|
|
var G3=Object.defineProperty;var Z3=(r,e,t)=>e in r?G3(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Xt=(r,e,t)=>(Z3(r,typeof e!="symbol"?e+"":e,t),t);import{g as Ai,d as Oc,E as En,I as eo,Q as QO,Y as JO,O as eP,U as Y3,S as X3,J as Bt,r as Ii,w as dl,n as fp,D as tP,G as Oa,H as pu,K as js,a0 as me,a1 as Q3,a2 as J3,B as Nw,b as kI,a3 as iP,a4 as nP,c as xI,F as Kp,L as lg,W as ez,A as tz,s as iz,l as nz,a5 as sz,h as Y_,v as X_,N as $h}from"./index-3c234266.js";import{t as KL,C as oz,L as rz}from"./index-08b117c0.js";import{A as II,_ as EI,B as sP,a as oP,b as az}from"./_plugin-vue_export-helper-a1ffee7e.js";import{I as lz,C as cz,c as dz,o as hz,s as uz,M as gz}from"./http-02c81b8c.js";import{l as f,i as ln,U as fz,a as Je,e as hl,b as Pn,m as rP,D as V,E as A,c as ts,d as Dh,f as pz,g as mz,h as _z,j as vz,k as aP,n as Mw,R as S,o as pp,p as In,q as lP,r as bz,s as Ro,t as gc,u as Ve,v as gs,w as _r,x as Hr,y as Es,C as T1,z as Ke,A as Cz,B as wz,F as Lt,T as TI,G as qb,H as Rw,I as cn,J as kh,K as ve,L as cP,M as qL,N as cd,O as dP,P as GL,Q as hP,S as Cn,V as Ao,W as Sz,X as N1,Y as yz,Z as A0,_ as wt,$ as Y,a0 as Lz,a1 as cg,a2 as Fn,a3 as oa,a4 as fc,a5 as NI,a6 as Gt,a7 as MI,a8 as ul,a9 as hr,aa as As,ab as mu,ac as Dz,ad as Ee,ae as kz,af as la,ag as Re,ah as xz,ai as hs,aj as gt,ak as Ts,al as ur,am as Iz,an as Yi,ao as Ct,ap as P,aq as Pl,ar as $s,as as RI,at as uP,au as M1,av as R1,aw as ue,ax as $d,ay as qp,az as Oo,aA as Ez,aB as gP,aC as Tz,aD as _u,aE as Q_,aF as Fl,aG as fP,aH as pc,aI as pP,aJ as Nz,aK as dg,aL as mP,aM as mc,aN as To,aO as Mz,aP as AI,aQ as Rz,aR as mp,aS as dn,aT as _p,aU as tr,aV as OI,aW as gr,aX as Az,aY as Gp,aZ as _P,a_ as vP,a$ as Oz,b0 as Pz,b1 as vu,b2 as A1,b3 as Fz,b4 as Bz,b5 as bP,b6 as CP,b7 as Wz,b8 as Vz,b9 as PI,ba as O1,bb as gb,bc as wP,bd as Hz,be as J_,bf as sd,bg as O0,bh as P1,bi as zz,bj as Fo,bk as Uz,bl as $z,bm as FI,bn as jz,bo as Za,bp as Kz,bq as SP,br as yP,bs as qz,bt as Gz,bu as Aw,bv as ZL,bw as LP,bx as Zp,by as Mn,bz as BI,bA as DP,bB as kP,bC as WI,bD as Zz,bE as ec,bF as Yz,bG as Xz,bH as Qz,bI as Jz,bJ as xP,bK as IP,bL as YL,bM as e4,bN as Yp,bO as t4,bP as Pc,bQ as st,bR as i4,bS as P0,bT as ev,bU as EP,bV as F1,bW as n4,bX as B1,bY as W1,bZ as s4,b_ as qg,b$ as Xs,c0 as d_,c1 as o4,c2 as TP,c3 as r4,c4 as NP,c5 as a4,c6 as l4,c7 as c4,c8 as d4,c9 as h4,ca as u4,cb as g4,cc as f4,cd as p4,ce as m4,cf as _4,cg as v4,ch as b4,ci as C4,cj as w4,ck as S4,cl as y4,cm as L4,cn as D4,co as k4,cp as x4,cq as I4,cr as E4,cs as T4,ct as N4,cu as M4,cv as MP,cw as R4,cx as A4,cy as O4,cz as P4,cA as F4,cB as B4,cC as W4,cD as V4,cE as Gg,cF as zi,cG as VI,cH as H4,cI as Ni,cJ as z4,cK as U4,cL as $4,cM as V1,cN as j4,cO as RP,cP as bu,cQ as AP,cR as Gb,cS as H1,cT as yo,cU as HI,cV as K4,cW as q4,cX as G4,cY as Z4,cZ as z1,c_ as XL,c$ as tc,d0 as Y4,d1 as X4,d2 as OP,d3 as PP,d4 as Q4,d5 as J4,d6 as eU}from"./editorWorker-3ed40424.js";import{u as FP,d as tU}from"./utils-ccf2ec76.js";import{c as iU}from"./componentList-d97405f6.js";import{u as nU,_ as sU}from"./index.vue_vue_type_style_index_0_lang-bef01711.js";import{d as oU}from"./defaultAmisConfig-97f3da4b.js";var rU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-1 - 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 KU extends ti{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(69,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:f("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:f("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[f("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),f("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),f("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:f("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:f("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:f("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:f("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:f("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:f("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:Le(t.enabled,this.defaultValue.enabled),autohide:Le(t.autohide,this.defaultValue.autohide),size:ki(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:ki(t.side,this.defaultValue.side,["right","left"]),showSlider:ki(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Le(t.renderCharacters,this.defaultValue.renderCharacters),scale:Dt.clampedInt(t.scale,1,1,3),maxColumn:Dt.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function qU(r){return r==="ctrlCmd"?Je?"metaKey":"ctrlKey":"altKey"}class GU extends ti{constructor(){super(80,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:f("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:f("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:Dt.clampedInt(t.top,0,0,1e3),bottom:Dt.clampedInt(t.bottom,0,0,1e3)}}}class ZU extends ti{constructor(){const e={enabled:!0,cycle:!0};super(81,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:f("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:f("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:Le(t.enabled,this.defaultValue.enabled),cycle:Le(t.cycle,this.defaultValue.cycle)}}}class YU extends h_{constructor(){super(136)}compute(e,t,i){return e.pixelRatio}}class XU extends ti{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off
`;gg.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])>
`;const Q1=typeof Buffer<"u";let H0;class jw{static wrap(e){return Q1&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new jw(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return Q1?this.buffer.toString():(H0||(H0=new TextDecoder),H0.decode(this.buffer))}}function T$(r,e){return r[e+0]<<0>>>0|r[e+1]<<8>>>0}function N$(r,e,t){r[t+0]=e&255,e=e>>>8,r[t+1]=e&255}function Yo(r,e){return r[e]*Math.pow(2,24)+r[e+1]*Math.pow(2,16)+r[e+2]*Math.pow(2,8)+r[e+3]}function Xo(r,e,t){r[t+3]=e,e=e>>>8,r[t+2]=e,e=e>>>8,r[t+1]=e,e=e>>>8,r[t]=e}function J1(r,e){return r[e]}function eN(r,e,t){r[t]=e}let z0;function GP(){return z0||(z0=new TextDecoder("UTF-16LE")),z0}let U0;function M$(){return U0||(U0=new TextDecoder("UTF-16BE")),U0}let $0;function ZP(){return $0||($0=lP()?GP():M$()),$0}function R$(r,e,t){const i=new Uint16Array(r.buffer,e,t);return t>0&&(i[0]===65279||i[0]===65534)?A$(r,e,t):GP().decode(i)}function A$(r,e,t){const i=[];let n=0;for(let s=0;s<t;s++){const o=T$(r,e);e+=2,i[n++]=String.fromCharCode(o)}return i.join("")}class Xg{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 ZP().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){const t=this._capacity-this._bufferLength;t<=1&&(t===0||In(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(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 Xb{constructor(e,t,i,n,s,o){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=s,this.reversedRegex=o,this._openSet=Xb._toSet(this.open),this._closeSet=Xb._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 O$(r){const e=r.length;r=r.map(o=>[o[0].toLowerCase(),o[1].toLowerCase()]);const t=[];for(let o=0;o<e;o++)t[o]=o;const i=(o,a)=>{const[l,c]=o,[d,h]=a;return l===d||l===h||c===d||c===h},n=(o,a)=>{const l=Math.min(o,a),c=Math.max(o,a);for(let d=0;d<e;d++)t[d]===c&&(t[d]=l)};for(let o=0;o<e;o++){const a=r[o];for(let l=o+1;l<e;l++){const c=r[l];i(a,c)&&n(t[o],t[l])}}const s=[];for(let o=0;o<e;o++){const a=[],l=[];for(let c=0;c<e;c++)if(t[c]===o){const[d,h]=r[c];a.push(d),l.push(h)}a.length>0&&s.push({open:a,close:l})}return s}class P${constructor(e,t){this._richEditBracketsBrand=void 0;const i=O$(t);this.brackets=i.map((n,s)=>new Xb(e,s,n.open,n.close,F$(n.open,n.close,i,s),B$(n.open,n.close,i,s))),this.forwardRegex=W$(this.brackets),this.reversedRegex=V$(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const s of n.open)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,s.length);for(const s of n.close)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,s.length)}}}function YP(r,e,t,i){for(let n=0,s=e.length;n<s;n++){if(n===t)continue;const o=e[n];for(const a of o.open)a.indexOf(r)>=0&&i.push(a);for(const a of o.close)a.indexOf(r)>=0&&i.push(a)}}function XP(r,e){return r.length-e.length}function Kw(r){if(r.length<=1)return r;const e=[],t=new Set;for(const i of r)t.has(i)||(e.push(i),t.add(i));return
`:e,l=a.length;let c=i.embeddedLanguageData,d=i.stack,h=0,u=null,g=!0;for(;g||h<l;){const p=h,m=d.depth,_=u?u.groups.length:0,b=d.state;let v=null,C=null,w=null,L=null,T=null;if(u){v=u.matches;const N=u.groups.shift();C=N.matched,w=N.action,L=u.rule,u.groups.length===0&&(u=null)}else{if(!g&&h>=l)break;g=!1;let N=this._lexer.tokenizer[b];if(!N&&(N=ov(this._lexer,b),!N))throw Ot(this._lexer,"tokenizer state is not defined: "+b);const R=a.substr(h);for(const B of N)if((h===0||!B.matchOnlyAtLineStart)&&(v=R.match(B.regex),v)){C=v[0],w=B.action;break}}if(v||(v=[""],C=""),w||(h<l&&(v=[a.charAt(h)],C=v[0]),w=this._lexer.defaultToken),C===null)break;for(h+=C.length;z5(w)&&mN(w)&&w.test;)w=w.test(C,v,b,h===l);let y=null;if(typeof w=="string"||Array.isArray(w))y=w;else if(w.group)y=w.group;else if(w.token!==null&&w.token!==void 0){if(w.tokenSubst?y=Vl(this._lexer,w.token,C,v,b):y=w.token,w.nextEmbedded)if(w.nextEmbedded==="@pop"){if(!c)throw Ot(this._lexer,"cannot pop embedded language if not inside one");c=null}else{if(c)throw Ot(this._lexer,"cannot enter embedded language from within an embedded language");T=Vl(this._lexer,w.nextEmbedded,C,v,b)}if(w.goBack&&(h=Math.max(0,h-w.goBack)),w.switchTo&&typeof w.switchTo=="string"){let N=Vl(this._lexer,w.switchTo,C,v,b);if(N[0]==="@"&&(N=N.substr(1)),ov(this._lexer,N))d=d.switchTo(N);else throw Ot(this._lexer,"trying to switch to a state '"+N+"' that is undefined in rule: "+this._safeRuleName(L))}else{if(w.transform&&typeof w.transform=="function")throw Ot(this._lexer,"action.transform not supported");if(w.next)if(w.next==="@push"){if(d.depth>=this._lexer.maxStack)throw Ot(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(b)}else if(w.next==="@pop"){if(d.depth<=1)throw Ot(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(L));d=d.pop()}else if(w.next==="@popall")d=d.popall();else{let N=Vl(this._lexer,w.next,C,v,b);if(N[0]==="@"&&(N=N.substr(1)),ov(this._lexer,N))d=d.push(N);else throw Ot(this._lexer,"trying to set a next state '"+N+"' that is undefined in rule: "+this._safeRuleName(L))}}w.log&&typeof w.log=="string"&&U5(this._lexer,this._lexer.languageId+": "+Vl(this._lexer,w.log,C,v,b))}if(y===null)throw Ot(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(L));const D=N=>{const R=this._languageService.getLanguageIdByLanguageName(N)||this._languageService.getLanguageIdByMimeType(N)||N,B=this._getNestedEmbeddedLanguageData(R);if(h<l){const U=e.substr(h);return this._nestedTokenize(U,t,Hl.create(d,B),n+h,s)}else return Hl.create(d,B)};if(Array.isArray(y)){if(u&&u.groups.length>0)throw Ot(this._lexer,"groups cannot be nested: "+this._safeRuleName(L));if(v.length!==y.length+1)throw Ot(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(L));let N=0;for(let R=1;R<v.length;R++)N+=v[R].length;if(N!==C.length)throw Ot(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(L));u={rule:L,matches:v,groups:[]};for(let R=0;R<y.length;R++)u.groups[R]={action:y[R],matched:v[R+1]};h-=C.length;continue}else{if(y==="@rematch"&&(h-=C.length,C="",v=null,y="",T!==null))return D(T);if(C.length===0){if(l===0||m!==d.depth||b!==d.state||(u?u.groups.length:0)!==_)continue;throw Ot(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(L))}let N=null;if(mF(y)&&y.indexOf("@brackets")===0){const R=y.substr(9),B=G5(this._lexer,C);if(!B)throw Ot(this._lexer,"@brackets token returned but no bracket defined as: "+C);N=_N(B.token+R)}else{const R=y===""?"":y+this._lexer.tokenPostfix;N=_N(R)}p<o&&s.emit(p+n,N)}if(T!==null)return D(T)}return Hl.create(d,c)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new Su(e,pg);e!==this._languageId&&(Gt.getOrCreate(e),this._embeddedLanguages[e]=!0);const t=Gt.get(e);return t?new Su(e,t.getInitialState()):new Su(e,pg)}};Jp=j5([K5(4,at)],Jp);function G5(r,e){if(!e)return null;e=nc(r,e);const t=r.brackets;for(const i of t){i
`)}}const nS=new v8;Kt.add(WF.ColorContribution,nS);function b8(r){return r===null||typeof r.hcLight>"u"&&(r.hcDark===null||typeof r.hcDark=="string"?r.hcLight=r.hcDark:r.hcLight=r.light),r}function E(r,e,t,i,n){return nS.registerColor(r,b8(e),t,i,n)}const J=E("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},f("foreground","Overall foreground color. This color is only used if not overridden by a component."));E("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},f("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));const C8=E("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},f("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));E("descriptionForeground",{light:"#717171",dark:pe(J,.7),hcDark:pe(J,.7),hcLight:pe(J,.7)},f("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));const lv=E("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},f("iconForeground","The default color for icons in the workbench.")),Ns=E("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},f("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),et=E("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},f("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),Pt=E("contrastActiveBorder",{light:null,dark:null,hcDark:Ns,hcLight:Ns},f("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));E("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},f("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."));E("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:W.black,hcLight:"#292929"},f("textSeparatorForeground","Color for text separators."));const w8=E("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},f("textLinkForeground","Foreground color for links in text."));E("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},f("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));E("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},f("textPreformatForeground","Foreground color for preformatted text segments."));E("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},f("textBlockQuoteBackground","Background color for block quotes in text."));E("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:W.white,hcLight:"#292929"},f("textBlockQuoteBorder","Border color for block quotes in text."));E("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:W.black,hcLight:"#F2F2F2"},f("textCodeBlockBackground","Background color for code blocks in text."));const Qr=E("widget.shadow",{dark:pe(W.black,.36),light:pe(W.black,.16),hcDark:null,hcLight:null},f("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),uE=E("widget.border",{dark:null,light:null,hcDark:et,hcLight:et},f("widgetBorder","Border color of widgets such as find/replace inside the editor.")),VF=E("input.background",{dark:"#3C3C3C",light:W.white,hcDark:W.black,hcLight:W.white},f("inputBoxBackground","Input box background.")),HF=E("input.foreground",{dark:J,light:J,hcDark:J,hcLight:J},f("inputBoxForeground","Input box foreground.")),zF=E("input.border",{dark:null,light:null,hcDark:et,hcLight:et},f("inputBoxBorder","Input box border.")),gE=E("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:et,hcLight:
${a}: ${o};`}return i+=`}`,i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function iK(r){return r.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class v_ extends V{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 s=e[i];switch(s.type){case 0:this.onCompositionStart(s)&&(t=!0);break;case 1:this.onCompositionEnd(s)&&(t=!0);break;case 2:this.onConfigurationChanged(s)&&(t=!0);break;case 3:this.onCursorStateChanged(s)&&(t=!0);break;case 4:this.onDecorationsChanged(s)&&(t=!0);break;case 5:this.onFlushed(s)&&(t=!0);break;case 6:this.onFocusChanged(s)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(s)&&(t=!0);break;case 8:this.onLineMappingChanged(s)&&(t=!0);break;case 9:this.onLinesChanged(s)&&(t=!0);break;case 10:this.onLinesDeleted(s)&&(t=!0);break;case 11:this.onLinesInserted(s)&&(t=!0);break;case 12:this.onRevealRangeRequest(s)&&(t=!0);break;case 13:this.onScrollChanged(s)&&(t=!0);break;case 15:this.onTokensChanged(s)&&(t=!0);break;case 14:this.onThemeChanged(s)&&(t=!0);break;case 16:this.onTokensColorsChanged(s)&&(t=!0);break;case 17:this.onZonesChanged(s)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(s)}}t&&(this._shouldRender=!0)}}class Ws extends v_{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class da{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 s=new Uint8Array(n);for(let o=0;o<n;o++)s[o]=i[n-o-1];return s}}class nK{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,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class sK extends nK{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 oK{constructor(e,t,i){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i}}class rS{static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i<n;i++){const s=e[i];t[i]=new rS(s.left,s.width)}return t}constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}toString(){return`[${this.left},${this.width}]`}}class Td{constructor(e,t){this._float
target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?Di.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return kn.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return kn.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,t,i,n){return kn.createMargin(e,this.target,this._getMouseColumn(t),t,i,n)}fulfillViewZone(e,t,i){return kn.createViewZone(e,this.target,this._getMouseColumn(t),t,i)}fulfillContentText(e,t,i){return kn.createContentText(this.target,this._getMouseColumn(e),e,t,i)}fulfillContentEmpty(e,t){return kn.createContentEmpty(this.target,this._getMouseColumn(e),e,t)}fulfillContentWidget(e){return kn.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return kn.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return kn.createOverlayWidget(this.target,this._getMouseColumn(),e)}withTarget(e){return new CE(this._ctx,this.editorPos,this.pos,this.relativePos,e)}}const GN={isAfterLines:!0};function oy(r){return{isAfterLines:!1,horizontalDistanceToText:r}}class tn{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=da.collect(t,this._viewHelper.viewDomNode);return!!(mo.isChildOfContentWidgets(i)||mo.isChildOfOverflowingContentWidgets(i)||mo.isChildOfOverlayWidgets(i))}createMouseTarget(e,t,i,n,s){const o=new Sg(this._context,this._viewHelper,e),a=new CE(o,t,i,n,s);try{const l=tn._createMouseTarget(o,a,!1);if(l.type===6&&o.stickyTabStops&&l.position!==null){const c=tn._snapToSoftTabBoundary(l.position,o.viewModel),d=S.fromPositions(c,c).plusRange(l.range);return a.fulfillContentText(c,d,l.detail)}return l}catch{return a.fulfillUnknown()}}static _createMouseTarget(e,t,i){if(t.target===null){if(i)return t.fulfillUnknown();const o=tn._doHitTest(e,t);return o.type===1?tn.createMouseTargetFromHitTestPosition(e,t,o.spanNode,o.position,o.injectedText):this._createMouseTarget(e,t.withTarget(o.hitTarget),!0)}const n=t;let s=null;return s=s||tn._hitTestContentWidget(e,n),s=s||tn._hitTestOverlayWidget(e,n),s=s||tn._hitTestMinimap(e,n),s=s||tn._hitTestScrollbarSlider(e,n),s=s||tn._hitTestViewZone(e,n),s=s||tn._hitTestMargin(e,n),s=s||tn._hitTestViewCursor(e,n),s=s||tn._hitTestTextArea(e,n),s=s||tn._hitTestViewLines(e,n,i),s=s||tn._hitTestScrollbar(e,n),s||t.fulfillUnknown()}static _hitTestContentWidget(e,t){if(mo.isChildOfContentWidgets(t.targetPath)||mo.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillContentWidget(i):t.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,t){if(mo.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,s=t.mouseVerticalOffset;for(const o of i){if(n<o.contentLeft||n>o.contentLeft+o.width)continue;const a=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(a<=s&&s<=a+o.height)return t.fulfillContentText(o.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 mo.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.mous
`,s+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($d(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min(qp(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(n,e.value.length-s);const o=t.value.substring(n,t.value.length-s),a=e.selectionStart-n,l=e.selectionEnd-n,c=t.selectionStart-n,d=t.selectionEnd-n;if(c===d){const u=e.selectionStart-n;return{text:o,replacePrevCharCnt:u,replaceNextCharCnt:0,positionDelta:0}}const h=l-a;return{text:o,replacePrevCharCnt:h,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($d(e.value,t.value),e.selectionEnd),n=Math.min(qp(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),o=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:o,replacePrevCharCnt:a,replaceNextCharCnt:s.length-a,positionDelta:l-o.length}}}Ki.EMPTY=new Ki("",0,0,null,void 0);class Tu{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new S(n,1,s+1,1)}static fromEditorSelection(e,t,i,n){const o=Tu._getPageOfLine(t.startLineNumber,i),a=Tu._getRangeForPage(o,i),l=Tu._getPageOfLine(t.endLineNumber,i),c=Tu._getRangeForPage(l,i);let d=a.intersectRanges(new S(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(d,1)>500){const b=e.modifyPosition(d.getEndPosition(),-500);d=S.fromPositions(b,d.getEndPosition())}const h=e.getValueInRange(d,1),u=e.getLineCount(),g=e.getLineMaxColumn(u);let p=c.intersectRanges(new S(t.endLineNumber,t.endColumn,u,g));if(n&&e.getValueLengthInRange(p,1)>500){const b=e.modifyPosition(p.getStartPosition(),500);p=S.fromPositions(p.getStartPosition(),b)}const m=e.getValueInRange(p,1);let _;if(o===l||o+1===l)_=e.getValueInRange(t,1);else{const b=a.intersectRanges(t),v=c.intersectRanges(t);_=e.getValueInRange(b,1)+String.fromCharCode(8230)+e.getValueInRange(v,1)}return n&&_.length>2*500&&(_=_.substring(0,500)+String.fromCharCode(8230)+_.substring(_.length-500,_.length)),new Ki(h+_+m,h.length,h.length+_.length,t,d.endLineNumber-d.startLineNumber)}}var hC;(function(r){r.Tap="-monaco-textarea-synthetic-tap"})(hC||(hC={}));const DD={forceCopyWithSyntaxHighlighting:!1};class dm{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)}}dm.INSTANCE=new dm;class EK{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 TK extends V{get textAreaState(){return this._textAreaState}constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new A),this.onFocus=this._onFocus.event,this._onBlur=this._register(new A),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new A),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new A),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new A),this.onCut=this._onCut.event,this._onPaste=this._register(new A),this.onPaste=this._onPaste.event,this._onType=this._register(new A),this.onType=this._onType.event,this._onCompositionStart=this._register(new A),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new A),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new A),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new A),this.onSelectionChang
`):t.text,i),e.preventDefault(),e.clipboardData&&XN.setTextData(e.clipboardData,t.text,t.html,i)}}class XN{static getTextData(e){const t=e.getData(Qn.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(o=>o.name).join(``),null]:[t,i]}static setTextData(e,t,i,n){e.setData(Qn.text,t),typeof i=="string"&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}}class NK extends V{constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new Qe(this._actual,"keydown")).event,this.onKeyUp=this._register(new Qe(this._actual,"keyup")).event,this.onCompositionStart=this._register(new Qe(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new Qe(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new Qe(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new Qe(this._actual,"beforeinput")).event,this.onInput=this._register(new Qe(this._actual,"input")).event,this.onCut=this._register(new Qe(this._actual,"cut")).event,this.onCopy=this._register(new Qe(this._actual,"copy")).event,this.onPaste=this._register(new Qe(this._actual,"paste")).event,this.onFocus=this._register(new Qe(this._actual,"focus")).event,this.onBlur=this._register(new Qe(this._actual,"blur")).event,this._onSyntheticTap=this._register(new A),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>Gl.onKeyDown())),this._register(this.onBeforeInput(()=>Gl.onBeforeInput())),this._register(this.onInput(()=>Gl.onInput())),this._register(this.onKeyUp(()=>Gl.onKeyUp())),this._register(j(this._actual,hC.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=Gd(this._actual);return e?e.activeElement===this._actual:lE(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 s=null;const o=Gd(n);o?s=o.activeElement:s=document.activeElement;const a=s===n,l=n.selectionStart,c=n.selectionEnd;if(a&&l===t&&c===i){no&&window.parent!==window&&n.focus();return}if(a){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),no&&window.parent!==window&&n.focus();return}try{const d=Vj(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),Hj(n,d)}catch{}}}class MK extends yE{constructor(e,t,i){super(e,t,i),this._register(kt.addTarget(this.viewHelper.linesContentDomNode)),this._register(j(this.viewHelper.linesContentDomNode,xt.Tap,s=>this.onTap(s))),this._register(j(this.viewHelper.linesContentDomNode,xt.Change,s=>this.onChange(s))),this._register(j(this.viewHelper.linesContentDomNode,xt.Contextmenu,s=>this._onContextMenu(new Cc(s,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(j(this.viewHelper.linesContentDomNode,"pointerdown",s=>{const o=s.pointerType;if(o==="mouse"){this._lastPointerType="mouse";return}else o==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const n=new J6(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,s=>this._onMouseMove(s))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(s,o)=>this._onMouseDown(s,o)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new Cc(e,!1,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,revealTy
`),v=_.substring(b+1),C=v.lastIndexOf(" "),w=v.length-C-1,L=u.getStartPosition(),T=Math.min(L.column-1,w),y=L.column-1-T,D=v.substring(0,v.length-T),{tabSize:N}=this._context.viewModel.model.getOptions(),R=l9(D,this._fontInfo,N);return{distanceToModelLineStart:y,widthOfHiddenTextBefore:R}})(),{distanceToModelLineEnd:m}=(()=>{const _=h.value.substring(Math.max(h.selectionStart,h.selectionEnd)),b=_.indexOf(``),v=b===-1?_:_.substring(0,b),C=v.indexOf(" "),w=C===-1?v.length:v.length-C-1,L=u.getEndPosition(),T=Math.min(this._context.viewModel.model.getLineMaxColumn(L.lineNumber)-L.column,w);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(L.lineNumber)-L.column-T}})();this._context.viewModel.revealRange("keyboard",!0,S.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new r9(this._context,u.startLineNumber,g,p,m),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Nd} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(d=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${Nd}`),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)})),this._register(gC.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(e){this._textAreaInput.writeScreenReaderContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),n=Oo(t);let s=!0,o=e.column,a=!0,l=e.column,c=0;for(;c<50&&(s||a);){if(s&&o<=1&&(s=!1),s){const d=i.charCodeAt(o-2);n.get(d)!==0?s=!1:o--}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(o-1,l-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=Oo(this._context.configuration.options.get(124));let n=e.column,s=0;for(;n>1;){const o=t.charCodeAt(n-2);if(i.get(o)!==0||s>50)return t.substring(n-1,e.column-1);s++,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(!In(i.charCodeAt(0)))return i}return""}_getAriaLabel(e){return e.get(2)===1?f("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",ln?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===yr.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const n=e.get(138).wrappingColumn;if(n!==-1&&this._accessibilitySupport!==1){const s=e.get(47);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(n*s.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=ay?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(138);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(47),this._lineHeight=t.get(63),this._emptySelectionClipboard=t.get(34),this._copyWithSyntaxHighlighting=t.get(22),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${n*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(118))),(e.hasChanged(31)||e.hasChanged(86))&&this._ensureReadOnlyAttribute(),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._textAreaInp`,i+1),i===-1)break;t++}while(!0);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:ay?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;Xi(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?W.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(54)?i.setClassName("monaco-editor-background textAreaCover "+Xd.OUTER_CLASS_NAME):n.get(64).renderType!==0?i.setClassName("monaco-editor-background textAreaCover "+w_.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}}function l9(r,e,t){if(r.length===0)return 0;const i=document.createElement("div");i.style.position="absolute",i.style.top="-50000px",i.style.width="50000px";const n=document.createElement("span");Xi(n,e),n.style.whiteSpace="pre",n.style.tabSize=`${t*e.spaceWidth}px`,n.append(r),i.appendChild(n),document.body.appendChild(i);const s=n.offsetWidth;return document.body.removeChild(i),s}function c9(r,e,t){let i=0;for(let s=0;s<r.length;s++)r.charAt(s)===" "?i=Di.nextIndentTabStop(i,e):i++;let n="";if(!t){const s=Math.floor(i/e);i=i%e;for(let o=0;o<s;o++)n+=" "}for(let s=0;s<i;s++)n+=" ";return n}function fC(r,e,t){let i=Fn(r);return i===-1&&(i=r.length),c9(r.substring(0,i),e,t)+r.substring(i)}const d9=()=>!0,h9=()=>!1,u9=r=>r===" "||r===" ";class jh{static shouldRecreate(e){return e.hasChanged(138)||e.hasChanged(124)||e.hasChanged(34)||e.hasChanged(73)||e.hasChanged(75)||e.hasChanged(76)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(122)||e.hasChanged(47)||e.hasChanged(86)}constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const s=i.options,o=s.get(138),a=s.get(47);this.readOnly=s.get(86),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=s.get(110),this.lineHeight=a.lineHeight,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=s.get(122),this.wordSeparators=s.get(124),this.emptySelectionClipboard=s.get(34),this.copyWithSyntaxHighlighting=s.get(22),this.multiCursorMergeOverlapping=s.get(73),this.multiCursorPaste=s.get(75),this.multiCursorLimit=s.get(76),this.autoClosingBrackets=s.get(5),this.autoClosingQuotes=s.get(8),this.autoClosingDelete=s.get(6),this.autoClosingOvertype=s.get(7),this.autoSurround=s.get(11),this.autoIndent=s.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const l=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(l)for(const c of l)this.surroundingPairs[c.open]=c.close}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=$w(t,i-1),s=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return s?s.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return fC(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return u9;case"languageDefined":return this._getLanguageDefinedSh
* '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}}}}]},r.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"},r.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function t(i){if(!i.to)return null;let n;switch(i.to){case r.RawDirection.Left:n=0;break;case r.RawDirection.Right:n=1;break;case r.RawDirection.Up:n=2;break;case r.RawDirection.Down:n=3;break;case r.RawDirection.PrevBlankLine:n=4;break;case r.RawDirection.NextBlankLine:n=5;break;case r.RawDirection.WrappedLineStart:n=6;break;case r.RawDirection.WrappedLineFirstNonWhitespaceCharacter:n=7;break;case r.RawDirection.WrappedLineColumnCenter:n=8;break;case r.RawDirection.WrappedLineEnd:n=9;break;case r.RawDirection.WrappedLineLastNonWhitespaceCharacter:n=10;break;case r.RawDirection.ViewPortTop:n=11;break;case r.RawDirection.ViewPortBottom:n=13;break;case r.RawDirection.ViewPortCenter:n=12;break;case r.RawDirection.ViewPortIfOutside:n=14;break;default:return null}let s=0;switch(i.by){case r.RawUnit.Line:s=1;break;case r.RawUnit.WrappedLine:s=2;break;case r.RawUnit.Character:s=3;break;case r.RawUnit.HalfLine:s=4;break}return{direction:n,unit:s,select:!!i.select,value:i.value||1}}r.parse=t})(pC||(pC={}));function Gu(r,e,t,i){const n=Uu(e,t.startLineNumber,t.startColumn),s=i.getLanguageConfiguration(n.languageId);if(!s)return null;const o=n.getLineContent(),a=o.substr(0,t.startColumn-1-n.firstCharOffset);let l;t.isEmpty()?l=o.substr(t.startColumn-1-n.firstCharOffset):l=Uu(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-n.firstCharOffset);let c="";if(t.startLineNumber>1&&n.firstCharOffset===0){const m=Uu(e,t.startLineNumber-1);m.languageId===n.languageId&&(c=m.getLineContent())}const d=s.onEnter(r,c,a,l);if(!d)return null;const h=d.indentAction;let u=d.appendText;const g=d.removeText||0;u?h===bi.Indent&&(u=" "+u):h===bi.Indent||h===bi.IndentOutdent?u=" ":u="";let p=nF(e,t.startLineNumber,t.startColumn);return g&&(p=p.substring(0,p.length-g)),{indentAction:h,appendText:u,removeText:g,indentation:p}}var m9=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_9=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const cy=Object.create(null);function Qc(r,e){if(e<=0)return"";cy[r]||(cy[r]=["",r]);const t=cy[r];for(let i=t.length;i<=e;i++)t[i]=t[i-1]+r;return t[e]}let Ys=class kD{static unshiftIndent(e,t,i,n,s){const o=Di.visibleColumnFromColumn(e,t,i);if(s){const a=Qc(" ",n),c=Di.prevIndentTabStop(o,n)/n;return Qc(a,c)}else{const a=" ",c=Di.prevRenderTabStop(o,i)/i;return Qc(a,c)}}static shiftIndent(e,t,i,n,s){const o=Di.visibleColumnFromColumn(e,t,i);if(s){const a=Qc(" ",n),c=Di.nextIndentTabStop(o,n)/n;return Qc(a,c)}else{const a=" ",c=Di.nextRenderTabStop(o,i)/i;return Qc(a,c)}}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selection
`)!==n.length-1&&(s=!1),s){const h=new S(d.lineNumber,1,d.lineNumber,1);o[a]=new LE(h,n,c,!0)}else o[a]=new nn(c,n)}return new qn(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,i,n,s){if(n||t.length===1)return null;if(s&&s.length===t.length)return s;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 o=ul(i);if(o.length===t.length)return o}return null}static paste(e,t,i,n,s,o){const a=this._distributePasteToCursors(e,i,n,s,o);return a?(i=i.sort(S.compareRangesUsingStarts),this._distributedPaste(e,t,i,a)):this._simplePaste(e,t,i,n,s)}static _goodIndentForLine(e,t,i){let n=null,s="";const o=hS(e.autoIndent,t,i,!1,e.languageConfigurationService);if(o)n=o.action,s=o.indentation;else if(i>1){let a;for(a=i-1;a>=1;a--){const d=t.getLineContent(a);if(oa(d)>=0)break}if(a<1)return null;const l=t.getLineMaxColumn(a),c=Gu(e.autoIndent,t,new S(a,l,a,l),e.languageConfigurationService);c&&(s=c.indentation+c.appendText)}return n&&(n===bi.Indent&&(s=$t.shiftIndent(e,s)),n===bi.Outdent&&(s=$t.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="";const o=i.getStartPosition();if(e.insertSpaces){const a=e.visibleColumnFromColumn(t,o),l=e.indentSize,c=l-a%l;for(let d=0;d<c;d++)s+=" "}else s=" ";return new nn(i,s,n)}static tab(e,t,i){const n=[];for(let s=0,o=i.length;s<o;s++){const a=i[s];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[s]=new nn(new S(a.startLineNumber,1,a.startLineNumber,l.length+1),d,!0);continue}}n[s]=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[s]=this._replaceJumpToNextIndent(e,t,a,!1);continue}}n[s]=new Ys(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,s,o,a,l){const c=n.map(d=>this._compositionType(i,d,s,o,a,l));return new qn(4,c,{shouldPushStackElementBefore:pv(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,o){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+s),d=new S(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(d)===i&&o===0?null:new Sb(d,i,0,o)}static _typeCommand(e,t,i){return i?new gv(e,t,!0):new nn(e,t,!0)}static _enter(e,t,i,n){if(e.autoIndent===0)return $t._typeCommand(n,``,i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||e.autoIndent===1){const l=t.getLineContent(n.startLineNumber),c=Lt(l).substring(0,n.startColumn-1);return $t._typeCommand(n,``+e.normalizeIndentation(c),i)}const s=Gu(e.autoIndent,t,n,e.languageConfigurationService);if(s){if(s.indentAction===bi.None)return $t._typeCommand(n,``+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===bi.Indent)return $t._typeCommand(n,``+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===bi.IndentOutdent){const l=e.normalizeIndentation(s.indentation),c=e.normalizeIndentation(s.indentation+s.appendText),d=``+c+``+l;return i?new gv(n,d,!0):new Sb(n,d,-1,c.length-l.length,!0)}else if(s.indentAction===bi.Outdent){const l=$t.unshiftIndent(e,s.indentation);return $t._typeCommand(n,``+e.normalizeIndentation(l+s.appendText),i)}}const o=t.getLineContent(n.startLineNumber),a=Lt(o).substring(0,n.startColumn-1);if(e.autoIndent>=4){const l=w9(e.autoIndent,t,n,{unshiftIndent:c=>$t.unshiftIndent(e,c),shiftIndent:c=>$t.shiftIndent(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)},e.languageConfigurationService);if(l){let c=e.visibleColumnFromColumn(t,n.getEndPosition());const d=n.endColumn,h=t.getLineContent(n.endLineNumber),u=Fn(h);if(u>=0?n=n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,u+1)):n=n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new gv(n,``+e.normalizeIndentation(l.afterEnter),!0);{let g=0;return d<=u+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),g=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new Sb(n,``+e.normalizeIndentation(l.afterEnter),0,g,!0)}}}return $t._typeCommand(n,``+e.normalizeIndentation(a),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,s=i.length;n<s;n++)if(!t.tokenization.isCheapToTokenize(i[n].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,i,n){const s=nF(t,i.startLineNumber,i.startColumn),o=S9(e.autoIndent,t,i,n,{shiftIndent:a=>$t.shiftIndent(e,a),unshiftIndent:a=>$t.unshiftIndent(e,a)},e.languageConfigurationService);if(o===null)return null;if(o!==e.normalizeIndentation(s)){const a=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return a===0?$t._typeCommand(new S(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+n,!1):$t._typeCommand(new S(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+t.getLineContent(i.startLineNumber).substring(a-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,s){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let o=0,a=i.length;o<a;o++){const l=i[o];if(!l.isEmpty())return!1;const c=l.getPosition(),d=t.getLineContent(c.lineNumber);if(d.charAt(c.column-1)!==s)return!1;const u=Al(s);if((c.column>2?d.charCodeAt(c.column-2):0)===92&&u)return!1;if(e.autoClosingOvertype==="auto"){let p=!1;for(let m=0,_=n.length;m<_;m++){const b=n[m];if(c.lineNumber===b.startLineNumber&&c.column===b.startColumn){p=!0;break}}if(!p)return!1}}return!0}static _runAutoClosingOvertype(e,t,i,n,s){const o=[];for(let a=0,l=n.length;a<l;a++){const d=n[a].getPosition(),h=new S(d.lineNumber,d.column,d.lineNumber,d.column+1);o[a]=new nn(h,s)}return new qn(4,o,{shouldPushStackElementBefore:pv(e,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],s=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],o=n.some(l=>t.startsWith(l.open)),a=s.some(l=>t.startsWith(l.close));return!o&&a}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let o=null;for(const a of s)if(o===null||a.open.length>o.open.length){let l=!0;for(const c of i)if(t.getValueInRange(new S(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+n!==a.open){l=!1;break}l&&(o=a)}return o}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 s=null;for(const o of n)o.open!==t.open&&t.open.includes(o.open)&&t.close.endsWith(o.close)&&(!s||o.open.length>s.open.length)&&(s=o);return s}static _getAutoClosingPairClose(e,t,i,n,s){const o=Al(n),a=o?e.autoClosingQuotes:e.autoClosingBrackets,l=o?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if(a==="never")return null;for(const p of i)if(!p.isEmpty())return null;const c=i.map(p=>{const m=p.getPosition();return s?{lineNumber:m.lineNumber,beforeColumn:m.column-n.length,afterColumn:m.column}:{lineNumber:m.lineNumber,beforeColumn:m.column,afterColumn:m.column}}),d=this._findAutoClosingPairOpen(e,t,c.map(p=>new P(p.lineNumber,p.beforeColumn)),n);if(!d)return null;const h=this._findContainedAutoClosingPair(e,d),u=h?h.close:"";let g=!0;for(const p of c){const{lineNumber:m,beforeColumn:_,afterColumn:b}=p,v=t.getLineContent(m),C=v.substring(0,_-1),w=v.substring(b-1);if(w.startsWith(u)||(g=!1),w.length>0){const D=w.charAt(0);if(!$t._isBeforeClosingBrace(e,w)&&!l(D))return null}if(d.open.length===1&&(n==="'"||n==='"')&&a!=="always"){const D=Oo(e.wordSeparators);if(C.length>0){const N=C.charCodeAt(C.length-1);if(D.get(N)===0)return null}}if(!t.tokenization.isCheapToTokenize(m))return null;t.tokenization.forceTokenization(m);const L=t.tokenization.getLineTokens(m),T=$w(L,_-1);if(!d.shouldAutoClose(T,_-T.firstCharOffset))return null;const y=d.findNeutralCharacter();if(y){const D=t.tokenization.getTokenTypeIfInsertingCharacter(m,_,y);if(!d.isOK(D))return null}}return g?d.close.substring(0,d.close.length-u.length):d.close}static _runAutoClosingOpenCharType(e,t,i,n,s,o,a){const l=[];for(let c=0,d=n.len
`){const d=[];for(let h=0,u=s.length;h<u;h++)d[h]=$t._enter(i,n,!1,s[h]);return new qn(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(i,n,s)){const d=[];let h=!1;for(let u=0,g=s.length;u<g;u++)if(d[u]=this._runAutoIndentType(i,n,s[u],a),!d[u]){h=!0;break}if(!h)return new qn(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(i,n,s,o,a))return this._runAutoClosingOvertype(t,i,n,s,a);if(!e){const d=this._getAutoClosingPairClose(i,n,s,a,!1);if(d)return this._runAutoClosingOpenCharType(t,i,n,s,a,!1,d)}if(!e&&this._isSurroundSelectionType(i,n,s,a))return this._runSurroundSelectionType(t,i,n,s,a);if(!e&&this._isTypeInterceptorElectricChar(i,n,s)){const d=this._typeInterceptorElectricChar(t,i,n,s[0],a);if(d)return d}const l=[];for(let d=0,h=s.length;d<h;d++)l[d]=new nn(s[d],a);const c=dy(a,t);return new qn(c,l,{shouldPushStackElementBefore:pv(t,c),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,i,n,s){const o=[];for(let l=0,c=n.length;l<c;l++)o[l]=new nn(n[l],s);const a=dy(s,e);return new qn(a,o,{shouldPushStackElementBefore:pv(e,a),shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,o=i.length;s<o;s++){let a=i[s].positionLineNumber;if(a===1)n[s]=new gv(new S(1,1,1,1),``);else{a--;const l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new S(a,l,a,l))}}return n}static lineInsertAfter(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,o=i.length;s<o;s++){const a=i[s].positionLineNumber,l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new S(a,l,a,l))}return n}static lineBreakInsert(e,t,i){const n=[];for(let s=0,o=i.length;s<o;s++)n[s]=this._enter(e,t,!0,i[s]);return n}}class pB extends Sb{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 S(n.startLineNumber,n.endColumn-this._closeCharacter.length,n.endLineNumber,n.endColumn),this.enclosingRange=new S(n.startLineNumber,n.endColumn-this._openCharacter.length-this._closeCharacter.length,n.endLineNumber,n.endColumn),super.computeCursorState(e,t)}}class y9{constructor(e,t,i,n,s,o){this.deletedText=e,this.deletedSelectionStart=t,this.deletedSelectionEnd=i,this.insertedText=n,this.insertedSelectionStart=s,this.insertedSelectionEnd=o}}function dy(r,e){return r===" "?e===5||e===6?6:5:4}function pv(r,e){return eM(r)&&!eM(e)?!0:r===5?!1:JN(r)!==JN(e)}function JN(r){return r===6||r===5?"space":r}function eM(r){return r===4||r===5||r===6}var I;(function(r){r.editorSimpleInput=new le("editorSimpleInput",!1,!0),r.editorTextFocus=new le("editorTextFocus",!1,f("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),r.focus=new le("editorFocus",!1,f("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),r.textInputFocus=new le("textInputFocus",!1,f("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),r.readOnly=new le("editorReadonly",!1,f("editorReadonly","Whether the editor is read only")),r.inDiffEditor=new le("inDiffEditor",!1,f("inDiffEditor","Whether the context is a diff editor")),r.columnSelection=new le("editorColumnSelection",!1,f("editorColumnSelection","Whether `editor.columnSelection` is enabled")),r.writable=r.readOnly.toNegated(),r.hasNonEmptySelection=new le("editorHasSelection",!1,f("editorHasSelection","Whether the editor has text selected")),r.hasOnlyEmptySelection=r.hasNonEmptySelection.toNegated(),r.hasMultipleSelections=new le("editorHasMultipleSelections",!1,f("editorHasMultipleSelections","Whether the editor has multiple selections")),r.hasSingleSelection=r.hasMultipleSelections.toNegated(),r.tabMovesFocus=new le("editorTabMovesFocus",!1,f("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),r.tabDoesNotMoveFocus=r.tabMovesFocus.toNegated(),r.isInWalkThroughSnippet=new le("isInEmbeddedEditor",!1,!0),r.canUndo=new le("canUndo",!1,!0),r.canRedo=new le("canRedo",!1,!0),r.hoverVisible=new le("editorHoverVisible",!1,f("editorHoverVisible","Whether the editor hover is visible")),r.inCompositeEditor=new le("inCompositeEditor",void 0,f("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),r.notInCompositeEditor=r.inCompositeEditor.toNegated(),r.languageId=new le("editorLangId","",f("editorLangId","The language identifier of the editor")),r.hasCompletionItemProvider=new le("editorHasCompletionItemProvider",!1,f("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),r.hasCodeActionsProvider=new le("editorHasCodeActionsProvider",!1,f("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),r.hasCodeLensProvider=new le("editorHasCodeLensProvider",!1,f("editorHasCodeLensProvider","Whether the editor has a code lens provider")),r.hasDefinitionProvider=new le("editorHasDefinitionProvider",!1,f("editorHasDefinitionProvider","Whether the editor has a definition provider")),r.hasDeclarationProvider=new le("editorHasDeclarationProvider",!1,f("editorHasDeclarationProvider","Whether the editor has a declaration provider")),r.hasImplementationProvider=new le("editorHasImplementationProvider",!1,f("editorHasImplementationProvid
`,"gi"):null,s=[];let o,a=0,l=0,c=0,d=0;const h=[];for(let p=0;p<60;p++)h.push(new Ul(hi(0,p),0,-1,yi.getEmpty(),new du(hi(0,p))));const u=[];for(let p=0;p<60;p++)u.push(new Ul(hi(1,p),0,-1,yi.getEmpty(),new du(hi(1,p))));if(n)for(n.lastIndex=0;(o=n.exec(e))!==null;){const p=o.index,m=o[0];if(m===``)a++,l=p+1;else{if(c!==p){let _;if(d===a){const b=p-c;if(b<h.length)_=h[b];else{const v=hi(0,b);_=new Ul(v,0,-1,yi.getEmpty(),new du(v))}}else{const b=a-d,v=p-l;if(b===1&&v<u.length)_=u[v];else{const C=hi(b,v);_=new Ul(C,0,-1,yi.getEmpty(),new du(C))}}s.push(_)}s.push(t.getToken(m)),c=p+m.length,d=a}}const g=e.length;if(c!==g){const p=d===a?hi(0,g-c):hi(a-d,g-l);s.push(new Ul(p,0,-1,yi.getEmpty(),new du(p)))}this.length=hi(a,g-l),this.tokens=s}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new Rz}}class TE{static createFromLanguage(e,t){function i(s){return t.getKey(`${s.languageId}:::${s.bracketText}`)}const n=new Map;for(const s of e.bracketsNew.openingBrackets){const o=hi(0,s.bracketText.length),a=i(s),l=yi.getEmpty().add(a,fM);n.set(s.bracketText,new Ul(o,1,a,l,CC.create(o,s,l)))}for(const s of e.bracketsNew.closingBrackets){const o=hi(0,s.bracketText.length);let a=yi.getEmpty();const l=s.getOpeningBrackets();for(const c of l)a=a.add(i(c),fM);n.set(s.bracketText,new Ul(o,2,i(l[0]),a,CC.create(o,s,a)))}return new TE(n)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>I7(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 I7(r){let e=Ro(r);return/^[\w ]+/.test(r)&&(e=`\\b${e}`),/[\w ]+$/.test(r)&&(e=`${e}\\b`),e}class DB{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=TE.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function E7(r){if(r.length===0)return null;if(r.length===1)return r[0];let e=0;function t(){if(e>=r.length)return null;const o=e,a=r[o].listHeight;for(e++;e<r.length&&r[e].listHeight===a;)e++;return e-o>=2?kB(o===0&&e===r.length?r:r.slice(o,e),!1):r[o]}let i=t(),n=t();if(!n)return i;for(let o=t();o;o=t())pM(i,n)<=pM(n,o)?(i=py(i,n),n=o):n=py(n,o);return py(i,n)}function kB(r,e=!1){if(r.length===0)return null;if(r.length===1)return r[0];let t=r.length;for(;t>3;){const i=t>>1;for(let n=0;n<i;n++){const s=n<<1;r[n]=ha.create23(r[s],r[s+1],s+3===t?r[s+2]:null,e)}t=i}return ha.create23(r[0],r[1],t>=3?r[2]:null,e)}function pM(r,e){return Math.abs(r.listHeight-e.listHeight)}function py(r,e){return r.listHeight===e.listHeight?ha.create23(r,e,null,!1):r.listHeight>e.listHeight?T7(r,e):N7(e,r)}function T7(r,e){r=r.toMutable();let t=r;const i=[];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 s=i.length-1;s>=0;s--){const o=i[s];n?o.childrenLength>=3?n=ha.create23(o.unappendChild(),n,null,!1):(o.appendChildOfSameHeight(n),n=void 0):o.handleChildrenChanged()}return n?ha.create23(r,n,null,!1):r}function N7(r,e){r=r.toMutable();let t=r;const i=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){const o=i[s];n?o.childrenLength>=3?n=ha.create23(n,o.unprependChild(),null,!1):(o.prependChildOfSameHeight(n),n=void 0):o.handleChildrenChanged()}return n?ha.create23(n,r,null,!1):r}class M7{constructor(e){this.lastOffset=vn,this.nextNodes=[e],this.offsets=[vn],this.idxs=[]}readLongestNodeAt(e,t){if(Yu(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=Df(this.nextNodes);if(!i)return;const n=Df(this.offsets);if(Yu(e,n))return;if(Yu(n,e))if(jt(n,i.length)<=e)this.nextNodeAfterCurre
`?0:1}function Ha(r){return r?r instanceof MB||r instanceof G7:!1}class ME{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Ha(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Ha(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(Ha(i)&&i.canAppend(this._model))return i;const n=new MB(f("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(n,t),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],AD(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const s=this._getOrCreateEditStackElement(e,n),o=this._model.applyEdits(t,!0),a=ME._computeCursorState(i,o),l=o.map((c,d)=>({index:d,textChange:c.textChange}));return l.sort((c,d)=>c.textChange.oldPosition===d.textChange.oldPosition?c.index-d.index:c.textChange.oldPosition-d.textChange.oldPosition),s.append(this._model,l.map(c=>c.textChange),AD(this._model),this._model.getAlternativeVersionId(),a),a}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return Ve(i),null}}}class Z7{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Y7(r,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s<e&&s<i;s++){const u=r.charCodeAt(s),g=t.charCodeAt(s);if(u!==g)break}let o=0,a=0;for(let u=s;u<e;u++)r.charCodeAt(u)===32?o++:a++;let l=0,c=0;for(let u=s;u<i;u++)t.charCodeAt(u)===32?l++:c++;if(o>0&&a>0||l>0&&c>0)return;const d=Math.abs(a-c),h=Math.abs(o-l);if(d===0){n.spacesDiff=h,h>0&&0<=l-1&&l-1<r.length&&l<t.length&&t.charCodeAt(l)!==32&&r.charCodeAt(l-1)===32&&r.charCodeAt(r.length-1)===44&&(n.looksLikeAlignment=!0);return}if(h%d===0){n.spacesDiff=h/d;return}}function SM(r,e,t){const i=Math.min(r.getLineCount(),1e4);let n=0,s=0,o="",a=0;const l=[2,4,6,8,3,5,7],c=8,d=[0,0,0,0,0,0,0,0,0],h=new Z7;for(let p=1;p<=i;p++){const m=r.getLineLength(p),_=r.getLineContent(p),b=m<=65536;let v=!1,C=0,w=0,L=0;for(let y=0,D=m;y<D;y++){const N=b?_.charCodeAt(y):r.getLineCharCode(p,y);if(N===9)L++;else if(N===32)w++;else{v=!0,C=y;break}}if(!v||(L>0?n++:w>1&&s++,Y7(o,a,_,C,h),h.looksLikeAlignment&&!(t&&e===h.spacesDiff)))continue;const T=h.spacesDiff;T<=c&&d[T]++,o=_,a=C}let u=t;n!==s&&(u=n<s);let g=e;if(u){let p=u?0:.1*i;l.forEach(m=>{const _=d[m];_>p&&(p=_,g=m)}),g===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(g=2)}return{insertSpaces:u,tabSize:g}}function Gn(r){return(r.metadata&1)>>>0}function At(r,e){r.metadata=r.metadata&254|e<<0}function an(r){return(r.metadata&2)>>>1===1}function Mt(r,e){r.metadata=r.metadata&253|(e?1:0)<<1}function RB(r){return(r.metadata&4)>>>2===1}function yM(r,e){r.metadata=r.metadata&251|(e?1:0)<<2}function X7(r){return(r.metadata&24)>>>3}function LM(r,e){r.metadata=r.metadata&231|e<<3}function Q7(r){return(r.metadata&32)>>>5===1}function DM(r,e){r.metadata=r.metadata&223|(e?1:0)<<5}class AB{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,At(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,yM(this,!1),LM(this,1),DM(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,Mt(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;yM(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),LM(this,this.options.stickiness),DM(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 AB(null,0,0);Ge.parent=Ge;Ge.left=Ge;Ge.right=Ge;At(Ge,0);class vy{constructor(){this.root=Ge,
`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(n,s-1)===13){const m=this.positionInBuffer(n,s-1);this.deleteNodeTail(n,m),t="\r"+t,n.piece.length===0&&d.push(n)}else this.deleteNodeTail(n,c);else this.deleteNodeTail(n,c);const u=this.createNewPieces(t);h.length>0&&this.rbInsertRight(n,h);let g=n;for(let p=0;p<u.length;p++)g=this.rbInsertRight(g,u[p]);this.deleteNodes(d)}else this.insertContentToNodeRight(t,n)}else{const n=this.createNewPieces(t);let s=this.rbInsertLeft(null,n[0]);for(let o=1;o<n.length;o++)s=this.rbInsertRight(s,n[o])}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),s=i.node,o=n.node;if(s===o){const u=this.positionInBuffer(s,i.remainder),g=this.positionInBuffer(s,n.remainder);if(i.nodeStartOffset===e){if(t===s.piece.length){const p=s.next();Cv(this,s),this.validateCRLFWithPrevNode(p),this.computeBufferMetadata();return}this.deleteNodeHead(s,g),this._searchCache.validate(e),this.validateCRLFWithPrevNode(s),this.computeBufferMetadata();return}if(i.nodeStartOffset+s.piece.length===e+t){this.deleteNodeTail(s,u),this.validateCRLFWithNextNode(s),this.computeBufferMetadata();return}this.shrinkNode(s,u,g),this.computeBufferMetadata();return}const a=[],l=this.positionInBuffer(s,i.remainder);this.deleteNodeTail(s,l),this._searchCache.validate(e),s.piece.length===0&&a.push(s);const c=this.positionInBuffer(o,n.remainder);this.deleteNodeHead(o,c),o.piece.length===0&&a.push(o);const d=s.next();for(let u=d;u!==Fe&&u!==o;u=u.next())a.push(u);const h=s.piece.length===0?s.prev():s;this.deleteNodes(a),this.validateCRLFWithNextNode(h),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){const i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){const o=t.piece,a={line:o.start.line+1,column:0},l=new rs(o.bufferIndex,a,o.end,this.getLineFeedCnt(o.bufferIndex,a,o.end),o.length-1);t.piece=l,e+=``,Aa(this,t,-1,-1),t.piece.length===0&&i.push(t)}const n=this.createNewPieces(e);let s=this.rbInsertLeft(t,n[n.length-1]);for(let o=n.length-2;o>=0;o--)s=this.rbInsertLeft(s,n[o]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=``);const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let s=n;for(let o=1;o<i.length;o++)s=this.rbInsertRight(s,i[o]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){const n=e.piece,s=e.piece.bufferIndex,o=this._buffers[s].lineStarts,l=o[n.start.line]+n.start.column+t;let c=n.start.line,d=n.end.line,h=0,u=0,g=0;for(;c<=d&&(h=c+(d-c)/2|0,g=o[h],h!==d);)if(u=o[h+1],l<g)d=h-1;else if(l>=u)c=h+1;else break;return i?(i.line=h,i.column=l-g,null):{line:h,column:l-g}}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 s=n[i.line+1],o=n[i.line]+i.column;if(s>o+1)return i.line-t.line;const a=o-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>Ia){const d=[];for(;e.length>Ia;){const u=e.charCodeAt(Ia-1);let g;u===13||u>=55296&&u<=56319?(g=e.substring(0,Ia-1),e=e.substring(Ia-1)):(g=e.substring(0,Ia),e=e.substring(Ia));const p=Pa(g);d.push(new rs(this._buffers.length,{line:0,column:0},{line:p.length-1,column:g.length-p[p.length-1]},p.length-1,g.length)),this._buffers.push(new fd(g,p))}const h=Pa(e);return d.push(new rs(this._buffers.length,{line:0,column:0},{line:h.length-1,column:e.length-h[h.length-1]},h.length-1,e.length)),this._buffers.push(new fd(e,h)),d}let t=this._buffers[0].buffer.length;const i=Pa(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 s=this._buffers[0].buffer.length,o=this._buffers[0].lineStarts.length-1,a=s-this._buffers[0].lineStarts[o],l={line:o,column:a},c=new rs(0,n,l,this.getLineFeedCnt(0,n,l),s-t);return this._lastChangeBufferPos=l,[c]}getLineRawContent(e,t=0){let i=this.root,n="";const s=this._searchCache.get2(e);if(s){i=s.node;const o=this.getAccumulatedValue(i,e-s.nodeStartLineNumber-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(s.nodeStartLineNumber+i.piece.lineFeedCnt===e)n=a.substring(l+o,l+i.piece.length);else{const c=this.getAccumulatedValue(i,e-s.nodeStartLineNumber);return a.substring(l+o,l+c-t)}}else{let o=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,h=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:a-(e-1-i.lf_left)}),d.substring(h+l,h+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,o+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==Fe;){const o=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+=o.substring(l,l+a-t),n}else{const a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=o.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.
`);const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=Pa(t,!1);for(let g=0;g<s.length;g++)s[g]+=n;if(i){const g=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-g}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(s.slice(1));const o=this._buffers[0].lineStarts.length-1,a=this._buffers[0].buffer.length-this._buffers[0].lineStarts[o],l={line:o,column:a},c=e.piece.length+t.length,d=e.piece.lineFeedCnt,h=this.getLineFeedCnt(0,e.piece.start,l),u=h-d;e.piece=new rs(e.piece.bufferIndex,e.piece.start,l,h,c),this._lastChangeBufferPos=l,Aa(this,e,t.length,u)}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 s={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(s),s}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 s=this.getAccumulatedValue(i,e-i.lf_left-2),o=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,o),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;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 s=this.getAccumulatedValue(i,0),o=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,s),nodeStartOffset:o}}else if(i.piece.length>=t-1){const s=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:s}}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,s=i[n]+t.start.column;return n===i.length-1||i[n+1]>s+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(s)===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 s;e.piece.end.column===0?s={line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:s={line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new rs(e.piece.bufferIndex,e.piece.start,s,a,o),Aa(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 rs(t.piece.bufferIndex,l,t.piece.end,d,c),Aa(this,t,-1,-1),t.piece.length===0&&i.push(t);const h=this.createNewPieces(`\r`);this.rbInsertRight(e,h[0]);for(let u=0;u<i.length;u++)Cv(this,i[u])}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,s={line:n.start.line+1,column:0},o=n.length-1,a=this.getLineFeedCnt(n.bufferIndex,s,n.end);i.piece=new rs(n.bufferIndex,s,n.end,a,o),Aa(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),s=this.offsetInBuffer(i.bufferIndex,i.end);return t.buffer.substring(n,s)}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 OD(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 s=RE(e.right);s.left=i,i.parent=s}return IM(this,i),i}rbInsertLeft(e,t){const i=new OD(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=PB(e.left);n.right=i,i.parent=n}return IM(this,i),i}}class Xu extends V{constructor(e,t,i,n,s,o,a){super(),this._onDidChangeContent=this._register(new A),this._BOM=t,this._mightContainNonBasicASCII=!o,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._pieceTree=new fq(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),s=this.getPositionAt(i);return new S(n.lineNumber,n.column,s.lineNumber,s.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),n=this.getOffsetAt(e.endLineNumber,e.endColumn);let s=0;const o=this._getEndOfLine(t),a=this.getEOL();if(o.length!==a.length){const l=o.length-a.length,c=e.endLineNumber-e.startLineNumber;s=l*c}return n-i+s}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,s=e.endLineNumber;for(let o=n;o<=s;o++){const a=this.getLineContent(o),l=o===n?e.startColumn-1:0,c=o===s?e.endColumn-1:a.length;for(let d=l;d<c;d++)In(a.charCodeAt(d))?(i=i+1,d=d+1):i=i+1}return i+=this._getEndOfLine(t).length*(s-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=Fn(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=oa(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,s=this._mightContainUnusualLineTerminators,o=this._mightContainNonBasicASCII,a=!0,l=[];for(let m=0;m<e.length;m++){const _=e[m];a&&_._isTracked&&(a=!1);const b=_.range;if(_.text){let T=!0;o||(T=!NI(_.text),o=T),!n&&T&&(n=cg(_.text)),!s&&T&&(s=CP(_.text))}let v="",C=0,w=0,L=0;if(_.text){let T;[C,w,L,T]=Jd(_.text);const y=this.getEOL();T===0||T===(y===`\r`?2:1)?v=_.text:v=_.text.replace(/\r\n|\r|\n/g,y)}l[m]={sortIndex:m,identifier:_.identifier||null,range:b,rangeOffset:this.getOffsetAt(b.startLineNumber,b.startColumn),rangeLength:this.getValueLengthInRange(b),text:v,eolCount:C,firstLineLength:w,lastLineLength:L,forceMoveMarkers:!!_.forceMoveMarkers,isAutoWhitespaceEdit:_.isAutoWhitespaceEdit||!1}}l.sort(Xu._sortOpsAscending);let c=!1;for(let m=0,_=l.length-1;m<_;m++){const b=l[m].range.getEndPosition(),v=l[m+1].range.getStartPosition();if(v.isBeforeOrEqual(b)){if(v.isBefore(b))throw new Error("Overlapping ranges are not allowed!");c=!0}}a&&(l=this._reduceOperations(l));const d=i||t?Xu._getInverseEditRanges(l):[],h=[];if(t)for(let m=0;m<l.length;m++){const _=l[m],b=d[m];if(_.isAutoWhitespaceEdit&&_.range.isEmpty())for(let v=b.startLineNumber;v<=b.endLineNumber;v++){let C="";v===b.startLineNumber&&(C=this.getLineContent(_.range.startLineNumber),Fn(C)!==-1)||h.push({lineNumber:v,oldContent:C})}}let u=null;if(i){let m=0;u=[];for(let _=0;_<l.length;_++){const b=l[_],v=d[_],C=this.getValueInRange(b.range),w=b.rangeOffset+m;m+=b.text.length-C.length,u[_]={sortIndex:b.sortIndex,identifier:b.identifier,range:v,text:C,textChange:new sn(b.rangeOffset,C,w,b.text)}}c||u.sort((_,b)=>_.sortIndex-b.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=o;const g=this._doApplyEdits(l);let p=null;if(t&&h.length>0){h.sort((m,_)=>_.lineNumber-m.lineNumber),p=[];for(let m=0,_=h.length;m<_;m++){const b=h[m].lineNumber;if(m>0&&h[m-1].lineNumber===b)continue;const v=h[m].oldContent,C=this.getLineContent(b);C.length===0||C===v||Fn(C)!==-1||p.push(b)}}return this._onDidChangeContent.fire(),new Wz(u,g,p)}_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,s=new S(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let o=i.startLineNumber,a=i.startColumn;const l=[];for(let g=0,p=e.length;g<p;g++){const m=e[g],_=m.range;t=t||m.forceMoveMarkers,l.push(this.getValueInRange(new S(o,a,_.startLineNumber,_.startColumn))),m.text.length>0&&l.push(m.text),o=_.endLineNumber,a=_.endColumn}const c=l.join(""),[d,h,u]=Jd(c);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:c,eolCount:d,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Xu._sortOpsDescending);const t=[];for(let i=0;i<e.length;i++){const n=e[i],s=n.range.startLineNumber,o=n.range.startColumn,a=n.range.endLineNumber,l=n.range.endColumn;if(s===a&&o===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 S(s,o,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,s=null;for(let o=0,a=e.length;o<a;o++){const l=e[o];let c,d;s?s.range.endLineNumber===l.range.startLineNumber?(c=i,d=n+(l.range.startColumn-s.range.endColumn)):(c=i+(l.range.startLineNumber-s.range.endLineNumber),d=l.range.startColumn):(c=l.range.startLineNumber,d=l.range.startColumn);let h;if(l.text.length>0){const u=l.eolCount+1;u===1?h=new S(c,d,c,d+l.firstLineLength):h=new S(c,d,c+u-1,l.lastLineLength+1)}else h=new S(c,d,c,d);i=h.endLineNumber,n=h.endColumn,t.push(h),s=l}return t}static _sortOpsAscending(e,t){const i=S.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=S.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}class pq{constructor(e,t,i,n,s,o,a,l,c){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=o,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._n
`:`\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 s=0,o=i.length;s<o;s++){const a=i[s].buffer.replace(/\r\n|\r|\n/g,t),l=Pa(a);i[s]=new fd(a,l)}const n=new Xu(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class BB{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&&MI(e)&&(this.BOM=Vz,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=hq(this._tmpLineStarts,e);this.chunks.push(new fd(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=cg(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=CP(e)))}finish(e=!0){return this._finish(),new pq(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=Pa(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class mq{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(e,t){this._startLineNumber=e,this._tokens=t}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class PD{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 mq(e,[t]))}finalize(){return this._tokens}}class EM{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=PI(this._store,e,i)}}class _q{get invalidLineStartIndex(){return this._firstLineNeedsTokenization}constructor(e,t){this.tokenizationSupport=e,this.initialState=t,this._lineBeginState=new EM(null),this._lineNeedsTokenization=new EM(!0),this._firstLineNeedsTokenization=0,this._lineBeginState.set(0,this.initialState)}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!1;const n=this._lineBeginState.get(t+1);if(n===null||!i.equals(n))return this._lineBeginState.set(t+1,i),this.markMustBeTokenized(t+1),!0;let s=t+1;for(;s<e&&!this._lineNeedsTokenization.get(s);)s++;return this._firstLineNeedsTokenization=s,!1}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)}updateTokensUntilLine(e,t,i,n){const s=e.getLanguageId(),o=e.getLineCount(),a=n-1;for(let l=this.invalidLineStartIndex;l<=a;l++){const c=e.getLineContent(l+1),d=this.getBeginState(l),h=ip(t,s,this.tokenizationSupport,c,!0,d);i.add(l+1,h.
`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=V.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 Od(e,t)))}setValue(e){if(this._assertNotDisposed(),e==null)throw As();const{textBuffer:t,disposable:i}=MM(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:s,isRedoing:o,isFlush:a}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokenizationTextModelPart.flush(),this._decorations=Object.create(null),this._decorationsTree=new RM,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Qu([new wq],this._versionId,!1,!1),this._createContentChanged2(new S(1,1,s,o),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),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Qu([new Lq],this._versionId,!1,!1),this._createContentChanged2(new S(1,1,s,o),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 s=t[i],o=s.range,a=s.cachedAbsoluteStart-s.start,l=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),c=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);s.cachedAbsoluteStart=l,s.cachedAbsoluteEnd=c,s.cachedVersionId=e,s.start=l-a,s.end=c-a,Sc(s)}}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 s=this._buffer.getLineLength(n);s>=Eq?t+=s:e+=s}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.originalIndentSize,n=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new gb({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:o});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=SM(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),fC(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(Hz.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=thi
`?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 s=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),o=Math.floor(typeof n=="number"&&!isNaN(n)?n:1);if(s<1)s=1,o=1;else if(s>t)s=t,o=this.getLineMaxColumn(s);else if(o<=1)o=1;else{const h=this.getLineMaxColumn(s);o>=h&&(o=h)}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 h=this.getLineMaxColumn(c);d>=h&&(d=h)}return i===s&&n===o&&a===c&&l===d&&e instanceof S&&!(e instanceof ue)?e:new S(s,o,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 s=this.getLineMaxColumn(e);if(t>s)return!1;if(i===1){const o=this._buffer.getLineCharCode(e,t-2);if(In(o))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),s=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),o=this._buffer.getLineCount();if(n<1)return new P(1,1);if(n>o)return new P(o,this.getLineMaxColumn(o));if(s<=1)return new P(n,1);const a=this.getLineMaxColumn(n);if(s>=a)return new P(n,a);if(i===1){const l=this._buffer.getLineCharCode(n,s-2);if(In(l))return new P(n,s-1)}return new P(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof P&&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,s=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(s,o,0))return!1;if(t===1){const a=n>1?this._buffer.getLineCharCode(i,n-2):0,l=o>1&&o<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,o-2):0,c=In(a),d=In(l);return!c&&!d}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof S&&!(e instanceof ue)&&this._isValidRange(e,1))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),s=i.lineNumber,o=i.column,a=n.lineNumber,l=n.column;{const c=o>1?this._buffer.getLineCharCode(s,o-2):0,d=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,h=In(c),u=In(d);return!h&&!u?new S(s,o,a,l):s===a&&o===l?new S(s,o-1,a,l-1):h&&u?new S(s,o-1,a,l+1):h?new S(s,o-1,a,l):new S(s,o,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 S(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,o,a=Iq){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(h=>S.isIRange(h))&&(l=t.map(h=>this.validateRange(h)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((h,u)=>h.startLineNumber-u.startLineNumber||h.startColumn-u.startColumn);const c=[];c.push(l.reduce((h,u)=>S.areIntersecting(h,u)?h.plusRange(u):(c.push(h),u)));let d;if(!i&&e.indexOf(``)<0){const u=new sd(e,i,n,s).parseSearchRequest();if(!u)return[];d=g=>this.findMatchesLineByLine(g,u,o,a)}else d=h=>J_.findMatches(this,new sd(e,i,n,s),h,o,a);return c.map(d).reduce((h,u)=>h.concat(u),[])}findNextMatch(e,t,i,n,s,o){this._assertNotDisposed();const a=this.validatePosition(t);if(!i&&e.indexOf(``)<0){const c=new sd(e,i,n,s).parseSearchRequest();if(!c)return null;const d=this.getLineCount();let h=new S(a.lineNumber,a.column,d,this.getLineMaxColumn(d)),u=this.findMatchesLineByLine(h,c,o,1);return J_.findNextMatch(this,new sd(e,i,n,s),a,o),u.length>0||(h=new S(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),u=this.findMatchesLineByLine(h,c,o,1),u.length>0)?u[0]:null}return J_.findNextMatch(this,new sd(e,i,n,s),a,o)}findPreviousMatch(e,t,i,n,s,o){this._assertNotDisposed();const a=this.validatePosition(t);return J_.findPreviousMatch(this,new sd(e,i,n,s),a,o)}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 O0?e:new O0(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,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i,n){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const s=t.map(a=>({range:this.validateRange(a.range),text:a.text}));let o=!0;if(e)for(let a=0,l=e.length;a<l;a++){const c=e[a];let d=!1;for(let h=0,u=s.length;h<u;h++){const g=s[h].range,p=g.startLineNumber>c.endLineNumber,m=c.startLineNumber>g.endLineNumber;if(!p&&!m){d=!0;break}}if(!d){o=!1;break}}if(o)for(let a=0,l=this._trimAutoWhitespaceLines.length;a<l;a++){const c=this._trimAutoWhitespaceLines[a],d=this.getLineMaxColumn(c);let h=!0;for(let u=0,g=s.length;u<g;u++){const p=s[u].range,m=s[u].text;if(!(c<p.startLineNumber||c>p.endLineNumber)&&!(c===p.startLineNumber&&p.startColumn===d&&p.isEmpty()&&m&&m.length>0&&m.charAt(0)===``)&&!(c===p.startLineNumber&&p.startColumn===1&&p.isEmpty()&&m&&m.length>0&&m.charAt(m.length-1)===``)){h=!1;break}}if(h){const u=new S(c,1,c,d);t.push(new O0(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,n)}_applyUndo(e,t,i,n){const s=e.map(o=>{const a=this.getPositionAt(o.newPosition),l=this.getPositionAt(o.newEnd);return{range:new S(a.lineNumber,a.column,l.lineNumber,l.column),text:o.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(o=>{const a=this.getPositionAt(o.oldPosition),l=this.getPositionAt(o.oldEnd);return{range:new S(a.lineNumber,a.column,l.lineNumber,l.column),text:o.newText}});this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),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),s=this._buffer.getLineCount(),o=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,o.length!==0){for(let c=0,d=o.length;c<d;c++){const h=o[c],[u,g,p]=Jd(h.text);this._tokenizationTextModelPart.acceptEdit(h.range,h.text,u,g,p),this._decorationsTree.acceptReplace(h.rangeOffset,h.rangeLength,h.text.length,h.forceMoveMarkers)}const a=[];this._increaseVersionId();let l=i;for(let c=0,d=o.length;c<d;c++){const h=o[c],[u]=Jd(h.text);this._onDidChangeDecorations.fire();const g=h.range.startLineNumber,p=h.range.endLineNumber,m=p-g,_=u,b=Math.min(m,_),v=_-m,C=s-l-v+g,w=C,L=C+_,T=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new P(w,1)),this.getOffsetAt(new P(L,this.getLineMaxColumn(L))),0),y=br.fromDecorations(T),D=new dg(y);for(let N=b;N>=0;N--){const R=g+N,B=C+N;D.takeFromEndWhile(H=>H.lineNumber>B);const U=D.takeFromEndWhile(H=>H.lineNumber===B);a.push(new NM(R,this.getLineContent(B),U))}if(b<m){const N=g+b;a.push(new Sq(N+1,p))}if(b<_){const N=new dg(y),R=g+b,B=_-b,U=s-l-B+R+1,H=[],ie=[];for(let he=0;he<B;he++){const _e=U+he;ie[he]=this.getLineContent(_e),N.takeWhile(Me=>Me.lineNumber<_e),H[he]=N.takeWhile(Me=>Me.lineNumber===_e)}a.push(new yq(R+1,g+_,ie,H))}l+=v}this._emitContentChangedEvent(new Qu(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:o,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 NM(n,this.getLineContent(n),this._getInjectedTextInLine(n)));this._onDidChangeInjectedText.fire(new WB(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:(s,o)=>this._deltaDecorationsImpl(e,[],[{range:s,options:o}])[0],changeDecoration:(s,o)=>{this._changeDecorationImpl(s,o)},changeDecorationOptions:(s,o)=>{this._changeDecorationOptionsImpl(s,OM(o))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,o)=>s.length===0&&o.length===0?[]:this._deltaDecorationsImpl(e,s,o)};let n=null;try{n=t(i)}catch(s){Ve(s)}return i.addDecoratio
`)>=0)return null;const o=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const a=o[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const c=l[0].open,d=s.text.length-o[2].length-1,h=s.text.lastIndexOf(c,d-1);if(h===-1)return null;t.push([h,d])}return t}executeEdits(e,t,i,n){let s=null;t==="snippet"&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);const o=[],a=[],l=this._model.pushEditOperations(this.getSelections(),i,c=>{if(s)for(let h=0,u=s.length;h<u;h++){const[g,p]=s[h],m=c[h],_=m.range.startLineNumber,b=m.range.startColumn-1+g,v=m.range.startColumn-1+p;o.push(new S(_,v+1,_,v+2)),a.push(new S(_,b+1,_,v+2))}const d=n(c);return d&&(this._isHandling=!0),d});l&&(this._isHandling=!1,this.setSelections(e,t,l,0)),o.length>0&&this._pushAutoClosedAction(o,a)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=Mp.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(o){Ve(o)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return BM.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new Rp(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($t.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 s=0;for(;s<n;){const o=gP(t,s),a=t.substr(s,o);this._executeEditOperation($t.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),a)),s+=o}}else this._executeEditOperation($t.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))},e,i)}compositionType(e,t,i,n,s,o){if(t.length===0&&i===0&&n===0){if(s!==0){const a=this.getSelections().map(l=>{const c=l.getPosition();return new ue(c.lineNumber,c.column+s,c.lineNumber,c.column+s)});this.setSelections(e,o,a,0)}return}this._executeEdit(()=>{this._executeEditOperation($t.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))},e,o)}paste(e,t,i,n,s){this._executeEdit(()=>{this._executeEditOperation($t.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,s,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(Qd.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new qn(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new qn(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}class Mp{static from(e,t){return new Mp(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}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 BM{static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this.`:this.model.getEOL();e=e.slice(0),e.sort(S.compareRangesUsingStarts);let s=!1,o=!1;for(const l of e)l.isEmpty()?s=!0:o=!0;if(!o){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(s&&t){const l=[];let c=0;for(const d of e){const h=d.startLineNumber;d.isEmpty()?h!==c&&l.push(this.model.getLineContent(h)):l.push(this.model.getValueInRange(d,i?2:0)),c=h}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===Os||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const d=n.startLineNumber;n=new S(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}const s=this._configuration.options.get(47),o=this._getColorMap(),l=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===fs.fontFamily;let c;return l?c=fs.fontFamily:(c=s.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${fs.fontFamily}`),{mode:i,html:`<div style="color: ${o[1]};background-color: ${o[2]};font-family: ${c};font-weight: ${s.fontWeight};font-size: ${s.fontSize}px;line-height: ${s.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,o)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn,a=this.getTabSize();let l="";for(let c=i;c<=s;c++){const d=this.model.tokenization.getLineTokens(c),h=d.getLineContent(),u=c===i?n-1:0,g=c===s?o-1:h.length;h===""?l+="<br>":l+=cG(h,d.inflate(),t,u,g,a,ts)}return l}_getColorMap(){const e=Gt.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=W.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 Xq);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,s){this._executeCursorEdit(o=>this._cursor.compositionType(o,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,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 S(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new Lb(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new S(
`?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 s={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(s),this._postDetachModelCleanup(n),this._contributions.onAfterModelAttached()}_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 s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(o.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?hu._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?hu._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?hu._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var i;(i=this._modelData)===null||i===void 0||i.viewModel.setHiddenAreas(e.map(n=>S.lift(n)),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Di.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(!P.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(!S.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,o,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 S(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(!P.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new S(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=ue.isISelection(e),n=S.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t
`:`
`),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(Ro(t),"g");return e.replace(i,(n,s)=>e.charAt(s-1)!=="\\"?`\\${n}`:n)}}function xg(r){return iW(r)?!r.value:Array.isArray(r)?r.every(xg):!0}function iW(r){return r instanceof Xn?!0:r&&typeof r=="object"?typeof r.value=="string"&&(typeof r.isTrusted=="boolean"||r.isTrusted===void 0)&&(typeof r.supportThemeIcons=="boolean"||r.supportThemeIcons===void 0):!1}function yZ(r){return r.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function Iv(r){return r.replace(/"/g,""")}function Ny(r){return r&&r.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function LZ(r){const e=[],t=r.split("|").map(n=>n.trim());r=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),o=n?n[1]:"",a=s?s[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(o));l&&e.push(`width="${a}"`),c&&e.push(`height="${o}"`)}return{href:r,dimensions:e}}var qD=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function DZ(r,e){gs(e)?r.title=tT(e):e!=null&&e.markdownNotSupportedFallback?r.title=e.markdownNotSupportedFallback:r.removeAttribute("title")}class kZ{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t,i){var n;return qD(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(e===void 0||gs(e)||e instanceof HTMLElement)s=e;else if(!ZL(e.markdown))s=(n=e.markdown)!==null&&n!==void 0?n:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(f("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new cn;const o=this._cancellationTokenSource.token;if(s=yield e.markdown(o),s===void 0&&(s=e.markdownNotSupportedFallback),this.isDisposed||o.isCancellationRequested)return}this.show(s,t,i)})}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s=Object.assign({content:e,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!n},i);this._hoverWidget=this.hoverDelegate.showHover(s,t)}n==null||n.dispose()}hasContent(e){return e?iW(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 nW(r,e,t,i){let n,s;const o=(h,u)=>{var g;const p=s!==void 0;h&&(s==null||s.dispose(),s=void 0),u&&(n==null||n.dispose(),n=void 0),p&&((g=r.onDidHideHover)===null||g===void 0||g.call(r))},a=(h,u,g)=>new lo(()=>qD(this,void 0,void 0,function*(){(!s||s.isDisposed)&&(s=new kZ(r,g||e,h>0),yield s.update(t,u,i))}),h),l=()=>{if(n)return;const h=new Y,u=m=>o(!1,m.fromElement===e);h.add(j(e,oe.MOUSE_LEAVE,u,!0));const g=()=>o(!0,!0);h.add(j(e,oe.MOUSE_DOWN,g,!0));const p={targetElements:[e],dispose:()=>{}};if(r.placement===void 0||r.placement==="mouse"){const m=_=>{p.x=_.x+10,_.target instanceof HTMLElement&&_.target.classList.contains("action-label")&&o(!0,!0)};h.add(j(e,oe.MOUSE_MOVE,m,!0))}h.add(a(r.delay,!1,p)),n=h},c=j(e,oe.MOUSE_OVER,l,!0);return{show:h=>{o(!1,!0),a(0,h)},hide:()=>{o(!0,!0)},update:(h,u)=>qD(this,void 0,void 0,function*(){t=h,yield s==null?void 0:s.update(t,void 0,u)}),dispose:()=>{c.dispose(),o(!0,!0)}}}function xZ(r,e={}){const t=iT(e);return t.textContent=r,t}function sW(r,e={}){const t=iT(e);return oW(t,EZ(r,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function iT(r){const e=r.`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){const c={type:2,content:a};n.children.push(c),s.push(n),n=c}else n.content+=a}return n.type===2&&(n=s.pop()),t}function TZ(r,e){return GD(r,e)!==0}function GD(r,e){switch(r){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}const NZ=new RegExp(`(\\\\)?\\$\\((${De.iconNameExpression}(?:${De.iconModifierExpression})?)\\)`,"g");function Pd(r){const e=new Array;let t,i=0,n=0;for(;(t=NZ.exec(r))!==null;){n=t.index||0,i<n&&e.push(r.substring(i,n)),i=(t.index||0)+t[0].length;const[,s,o]=t;e.push(s?`$(${o})`:MZ({id:o}))}return i<r.length&&e.push(r.substring(i)),e}function MZ(r){const e=X("span");return e.classList.add(...De.asClassNameArray(r)),e}class nT{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const rW=new nT("id#");let Wn={};(function(){function r(e,t){t(Wn)}r.amd=!0,function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof r=="function"&&r.amd?r(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.marked={}))}(this,function(e){function t(G,$){for(var z=0;z<$.length;z++){var k=$[z];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(G,k.key,k)}}function i(G,$,z){return $&&t(G.prototype,$),z&&t(G,z),Object.defineProperty(G,"prototype",{writable:!1}),G}function n(G,$){if(G){if(typeof G=="string")return s(G,$);var z=Object.prototype.toString.call(G).slice(8,-1);if(z==="Object"&&G.constructor&&(z=G.constructor.name),z==="Map"||z==="Set")return Array.from(G);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return s(G,$)}}function s(G,$){($==null||$>G.length)&&($=G.length);for(var z=0,k=new Array($);z<$;z++)k[z]=G[z];return k}function o(G,$){var z=typeof Symbol<"u"&&G[Symbol.iterator]||G["@@iterator"];if(z)return(z=z.call(G)).next.bind(z);if(Array.isArray(G)||(z=n(G))||$&&G&&typeof G.length=="number"){z&&(G=z);var k=0;return function(){return k>=G.length?{done:!0}:{done:!1,value:G[k++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(){return{async:!1,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(G){e.defaults=G}var c=/[&<>"']/,d=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,g={"&":"&","<":"<",">":">",'"':""","'":"'"},p=function($){return g[$]};function m(G,$){if($){if(c.test(G))return G.replace(d,p)}else if(h.test(G))return G.replace(u,p);return G}var _=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b(G){return G.replace(_,function($,z){return z=z.toLowerCase(),z==="colon"?":":z.charAt(0)==="#"?z.charAt(1)==="x"?String.fromCharCode(parseInt(z.substring(2),16)):String.fromCharCode(+z.substring(1)):""})}var v=/(^|[^\[])\^/g;function C(G,$){G=typeof G=="string"?G:G.source,$=$||"";var z={replace:function(M,F){return F=F.source||F,F=F.replace(v,"$1"),G=G.replace(M,F),z},getRegex:function(){return new RegExp(G,$)}};return z}var w=/[^\w:]/g,L=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function T(G,$,z){if(G){var k;try{k=decodeURIComponent(b(z)).replace(w,"").toLowerCase()}catch{return null}if(k.indexOf("javascript:")===0||k.indexOf("vbscript:")===0||k.indexOf("data:")===0)return null}$&&!L.test(z)&&(z=B($,z));try{z=encodeURI(z).replace(/%25/g,"%")}catch{return null}return z}var y={},D=/^[^:]+:\/*[^/]*$/,N=/^([^:]+:)[\s\S]*$/,R=/^([^:]+:\/*[^/]*)[\s\S]*$/;function B(G,$){y[" "+G]||(D.test(G)?y[" "+G]=G+"/":y[" "+G]=he(G,"/",!0)),G=y[" "+G];var z=G.indexOf(":")===-1;return $.substring(0,2)==="//"?z?$:G.replace(N,"$1")+$:$.charAt(0)==="/"?z?$:G.replace(R,"$1")+$:G+$}var U={exec:function(){}};function H(G){for(var $=1,z,k;$<arguments.length;$++){z=arguments[$];for(k in z)Object.prototype.hasOwnProperty.call(z,k)&&(G[k]=z[k])}return G}function ie(G,$){var z=G.replace(/\|/g,function(F,O,Z){for(var re=!1,Se=O;--Se>=0&&Z[Se]==="\\";)re=!re;return re?"|":" |"}),k=z.split(/ \|/),M=0;if(k[0].trim()||k.shift(),k.length>0&&!k[k.length-1].trim()&&k.pop(),k.length>$)k.splice($);else for(;k.length<$;)k.push("");for(;M<k.length;M++)k[M]=k[M].trim().replace(/\\\|/g,"|");return k}function he(G,$,z){var k=G.length;if(k===0)return"";for(var M=0;M<k;){var F=G.charAt(k-M-1);if(F===$&&!z)M++;else if(F!==$&&z)M++;else break}return G.slice(0,k-M)}function _e(G,$){if(G.indexOf($[1])===-1)return-1;for(var z=G.length,k=0,M=0;M<z;M++)if(G[M]==="\\")M++;else if(G[M]===$[0])k++;else if(G[M]===$[1]&&(k--,k<0))return M;return-1}function Me(G){G&&G.sanitize&&!G.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 We(G,$){if($<1)return"";for(var z="";$>1;)$&1&&(z+=G),$>>=1,G+=G;return z+G}function xe(G,$,z,k){var M=$.href,F=$.title?m($.title):null,O=G[1].replace(/\\([\[\]])/g,"$1");if(G[0].charAt(0)!=="!"){k.state.inLink=!0;var Z={type:"link",raw:z,href:M,title:F,text:O,tokens:k.inlineTokens(O)};return k.state.inLink=!1,Z}return{type:"image",raw:z,href:M,title:F,text:m(O)}}function qe(G,$){var z=G.match(/^(\s+)(?:```)/);if(z===null)return $;var k=z[1];return $.split(`
`).map(function(M){var F=M.match(/^\s+/);if(F===null)return M;var O=F[0];return O.length>=k.length?M.slice(k.length):M}).join(``)}var Ye=function(){function G(z){this.options=z||e.defaults}var $=G.prototype;return $.space=function(k){var M=this.rules.block.newline.exec(k);if(M&&M[0].length>0)return{type:"space",raw:M[0]}},$.code=function(k){var M=this.rules.block.code.exec(k);if(M){var F=M[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:M[0],codeBlockStyle:"indented",text:this.options.pedantic?F:he(F,``)}}},$.fences=function(k){var M=this.rules.block.fences.exec(k);if(M){var F=M[0],O=qe(F,M[3]||"");return{type:"code",raw:F,lang:M[2]?M[2].trim():M[2],text:O}}},$.heading=function(k){var M=this.rules.block.heading.exec(k);if(M){var F=M[2].trim();if(/#$/.test(F)){var O=he(F,"#");(this.options.pedantic||!O||/ $/.test(O))&&(F=O.trim())}return{type:"heading",raw:M[0],depth:M[1].length,text:F,tokens:this.lexer.inline(F)}}},$.hr=function(k){var M=this.rules.block.hr.exec(k);if(M)return{type:"hr",raw:M[0]}},$.blockquote=function(k){var M=this.rules.block.blockquote.exec(k);if(M){var F=M[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:M[0],tokens:this.lexer.blockTokens(F,[]),text:F}}},$.list=function(k){var M=this.rules.block.list.exec(k);if(M){var F,O,Z,re,Se,ke,$e,He,Tt,bt,Oe,Li,Yt=M[1].trim(),zs=Yt.length>1,ni={type:"list",raw:"",ordered:zs,start:zs?+Yt.slice(0,-1):"",loose:!1,items:[]};Yt=zs?"\\d{1,9}\\"+Yt.slice(-1):"\\"+Yt,this.options.pedantic&&(Yt=zs?Yt:"[*+-]");for(var $i=new RegExp("^( {0,3}"+Yt+")((?:[ ][^\\n]*)?(?:\\n|$))");k&&(Li=!1,!(!(M=$i.exec(k))||this.rules.block.hr.test(k)));){if(F=M[0],k=k.substring(F.length),He=M[2].split(``,1)[0],Tt=k.split(``,1)[0],this.options.pedantic?(re=2,Oe=He.trimLeft()):(re=M[2].search(/[^ ]/),re=re>4?1:re,Oe=He.slice(re),re+=M[1].length),ke=!1,!He&&/^ *$/.test(Tt)&&(F+=Tt+``,k=k.substring(Tt.length+1),Li=!0),!Li)for(var qc=new RegExp("^ {0,"+Math.min(3,re-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),Cs=new RegExp("^ {0,"+Math.min(3,re-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),kr=new RegExp("^ {0,"+Math.min(3,re-1)+"}(?:```|~~~)"),kl=new RegExp("^ {0,"+Math.min(3,re-1)+"}#");k&&(bt=k.split(`
`,1)[0],He=bt,this.options.pedantic&&(He=He.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(kr.test(He)||kl.test(He)||qc.test(He)||Cs.test(k)));){if(He.search(/[^ ]/)>=re||!He.trim())Oe+=``+He.slice(re);else if(!ke)Oe+=``+He;else break;!ke&&!He.trim()&&(ke=!0),F+=bt+``,k=k.substring(bt.length+1)}ni.loose||($e?ni.loose=!0:/\n *\n *$/.test(F)&&($e=!0)),this.options.gfm&&(O=/^\[[ xX]\] /.exec(Oe),O&&(Z=O[0]!=="[ ] ",Oe=Oe.replace(/^\[[ xX]\] +/,""))),ni.items.push({type:"list_item",raw:F,task:!!O,checked:Z,loose:!1,text:Oe}),ni.raw+=F}ni.items[ni.items.length-1].raw=F.trimRight(),ni.items[ni.items.length-1].text=Oe.trimRight(),ni.raw=ni.raw.trimRight();var Gc=ni.items.length;for(Se=0;Se<Gc;Se++){this.lexer.state.top=!1,ni.items[Se].tokens=this.lexer.blockTokens(ni.items[Se].text,[]);var Zc=ni.items[Se].tokens.filter(function(Us){return Us.type==="space"}),Yc=Zc.every(function(Us){for(var q_=Us.raw.split(""),pf=0,G_=o(q_),Z_;!(Z_=G_()).done;){var Xe=Z_.value;if(Xe===``&&(pf+=1),pf>1)return!0}return!1});!ni.loose&&Zc.length&&Yc&&(ni.loose=!0,ni.items[Se].loose=!0)}return ni}},$.html=function(k){var M=this.rules.block.html.exec(k);if(M){var F={type:"html",raw:M[0],pre:!this.options.sanitizer&&(M[1]==="pre"||M[1]==="script"||M[1]==="style"),text:M[0]};if(this.options.sanitize){var O=this.options.sanitizer?this.options.sanitizer(M[0]):m(M[0]);F.type="paragraph",F.text=O,F.tokens=this.lexer.inline(O)}return F}},$.def=function(k){var M=this.rules.block.def.exec(k);if(M){M[3]&&(M[3]=M[3].substring(1,M[3].length-1));var F=M[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:F,raw:M[0],href:M[2],title:M[3]}}},$.table=function(k){var M=this.rules.block.table.exec(k);if(M){var F={type:"table",header:ie(M[1]).map(function($e){return{text:$e}}),align:M[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:M[3]&&M[3].trim()?M[3].replace(/\n[ \t]*$/,"").split(``):[]};if(F.header.length===F.align.length){F.raw=M[0];var O=F.align.length,Z,re,Se,ke;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]=ie(F.rows[Z],F.header.length).map(function($e){return{text:$e}});for(O=F.header.length,re=0;re<O;re++)F.header[re].tokens=this.lexer.inline(F.header[re].text);for(O=F.rows.length,re=0;re<O;re++)for(ke=F.rows[re],Se=0;Se<ke.length;Se++)ke[Se].tokens=this.lexer.inline(ke[Se].text);return F}}},$.lheading=function(k){var M=this.rules.block.lheading.exec(k);if(M)return{type:"heading",raw:M[0],depth:M[2].charAt(0)==="="?1:2,text:M[1],tokens:this.lexer.inline(M[1])}},$.paragraph=function(k){var M=this.rules.block.paragraph.exec(k);if(M){var F=M[1].charAt(M[1].length-1)===``?M[1].slice(0,-1):M[1];return{type:"paragraph",raw:M[0],text:F,tokens:this.lexer.inline(F)}}},$.text=function(k){var M=this.rules.block.text.exec(k);if(M)return{type:"text",raw:M[0],text:M[0],tokens:this.lexer.inline(M[0])}},$.escape=function(k){var M=this.rules.inline.escape.exec(k);if(M)return{type:"escape",raw:M[0],text:m(M[1])}},$.tag=function(k){var M=this.rules.inline.tag.exec(k);if(M)return!this.lexer.state.inLink&&/^<a /i.test(M[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(M[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(M[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(M[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:M[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(M[0]):m(M[0]):M[0]}},$.link=function(k){var M=this.rules.inline.link.exec(k);if(M){var F=M[2].trim();if(!this.options.pedantic&&/^</.test(F)){if(!/>$/.test(F))return;var O=he(F.slice(0,-1),"\\");if((F.length-O.length)%2===0)return}else{var Z=_e(M[2],"()");if(Z>-1){var re=M[0].indexOf("!")===0?5:4,Se=re+M[1].length+Z;M[2]=M[2].substring(0,Z),M[0]=M[0].substring(0,Se).trim(),M[3]=""}}var ke=M[2],$e="";if(this.options.pedantic){var He=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ke);He&&(ke=He[1],$e=He[3])}else $e=M[3]?M[3].slice(1,-1):"";return ke=ke.trim(),/^</.test(ke)&&(this.options.pedantic&&!/>$/.test(F)?ke=ke.slice(1):ke=ke.slice(1,-1)),xe(M,{href:ke&&ke.replace(this.rules.inline._escapes,"$1"),title:$e&&$e.replace(this.rules.inline._escapes,"$1")},M[0],this.lexer)}},$.reflink=function(k,M){var F;if((F=this.rules.inline.reflink.exec(k))||(F=this.rules.inline.nolink.exec(k))){var O=(F[2]||F[1]).replace(/\s+/g," ");if(O=M[O.toLowerCase()],!O||!O.href){var Z=F[0].charAt(0);return{type:"text",raw:Z,text:Z}}return xe(F,O,F[0],this.lexer)}},$.emStrong=function(k,M,F){F===void 0&&(F="");var O=this.rules.inline.emStrong.lDelim.exec(k);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\
]`).replace("lheading",fe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Ce={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:U,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(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:U,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Ce._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Ce.punctuation=C(Ce.punctuation).replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Ce.escapedEmSt=/\\\*|\\_/g,Ce._comment=C(fe._comment).replace("(?:-->|$)","-->").getRegex(),Ce.emStrong.lDelim=C(Ce.emStrong.lDelim).replace(/punct/g,Ce._punctuation).getRegex(),Ce.emStrong.rDelimAst=C(Ce.emStrong.rDelimAst,"g").replace(/punct/g,Ce._punctuation).getRegex(),Ce.emStrong.rDelimUnd=C(Ce.emStrong.rDelimUnd,"g").replace(/punct/g,Ce._punctuation).getRegex(),Ce._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ce._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ce._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])?)+(?![-_])/,Ce.autolink=C(Ce.autolink).replace("scheme",Ce._scheme).replace("email",Ce._email).getRegex(),Ce._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ce.tag=C(Ce.tag).replace("comment",Ce._comment).replace("attribute",Ce._attribute).getRegex(),Ce._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ce._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Ce._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ce.link=C(Ce.link).replace("label",Ce._label).replace("href",Ce._href).replace("title",Ce._title).getRegex(),Ce.reflink=C(Ce.reflink).replace("label",Ce._label).replace("ref",fe._label).getRegex(),Ce.nolink=C(Ce.nolink).replace("ref",fe._label).getRegex(),Ce.reflinkSearch=C(Ce.reflinkSearch,"g").replace("reflink",Ce.reflink).replace("nolink",Ce.nolink).getRegex(),Ce.normal=H({},Ce),Ce.pedantic=H({},Ce.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:C(/^!?\[(label)\]\((.*?)\)/).replace("label",Ce._label).getRegex(),reflink:C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ce._label).getRegex()}),Ce.gfm=H({},Ce.normal,{escape:C(Ce.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Ce.gfm.url=C(Ce.gfm.url,"i").replace("email",Ce.gfm._extended_email).getRegex(),Ce.breaks=H({},Ce.gfm,{br`),this.blockTokens(k,this.tokens);for(var M;M=this.inlineQueue.shift();)this.inlineTokens(M.src,M.tokens);return this.tokens},$.blockTokens=function(k,M){var F=this;M===void 0&&(M=[]),this.options.pedantic?k=k.replace(/\t/g," ").replace(/^ +$/gm,""):k=k.replace(/^( *)(\t+)/gm,function($e,He,Tt){return He+" ".repeat(Tt.length)});for(var O,Z,re,Se;k;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function($e){return(O=$e.call({lexer:F},k,M))?(k=k.substring(O.raw.length),M.push(O),!0):!1}))){if(O=this.tokenizer.space(k)){k=k.substring(O.raw.length),O.raw.length===1&&M.length>0?M[M.length-1].raw+=``:M.push(O);continue}if(O=this.tokenizer.code(k)){k=k.substring(O.raw.length),Z=M[M.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):M.push(O);continue}if(O=this.tokenizer.fences(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.heading(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.hr(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.blockquote(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.list(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.html(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.def(k)){k=k.substring(O.raw.length),Z=M[M.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(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.lheading(k)){k=k.substring(O.raw.length),M.push(O);continue}if(re=k,this.options.extensions&&this.options.extensions.startBlock&&function(){var $e=1/0,He=k.slice(1),Tt=void 0;F.options.extensions.startBlock.forEach(function(bt){Tt=bt.call({lexer:this},He),typeof Tt=="number"&&Tt>=0&&($e=Math.min($e,Tt))}),$e<1/0&&$e>=0&&(re=k.substring(0,$e+1))}(),this.state.top&&(O=this.tokenizer.paragraph(re))){Z=M[M.length-1],Se&&Z.type==="paragraph"?(Z.raw+=``+O.raw,Z.text+=``+O.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Z.text):M.push(O),Se=re.length!==k.length,k=k.substring(O.raw.length);continue}if(O=this.tokenizer.text(k)){k=k.substring(O.raw.length),Z=M[M.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):M.push(O);continue}if(k){var ke="Infinite loop on byte: "+k.charCodeAt(0);if(this.options.silent){console.error(ke);break}else throw new Error(ke)}}return this.state.top=!0,M},$.inline=function(k,M){return M===void 0&&(M=[]),this.inlineQueue.push({src:k,tokens:M}),M},$.inlineTokens=function(k,M){var F=this;M===void 0&&(M=[]);var O,Z,re,Se=k,ke,$e,He;if(this.tokens.links){var Tt=Object.keys(this.tokens.links);if(Tt.length>0)for(;(ke=this.tokenizer.rules.inline.reflinkSearch.exec(Se))!=null;)Tt.includes(ke[0].slice(ke[0].lastIndexOf("[")+1,-1))&&(Se=Se.slice(0,ke.index)+"["+We("a",ke[0].length-2)+"]"+Se.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ke=this.tokenizer.rules.inline.blockSkip.exec(Se))!=null;)Se=Se.slice(0,ke.index)+"["+We("a",ke[0].length-2)+"]"+Se.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ke=this.tokenizer.rules.inline.escapedEmSt.exec(Se))!=null;)Se=Se.slice(0,ke.index)+"++"+Se.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;k;)if($e||(He=""),$e=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(Oe){return(O=Oe.call({lexer:F},k,M))?(k=k.substring(O.raw.length),M.push(O),!0):!1}))){if(O=this.tokenizer.escape(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.tag(k)){k=k.substring(O.raw.length),Z=M[M.length-1],Z&&O.type==="text"&&Z.type==="text"?(Z.raw+=O.raw,Z.text+=O.text):M.push(O);continue}if(O=this.tokenizer.link(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.reflink(k,this.tokens.links)){k=k.substring(O.raw.length),Z=M[M.length-1],Z&&O.type==="text"&&Z.type==="text"?(Z.raw+=O.raw,Z.text+=O.text):M.push(O);continue}if(O=this.tokenizer.emStrong(k,Se,He)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.codespan(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.br(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.del(k)){k=k.substring(O.raw.length),M.push(O);continue}if(O=this.tokenizer.autolink(k,Mi)){k=k.substring(O.raw.length),M.push(O);continue}if(!this.state.inLink&&(O=this.tokenizer.url(k,Mi))){k=k.substring(O.raw.length),M.push(O);continue}if(re=k,this.options.extensions&&this.options.extensions.startInline&&function(){var Oe=1/0,Li=k.slice(1),Yt=void 0;F.options.extensions.startInline.forEach(function(zs){Yt=zs.call({lexer:this},Li),typeof Yt=="number"&&Yt>=0&&(Oe=Math.min(Oe,Yt))}),Oe<1/0&&Oe>=0&&(re=k.substring(0,Oe+1))}(),O=this.tokenizer.inlineText(re,lt)){k=k.substring(O.raw.length),O.raw.slice(-1)!=="_"&&(He=O.raw.slice(-1)),$e=!0,Z=M[M.length-1],Z&&Z.type==="text"?(Z.raw+=O.raw,Z.text+=O.text):M.push(O);continue}if(k){var bt="Infinite loop on byte: "+k.charCodeAt(0);if(this.options.silent){console.error(bt);break}else throw new Error(bt)}}return M},i(G,null,[{key:"rules",get:function(){return{block:fe,inline:Ce}}}]),G}(),Nn=function(){function G(z){this.options=z||e.defaults}var $=G.prototype;return $.code=function(k,M,F){var O=(M||"").match(/\S*/)[0];if(this.options.highlight){var Z=this.options.highlight(k,O);Z!=null&&Z!==k&&(F=!0,k=Z)}return k=k.replace(/\n$/,"")+``,O?'<pre><code class="'+this.options.langPrefix+m(O,!0)+'">'+(F?k:m(k,!0))+`</code></pre>`:"<pre><code>"+(F?k:m(k,!0))+`</code></pre>`},$.blockquote=function(k){return`<blockquote>`+k+`</blockquote>`},$.html=function(k){return k},$.heading=function(k,M,F,O){if(this.options.headerIds){var Z=this.options.headerPrefix+O.slug(F);return"<h"+M+' id="'+Z+'">'+k+"</h"+M+`>`}return"<h"+M+">"+k+"</h"+M+`>`},$.hr=function(){return this.options.xhtml?`<hr/>`:`<hr>`},$.list=function(k,M,F){var O=M?"ol":"ul",Z=M&&F!==1?' start="'+F+'"':"";return"<"+O+Z+`>`+k+"</"+O+`>`},$.listitem=function(k){return"<li>"+k+`</li>`},$.checkbox=function(k){return"<input "+(k?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},$.paragraph=function(k){return"<p>"+k+`</p>`},$.table=function(k,M){return M&&(M="<tbody>"+M+"</tbody>"),`<table><thead>`+k+`</thead>`+M+`</table>`},$.tablerow=function(k){return`<tr>`+k+`</tr>`},$.tablecell=function(k,M){var F=M.header?"th":"td",O=M.align?"<"+F+' align="'+M.align+'">':"<"+F+">";return O+k+("</"+F+`>`)},$.strong=function(k){return"<strong>"+k+"</strong>"},$.em=function(k){return"<em>"+k+"</em>"},$.codespan=function(k){return"<code>"+k+"</code>"},$.br=function(){return this.options.xhtml?"<br/>":"<br>"},$.del=function(k){return"<del>"+k+"</del>"},$.link=function(k,M,F){if(k=T(this.options.sanitize,this.options.baseUrl,k),k===null)return F;var O='<a href="'+m(k)+'"';return M&&(O+=' title="'+M+'"'),O+=">"+F+"</a>",O},$.image=function(k,M,F){if(k=T(this.options.sanitize,this.options.baseUrl,k),k===null)return F;var O='<img src="'+k+'" alt="'+F+'"';return M&&(O+=' title="'+M+'"'),O+=this.options.xhtml?"/>":">",O},$.text=function(k){return k},G}(),Ie=function(){function G(){}var $=G.prototype;return $.strong=function(k){return k},$.em=function(k){return k},$.codespan=function(k){return k},$.del=function(k){return k},$.html=function(k){return k},$.text=function(k){return k},$.link=function(k,M,F){return""+F},$.image=function(k,M,F){return""+F},$.br=function(){return""},G}(),de=function(){function G(){this.seen={}}var $=G.prototype;return $.serialize=function(k){return k.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},$.getNextSafeSlug=function(k,M){var F=k,O=0;if(this.seen.hasOwnProperty(F)){O=this.seen[k];do O++,F=k+"-"+O;while(this.seen.hasOwnProperty(F))}return M||(this.seen[k]=O,this.seen[F]=0),F},$.slug=function(k,M){M===void 0&&(M={});var F=this.serialize(k);return this.getNextSafeSlug(F,M.dryrun)},G}(),we=function(){function G(z){this.options=z||e.defaults,this.options.renderer=this.options.renderer||new Nn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ie,this.slugger=new de}G.parse=function(k,M){var F=new G(M);return F.parse(k)},G.parseInline=function(k,M){var F=new G(M);return F.parseInline(k)};var $=G.prototype;return $.parse=function(k,M){M===void 0&&(M=!0);var F="",O,Z,re,Se,ke,$e,He,Tt,bt,Oe,Li,Yt,zs,ni,$i,qc,Cs,kr,kl,Gc=k.length;for(O=0;O<Gc;O++){if(Oe=k[O],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Oe.type]&&(kl=this.options.extensions.renderers[Oe.type].call({parser:this},Oe),kl!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(Oe.type))){F+=kl||"";continue}switch(Oe.type){case"space":continue;case"hr":{F+=this.renderer.hr();continue}case"heading":{F+=this.renderer.heading(this.parseInline(Oe.tokens),Oe.depth,b(this.parseInline(Oe.tokens,this.textRenderer)),this.slugger);continue}case"code":{F+=this.renderer.code(Oe.text,Oe.lang,Oe.escaped);continue}case"table":{for(Tt="",He="",Se=Oe.header.length,Z=0;Z<Se;Z++)He+=this.renderer.tablecell(this.parseInline(Oe.header[Z].tokens),{header:!0,align:Oe.align[Z]});for(Tt+=this.renderer.tablerow(He),bt="",Se=Oe.rows.length,Z=0;Z<Se;Z++){for($e=Oe.rows[Z],He="",ke=$e.length,re=0;re<ke;re++)He+=this.renderer.tablecell(this.parseInline($e[re].tokens),{header:!1,align:Oe.align[re]});bt+=this.renderer.tablerow(He)}F+=this.renderer.table(Tt,bt);continue}case"blockquote":{bt=this.parse(Oe.tokens),F+=this.renderer.blockquote(bt);continue}case"list":{for(Li=Oe.ordered,Yt=Oe.start,zs=Oe.loose,Se=Oe.items.length,bt="",Z=0;Z<Se;Z++)$i=Oe.items[Z],qc=$i.checked,Cs=$i.task,ni="",$i.task&&(kr=this.renderer.checkbox(qc),zs?$i.tokens.length>0&&$i.tokens[0].type==="paragraph"?($i.tokens[0].text=kr+" "+$i.tokens[0].text,$i.tokens[0].tokens&&$i.tokens[0].tokens.length>0&&$i.tokens[0].tokens[0].type==="text"&&($i.tokens[0].tokens[0].text=kr+" "+$i.tokens[0].tokens[0].text)):$i.tokens.unshift({type:"text",text:kr}):ni+=kr),ni+=this.parse($i.tokens,zs),bt+=this.renderer.listitem(ni,Cs,qc);F+=this.renderer.list(bt,Li,Yt);continue}case"html":{F+=this.renderer.html(Oe.text);continue}case"paragraph":{F+=this.renderer.paragraph(this.parseInline(Oe.tokens));continue}case"text":{for(bt=Oe.tokens?this.parseInline(Oe.tokens):Oe.text;O+1<Gc&&k[O+1].type==="text";)Oe=k[++O],bt+=`
`+(Oe.tokens?this.parseInline(Oe.tokens):Oe.text);F+=M?this.renderer.paragraph(bt):bt;continue}default:{var Zc='Token with "'+Oe.type+'" type was not found.';if(this.options.silent){console.error(Zc);return}else throw new Error(Zc)}}}return F},$.parseInline=function(k,M){M=M||this.renderer;var F="",O,Z,re,Se=k.length;for(O=0;O<Se;O++){if(Z=k[O],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Z.type]&&(re=this.options.extensions.renderers[Z.type].call({parser:this},Z),re!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(Z.type))){F+=re||"";continue}switch(Z.type){case"escape":{F+=M.text(Z.text);break}case"html":{F+=M.html(Z.text);break}case"link":{F+=M.link(Z.href,Z.title,this.parseInline(Z.tokens,M));break}case"image":{F+=M.image(Z.href,Z.title,Z.text);break}case"strong":{F+=M.strong(this.parseInline(Z.tokens,M));break}case"em":{F+=M.em(this.parseInline(Z.tokens,M));break}case"codespan":{F+=M.codespan(Z.text);break}case"br":{F+=M.br();break}case"del":{F+=M.del(this.parseInline(Z.tokens,M));break}case"text":{F+=M.text(Z.text);break}default:{var ke='Token with "'+Z.type+'" type was not found.';if(this.options.silent){console.error(ke);return}else throw new Error(ke)}}}return F},G}();function ae(G,$,z){if(typeof G>"u"||G===null)throw new Error("marked(): input parameter is undefined or null");if(typeof G!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(G)+", string expected");if(typeof $=="function"&&(z=$,$=null),$=H({},ae.defaults,$||{}),Me($),z){var k=$.highlight,M;try{M=wi.lex(G,$)}catch(Se){return z(Se)}var F=function(ke){var $e;if(!ke)try{$.walkTokens&&ae.walkTokens(M,$.walkTokens),$e=we.parse(M,$)}catch(He){ke=He}return $.highlight=k,ke?z(ke):z(null,$e)};if(!k||k.length<3||(delete $.highlight,!M.length))return F();var O=0;ae.walkTokens(M,function(Se){Se.type==="code"&&(O++,setTimeout(function(){k(Se.text,Se.lang,function(ke,$e){if(ke)return F(ke);$e!=null&&$e!==Se.text&&(Se.text=$e,Se.escaped=!0),O--,O===0&&F()})},0))}),O===0&&F();return}function Z(Se){if(Se.message+=`Please report this to https://github.com/markedjs/marked.`,$.silent)return"<p>An error occurred:</p><pre>"+m(Se.message+"",!0)+"</pre>";throw Se}try{var re=wi.lex(G,$);if($.walkTokens){if($.async)return Promise.all(ae.walkTokens(re,$.walkTokens)).then(function(){return we.parse(re,$)}).catch(Z);ae.walkTokens(re,$.walkTokens)}return we.parse(re,$)}catch(Se){Z(Se)}}ae.options=ae.setOptions=function(G){return H(ae.defaults,G),l(ae.defaults),ae},ae.getDefaults=a,ae.defaults=e.defaults,ae.use=function(){for(var G=arguments.length,$=new Array(G),z=0;z<G;z++)$[z]=arguments[z];var k=H.apply(void 0,[{}].concat($)),M=ae.defaults.extensions||{renderers:{},childTokens:{}},F;$.forEach(function(O){if(O.extensions&&(F=!0,O.extensions.forEach(function(re){if(!re.name)throw new Error("extension name required");if(re.renderer){var Se=M.renderers?M.renderers[re.name]:null;Se?M.renderers[re.name]=function(){for(var ke=arguments.length,$e=new Array(ke),He=0;He<ke;He++)$e[He]=arguments[He];var Tt=re.renderer.apply(this,$e);return Tt===!1&&(Tt=Se.apply(this,$e)),Tt}:M.renderers[re.name]=re.renderer}if(re.tokenizer){if(!re.level||re.level!=="block"&&re.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");M[re.level]?M[re.level].unshift(re.tokenizer):M[re.level]=[re.tokenizer],re.start&&(re.level==="block"?M.startBlock?M.startBlock.push(re.start):M.startBlock=[re.start]:re.level==="inline"&&(M.startInline?M.startInline.push(re.start):M.startInline=[re.start]))}re.childTokens&&(M.childTokens[re.name]=re.childTokens)})),O.renderer&&function(){var re=ae.defaults.renderer||new Nn,Se=function(He){var Tt=re[He];re[He]=function(){for(var bt=arguments.length,Oe=new Array(bt),Li=0;Li<bt;Li++)Oe[Li]=arguments[Li];var Yt=O.renderer[He].apply(re,Oe);return Yt===!1&&(Yt=Tt.apply(re,Oe)),Yt}};for(var ke in O.renderer)Se(ke);k.renderer=re}(),O.tokenizer&&function(){var re=ae.defaults.tokenizer||new Ye,Se=function(He){var Tt=re[He];re[He]=function(){for(var bt=arguments.length,Oe=new Array(bt),Li=0;Li<bt;Li++)Oe[Li]=arguments[Li];var Yt=O.tokenizer[He].apply(re,Oe);return Yt===!1&&(Yt=Tt.apply(re,Oe)),Yt}};for(var ke in O.tokenizer)Se(ke);k.tokenizer=re}(),O.walkTokens){var Z=ae.defaults.walkTokens;k.walkTokens=function(re){var Se=[];return Se.push(O.walkTokens.call(this,re)),Z&&(Se=Se.concat(Z.call(this,re))),Se}}F&&(k.extensions=M),ae.setOptions(k)})},ae.walkTokens=function(G,$){for(var z=[],k=function(){var Z=F.value;switch(z=z.concat($.call(ae,Z)),Z.type){case"table":{for(var re=o(Z.header),Se;!(Se=re()).done;){var ke=Se.value;z=z.concat(ae.walkTokens(ke.tokens,$))}for(var $e=o(Z.rows),He;!(He=$e()).done;)for(var Tt=He.value,bt=o(Tt),Oe;!(Oe=bt()).done;){var Li=Oe.value;z=z.concat(ae.walkTokens(Li.tokens,$))}break}case"list":{z=z.concat(ae.walkTokens(Z.items,$));break}default:ae.defaults.extensions&&ae.defaults.extensions.childTokens&&ae.defaults.extensions.childTokens[Z.type]?ae.defaults.extensions.childTokens[Z.type].forEach(function(Yt){z=z.concat(ae.walkTokens(Z[Yt],$))}):Z.tokens&&(z=z.concat(ae.walkTokens(Z.tokens,$)))}},M=o(G),F;!(F=M()).done;)k();return z},ae.parseInline=function(G,$){if(typeof G>"u"||G===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof G!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(G)+", string expected");$=H({},ae.defaults,$||{}),Me($);try{var z=wi.lexInline(G,$);return $.walkTokens&&ae.walkTokens(z,$.walkTokens),we.parseInline(z,$)}catch(k){if(k.message+=`
Please report this to https://github.com/markedjs/marked.`,$.silent)return"<p>An error occurred:</p><pre>"+m(k.message+"",!0)+"</pre>";throw k}},ae.Parser=we,ae.parser=we.parse,ae.Renderer=Nn,ae.TextRenderer=Ie,ae.Lexer=wi,ae.lexer=wi.lex,ae.Tokenizer=Ye,ae.Slugger=de,ae.parse=ae;var pi=ae.options,mi=ae.setOptions,hn=ae.use,zn=ae.walkTokens,Uo=ae.parseInline,La=ae,Uh=we.parse,K_=wi.lex;e.Lexer=wi,e.Parser=we,e.Renderer=Nn,e.Slugger=de,e.TextRenderer=Ie,e.Tokenizer=Ye,e.getDefaults=a,e.lexer=K_,e.marked=ae,e.options=pi,e.parse=La,e.parseInline=Uo,e.parser=Uh,e.setOptions=mi,e.use=hn,e.walkTokens=zn,Object.defineProperty(e,"__esModule",{value:!0})})})();Wn.Lexer||exports.Lexer;Wn.Parser||exports.Parser;Wn.Renderer||exports.Renderer;Wn.Slugger||exports.Slugger;Wn.TextRenderer||exports.TextRenderer;Wn.Tokenizer||exports.Tokenizer;Wn.getDefaults||exports.getDefaults;Wn.lexer||exports.lexer;var iR=Wn.marked||exports.marked;Wn.options||exports.options;Wn.parse||exports.parse;Wn.parseInline||exports.parseInline;Wn.parser||exports.parser;Wn.setOptions||exports.setOptions;Wn.use||exports.use;Wn.walkTokens||exports.walkTokens;function TC(r){let e=JSON.parse(r);return e=ZD(e),e}function ZD(r,e=0){if(!r||e>200)return r;if(typeof r=="object"){switch(r.$mid){case 1:return Ee.revive(r);case 2:return new RegExp(r.source,r.flags);case 16:return new Date(r.source)}if(r instanceof jw||r instanceof Uint8Array)return r;if(Array.isArray(r))for(let t=0;t<r.length;++t)r[t]=ZD(r[t],e+1);else for(const t in r)Object.hasOwnProperty.call(r,t)&&(r[t]=ZD(r[t],e+1))}return r}const My=Object.freeze({image:(r,e,t)=>{let i=[],n=[];return r&&({href:r,dimensions:i}=LZ(r),n.push(`src="${Iv(r)}"`)),t&&n.push(`alt="${Iv(t)}"`),e&&n.push(`title="${Iv(e)}"`),i.length&&(n=n.concat(i)),"<img "+n.join(" ")+">"},paragraph:r=>`<p>${r}</p>`,link:(r,e,t)=>typeof r!="string"?"":(r===t&&(t=Ny(t)),e=typeof e=="string"?Iv(Ny(e)):"",r=Ny(r),r=r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a href="${r}" title="${e||r}">${t}</a>`)});function aW(r,e={},t={}){var i;const n=new Y;let s=!1;const o=iT(e),a=function(m){let _;try{_=TC(decodeURIComponent(m))}catch{}return _?(_=LP(_,b=>{if(r.uris&&r.uris[b])return Ee.revive(r.uris[b])}),encodeURIComponent(JSON.stringify(_))):m},l=function(m,_){const b=r.uris&&r.uris[m];let v=Ee.revive(b);return _?m.startsWith(Ue.data+":")?m:(v||(v=Ee.parse(m)),LF.uriToBrowserUri(v).toString(!0)):!v||Ee.parse(m).toString()===v.toString()?m:(v.query&&(v=v.with({query:a(v.query)})),v.toString())},c=new iR.Renderer;c.image=My.image,c.link=My.link,c.paragraph=My.paragraph;const d=[];if(e.codeBlockRenderer&&(c.code=(m,_)=>{const b=rW.nextId(),v=e.codeBlockRenderer(RZ(_),m);return d.push(v.then(C=>[b,C])),`<div class="code" data-code="${b}">${FI(m)}</div>`}),e.actionHandler){const m=function(v){let C=v.target;if(!(C.tagName!=="A"&&(C=C.parentElement,!C||C.tagName!=="A")))try{let w=C.dataset.href;w&&(r.baseUri&&(w=Ry(Ee.from(r.baseUri),w)),e.actionHandler.callback(w,v))}catch(w){Ve(w)}finally{v.preventDefault()}},_=e.actionHandler.disposables.add(new Qe(o,"click")),b=e.actionHandler.disposables.add(new Qe(o,"auxclick"));e.actionHandler.disposables.add(ve.any(_.event,b.event)(v=>{const C=new lr(v);!C.leftButton&&!C.middleButton||m(C)})),e.actionHandler.disposables.add(j(o,"keydown",v=>{const C=new Et(v);!C.equals(10)&&!C.equals(3)||m(C)}))}r.supportHtml||(t.sanitizer=m=>(r.isTrusted?m.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?m:"",t.sanitize=!0,t.silent=!0),t.renderer=c;let h=(i=r.value)!==null&&i!==void 0?i:"";h.length>1e5&&(h=`${h.substr(0,1e5)}…`),r.supportThemeIcons&&(h=CZ(h));let u=iR.parse(h,t);r.supportThemeIcons&&(u=Pd(u).map(_=>typeof _=="string"?_:_.outerHTML).join(""));const p=new DOMParser().parseFromString(nR(r,u),"text/html");if(p.body.querySelectorAll("img").forEach(m=>{const _=m.getAttribute("src");if(_){let b=_;try{r.baseUri&&(b=Ry(Ee.from(r.baseUri),b))}catch{}m.src=l(b,!0)}}),p.body.querySelectorAll("a").forEach(m=>{const _=m.getAttribute("href");if(m.setAttribute("hre
.monaco-drag-image, .monaco-list${n}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } `),e.listFocusAndSelectionForeground&&s.push(` .monaco-drag-image, .monaco-list${n}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; } `),e.listInactiveFocusForeground&&(s.push(`.monaco-list${n} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),s.push(`.monaco-list${n} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&s.push(`.monaco-list${n} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(s.push(`.monaco-list${n} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),s.push(`.monaco-list${n} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(s.push(`.monaco-list${n} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),s.push(`.monaco-list${n} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&s.push(`.monaco-list${n} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&s.push(`.monaco-list${n}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&s.push(`.monaco-list${n}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const o=Ed(e.listFocusAndSelectionOutline,Ed(e.listSelectionOutline,(t=e.listFocusOutline)!==null&&t!==void 0?t:""));o&&s.push(`.monaco-list${n}:focus .monaco-list-row.focused.selected { outline: 1px solid ${o}; outline-offset: -1px;}`),e.listFocusOutline&&s.push(` .monaco-drag-image, .monaco-list${n}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } .monaco-workbench.context-menu-visible .monaco-list${n}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } `);const a=Ed(e.listSelectionOutline,(i=e.listInactiveFocusOutline)!==null&&i!==void 0?i:"");a&&s.push(`.monaco-list${n} .monaco-list-row.focused.selected { outline: 1px dotted ${a}; outline-offset: -1px; }`),e.listSelectionOutline&&s.push(`.monaco-list${n} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&s.push(`.monaco-list${n} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&s.push(`.monaco-list${n} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&s.push(` .monaco-list${n}.drop-target, .monaco-list${n} .monaco-list-rows.drop-target, .monaco-list${n} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; } `),e.tableColumnsBorder&&s.push(` .monaco-table > .monaco-split-view2, .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before, .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2, .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { border-color: ${e.tableColumnsBorder}; }
.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2, .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before { border-color: transparent; } `),e.tableOddRowsBackgroundColor&&s.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=s.join(``)}}const QZ={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:W.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:W.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:W.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0},JZ={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function eY(r,e){const t=r.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&r[n]===e-(t-n);)i.push(r[n--]);for(i.reverse(),n=t;n<r.length&&r[n]===e+(n-t);)i.push(r[n++]);return i}function XD(r,e){const t=[];let i=0,n=0;for(;i<r.length||n<e.length;)if(i>=r.length)t.push(e[n++]);else if(n>=e.length)t.push(r[i++]);else if(r[i]===e[n]){t.push(r[i]),i++,n++;continue}else r[i]<e[n]?t.push(r[i++]):t.push(e[n++]);return t}function tY(r,e){const t=[];let i=0,n=0;for(;i<r.length||n<e.length;)if(i>=r.length)t.push(e[n++]);else if(n>=e.length)t.push(r[i++]);else if(r[i]===e[n]){i++,n++;continue}else r[i]<e[n]?t.push(r[i++]):n++;return t}const lR=(r,e)=>r-e;class iY{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 s=0;for(const o of this.renderers)o.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){var s;let o=0;for(const a of this.renderers)(s=a.disposeElement)===null||s===void 0||s.call(a,e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class nY{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 s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof s=="number"?i.setAttribute("aria-level",`${s}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class sY{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 s,o;(o=(s=this.dnd).onDragLeave)===null||o===void 0||o.call(s,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 Wo{get onDidChangeFocus(){return ve.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return ve.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get on
`)}styleSelectElement(){var e,t,i;const n=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",s=(t=this.styles.selectForeground)!==null&&t!==void 0?t:"",o=(i=this.styles.selectBorder)!==null&&i!==void 0?i:"";this.selectElement.style.backgroundColor=n,this.selectElement.style.color=s,this.selectElement.style.borderColor=o}styleList(){var e,t;const i=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",n=Ed(this.styles.selectListBackground,i);this.selectDropDownListContainer.style.backgroundColor=n,this.selectionDetailsPane.style.backgroundColor=n;const s=(t=this.styles.focusBorder)!==null&&t!==void 0?t:"";this.selectDropDownContainer.style.outlineColor=s,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=Wi(this.selectElement),i=getComputedStyle(this.selectElement),n=parseFloat(i.getPropertyValue("--dropdown-padding-top"))+parseFloat(i.getPropertyValue("--dropdown-padding-bottom")),s=window.innerHeight-t.top-t.height-(this.selectBoxOptions.minBottomMargin||0),o=t.top-qr.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,a=this.selectElement.offsetWidth,l=this.setWidthControlElement(this.widthControlElement),c=Math.max(l,Math.round(a)).toString()+"px";this.selectDropDownContainer.style.width=c,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let d=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const h=this._hasDetails?this._cachedMaxDetailsHeight:0,u=d+n+h,g=Math.floor((s-n-h)/this.getHeight()),p=Math.floor((o-n-h)/this.getHeight());if(e)return t.top+t.height>window.innerHeight-22||t.top<qr.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||g<1&&p<1?!1:(g<qr.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&p>g&&this.options.length>g?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selection
`)}}const Mh=new hY;Kt.add(dY.IconContribution,Mh);function fi(r,e,t,i){return Mh.registerIcon(r,e,t,i)}function mW(){return Mh}function uY(){const r=kP();for(const e in r){const t="\\"+r[e].toString(16);Mh.registerIcon(e,{fontCharacter:t})}}uY();const _W="vscode://schemas/icons",vW=Kt.as(Gw.JSONContribution);vW.registerSchema(_W,Mh.getIconSchema());const hR=new yt(()=>vW.notifySchemaChanged(_W),200);Mh.onDidChange(()=>{hR.isScheduled()||hR.schedule()});const bW=fi("widget-close",Re.close,f("widgetClose","Icon for the close action in widgets."));fi("goto-previous-location",Re.arrowUp,f("previousChangeIcon","Icon for goto previous editor location."));fi("goto-next-location",Re.arrowDown,f("nextChangeIcon","Icon for goto next editor location."));De.modify(Re.sync,"spin");De.modify(Re.loading,"spin");var gY=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uR=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},fY=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Oy;const Ev=3;class xf{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 Py{constructor(e){this.entries=e}}const pY=fi("diff-review-insert",Re.add,f("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),mY=fi("diff-review-remove",Re.remove,f("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),_Y=fi("diff-review-close",Re.close,f("diffReviewCloseIcon","Icon for 'Close' in diff review."));let MC=class rd extends V{constructor(e,t,i){super(),this._languageService=t,this._audioCueService=i,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 ao(this.actionBarContainer.domNode)),this._actionBar.push(new ps("diffreview.close",f("label.close","Close"),"close-diff-review "+De.asClassName(_Y),!0,()=>fY(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 C_(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(ui(this.domNode.domNode,"click",n=>{n.preventDefault();const s=xF(n.target,"diff-review-row");s&&this._goToRow(s)})),this._register(ui(this.domNode.domNode,"keydown",n=>{(n.equals(18)||n.equals(2066)||n.equals(530))&&(n.preventDefault(),this._goToRow(this._getNextRow(),"next")),(n.equals(16)||n.equals(2064)||n.equals(528))&&(n.preventDefault(),this._goToRow(this._getPrevRow(),"previous")),(n.equals(9)||n.equals(2057)||n.equals(521)||n.equals(1033)||n.equals(10)||n.equals(3))&&(n.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,s=this._diffs.length;n<s;n++)if(this._diffs[n]===thi
`:`\r`)}else yield this._clipboardService.writeText(m)})),c.push(u)),i.getOption(86)||c.push(new ps("diff.inline.revertChange",f("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>Fy(this,void 0,void 0,function*(){const m=new S(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),_=n.originalModel.getValueInRange(m);if(n.modifiedEndLineNumber===0){const b=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new S(n.modifiedStartLineNumber,b,n.modifiedStartLineNumber,b),text:l+_}])}else{const b=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new S(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,b),text:_}])}})));const p=(m,_)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:m,y:_}),getActions:()=>(u&&(u.label=d?f("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+h):f("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber+h)),c),autoSelectFirstItem:!0})};this._register(ui(this._diffActions,"mousedown",m=>{const{top:_,height:b}=Wi(this._diffActions),v=Math.floor(a/3);m.preventDefault(),p(m.posx,_+b+v)})),this._register(i.onMouseMove(m=>{m.target.type===8||m.target.type===5?m.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,h=this._updateLightBulbPosition(this._marginDomNode,m.event.browserEvent.y,a)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(m=>{m.event.rightButton&&(m.target.type===8||m.target.type===5)&&m.target.detail.viewZoneId===this._viewZoneId&&(m.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,m.event.browserEvent.y,a),p(m.event.posx,m.event.posy+a))}))}_updateLightBulbPosition(e,t,i){const{top:n}=Wi(e),s=t-n,o=Math.floor(s/i),a=o*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],o<l)return c}return o}}const Vo=tt("editorWorkerService");var wY=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SY=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},yY=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let QD=class{constructor(e,t){this.editorWorkerService=t,this.onDidChangeEventEmitter=new A,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="smart",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;(e=this.diffAlgorithmOnDidChangeSubscription)===null||e===void 0||e.dispose()}computeDiff(e,t,i){return yY(this,void 0,void 0,function*(){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,i);const n=yield this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm);if(!n)throw new Error("no diff result available");return n})}setOptions(e){var t;let i=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&((t=this.diffAlgorithmOnDidChangeSubscription)===null||t===void 0||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),i=!0),i&&this.onDidChangeEventEmitter.fire()}};QD=wY([SY(1,Vo)],QD);const Sl=tt("clipboardService"),yl=tt("contextViewService"),Lr=tt("contextMenuService"),sT=tt("progressService")
.monaco-editor .diagonal-fill { background-image: linear-gradient( -45deg, ${t} 12.5%, #0000 12.5%, #0000 50%, ${t} 50%, ${t} 62.5%, #0000 62.5%, #0000 100% ); background-size: 8px 8px; } `)});var MY=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},RY=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},AY=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let JD=class extends V{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new A),this._onCodeEditorAdd=this._register(new A),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new A),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new A),this._onDiffEditorAdd=this._register(new A),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new A),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new hs,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}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])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}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 s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.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 AY(this,void 0,void 0,function*(){for(const n of this._codeEditorOpenHandlers){const s=yield n(e,t,i);if(s!==null)return s}return null})}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return Ke(t)}};JD=MY([RY(0,Ui)],JD);var OY=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bR=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},PY=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let OC=class extends JD{constructor(e,t){super(t),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=e.createKey("ed
`)}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 BY{constructor(e,t,i,n,s,o,a){this.id=++IW,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=s,this.sourceId=o,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 SR),this.removedResources.has(t)||this.removedResources.set(t,new wR(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 SR),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new wR(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class EW{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 VB(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-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,s=0),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let o=-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,o=a),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),o!==-1&&(this._future=this._future.slice(o+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 Wy{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 TW=new EW("","");TW.locked=!0;let tk=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=Lg.None,i=jr.None){if(e.type===0){const n=Nv(e.resource),s=this.getUriComparisonKey(e.resource);this._pushElement(new Mv(e,n,s,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,s=[],o=[];for(const a of e.resources){const l=Nv(a),c=this.getUriComparisonKey(a);n.has(c)||(n.add(c),s.push(l),o.push(c))}s.length===1?this._pushElement(new Mv(e,s[0],o[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new BY(e,s,o,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],s=e.strResources[t];let o;this._editStacks.has(s)?o=this._editStacks.get(s):(o=new EW(n,s),this._editStacks.set(s,o)),o.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 s of i){const o=Nv(s.resource),a=this.getUriComparisonKey(s.resource),l=new Mv(s,o,a,0,0,0,0);n.set(l.strResource,l)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).splitPastWorkspaceElement(e,n)}}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const o=Nv(s.resource),a=this.getUriComparisonKey(s.resource),l=new Mv(s,o,a,0,0,0,0);n.set(l.strResource,l)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).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 VB(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,s]of this._editStacks){const o=s.getClosestPastElement();o&&o.sourceId===e&&(!t||o.sourceOrder>t.sourceOrder)&&(t=o,i=n)}return[t,i]}canUndo(e){if(e instanceof jr){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){Ve(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,s){const o=this._acquireLocks(i);let a;try{a=t()}catch(l){return o(),n.dispose(),this._onError(l,e)}return a?a.then(()=>(o(),n.dispose(),s()),l=>(o(),n.dispose(),this._onError(l,e))):(o(),n.dispose(),s())}_invokeWorkspacePrepare(e){return Tv(this,void 0,void 0,function*(){if(typeof e.actual.prepareUndoRedo>"u")return V.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?V.None:t})}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(V.None);const i=e.actual.prepareUndoRedo();return i?WI(i)?t(i):i.then(n=>t(n)):t(V.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||TW);return new Wy(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Rv(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new Rv}_checkWorkspac
`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const s of e.keys)this.affectedKeys.add(s);for(const[,s]of e.overrides)for(const o of s)this.affectedKeys.add(o);this._affectsConfigStr=this._marker;for(const s of this.affectedKeys)this._affectsConfigStr+=s+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=yS.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;const n=this._marker+e,s=this._affectsConfigStr.indexOf(n);if(s<0)return!1;const o=s+n.length;if(o>=this._affectsConfigStr.length)return!1;const a=this._affectsConfigStr.charCodeAt(o);if(a!==this._markerCode1&&a!==this._markerCode2)return!1;if(t){const l=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(i=this.previous)===null||i===void 0?void 0:i.workspace):void 0,c=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!hl(l,c)}return!0}}const fX=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class pX extends V{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:ve.None}constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new A),this._currentChord=null,this._currentChordChecker=new f_,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Au.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new lo,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),null;const[n]=i.getDispatchChords();if(n===null)return this._log("\\ Keyboard event cannot be dispatched"),null;const s=this._contextKeyService.getContext(t),o=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(s,o,n)}_enterMultiChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(f("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-i>5e3&&this._leaveChordMode()},500),gC.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null,gC.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Au.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Au.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mi :host { all: initial; /* 1st rule so subsequent properties are reset. */ }
.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 NX=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},MX=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let uk=class extends V{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=V.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new Eg(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=Ke(()=>{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)}};uk=NX([MX(0,nf)],uk);let Tg=[],dT=[],VW=[];function Fv(r,e=!1){RX(r,!1,e)}function RX(r,e,t){const i=AX(r,e);Tg.push(i),i.userConfigured?VW.push(i):dT.push(i),t&&!i.userConfigured&&Tg.forEach(n=>{n.mime===i.mime||n.userConfigured||(i.extension&&n.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&n.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&n.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&n.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}function AX(r,e){return{id:r.id,mime:r.mime,filename:r.filename,extension:r.extension,filepattern:r.filepattern,firstline:r.firstline,userConfigured:e,filenameLowercase:r.filename?r.filename.toLowerCase():void 0,extensionLowercase:r.extension?r.extension.toLowerCase():void 0,filepatternLowercase:r.filepattern?AW(r.filepattern.toLowerCase()):void 0,filepatternOnPath:r.filepattern?r.filepattern.indexOf(tr.sep)>=0:!1}}function OX(){Tg=Tg.filter(r=>r.userConfigured),dT=[]}function PX(r,e){return FX(r,e).map(t=>t.id)}function FX(r,e){let t;if(r)switch(r.scheme){case Ue.file:t=r.fsPath;break;case Ue.data:{t=wc.parseMetaData(r).get(wc.META_DATA_LABEL);break}case Ue.vscodeNotebookCell:t=void 0;break;default:t=r.path}if(!t)return[{id:"unknown",mime:Qn.unknown}];t=t.toLowerCase();const i=ec(t),n=FR(t,i,VW);if(n)return[n,{id:Os,mime:Qn.text}];const s=FR(t,i,dT);if(s)return[s,{id:Os,mime:Qn.text}];if(e){const o=BX(e);if(o)return[o,{id:Os,mime:Qn.text}]}return[{id:"unknown",mime:Qn.unknown}]}function FR(r,e,t){var i;let n,s,o;for(let a=t.length-1;a>=0;a--){const l=t[a];if(e===l.filenameLowercase){n=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const c=l.filepatternOnPath?r:e;!((i=l.filepatternLowercase)===null||i===void 0)&&i.call(l,c)&&(s=l)}l.extension&&(!o||l.extension.length>o.extension.length)&&e.endsWith(l.extensionLowercase)&&(o=l)}if(n)return n;if(s)return s;if(o)return o}function BX(r){if(MI(r)&&(r=r.substr(1)),r.length>0)for(let e=Tg.length-1;e>=0;e--){const t=Tg[e];if(!t.firstline)continue;const i=r.match(t.firstline);if(i&&i.length>0)return t}}const Bv=Object.prototype.hasOwnProperty,BR="vs.editor.nullLanguage";class WX{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(BR,0),this._register(Os,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._next
[{1}] {2}`,s,cT.modifierLabels[Ts].altKey,c)}return s}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const n=this._commandAction.checked&&zX(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(n)if(De.isThemeIcon(n)){const s=De.asClassNameArray(n);i.classList.add(...s),this._itemClassDispose.value=Ke(()=>{i.classList.remove(...s)})}else i.style.backgroundImage=rm(this._themeService.getColorTheme().type)?Yd(n.dark):Yd(n.light),i.classList.add("icon"),this._itemClassDispose.value=ur(Ke(()=>{i.style.backgroundImage="",i.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};eh=kS([Ds(2,ii),Ds(3,Ci),Ds(4,Ne),Ds(5,Ui),Ds(6,Lr)],eh);let gk=class extends UC{constructor(e,t,i,n){var s,o;const a=Object.assign({},t??Object.create(null),{menuAsChild:(s=t==null?void 0:t.menuAsChild)!==null&&s!==void 0?s:!1,classNames:(o=t==null?void 0:t.classNames)!==null&&o!==void 0?o:De.isThemeIcon(e.item.icon)?De.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,a),this._contextMenuService=i,this._themeService=n}render(e){super.render(e),Ct(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!De.isThemeIcon(i)){this.element.classList.add("icon");const n=()=>{this.element&&(this.element.style.backgroundImage=rm(this._themeService.getColorTheme().type)?Yd(i.dark):Yd(i.light))};n(),this._register(this._themeService.onDidColorThemeChange(()=>{n()}))}}};gk=kS([Ds(2,Lr),Ds(3,Ui)],gk);let fk=class extends nr{constructor(e,t,i,n,s,o,a,l){var c,d,h;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=o,this._instaService=a,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let u;const g=l.get(this._storageKey,1);g&&(u=e.actions.find(m=>g===m.id)),u||(u=e.actions[0]),this._defaultAction=this._instaService.createInstance(eh,u,{keybinding:this._getDefaultActionKeybindingLabel(u)});const p=Object.assign({},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:(h=t==null?void 0:t.actionRunner)!==null&&h!==void 0?h:new _g});this._dropdown=new UC(e,e.actions,this._contextMenuService,p),this._dropdown.actionRunner.onDidRun(m=>{m.action instanceof Po&&this.update(m.action)})}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(eh,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends _g{runAction(t,i){return zW(this,void 0,void 0,function*(){yield t.run(void 0)})}},this._container&&this._defaultAction.render(zj(this._container,X(".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=X(".action-container");this._defaultAction.render(K(this._container,t)),this._register(j(t,oe.KEY_DOWN,n=>{const s=new Et(n);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));const i=X(".dropdown-action-container");this._dropdown.render(K(this._container,i)),this._register(j(i,oe.KEY_DOWN,n=>{var s;const o=new Et(n);o.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(s=this._defaultAction.element)===
.monaco-menu { font-size: 13px; border-radius: 5px; min-width: 160px;}
${zR(Re.menuSelection)}${zR(Re.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 = √φ */}
.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; margin: 0 4px; border-radius: 4px;}
.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: 4px 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=r.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=r.scrollbarSliderBackground;n&&(t+=` .monaco-scrollable-element > .scrollbar > .slider { background: ${n}; } `);const s=r.scrollbarSliderHoverBackground;s&&(t+=` .monaco-scrollable-element > .scrollbar > .slider:hover { background: ${s}; } `);const o=r.scrollbarSliderActiveBackground;o&&(t+=` .monaco-scrollable-element > .scrollbar > .slider.active { background: ${o}; } `)}return t}class iQ{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=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=TF(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:s=>{var o;this.lastContainer=s;const a=e.getMenuClassName?e.getMenuClassName():"";a&&(s.className+=" "+a),this.options.blockMouse&&(this.block=s.appendChild(X(".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",(o=this.blockDisposable)===null||o===void 0||o.dispose(),this.blockDisposable=j(this.block,oe.MOUSE_DOWN,d=>d.stopPropagation()));const l=new Y,c=e.actionRunner||new _g;return c.onWillRun(d=>this.onActionRun(d,!e.skipTelemetry),this,l),c.onDidRun(this.onDidActionRun,this,l),i=new ig(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:c,getKeyBinding:e.getKeyBinding?e.getKeyBinding:d=>this.keybindingService.lookupKeybinding(d.id)},XX),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,l),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,l),l.add(j(window,oe.BLUR,()=>this.contextViewService.hideContextView(!0))),l.add(j(window,oe.MOUSE_DOWN,d=>{if(d.defaultPrevented)return;const h=new lr(d);let u=h.target;if(!h.rightButton){for(;u;){if(u===s)return;u=u.parentElement}this.contextViewService.hideContextView(!0)}})),ur(l,i)},focus:()=>{i==null||i.focus(!!e.autoSelectFirstItem)},onHide:s=>{var o,a,l;(o=e.onHide)===null||o===void 0||o.call(e,!!s),this.block&&(this.block.remove(),this.block=null),(a=this.blockDisposable)===null||a===void 0||a.dispose(),this.blockDisposable=null,this.lastContainer&&(sc()===this.lastContainer||to(sc(),this.lastContainer))&&((l=this.focusToReturn)===null||l===void 0||l.focus()),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!Pc(e.error)&&this.notificationService.error(e.error)}}var nQ=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qh=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let _k=class extends V{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new iQ(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,s,o){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=s,this.contextKeyService=o,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new A),this._onDidHideContextMenu=this._store.add(new A)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=vk.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{var i;(i=e.onHide)===null||i===void 0||i.call(e,t),this._onDidHideContextMenu.fire()}})),Xa.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};_k=nQ([Qh(0,ho),Qh(1,Ci),Qh(2,yl),Qh(3,ii),Qh(4,Ca),Qh(5,Ne)],_k);var vk;(function(r){function e(i){return i&&i.menuId i
`?a=2:l===``&&(a=1);let c=_n.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(c=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let d=_n.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(d=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let h=_n.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(h=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let u=_n.bracketPairColorizationOptions;return!((i=e.editor)===null||i===void 0)&&i.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(u={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:s,insertSpaces:o,detectIndentation:d,defaultEOL:a,trimAutoWhitespace:c,largeFileOptimizations:h,bracketPairColorizationOptions:u}}_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:Ts===3||Ts===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 s=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:t}),o=this._getEOL(t,e);n=rp._readModelOptions({editor:s,eol:o},i),this._modelCreationOptionsByLanguageAndResource[e+t]=n}return n}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,s=i.length;n<s;n++){const o=i[n],a=this._models[o],l=a.model.getLanguageId(),c=a.model.uri;if(e&&!e.affectsConfiguration("editor",{overrideIdentifier:l,resource:c})&&!e.affectsConfiguration("files.eol",{overrideIdentifier:l,resource:c}))continue;const d=t[l+c],h=this.getCreationOptions(l,c,a.model.isForSimpleWidget);rp._setModelOptionsForModel(a.model,h,d)}}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&&hl(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(Tl(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(Tl(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(Tl(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 s=this.getCreationOptions(t,i,n),o=new _l(e,t,s,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(Tl(i))){const c=this._removeDisposedModel(i),d=this._undoRedoService.getElements(i),h=$R(o)===c.sha1;if(h||c.sharesUndoRedoStack){for(const u of d.past)Ha(u)&&u.matchesResource(i)&&u.setModel(o);for(const u of d.future)Ha(u)&&u.matchesResource(i)&&u.setModel(o);this._undoRedoService.setElementsValidFlag(i,!0,u=>Ha(u)&&u.matchesResource(i)),h&&(o._overwriteVersionId(c.versionId),o._overwriteAlternativeVersionId(c.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}const a=Tl(o.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new aQ(o,c=>this._onWillDispose(c),(c,d)=>this._onDidChangeLanguage(c,d));return this._models[a]=l,l}createModel(e,t,i,n=!1){let s;return t?(s=this._createModelData(e,t.languageId,i,n),this.setMode(s.model,t)):s=this._createModelData(e,Os,i,n),this._onModelAdded.fire(s.model),s.model}setMode(e,t,i){if(!t)return;const n=this._models[Tl(e.uri)];n&&n.setLanguage(t,i)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const s=t[i];e.push(this._models[s].model)}return e}getModel(e){const t=Tl(e),i=this._models[t];return i?i.model:null}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===Ue.file||e.scheme===Ue.vscodeRemote||e.scheme===Ue.vscodeUserData||e.scheme===Ue.vscodeNotebookCell||e.scheme==="fake-fs"}_onWillDispose(e){const t=Tl(e.uri),i=this._model
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()}}xS.InstanceCount=0;class of extends go{constructor(e){super(),this._onChange=this._register(new A),this.onChange=this._onChange.event,this._onKeyDown=this._register(new A),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...De.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._register(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}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const bQ=f("caseDescription","Match Case"),CQ=f("wordsDescription","Match Whole Word"),wQ=f("regexDescription","Use Regular Expression");class GW extends of{constructor(e){super({icon:Re.caseSensitive,title:bQ+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class ZW extends of{constructor(e){super({icon:Re.wholeWord,title:CQ+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class YW extends of{constructor(e){super({icon:Re.regex,title:wQ+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class SQ{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 yQ{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()}isLast(){return this._currentPosition()===this._elements.
`),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)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,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(s=>this.model.getNode(s));this.selection.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-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 o=this.model.getParentNodeLocation(n);if(!o)return;const a=this.model.getListIndex(o);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[o]=this.view.getFocus(),a=o+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),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){wt(this.disposables),this.view.dispose()}}class pT{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new kQ(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,s){return i.sorter.compare(n.element,s.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=gt.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=gt.empty(),i){const n=new Set,s=new Set,o=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 h=this.identityProvider.getId(d.element).toString();s.add(h),this.nodesByIdentity.set(h,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 h=this.identityProvider.getId(d.element).toString();s.has(h)||this.nodesByIdentity.delete(h)}(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:o,onDidDeleteNode:a}))}preserveCollapseState(e=gt.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),gt.map(e,t=>{let i=this.nodes.get(t.element);if(!i&&this.identityProvider){const o=this.identityProvider.getId(t.element).toString();i=this.nodesByIdentity.get(o)}if(!i)return Object.assign(Object.assign({},t),{children:this.preserveCollapseState(t.children)});const n=typeof t.collapsible=="boolean"?t.collapsible:i.collapsible,s=typeof t.collapsed<"u"?t.collapsed:i.collapsed;return Object.assign(Object.assign({},t),{collapsible:n,collapsed:s,children:this.preserveCollapseState(t.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirs
`?-1:0,o+=i;for(const a of t)a.end<=o||(a.start>=o&&(a.start+=n),a.end>=o&&(a.end+=n));return i+=n,"⏎"})}}class Jy{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 iw extends V{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new Jy(K(e,X(".monaco-icon-label")))),this.labelContainer=K(this.domNode.element,X(".monaco-icon-label-container"));const i=K(this.labelContainer,X("span.monaco-icon-name-container"));t!=null&&t.supportHighlights||t!=null&&t.supportIcons?this.nameNode=new mJ(i,!!t.supportIcons):this.nameNode=new fJ(i),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"],s=["monaco-icon-label-container"];if(i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough"),i.disabledCommand&&s.push("disabled")),this.domNode.className=n.join(" "),this.labelContainer.className=s.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){const o=this.getOrCreateDescriptionNode();o instanceof rl?(o.set(t||"",i?i.descriptionMatches:void 0,void 0,i==null?void 0:i.labelEscapeNewLines),this.setupHover(o.element,i==null?void 0:i.descriptionTitle)):(o.textContent=t&&(i!=null&&i.labelEscapeNewLines)?rl.escapeNewLines(t,[]):t||"",this.setupHover(o.element,(i==null?void 0:i.descriptionTitle)||""),o.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)DZ(e,t);else{const n=nW(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()}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new Jy(K(this.labelContainer,X("span.monaco-icon-description-container"))));!((e=this.creationOptions)===null||e===void 0)&&e.supportDescriptionHighlights?this.descriptionNode=new rl(K(t.element,X("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new Jy(K(t.element,X("span.label-description"))))}return this.descriptionNode}}class fJ{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&hl(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=K(this.container,X("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],s=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${i}`;K(this.container,X("a.label-name",{id:s,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},n)),i<e.length-1&&K(this.container,X("span.label-separator",void 0,(t==null?void 0:t.separator)||"/"))}}}}function pJ(r,e,t){if(!t)return;let i=0;return r.map(n=>{const s={start:i,end:i+n.length},o=t.map(a=>gn.intersect(s,a)).filter(a=>!gn.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=s.end+e.length,o})}class mJ{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&hl(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 rl(K(this.container,X("a.label-name",{id:t==null?vo
`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}isDisplayed(){return this.ui&&this.ui.container.style.display!=="none"}}AS.MAX_WIDTH=600;var MJ=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Tf=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Rk=class extends PK{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Ek))),this._quickAccess}constructor(e,t,i,n,s){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=s,this._onShow=this._register(new A),this._onHide=this._register(new A),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:s=>this.setContextKey(s),linkOpenerDelegate:s=>{this.instantiationService.invokeFunction(o=>{o.get(Vs).open(s,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),createList:(s,o,a,l,c)=>this.instantiationService.createInstance(kk,s,o,a,l,c),hoverDelegate:{showHover(s,o){},delay:200},styles:this.computeStyles()},n=this._register(new AS(Object.assign(Object.assign({},i),t)));return n.layout(e.dimension,e.offset.quickPickTop),this._register(e.onDidLayout(s=>n.layout(s,e.offset.quickPickTop))),this._register(n.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(n.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new le(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t==null||t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=st.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:se(FN),quickInputForeground:se(z8),quickInputTitleBackground:se(U8),widgetBorder:se(uE),widgetShadow:se(Qr)},inputBox:KC,toggle:jC,countBadge:HW,button:qX,progressBar:GX,keybindingLabel:KX,list:sf({listBackground:FN,listFocusBackground:Sd,listFocusForeground:wd,listInactiveFocusForeground:wd,listInactiveSelectionIconForeground:Du,listInactiveFocusBackground:Sd,listFocusOutline:Pt,listInactiveFocusOutline:Pt}),pickerGroup:{pickerGroupBorder:se($8),pickerGroupForeground:se(UF)}}}};Rk=MJ([Tf(0,Pe),Tf(1,Ne),Tf(2,Ui),Tf(3,_a),Tf(4,nf)],Rk);var pV=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},md=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Ak=class extends Rk{constructor(e,t,i,n,s,o){super(t,i,n,s,new ek(e.getContainerDomNode(),o)),this.host=void 0;const a=Ng.get(e);if(a){const l=a.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return l.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host
`)}const zJ={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:{[Ti]:"#FFFFFE",[ko]:"#000000",[$F]:"#E5EBF1",[lS]:"#D3D3D3",[cS]:"#939393",[mE]:"#ADD6FF4D"}},UJ={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:{[Ti]:"#1E1E1E",[ko]:"#D4D4D4",[$
`)}}}class _V{getIcon(e){const t=mW();let i=e.defaults;for(;De.isThemeIcon(i);){const n=t.getIcon(i.id);if(!n)return;i=n.defaults}return i}}const Ga="vs",ng="vs-dark",Fd="hc-black",Bd="hc-light",vV=Kt.as(WF.ColorContribution),qJ=Kt.as(iB.ThemingContribution);class bV{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(Rb(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,W.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=Pk(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,W.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=vV.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case Ga:return Qs.LIGHT;case Fd:return Qs.HIGH_CONTRAST_DARK;case Bd:return Qs.HIGH_CONTRAST_LIGHT;default:return Qs.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const s=Pk(this.themeData.base);e=s.rules,s.encodedTokensColors&&(t=s.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const s={token:""};i&&(s.foreground=i),n&&(s.background=n),e.push(s)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=mV.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=on.getForeground(s),a=on.getFontStyle(s);return{foreground:o,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}}function Rb(r){return r===Ga||r===ng||r===Fd||r===Bd}function Pk(r){switch(r){case Ga:return zJ;case ng:return UJ;case Fd:return $J;case Bd:return jJ}}function Vv(r){const e=Pk(r);return new bV(r,e)}class GJ extends V{constructor(){super(),this._onColorThemeChange=this._register(new A),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new A),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new _V,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Ga,Vv(Ga)),this._knownThemes.set(ng,Vv(ng)),this._knownThemes.set(Fd,Vv(Fd)),this._knownThemes.set(Bd,Vv(Bd));const e=KJ(this);this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Ga),this._onOSSchemeChanged(),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),KI("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return sC(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=oo(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),V.None}_registerShadowDomContainer(e){const t=oo(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(!Rb(t.base)&&!Rb(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new bV(e,t)),Rb(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(Ga),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!==ra(this._theme.type)){let t;rm(this._theme.type)?t=e?Fd:ng:t=e?Bd:Ga,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:o=>{t[o]||(e.push(o),t[o]=!0)}};qJ.getThemingParticipants().forEach(o=>o(this._theme,i,this._environment));const n=[];for(const o of vV.getColors()){const a=this._theme.getColor(o.id,!0);a&&n.push(`${hE(o.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor { ${n.join(`
`)} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(HJ(s)),this._themeCSS=e.join(`
`),this._updateCSS(),Gt.setColorMap(s),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 Hs=tt("themeService");var ZJ=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},tL=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Fk=class extends V{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new A,this._onDidChangeReducedMotion=new A,this._accessibilityModeEnabledContext=u_.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(o=>{o.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),o.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),n(),this._register(this.onDidChangeScreenReaderOptimized(()=>n()));const s=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(s)}initReducedMotionListeners(e){if(!this._layoutService.hasContainer)return;this._register(j(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}};Fk=ZJ([tL(0,Ne),tL(1,nf),tL(2,at)],Fk);var PS=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nh=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Bk=class{constructor(e,t){this._commandService=e,this._hiddenStates=new nw(t)}createMenu(e,t,i){return new Vk(e,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};Bk=PS([nh(0,ci),nh(1,zo)],Bk);let nw=class ap{constructor(e){this._storageService=e,this._disposables=new Y,this._onDidChange=new A,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(ap._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(t=>{if(t.key===ap._key){if(!this._ignoreChangeEvent)try{const i=e.get(ap._key,0,"{}");this._data=JSON.parse(i)}catch(i){console.log("FAILED to read storage after UPDATE",i)}this._onDidChange.fire()}}))}dispose(){this._onDidChange.dispose(),this._disposables.dis
(-> incoming)[${[...i.incoming.keys()].join(", ")}] (outgoing ->)[${[...i.outgoing.keys()].join(",")}]`);return e.join(``)}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 s=this._findCycle(n,t);if(s)return s;t.delete(i)}}}const lee=!1;class fA 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 sw{constructor(e=new _S,t=!1,i,n=lee){var s;this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._activeInstantiations=new Set,this._services.set(Pe,this),this._globalGraph=n?(s=i==null?void 0:i._globalGraph)!==null&&s!==void 0?s:new gA(o=>o):void 0}createChild(e){return new sw(e,this._strict,this,this._enableTracing)}invokeFunction(e,...t){const i=Zn.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:o=>{if(n)throw r4("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(o,i);if(!a)throw new Error(`[invokeFunction] unknown service '${o}'`);return a}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof Br?(i=Zn.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Zn.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=ar.getServiceDependencies(e).sort((a,l)=>a.index-l.index),s=[];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),s.push(l)}const o=n.length>0?n[0].index:t.length;if(t.length!==o){console.trace(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);const a=o-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,o)}return Reflect.construct(e,t.concat(s))}_setServiceInstance(e,t){if(this._services.get(e)instanceof Br)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){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof Br?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){var n;const s=new gA(l=>l.id.toString());let o=0;const a=[{id:e,desc:t,_trace:i}];for(;a.length;){const l=a.pop();if(s.lookupOrInsertNode(l),o++>1e3)throw new fA(s);for(const c of ar.getServiceDependencies(l.desc.ctor)){const d=this._getServiceInstanceOrDescriptor(c.id);if(d||this._throwIfStrict(`[createInstance] ${e} depends on ${c.id} which is NOT registered.`,!0),(n=this._globalGraph)===null||n===void 0||n.insertEdge(String(l.id),String(c.id)),d instanceof Br){const h={id:c.id,desc:d,_trace:l._trace.branch(c.id,!0)};s.insertEdge(l,h),a.push(h)}}}for(;;){const l=s.roots();if(l.length===0){if(!s.isEmpty())throw new fA(s);break}for(const{data:c}of l){if(this._getServiceInstanceOrDescriptor(c.id)instanceof Br){const h=this._createServiceInstanceWithOwner(c.id,c.desc.ctor,c.desc.staticArguments,c.desc.supportsDelayedInstantiation,c._trace);this._setServiceInstance(c.id,h)}s.removeNode(c)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof Br)return this._createServiceInstance(e,t,i,n,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,s){if(n){const o=new sw(void 0,this._strict,this,this._enableTracing);o._globalGraphImplicitDependency=String(e);const a=new Map,l=new mb(()=>{const c=o._createInstance(t,i,s);for(const[d,h]of a){const u=c[d];if(typeof u=="function")for(const g of h)u.apply(c,g)}return a.clear(),c});return new Proxy(Object.c
`).slice(3,4).join(``)):Zn._None}static traceCreation(e,t){return e?new Zn(1,t.name):Zn._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new Zn(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;Zn._totals+=e;let t=!1;function i(s,o){const a=[],l=new Array(s+1).join(" ");for(const[c,d,h]of o._dep)if(d&&h){t=!0,a.push(`${l}CREATES -> ${c}`);const u=i(s+1,h);u&&a.push(u)}else a.push(`${l}uses -> ${c}`);return a.join(``)}const n=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Zn._totals.toFixed(2)}ms)`];(e>2||t)&&Zn.all.add(n.join(``))}}Zn.all=new Set;Zn._None=new class extends Zn{constructor(){super(0,null)}stop(){}branch(){return this}};Zn._totals=0;const cee=new Set([Ue.inMemory,Ue.vscodeSourceControl,Ue.walkThrough,Ue.walkThroughSnippet]);class dee{constructor(){this._byResource=new bn,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 s=this._byOwner.get(t);s||(s=new bn,this._byOwner.set(t,s)),s.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 s=this._byResource.get(e);s&&(i=s.delete(t));const o=this._byOwner.get(t);if(o&&(n=o.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,s;return typeof e=="string"?(i=(t=this._byOwner.get(e))===null||t===void 0?void 0:t.values())!==null&&i!==void 0?i:gt.empty():Ee.isUri(e)?(s=(n=this._byResource.get(e))===null||n===void 0?void 0:n.values())!==null&&s!==void 0?s:gt.empty():gt.map(gt.concat(...this._byOwner.values()),o=>o[1])}}class hee{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new bn,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(cee.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===Zt.Error?t.errors+=1:i===Zt.Warning?t.warnings+=1:i===Zt.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 Bl{constructor(){this._onMarkerChanged=new TP({delay:0,merge:Bl._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new dee,this._stats=new hee(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(NP(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const s of i){const o=Bl._toMarker(e,t,s);o&&n.push(o)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:o,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:h,relatedInformation:u,tags:g}=i;if(o)return l=l>0?l:1,c=c>0?c:1,d=d>=l?d:l,h=h>0?h:c,{resource:t,owner:e,code:n,severity:s,message:o,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:h,relatedInformation:u,tags:g}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const s of n){const o=gt.first(s);o&&(i.push(o.resource),this._data.delete(o.resource,e))}if(Cn(t)){const s=new bn;for(const{resource:o,marker:a}of t){const l=Bl._toMarker(e,o,a);if(!l)continue;const c=s.get(o);c?c.push(l):(s.set(o,[l]),i.push(o))}for(const[o,a]of s)this._data.set(o,e,a)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const o=this._data.get(i,t);if(o){const a=[];for(const l of o)if(Bl._accept(l,n)){const c=a.push(l);if(s>0&&c===s)break}return a}else return[]}else if(!t&&!i){const o=[];for(const a of this._data.values())for(const l of a)if(Bl._accept(l,n)){const c=o.push(l);if(s>0&&c===s)return o}return o}else{const o=this._data.values(i??t),a=[];for(const l of o)for(const c of l)if(Bl._accept(c,n)){const d=a.push(c);if(s>0&&d===s)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new bn;for(const i of e)for(const n of i)t.set(n,!0);return Array.from(t.keys())}}class uee extends V{constructor(){super(...arguments),this._configurationModel=new pn}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._confi
`+t),window.confirm(i)}prompt(e){var t,i;return sg(this,void 0,void 0,function*(){let n;if(this.doConfirm(e.message,e.detail)){const o=[...(t=e.buttons)!==null&&t!==void 0?t:[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&o.push(e.cancelButton),n=yield(i=o[0])===null||i===void 0?void 0:i.run({checkboxChecked:!1})}return{result:n}})}error(e,t){return sg(this,void 0,void 0,function*(){yield this.prompt({type:ai.Error,message:e,detail:t})})}}class Om{info(e){return this.notify({severity:ai.Info,message:e})}warn(e){return this.notify({severity:ai.Warning,message:e})}error(e){return this.notify({severity:ai.Error,message:e})}notify(e){switch(e.severity){case ai.Error:console.error(e.message);break;case ai.Warning:console.warn(e.message);break;default:console.log(e.message);break}return Om.NO_OP}prompt(e,t,i,n){return Om.NO_OP}status(e,t){return V.None}}Om.NO_OP=new xG;let $k=class{constructor(e){this._onWillExecuteCommand=new A,this._onDidExecuteCommand=new A,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=ot.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)}}};$k=Hc([Zi(0,Pe)],$k);let Rg=class extends pX{constructor(e,t,i,n,s,o){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=g=>{const p=new Y;p.add(j(g,oe.KEY_DOWN,m=>{const _=new Et(m);this._dispatch(_,_.target)&&(_.preventDefault(),_.stopPropagation())})),p.add(j(g,oe.KEY_UP,m=>{const _=new Et(m);this._singleModifierDispatch(_,_.target)&&_.preventDefault()})),this._domNodeListeners.push(new bee(g,p))},l=g=>{for(let p=0;p<this._domNodeListeners.length;p++){const m=this._domNodeListeners[p];m.domNode===g&&(this._domNodeListeners.splice(p,1),m.dispose())}},c=g=>{g.getOption(58)||a(g.getContainerDomNode())},d=g=>{g.getOption(58)||l(g.getContainerDomNode())};this._register(o.onCodeEditorAdd(c)),this._register(o.onCodeEditorRemove(d)),o.listCodeEditors().forEach(c);const h=g=>{a(g.getContainerDomNode())},u=g=>{l(g.getContainerDomNode())};this._register(o.onDiffEditorAdd(h)),this._register(o.onDiffEditorRemove(u)),o.listDiffEditors().forEach(h)}addDynamicKeybinding(e,t,i,n){return ur(ot.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map(i=>{var n;return{keybinding:hD(i.keybinding,Ts),command:(n=i.command)!==null&&n!==void 0?n:null,commandArgs:i.commandArgs,when:i.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),Ke(()=>{for(let i=0;i<this._dynamicKeybindings.length;i++)if(this._dynamicKeybindings[i]===t[0]){this._dynamicKeybindings.splice(i,t.length),this.updateResolver();return}})}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(is.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new Fp(e,t,i=>this._log(i))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const o=s.when||void 0,a=s.keybinding;if(!a)i[n++]=new PR(void 0,s.command,s.commandArgs,o,t,null,!1);else{const l=ym.resolveKeybinding(a,Ts);for(const c of l)i[n++]=new PR(c,s.command,s.commandArgs,o,t,null,!1)}}return i}resolveKeyboardEvent(e){const t=new fl(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new ym([t],Ts)}};Rg=Hc([Zi(0,Ne),Zi(1,ci),Zi(2,ho),Zi(3,Ci),Zi(4,co),Zi(5,pt)],Rg);class bee extends V{constructor(e,t){super(),this.domNode=e,this._register(t)}}function pA(r){return r&&typeof r=="object"&&(
`:`\r`}};Kk=Hc([Zi(0,at)],Kk);class Cee{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class Pm{constructor(){const e=Ee.from({scheme:Pm.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new EX({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===Pm.SCHEME?this.workspace.folders[0]:null}}Pm.SCHEME="inmemory";function ow(r,e,t){if(!e||!(r instanceof SV))return;const i=[];Object.keys(e).forEach(n=>{lX(n)&&i.push([`editor.${n}`,e[n]]),t&&cX(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&r.updateValues(i)}let qk=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return sg(this,void 0,void 0,function*(){const i=Array.isArray(e)?e:aT.convert(e),n=new Map;for(const a of i){if(!(a instanceof ol))throw new Error("bad edit - only text edits are supported");const l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let c=n.get(l);c||(c=[],n.set(l,c)),c.push(Ht.replaceMove(S.lift(a.textEdit.range),a.textEdit.text))}let s=0,o=0;for(const[a,l]of n)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),o+=1,s+=l.length;return{ariaSummary:Xs(hk.bulkEditServiceSummary,s,o),isApplied:s>0}})}};qk=Hc([Zi(0,qt)],qk);class wee{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return ro(e)}}let Gk=class extends uk{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)}};Gk=Hc([Zi(0,nf),Zi(1,pt)],Gk);class See{constructor(){this._neverEmitter=new A,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class yee extends xm{constructor(){super()}}class Lee extends gee{constructor(){super(new b5)}}let Zk=class extends _k{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o),this.configure({blockMouse:!1})}};Zk=Hc([Zi(0,ho),Zi(1,Ci),Zi(2,yl),Zi(3,ii),Zi(4,Ca),Zi(5,Ne)],Zk);class Dee{playAudioCue(e,t){return sg(this,void 0,void 0,function*(){})}}rt(at,SV,0);rt(iE,jk,0);rt(lF,Kk,0);rt(Lm,Pm,0);rt(Ig,wee,0);rt(ho,Cee,0);rt(D_,vee,0);rt(Ci,Om,0);rt(Sa,Bl,0);rt(Ut,yee,0);rt(Hs,GJ,0);rt(co,Lee,0);rt(qt,XC,0);rt(cE,Sk,0);rt(Ne,zk,0);rt(sT,_ee,0);rt(Vc,FS,0);rt(zo,$X,0);rt(Vo,cD,0);rt(k_,qk,0);rt(WW,See,0);rt(os,Uk,0);rt(_a,Fk,0);rt(po,JQ,0);rt(ci,$k,0);rt(ii,Rg,0);rt(ya,Ok,0);rt(yl,Gk,0);rt(Vs,wk,0);rt(Sl,Hk,0);rt(Lr,Zk,0);rt(Ca,Bk,0);rt(XI,Dee,0);var Te;(function(r){const e=new _S;for(const[o,a]of iN())e.set(o,a);const t=new sw(e,!0);e.set(Pe,t);function i(o){const a=e.get(o);if(!a)throw new Error("Missing service "+o);return a instanceof Br?t.invokeFunction(l=>l.get(o)):a}r.get=i;let n=!1;function s(o){if(n)return t;n=!0;for(const[l,c]of iN())e.get(l)||e.set(l,c);for(const l in o)if(o.hasOwnProperty(l)){const c=tt(l);e.get(c)instanceof Br&&e.set(c,o[l])}const a=pee();for(const l of a)try{t.createInstance(l)}catch(c){Ve(c)}return t}r.initialize=s})(Te||(Te={}));var RT=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Vt=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let kee=0,mA=!1;function xee(r){if(!r){if(mA)return;mA=!0}Zj(r||document.body)}let rw=class extends Dg{constructor(e,t,i,n,s,o,a,l,c,d,h,u){const g=Object.assign({},t);g.ariaLabel=g.ariaLabel||zC.editorViewAccessibleLabel,g.ariaLabel=g.ariaLabel+";"+zC.accessibilityHelpMessage,super(e,g,{},i,n,s,o,l,c,d,h,u),a instanceof Rg?this._standaloneKeybindingService=a:th
`);let o=t;return s!==-1&&(o=t.substring(0,s)),_A(r,t,e.createByFilepathOrFirstLine(n||null,o),n)}return _A(r,t,e.createById(i),n)}function _A(r,e,t,i){return r.createModel(e,t,i)}function Iee(r,e,t){return Te.initialize(t||{}).createInstance(Yk,r,e)}function Eee(r){return Te.get(pt).onCodeEditorAdd(t=>{r(t)})}function Tee(r){return Te.get(pt).onDiffEditorAdd(t=>{r(t)})}function Nee(){return Te.get(pt).listCodeEditors()}function Mee(){return Te.get(pt).listDiffEditors()}function Ree(r,e,t){return Te.initialize(t||{}).createInstance(Xk,r,e)}function Aee(r,e){return Te.initialize({}).createInstance(nD,r,e)}function Oee(r){if(typeof r.id!="string"||typeof r.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return ot.registerCommand(r.id,r.run)}function Pee(r){if(typeof r.id!="string"||typeof r.label!="string"||typeof r.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=ne.deserialize(r.precondition),t=(n,...s)=>Qi.runEditorCommand(n,s,e,(o,a,l)=>Promise.resolve(r.run(a,...l))),i=new Y;if(i.add(ot.registerCommand(r.id,t)),r.contextMenuGroupId){const n={command:{id:r.id,title:r.label},when:e,group:r.contextMenuGroupId,order:r.contextMenuOrder||0};i.add(Jn.appendMenuItem(x.EditorContext,n))}if(Array.isArray(r.keybindings)){const n=Te.get(ii);if(!(n instanceof Rg))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const s=ne.and(e,ne.deserialize(r.keybindingContext));i.add(n.addDynamicKeybindings(r.keybindings.map(o=>({keybinding:o,command:r.id,when:s}))))}}return i}function Fee(r){return LV([r])}function LV(r){const e=Te.get(ii);return e instanceof Rg?e.addDynamicKeybindings(r.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:ne.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),V.None)}function Bee(r,e,t){const i=Te.get(Ut),n=i.getLanguageIdByMimeType(e)||e;return yV(Te.get(qt),i,r,n,t)}function Wee(r,e){const t=Te.get(Ut),i=Te.get(qt),n=t.getLanguageIdByMimeType(e)||e||Os;i.setMode(r,t.createById(n))}function Vee(r,e,t){r&&Te.get(Sa).changeOne(e,r.uri,t)}function Hee(r){Te.get(Sa).changeAll(r,[])}function zee(r){return Te.get(Sa).read(r)}function Uee(r){return Te.get(Sa).onMarkerChanged(r)}function $ee(r){return Te.get(qt).getModel(r)}function jee(){return Te.get(qt).getModels()}function Kee(r){return Te.get(qt).onModelAdded(r)}function qee(r){return Te.get(qt).onModelRemoved(r)}function Gee(r){return Te.get(qt).onModelLanguageChanged(t=>{r({model:t.model,oldLanguage:t.oldLanguageId})})}function Zee(r){return D5(Te.get(qt),Te.get(li),r)}function Yee(r,e){const t=Te.get(Ut),i=Te.get(Hs);return i.registerEditorContainer(r),rE.colorizeElement(i,t,r,e)}function Xee(r,e,t){const i=Te.get(Ut);return Te.get(Hs).registerEditorContainer(document.body),rE.colorize(i,r,e,t)}function Qee(r,e,t=4){return Te.get(Hs).registerEditorContainer(document.body),rE.colorizeModelLine(r,e,t)}function Jee(r){const e=Gt.get(r);return e||{getInitialState:()=>pg,tokenize:(t,i,n)=>eE(r,n)}}function ete(r,e){Gt.getOrCreate(e);const t=Jee(e),i=ul(r),n=[];let s=t.getInitialState();for(let o=0,a=i.length;o<a;o++){const l=i[o],c=t.tokenize(l,!0,s);n[o]=c.tokens,s=c.endState}return n}function tte(r,e){Te.get(Hs).defineTheme(r,e)}function ite(r){Te.get(Hs).setTheme(r)}function nte(){tD.clearAllFontInfos()}function ste(r,e){return ot.registerCommand({id:r,handler:e})}function ote(){return{create:Iee,getEditors:Nee,getDiffEditors:Mee,onDidCreateEditor:Eee,onDidCreateDiffEditor:Tee,createDiffEditor:Ree,createDiffNavigator:Aee,addCommand:Oee,addEditorAction:Pee,addKeybindingRule:Fee,addKeybindingRules:LV,createModel:Bee,setModelLanguage:Wee,setModelMarkers:Vee,getModelMarkers:zee,removeAllMarkers:Hee,onDidChangeMarkers:Uee,getModels:jee,getModel:$ee,onDidCreateModel:Kee,onWillDisposeModel:qee,onDidChangeModelLanguage:Gee,createWebWorker:Zee,colorizeElement:Yee,coloriz
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")s.push({token:a.token+t.tokenPostfix,open:nc(t,a.open),close:nc(t,a.close)});else throw Ot(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}var hte=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function ute(r){fg.registerLanguage(r)}function gte(){let r=[];return r=r.concat(fg.getLanguages()),r}function fte(r){return Te.get(Ut).languageIdCodec.encodeLanguageId(r)}function pte(r,e){const i=Te.get(Ut).onDidEncounterLanguage(n=>{n===r&&(i.dispose(),e())});return i}function mte(r,e){if(!Te.get(Ut).isRegisteredLanguageId(r))throw new Error(`Cannot set configuration for unknown language ${r}`);return Te.get(li).register(r,e,100)}class _te{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 Fm.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 Rw(n.tokens,n.endState)}}class Fm{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 s=0,o=e.length;s<o;s++){const a=e[s];let l=a.startIndex;s===0?l=0:l<n&&(l=n),i[s]=new qb(l,a.scopes,t),n=l}return i}static adaptTokenize(e,t,i,n){const s=t.tokenize(i,n),o=Fm._toClassicTokens(s.tokens,e);let a;return s.endState.equals(n)?a=n:a=s.endState,new TI(o,a)}tokenize(e,t,i){return Fm.adaptTokenize(this._languageId,this._actual,e,i)}_toBinaryTokens(e,t){const i=e.encodeLanguageId(this._languageId),n=this._standaloneThemeService.getColorTheme().tokenTheme,s=[];let o=0,a=0;for(let c=0,d=t.length;c<d;c++){const h=t[c],u=n.match(i,h.scopes);if(o>0&&s[o-1]===u)continue;let g=h.startIndex;c===0?g=0:g<a&&(g=a),s[o++]=g,s[o++]=u,a=g}const l=new Uint32Array(o);for(let c=0;c<o;c++)l[c]=s[c];return l}tokenizeEncoded(e,t,i){const n=this._actual.tokenize(e,i),s=this._toBinaryTokens(this._languageService.languageIdCodec,n.tokens);let o;return n.endState.equals(i)?o=i:o=n.endState,new Rw(s,o)}}function vte(r){return typeof r.getInitialState=="function"}function bte(r){return"tokenizeEncoded"in r}function kV(r){return r&&typeof r.then=="function"}function Cte(r){const e=Te.get(Hs);if(r){const t=[null];for(let i=1,n=r.length;i<n;i++)t[i]=W.fromHex(r[i]);e.setColorMapOverride(t)}else e.setColorMapOverride(null)}function xV(r,e){return bte(e)?new _te(r,e):new Fm(r,e,Te.get(Ut),Te.get(Hs))}function AT(r,e){const t={createTokenizationSupport:()=>hte(this,void 0,void 0,function*(){const i=yield Promise.resolve(e.create());return i?vte(i)?xV(r,i):new Jp(Te.get(Ut),Te.get(Hs),r,DV(r,i),Te.get(at)):null})};return Gt.registerFactory(r,t)}function wte(r,e){if(!Te.get(Ut).isRegisteredLanguageId(r))throw new Error(`Cannot set tokens provider for unknown language ${r}`);return kV(e)?AT(r,{create:()=>e}):Gt.register(r,xV(r,e))}function Ste(r,e){const t=i=>new Jp(Te.get(Ut),Te.get(Hs),r,DV(r,i),Te.get(at));return kV(e)?AT(r,{create:()=>e}):Gt.register(r,t(e))}function yte(r,e){return Te.get(ge).referenceProvider.register(r,e)}function Lte(r,e){return Te.get(ge).renameProvider.register(r,e)}function Dte(r,e){return Te.get(ge).signatureHelpProvider.register(r,e)}function kte(r,e){return Te.get(ge).hoverProvider.register(r,{provideHover:(i,n,s)=>{const o=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s)).then(a=>{if(a)return!a.range&&o&&(a.range=new S(n.lineNumber,o.startColumn,n.lineNumber,o.endColumn)),a
* Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.36.1(6c56744c3419458f0dd48864520b759d1a3a1ca8) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/var pie=Object.defineProperty,mie=Object.getOwnPropertyDescriptor,_ie=Object.getOwnPropertyNames,vie=Object.prototype.hasOwnProperty,CA=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of _ie(e))!vie.call(r,n)&&n!==t&&pie(r,n,{get:()=>e[n],enumerable:!(i=mie(e,n))||i.enumerable});return r},bie=(r,e,t)=>(CA(r,e,"default"),t&&CA(t,e,"default")),lp={};bie(lp,M_);var OV={},sL={},PV=class{constructor(r){Xt(this,"_languageId");Xt(this,"_loadingTriggered");Xt(this,"_lazyLoadPromise");Xt(this,"_lazyLoadPromiseResolve");Xt(this,"_lazyLoadPromiseReject");this._languageId=r,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(r){return sL[r]||(sL[r]=new PV(r)),sL[r]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,OV[this._languageId].loader().then(r=>this._lazyLoadPromiseResolve(r),r=>this._lazyLoadPromiseReject(r))),this._lazyLoadPromise}};function be(r){const e=r.id;OV[e]=r,lp.languages.register(r);const t=PV.getOrCreate(e);lp.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),lp.languages.onLanguage(e,async()=>{const i=await t.load();lp.languages.setLanguageConfiguration(e,i.conf)})}be({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>me(()=>import("./abap-42d5eca7.js"),[],import.meta.url)});be({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>me(()=>import("./apex-7148dbcf.js"),[],import.meta.url)});be({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>me(()=>import("./azcli-ad3d7346.js"),[],import.meta.url)});be({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>me(()=>import("./bat-0217c0bc.js"),[],import.meta.url)});be({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>me(()=>import("./bicep-0cadb30a.js"),[],import.meta.url)});be({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>me(()=>import("./cameligo-ac55f854.js"),[],import.meta.url)});be({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>me(()=>import("./clojure-388a0d58.js"),[],import.meta.url)});be({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>me(()=>import("./coffee-7e7a2971.js"),[],import.meta.url)});be({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>me(()=>import("./cpp-840d082a.js"),[],import.meta.url)});be({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>me(()=>import("./cpp-840d082a.js"),[],import.meta.url)});be({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>me(()=>import("./csharp-b3429875.js"),[],import.meta.url)});be({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>me(()=>import("./csp-83442b86.js"),[],import.meta.url)});be({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>me(()=>import("./css-7a34b8c3.js"),[],import.meta.url)});be({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>me(()=>import("./cypher-cc9c23cc.js"),[],import.meta.url)});be({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>me(()=>import("./dart-00a58d1c.js"),[],import.meta.url)});be({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>me(()=>import("./dockerfile-668ee825.js"),[],import.meta.url)});be({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>me(()=>import("./ecl-b42ffd48.js"),[],import.meta.url)});be({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>me(()=>import("./elixir-b9ceca92.js"),[],import.meta.url)});be({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.36.1(6c56744c3419458f0dd48864520b759d1a3a1ca8) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/var Cie=Object.defineProperty,wie=Object.getOwnPropertyDescriptor,Sie=Object.getOwnPropertyNames,yie=Object.prototype.hasOwnProperty,wA=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Sie(e))!yie.call(r,n)&&n!==t&&Cie(r,n,{get:()=>e[n],enumerable:!(i=wie(e,n))||i.enumerable});return r},Lie=(r,e,t)=>(wA(r,e,"default"),t&&wA(t,e,"default")),rf={};Lie(rf,M_);var BT=class{constructor(e,t,i){Xt(this,"_onDidChange",new rf.Emitter);Xt(this,"_options");Xt(this,"_modeConfiguration");Xt(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}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(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},WT={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}},VT={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},FV=new BT("css",WT,VT),BV=new BT("scss",WT,VT),WV=new BT("less",WT,VT);rf.languages.css={cssDefaults:FV,lessDefaults:WV,scssDefaults:BV};function HT(){return me(()=>import("./cssMode-3085379d.js"),["./cssMode-3085379d.js","./index-3c234266.js","./index-f51743cc.css","./index-08b117c0.js","./http-02c81b8c.js","./_plugin-vue_export-helper-a1ffee7e.js","./index-1be6d382.css","./editorWorker-3ed40424.js","./utils-ccf2ec76.js","./componentList-d97405f6.js","./index.vue_vue_type_style_index_0_lang-bef01711.js","./index-078648b9.css","./defaultAmisConfig-97f3da4b.js"],import.meta.url)}rf.languages.onLanguage("less",()=>{HT().then(r=>r.setupMode(WV))});rf.languages.onLanguage("scss",()=>{HT().then(r=>r.setupMode(BV))});rf.languages.onLanguage("css",()=>{HT().then(r=>r.setupMode(FV))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.36.1(6c56744c3419458f0dd48864520b759d1a3a1ca8) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/var Die=Object.defineProperty,kie=Object.getOwnPropertyDescriptor,xie=Object.getOwnPropertyNames,Iie=Object.prototype.hasOwnProperty,SA=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of xie(e))!Iie.call(r,n)&&n!==t&&Die(r,n,{get:()=>e[n],enumerable:!(i=kie(e,n))||i.enumerable});return r},Eie=(r,e,t)=>(SA(r,e,"default"),t&&SA(t,e,"default")),BS={};Eie(BS,M_);var Tie=class{constructor(e,t,i){Xt(this,"_onDidChange",new BS.Emitter);Xt(this,"_options");Xt(this,"_modeConfiguration");Xt(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},Nie={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"},WS={format:Nie,suggest:{},data:{useDefaultDataProvider:!0}};function VS(r){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:r===Vp,documentFormattingEdits:r===Vp,documentRangeFormattingEdits:r===Vp}}var Vp="html",yA="handlebars",LA="razor",VV=HS(Vp,WS,VS(Vp)),Mie=VV.defaults,HV=HS(yA,WS,VS(yA)),Rie=HV.defaults,zV=HS(LA,WS,VS(LA)),Aie=zV.defaults;BS.languages.html={htmlDefaults:Mie,razorDefaults:Aie,handlebarDefaults:Rie,htmlLanguageService:VV,handlebarLanguageService:HV,razorLanguageService:zV,registerHTMLLanguageService:HS};function Oie(){return me(()=>import("./htmlMode-e2301f5c.js"),["./htmlMode-e2301f5c.js","./index-3c234266.js","./index-f51743cc.css","./index-08b117c0.js","./http-02c81b8c.js","./_plugin-vue_export-helper-a1ffee7e.js","./index-1be6d382.css","./editorWorker-3ed40424.js","./utils-ccf2ec76.js","./componentList-d97405f6.js","./index.vue_vue_type_style_index_0_lang-bef01711.js","./index-078648b9.css","./defaultAmisConfig-97f3da4b.js"],import.meta.url)}function HS(r,e=WS,t=VS(r)){const i=new Tie(r,e,t);let n;const s=BS.languages.onLanguage(r,async()=>{n=(await Oie()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n==null||n.dispose(),n=void 0}}}/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.36.1(6c56744c3419458f0dd48864520b759d1a3a1ca8) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/var Pie=Object.defineProperty,Fie=Object.getOwnPropertyDescriptor,Bie=Object.getOwnPropertyNames,Wie=Object.prototype.hasOwnProperty,DA=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Bie(e))!Wie.call(r,n)&&n!==t&&Pie(r,n,{get:()=>e[n],enumerable:!(i=Fie(e,n))||i.enumerable});return r},Vie=(r,e,t)=>(DA(r,e,"default"),t&&DA(t,e,"default")),R_={};Vie(R_,M_);var Hie=class{constructor(e,t,i){Xt(this,"_onDidChange",new R_.Emitter);Xt(this,"_diagnosticsOptions");Xt(this,"_modeConfiguration");Xt(this,"_languageId");this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},zie={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},Uie={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},UV=new Hie("json",zie,Uie);R_.languages.json={jsonDefaults:UV};function $ie(){return me(()=>import("./jsonMode-33672308.js"),["./jsonMode-33672308.js","./index-3c234266.js","./index-f51743cc.css","./index-08b117c0.js","./http-02c81b8c.js","./_plugin-vue_export-helper-a1ffee7e.js","./index-1be6d382.css","./editorWorker-3ed40424.js","./utils-ccf2ec76.js","./componentList-d97405f6.js","./index.vue_vue_type_style_index_0_lang-bef01711.js","./index-078648b9.css","./defaultAmisConfig-97f3da4b.js"],import.meta.url)}R_.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});R_.languages.onLanguage("json",()=>{$ie().then(r=>r.setupMode(UV))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.36.1(6c56744c3419458f0dd48864520b759d1a3a1ca8) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/var jie=Object.defineProperty,Kie=Object.getOwnPropertyDescriptor,qie=Object.getOwnPropertyNames,Gie=Object.prototype.hasOwnProperty,kA=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of qie(e))!Gie.call(r,n)&&n!==t&&jie(r,n,{get:()=>e[n],enumerable:!(i=Kie(e,n))||i.enumerable});return r},Zie=(r,e,t)=>(kA(r,e,"default"),t&&kA(t,e,"default")),Yie="4.5.5",Og={};Zie(Og,M_);var $V=(r=>(r[r.None=0]="None",r[r.CommonJS=1]="CommonJS",r[r.AMD=2]="AMD",r[r.UMD=3]="UMD",r[r.System=4]="System",r[r.ES2015=5]="ES2015",r[r.ESNext=99]="ESNext",r))($V||{}),jV=(r=>(r[r.None=0]="None",r[r.Preserve=1]="Preserve",r[r.React=2]="React",r[r.ReactNative=3]="ReactNative",r[r.ReactJSX=4]="ReactJSX",r[r.ReactJSXDev=5]="ReactJSXDev",r))(jV||{}),KV=(r=>(r[r.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",r[r.LineFeed=1]="LineFeed",r))(KV||{}),qV=(r=>(r[r.ES3=0]="ES3",r[r.ES5=1]="ES5",r[r.ES2015=2]="ES2015",r[r.ES2016=3]="ES2016",r[r.ES2017=4]="ES2017",r[r.ES2018=5]="ES2018",r[r.ES2019=6]="ES2019",r[r.ES2020=7]="ES2020",r[r.ESNext=99]="ESNext",r[r.JSON=100]="JSON",r[r.Latest=99]="Latest",r))(qV||{}),GV=(r=>(r[r.Classic=1]="Classic",r[r.NodeJs=2]="NodeJs",r))(GV||{}),ZV=class{constructor(r,e,t,i,n){Xt(this,"_onDidChange",new Og.Emitter);Xt(this,"_onDidExtraLibsChange",new Og.Emitter);Xt(this,"_extraLibs");Xt(this,"_removedExtraLibs");Xt(this,"_eagerModelSync");Xt(this,"_compilerOptions");Xt(this,"_diagnosticsOptions");Xt(this,"_workerOptions");Xt(this,"_onDidExtraLibsChangeTimeout");Xt(this,"_inlayHintsOptions");Xt(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(r),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(r,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===r)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:r,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(r){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),r&&r.length>0)for(const e of r){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(r){this._compilerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(r){this._diagnosticsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(r){this._workerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(r){this._inlayHintsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(r){}setEagerModelSync(r){this._eagerModelSync=r}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(r){this._modeConfiguration=r||Object.create(null),this._onDi`),split:r=>r.split(`\r`),parse:r=>s0.split(r).filter(e=>!e.startsWith("#"))}),vw={EDITORS:"CodeEditors",FILES:"CodeFiles"};function Voe(r){var e;const t=[];if(r.dataTransfer&&r.dataTransfer.types.length>0){const s=r.dataTransfer.getData(vw.EDITORS);if(s)try{t.push(...TC(s))}catch{}else try{const l=r.dataTransfer.getData(y_.RESOURCES);t.push(...Hoe(l))}catch{}if(!((e=r.dataTransfer)===null||e===void 0)&&e.files)for(let l=0;l<r.dataTransfer.files.length;l++){const c=r.dataTransfer.files[l];if(c&&c.path)try{t.push({resource:Ee.file(c.path),isExternal:!0,allowWorkspaceOpen:!0})}catch{}}const o=r.dataTransfer.getData(vw.FILES);if(o)try{const l=JSON.parse(o);for(const c of l)t.push({resource:Ee.file(c),isExternal:!0,allowWorkspaceOpen:!0})}catch{}const a=Kt.as(g2.DragAndDropContribution).getAll();for(const l of a){const c=r.dataTransfer.getData(l.dataFormatKey);if(c)try{t.push(...l.getEditorInputs(c))}catch{}}}const i=[],n=new bn;for(const s of t)s.resource?n.has(s.resource)||(i.push(s),n.set(s.resource,!0)):i.push(s);return i}function Hoe(r){const e=[];if(r){const t=JSON.parse(r);for(const i of t)if(i.indexOf(":")>0){const{selection:n,uri:s}=NW(Ee.parse(i));e.push({resource:s,options:{selection:n}})}}return e}class zoe{constructor(){this._contributions=new Map}getAll(){return this._contributions.values()}}const g2={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Kt.add(g2.DragAndDropContribution,new zoe);var Uoe=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function Ax(r){const e=new u2;for(const t of r.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,i1(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,$oe(n))}}return e}function $oe(r){const e=r.path?Ee.parse(r.path):void 0;return Woe(r.name,e,()=>Uoe(this,void 0,void 0,function*(){return new Uint8Array(yield r.arrayBuffer())}))}const joe=Object.freeze([vw.EDITORS,vw.FILES,y_.RESOURCES]);function Koe(r,e,t=!1){var i;if(e.dataTransfer&&(t||!r.has(Qn.uriList))){const n=Voe(e).filter(s=>s.resource).map(s=>s.resource.toString());for(const s of(i=e.dataTransfer)===null||i===void 0?void 0:i.items){const o=s.getAsFile();o&&n.push(o.path?Ee.file(o.path).toString():o.name)}n.length&&r.replace(Qn.uriList,i1(s0.create(n)))}for(const n of joe)r.delete(n)}var qoe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Af=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Zv=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const LL="application/vnd.code.copyMetadata";let $m=class extends V{constructor(e,t,i,n,s,o){super(),this._bulkEditService=t,this._clipboardService=i,this._configurationService=n,this._languageFeaturesService=s,this._progressService=o,this._editor=e;const a=e.getContainerDomNode();this._register(j(a,"copy",l=>this.handleCopy(l))),this._register(j(a,"cut",l=>this.handleCopy(l))),this._register(j(a,"paste",l=>this.handlePaste(l),!0))}arePasteActionsEnabled(e){return this._configurationService.getValue("editor.experimental.pasteActions.enabled",{resource:e.uri})?!0:e.uri.scheme===Ue.vscodeNotebookCell}handleCopy(e){var t;if(!e.clipboardData||!this._editor.hasTextFocus())return;const i=this._editor.getModel(),n=this._editor.getSe
`),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=Wa._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 ue(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){const i=[];for(let n=0,s=e.length;n<s;n++){const o=e[n];o.ignore||i.push(Ht.delete(new S(t+n,o.commentStrOffset+1,t+n,o.commentStrOffset+o.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){const i=[],n=this._insertSpace?" ":"";for(let s=0,o=e.length;s<o;s++){const a=e[s];a.ignore||i.push(Ht.insert(new P(t+s,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 s=1073741824,o,a;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(i+l);let h=0;for(let u=0,g=t[l].commentStrOffset;h<s&&u<g;u++)h=Wa.nextVisibleColumn(h,n,d.charCodeAt(u)===9,1);h<s&&(s=h)}s=Math.floor(s/n)*n;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(i+l);let h=0;for(o=0,a=t[l].commentStrOffset;h<s&&o<a;o++)h=Wa.nextVisibleColumn(h,n,d.charCodeAt(o)===9,1);h>s?t[l].commentStrOffset=o-1:t[l].commentStrOffset=o}}}class n1 extends ce{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(li);if(!t.hasModel())return;const n=t.getModel(),s=[],o=n.getOptions(),a=t.getOption(20),l=t.getSelections().map((d,h)=>({selection:d,index:h,ignoreFirstLine:!1}));l.sort((d,h)=>S.compareRangesUsingStarts(d.selection,h.selection));let c=l[0];for(let d=1;d<l.length;d++){const h=l[d];c.selection.endLineNumber===h.selection.startLineNumber&&(c.index<h.index?h.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=h))}for(const d of l)s.push(new Wa(i,d.selection,o.tabSize,this._type,a.insertSpace,a.ignoreEmptyLines,d.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class Zoe extends n1{constructor(){super(0,{id:"editor.action.commentLine",label:f("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:x.MenubarEditMenu,group:"5_insert",title:f({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}class Yoe extends n1{constructor(){super(1,{id:"editor.action.addCommentLine",label:f("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2081),weight:100}})}}class Xoe extends n1{constructor(){super(2,{id:"editor.action.removeCommentLine",label:f("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2099),weight:100}})}}class Qoe extends ce{constructor(){super({id:"editor.action.blockComment",label:f("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:x.MenubarEditMenu,group:"5_insert",title:f({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){const i=e.get(li);if(!t.hasModel())return;const n=t.getOption(20),s=[],o=t.getSelections();for(const a of o)s.push(new Ql(a,n.insertSpace,i));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}ee(Zoe);ee(Yoe);ee(Xoe);ee(Qoe);var Joe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.g
`,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(o));break}continue}if(s===36){if(i++,i>=n)break;const o=r.charCodeAt(i);if(o===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(o===48||o===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=o&&o<=57){let a=o-48;if(i+1<n){const l=r.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 Dl=new le("findWidgetVisible",!1);Dl.toNegated();const o0=new le("findInputFocussed",!1),s1=new le("replaceInputFocussed",!1),Yv={primary:545,mac:{primary:2593}},Xv={primary:565,mac:{primary:2613}},Qv={primary:560,mac:{primary:2608}},Jv={primary:554,mac:{primary:2602}},eb={primary:558,mac:{primary:2606}},Nt={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",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"},Jl=19999,lre=240;class Up{constructor(e,t){this._toDispose=new Y,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new lo,this._decorations=new Dn(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new yt(()=>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,wt(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)},lre)):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 S(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));const n=this._findMatches(i,!1,Jl);this._decorations.set(n,i);const s=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(s);if(o===0&&n.length>0){const a=RP(n.map(l=>l.range),l=>S.compareRangesUsingStarts(l,s)>=0);o=a>0?a-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._edito
`),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 lO(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return cO(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(aO|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{ts&&hr&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(f("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(rO,!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 lO(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return cO(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 Cx(null,this._contextViewProvider,{width:Tre,label:mre,placeholder:_re,appendCaseSensitiveLabel:this._keybindingLabelFor(Nt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(Nt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(Nt.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,showCommonFindToggles:!0,showHistoryHint:()=>iO(this._keybindingService),inputBoxStyles:KC,toggleStyles:jC},this._contextKeyService)),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()})),ln&&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 su({label:vre+this._keybindingLabelFor(Nt.PreviousMatchFindAction),icon:fre,onTrigger:()=>{bu(this._codeEditor.getAction(Nt.PreviousMatchFindAction)).run().then(void 0,Ve)}})),this._nextBtn=this._register(new su({label:bre+this._keybindingLabelFor(Nt.NextMatchFindAction),icon:pre,onTrigger:()=>{bu(this._codeEditor.getAction(Nt.NextMatchFindAction)).run().then(void 0,Ve)}}));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 of({icon:hre,title:Cre+this._keybindingLabelFor(Nt.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:se(fE),inputActiveOptionBorder:se(gE),inputActiveOptionForeground:se(pE)})),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 su({label:wre+this._keybindingLabelFor(Nt.CloseFindWidgetCommand),icon:bW,onTrigger:()=>{
.monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${g} !important; } `);const p=r.getColor(Ns);p&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${p}; }`)});var _2=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Fr=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},fh=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Mre=524288;function Px(r,e="single",t=!1){if(!r.hasModel())return null;const i=r.getSelection();if(e==="single"&&i.startLineNumber===i.endLineNumber||e==="multiple"){if(i.isEmpty()){const n=r.getConfiguredWordAtPosition(i.getStartPosition());if(n&&t===!1)return n.word}else if(r.getModel().getValueLengthInRange(i)<Mre)return r.getModel().getValueInRange(i)}return null}let Bn=class v2 extends V{get editor(){return this._editor}static get(e){return e.getContribution(v2.ID)}constructor(e,t,i,n){super(),this._editor=e,this._findWidgetVisible=Dl.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._updateHistoryDelayer=new ca(500),this._state=this._register(new cre),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(s=>this._onStateChanged(s))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const s=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),s&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(38).loop})}))}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!!o0.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.i
The flag will not be saved for the future.0: Do Nothing1: True2: False`)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:f("actions.find.wholeWordOverride",`Overrides "Match Whole Word" flag.The flag will not be saved for the future.0: Do Nothing1: True2: False`)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:f("actions.find.matchCaseOverride",`Overrides "Math Case" flag.The flag will not be saved for the future.0: Do Nothing1: True2: False`)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:f("actions.find.preserveCaseOverride",`Overrides "Preserve Case" flag.The flag will not be saved for the future.0: Do Nothing1: True2: False`)},findInSelection:{type:"boolean"}}}}]};class Ore extends ce{constructor(){super({id:Nt.StartFindWithArgs,label:f("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:Are})}run(e,t,i){return fh(this,void 0,void 0,function*(){const n=Bn.get(t);if(n){const s=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(38).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(38).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(i==null?void 0:i.findInSelection)||!1,loop:t.getOption(38).loop},s),n.setGlobalBufferTerm(n.getState().searchString)}})}}class Pre extends ce{constructor(){super({id:Nt.StartFindWithSelection,label:f("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 fh(this,void 0,void 0,function*(){const i=Bn.get(t);i&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(38).loop}),i.setGlobalBufferTerm(i.getState().searchString))})}}class b2 extends ce{run(e,t){return fh(this,void 0,void 0,function*(){const i=Bn.get(t);i&&!this._run(i)&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&t.getOption(38).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(38).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(38).loop}),this._run(i))})}}class Fre extends b2{constructor(){super({id:Nt.NextMatchFindAction,label:f("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:I.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:ne.and(I.focus,o0),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class Bre extends b2{constructor(){super({id:Nt.PreviousMatchFindAction,label:f("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:I.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:ne.and(I.focus,o0),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class Wre extends ce{constructor(){super({id:Nt.GoToMatchFindAction,label:f("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:Dl}),this._highlightDecorations=[]}run(e,t,i){const n=Bn.get(t);if(!n)return;const o=e.get(ya).createInputBox();o.placeholder=f("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",n.getState().matchesCount);const a=l=>{const c=parseInt(l);if(!isNaN(c)&&c>0&&c<=n.getState().matchesCount){o.validationMessage=void 0,n.goToMatch(c-1);const d=n.getState().currentMatch;d&&this.addDecorations(t,d)}else o.validationMessage=f("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};o.onDidChangeValue(l=>{a(l)}),o.onDidAccept(()=>{const l=parseInt(o.value);!isNaN(l)&&l>0&&l<=n.getState().matchesCount?(n.goToMatch(l-1),o.hide()):o.validationMessage=f("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount)}),o.onDidHide(()=>{this.clearDecorations(t),o.dispose()}),o.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecoration
* '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:x2,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 s=n&&n.levels||1,o=this.getLineNumbers(n,i);n&&n.direction==="up"?w2(t,!1,s,o):df(t,!1,s,o)}}class pae extends Tn{constructor(){super({id:"editor.unfoldRecursively",label:f("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:yn,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2137),weight:100}})}invoke(e,t,i,n){df(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class mae extends Tn{constructor(){super({id:"editor.fold",label:f("foldAction.label","Fold"),alias:"Fold",precondition:yn,kbOpts:{kbExpr:I.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:x2,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 s=this.getLineNumbers(n,i),o=n&&n.levels,a=n&&n.direction;typeof o!="number"&&typeof a!="string"?qre(t,!0,s):a==="up"?w2(t,!0,o||1,s):df(t,!0,o||1,s)}}class _ae extends Tn{constructor(){super({id:"editor.toggleFold",label:f("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:yn,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);Kre(t,1,n)}}class vae extends Tn{constructor(){super({id:"editor.foldRecursively",label:f("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:yn,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2135),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);df(t,!0,Number.MAX_VALUE,n)}}class bae extends Tn{constructor(){super({id:"editor.foldAllBlockComments",label:f("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:yn,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2133),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())r1(t,Gg.Comment.value,!0);else{const o=i.getModel();if(!o)return;const a=s.getLanguageConfiguration(o.getLanguageId()).comments;if(a&&a.blockCommentStartToken){const l=new RegExp("^\\s*"+Ro(a.blockCommentStartToken));o1(t,l,!0)}}}}class Cae extends Tn{constructor(){super({id:"editor.foldAllMarkerRegions",label:f("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:yn,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2077),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())r1(t,Gg.Region.value,!0);else{const o=i.getModel();if(!o)return;const a=s.getLanguageConfiguration(o.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);o1(t,l,!0)}}}}class wae extends Tn{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:f("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:yn,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2078),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())r1(t,Gg.Region.value,!1);else{const o=i.getModel();if(!o)return;const a=s.getLanguageConfiguration(o.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);o1(t,l,!1)}}}}class Sae extends Tn{constructor(){super({id:"editor.foldAllExcept",label:f("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:yn,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2131),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);S2(t,!0,n)}}class yae extends Tn{constructor(){super({id:"editor.unfoldAllExcept",label:f("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:yn,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2129),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);S2(t,!1,n)}}class Lae extends Tn{constructor(){super({id:"editor.foldAll",label:f("foldAllAction.label","Fold All"),alias:"Fold All",precondition:yn,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2069),weight:100}})}invoke(e,t,i){df(t,!0)}}class Dae extends Tn{constructor(){super({id:"editor.unfoldAll",label:f("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:yn,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2088),weight:100}})}invoke(e,t,i){df(t,!1)}}class ph extends Tn{getFoldingLevel(){return parseInt(this.id.substr(ph.ID_PREFIX.length))}invoke(e,t,i){Gre(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}ph.ID_PREFIX="editor.foldLevel";ph.ID=r=>ph.ID_PREFIX+r;class kae extends Tn{constructor(){super({id:"editor.gotoParentFold",label:f("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:yn,kbOpts:{kbExpr:I.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s
`&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}}const $ae=[];function jae(){return $ae}class T2{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 zae(i,this.parts.map(s=>({range:{startLineNumber:1,endLineNumber:1,startColumn:s.column,endColumn:s.column},text:s.lines.join(``)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}}class Vx{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}}class N2{constructor(e,t,i,n,s=0){this.lineNumber=e,this.columnStart=t,this.length=i,this.newLines=n,this.additionalReservedLineCount=s,this.parts=[new Vx(this.columnStart+this.length,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(``)}}class M2 extends V{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new A,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(112)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}function Cw(r,e){if(!e)return e;const t=r.getValueInRange(e.range),i=$d(t,e.insertText),n=r.getOffsetAt(e.range.getStartPosition())+i,s=r.getPositionAt(n),o=t.substr(i),a=qp(o,e.insertText),l=r.getPositionAt(Math.max(n,r.getOffsetAt(e.range.getEndPosition())-a));return{range:S.fromPositions(s,l),insertText:e.insertText.substr(i,e.insertText.length-i-a),snippetInfo:e.snippetInfo,filterText:e.filterText,additionalTextEdits:e.additionalTextEdits}}function Kae(r,e){return r===e?!0:!r||!e?!1:r.range.equalsRange(e.range)&&r.insertText===e.insertText&&r.command===e.command}function R2(r,e,t,i,n=0){if(r.range.startLineNumber!==r.range.endLineNumber)return;const s=e.getLineContent(r.range.startLineNumber),o=Lt(s).length;if(r.range.startColumn-1<=o){const g=Lt(r.insertText).length,p=s.substring(r.range.startColumn-1,o),m=S.fromPositions(r.range.getStartPosition().delta(0,p.length),r.range.getEndPosition()),_=r.insertText.startsWith(p)?r.insertText.substring(p.length):r.insertText.substring(g);r={range:m,insertText:_,command:r.command,snippetInfo:void 0,filterText:r.filterText,additionalTextEdits:r.additionalTextEdits}}const l=e.getValueInRange(r.range),c=qae(l,r.insertText);if(!c)return;const d=r.range.startLineNumber,h=new Array;if(t==="prefix"){const g=c.filter(p=>p.originalLength===0);if(g.length>1||g.length===1&&g[0].originalStart!==l.length)return}const u=r.insertText.length-n;for(const g of c){const p=r.range.startColumn+g.originalStart+g.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===r.range.startLineNumber&&p<i.column||g.originalLength>0)return;if(g.modifiedLength===0)continue;const m=g.modifiedStart+g.modifiedLength,_=Math.max(g.modifiedStart,Math.min(m,u)),b=r.insertText.substring(g.modifiedStart,_),v=r.insertText.substring(_,Math.max(g.modifiedStart,m));if(b.length>0){const C=ul(b);h.push(new Vx(p,C,!1))}if(v.length>0){const C=ul(v);h.push(new Vx(p,C,!0))}}return new T2(d,h,0)}let Tr;function qae(r,e){if((Tr==null?void 0:Tr.originalValue)===r&&(Tr==null?void 0:Tr.newValue)===e)return Tr==null?void 0:Tr.changes;{let t=fO(r,e,!0);if(t){const i=gO(t);if(i>0){const n=fO(r,e,!1);n&&gO(n)<i&&(t=n)}}return Tr={originalValue:r,newValue:e,changes:t},t}}function gO(r){let e=0;for(const t of r)e+=t.originalLength;return e}function fO(r,e,t){if(r.length>5e3||e.length>5e3)return;function i(c){let d=0;for(let h=0,u=c.length;h<u;h++){const g=c.charCodeAt(h);g>d&&(d=g)}return d}const n=Math.max(i(r),i(e));function s(c){if(c<0)throw new Error("unexpected");return n+c+1}function o(c){let d=0,h=0;const u=new Int32Array(c.length);for(let g=0,p=c.length;g<p;g++)if(t&&c[g]==="("){const m=h*100+d;u[g]=s(2*m),d++}else if(t&&c[g]===")"){d=Math.max(d-1,0);const m=h*100+d;u[g]=s(2*m+1),d===0&&h++}else u[g]=c.charCodeAt(g);return u}const a=o(r),l=o(e);return new EP({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}function pO(r,e=ts){return H7(r,e)?r.charAt(0).toUpperCase()+r.slice(1):r}var Gae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zae=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class mO{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 _O{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
`),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 vd(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=new Date,n=Hi(o=>vd(this,void 0,void 0,function*(){let a;try{a=yield O2(this.registry,t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},o,this.languageConfigurationService);const l=new Date;this.debounce.update(this.editor.getModel(),l.getTime()-i.getTime())}catch(l){Ve(l);return}o.isCancellationRequested||(this.cache.setValue(this.editor,a,e),this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire())})),s=new A2(n,e);this.updateOperation.value=s,yield n,this.updateOperation.value===s&&this.updateOperation.clear()})}takeOwnership(e){this._register(e)}commitCurrentCompletionNextWord(){const e=this.ghostText;if(!e)return;const t=this.currentCompletion;if(!t)return;if(t.snippetInfo||t.filterText!==t.insertText){this.commit(t);return}if(e.parts.length===0)return;const i=e.parts[0],n=new P(e.lineNumber,i.column),s=i.lines[0],o=this.editor.getModel().getLanguageIdAtPosition(e.lineNumber,1),a=this.languageConfigurationService.getLanguageConfiguration(o),l=new RegExp(a.wordDefinition.source,a.wordDefinition.flags.replace("g","")),c=s.match(l);let d=0;c&&c.index!==void 0?c.index===0?d=c[0].length:d=c.index:d=s.length;const h=/\s/g;let u=h.exec(s);u&&u.index===0&&(u=h.exec(s)),u&&u.index!==void 0&&u.index<d&&(d=u.index);const g=s.substring(0,d);if(this.editor.pushUndoStop(),this.editor.executeEdits("inlineSuggestion.accept",[Ht.replace(S.fromPositions(n),g)]),this.editor.setPosition(n.delta(0,g.length)),t.sourceProvider.handlePartialAccept){const p=S.fromPositions(t.range.getStartPosition(),n.delta(0,d)),m=this.editor.getModel().getValueInRange(p);t.sourceProvider.handlePartialAccept(t.sourceInlineCompletions,t.sourceInlineCompletion,m.length)}}commitCurrentCompletion(){if(!this.ghostText)return;const t=this.currentCompletion;t&&this.commit(t)}commit(e){var t;const i=this.cache.clearAndLeak();this.editor.pushUndoStop(),e.snippetInfo?(this.editor.executeEdits("inlineSuggestion.accept",[Ht.replaceMove(e.range,""),...e.additionalTextEdits]),this.editor.setPosition(e.snippetInfo.range.getStartPosition()),(t=Ji.get(this.editor))===null||t===void 0||t.insert(e.snippetInfo.snippet,{undoStopBefore:!1})):this.editor.executeEdits("inlineSuggestion.accept",[Ht.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,zi):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 A2{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class tle extends V{constructor(e,t,i,n){super(),this.editor=t,this.onChange=i,this.triggerKind=n,this.isDisposing=!1;const s=t.changeDecorations(o=>o.deltaDecorations([],e.items.map(a=>({range:a.range,options:{description:"inline-completion-tracking-range"}}))));this._register(Ke(()=>{this.isDisposing=!0,t.removeDecorations(s)})),this.completions=e.items.map((o,a)=>new ile(o,s[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){Ve(new Error("Decoration has no range"));continue}i.synchronizedRange.equalsRange(n)||(e=!0,i.synchronizedRange=n)}e&&this.onChange()}}class ile{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.insertTex
`,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("")}`,o=new Xn().appendCodeblock("empty",a),s=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!g1(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),s){const a=s.length>1e5?`${s.substr(0,1e5)}…`:s;this._type.textContent=a,this._type.title=a,ds(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else xi(this._type),this._type.title="",An(this._type),this.domNode.classList.add("no-type");if(xi(this._docs),typeof o=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=o;else if(o){this._docs.classList.add("markdown-docs"),xi(this._docs);const a=this._markdownRenderer.render(o);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 It(e,t);It.equals(i,this._size)||(this._size=i,Oj(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}};$x=ble([Cle(1,Pe)],$x);class wle{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new Y,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new W2,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,n,s=0,o=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&&(o=n.width-a.dimension.width,l=!0),a.north&&(s=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:i.top+s,left:i.left+o})}a.done&&(i=void 0,n=void 0,s=0,o=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 s=eS(document.body),o=this.widget.getLayoutInfo(),a=new It(220,2*o.lineHeight),l=e.top,c=function(){const C=s.width-(e.left+e.width+o.borderWidth+o.horizontalPadding),w=-o.borderWidth+e.left+e.width,L=new It(C,s.height-e.top-o.borderHeight-o.verticalPadding),T=L.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:l,left:w,fit:C-t.width,maxSizeTop:L,maxSizeBottom:T,minSize:a.with(Math.min(C,a.width))}}(),d=function(){const C=e.left-o.borderWidth-o.horizontalPadding,w=Math.max(o.horizontalPadding,e.left
`);s===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new S(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":``):this._isCopyingDown?t.addEditOperation(new S(i.startLineNumber,1,i.startLineNumber,1),s+``):t.addEditOperation(new S(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),``+s),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,s=i.startColumn,o=i.endLineNumber,a=i.endColumn;this._startLineNumberDelta!==0&&(n=n+this._startLineNumberDelta,s=1),this._endLineNumberDelta!==0&&(o=o+this._endLineNumberDelta,a=1),i=ue.createWithDirection(n,s,o,a,this._selectionDirection)}return i}}var xce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ice=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let nI=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:s,indentSize:o,insertSpaces:a}=e.getOptions(),l=this.buildIndentConverter(s,o,a),c={tokenization:{getLineTokens:d=>e.tokenization.getLineTokens(d),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(d,h)=>e.getLanguageIdAtPosition(d,h)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&e.getLineMaxColumn(n.startLineNumber)===1){const d=n.startLineNumber,h=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(h)===1?t.addEditOperation(new S(1,1,1,1),null):(t.addEditOperation(new S(d,1,d,1),e.getLineContent(h)),t.addEditOperation(new S(h,1,h,e.getLineMaxColumn(h)),null)),n=new ue(h,1,h,1)}else{let d,h;if(this._isMovingDown){d=n.endLineNumber+1,h=e.getLineContent(d),t.addEditOperation(new S(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let u=h;if(this.shouldAutoIndent(e,n)){const g=this.matchEnterRule(e,l,s,d,n.startLineNumber-1);if(g!==null){const m=Lt(e.getLineContent(d)),_=g+as(m,s);u=$p(_,s,a)+this.trimLeft(h)}else{c.getLineContent=_=>_===n.startLineNumber?e.getLineContent(d):e.getLineContent(_);const m=yp(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),n.startLineNumber,l,this._languageConfigurationService);if(m!==null){const _=Lt(e.getLineContent(d)),b=as(m,s),v=as(_,s);b!==v&&(u=$p(b,s,a)+this.trimLeft(h))}}t.addEditOperation(new S(n.startLineNumber,1,n.startLineNumber,1),u+``);const p=this.matchEnterRuleMovingDown(e,l,s,n.startLineNumber,d,u);if(p!==null)p!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,a,p);else{c.getLineContent=_=>_===n.startLineNumber?u:_>=n.startLineNumber+1&&_<=n.endLineNumber+1?e.getLineContent(_-1):e.getLineContent(_);const m=yp(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),n.startLineNumber+1,l,this._languageConfigurationService);if(m!==null){const _=Lt(e.getLineContent(n.startLineNumber)),b=as(m,s),v=as(_,s);if(b!==v){const C=b-v;this.getIndentEditsOfMovingBlock(e,t,n,s,a,C)}}}}else t.addEditOperation(new S(n.startLineNumber,1,n.startLineNumber,1),u+``)}else if(d=n.startLineNumber-1,h=e.getLineContent(d),t.addEditOperation(new S(d,1,d+1,1),null),t.addEditOperation(new S(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),``+h),this.shouldAutoIndent(e,n)){c.getLineContent=g=>g===d?e.getLineContent(n.startLineNumber):e.getLineContent(g);const u=this.matchEnterRule(e,l,s,n.startLineNumber,n.startLineNumber-2);if(u!==null)u!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,a,u);else{const g=yp(this._autoIndent,c,e.getLanguageIdAtPosition(n.startLineNumber,1),d,l,this._languageConfigurationService);if(g!==null){const p=Lt(e.getLineContent(n.startLineNumber)),m=as(g,s),_=as(p,s);if(m!==_){const b=m-_;this.getIndentEditsOfMovingBlock(e,t,n,s,a,b)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>Ys.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>Ys.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let o=s.indentation;s.indentAction===bi.None||s.indentAction===bi.Indent?o=s.indentation+s.appendText:s.indentAction===bi.IndentOutdent?o=s.indentation:s.indentAction===bi.Outdent&&(o=t.unshiftIndent(s.indentation)+s.appendText);const a=e.getLineContent(n);if(this.trimLeft(a).indexOf(this.trimLeft(o))>=0){const l=Lt(e.getLineContent(n));let c=Lt(o);const d=fB(e,n,this._languageConfigurationService);d!==null&&d&2&&(c=t.unshiftIndent(c));const h=as(c,i),u=as(l,i);return h-u}}return null}matchEnterRuleMovingDown(e,t,i,n,s,o){if(oa(o)>=0){const a=e.getLineMaxColumn(s),l=Gu(this._autoIndent,e,new S(s,a,s,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(oa(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=Gu(this._autoIndent,e,new S(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,c)}}matchEnterRule(e,t,i,n,s,o){let a=s;for(;a>=1;){let d;if(a===s&&o!==void 0?d=o:d=e.getLineContent(a),oa(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=Gu(this._autoIndent,e,new S(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,s,o){for(let a=i.startLineNumber;a<=i.endLineNumber;a++){const l=e.getLineContent(a),c=Lt(l),h=as(c,n)+o,u=$p(h,n,s);u!==c&&(t.addEditOperation(new S(a,1,a,c.length+1),u),a===i.endLineNumber&&i.endColumn<=c.length+1&&u===""&&(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}};nI=xce([Ice(3,li)],nI);class hc{static getCollator(){return hc._COLLATOR||(hc._COLLATOR=new Intl.Collator),hc._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){const i=Ece(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=Z2(e,t,i);if(!n)return!1;for(let s=0,o=n.before.length;s<o;s++)if(n.before[s]!==n.after[s])return!0;return!1}}hc._COLLATOR=null;function Z2(r,e,t){const i=e.startLineNumber;let n=e.endLineNumber;if(e.endColumn===1&&n--,i>=n)return null;const s=[];for(let a=i;a<=n;a++)s.push(r.getLineContent(a));let o=s.slice(0);return o.sort(hc.getCollator().compare),t===!0&&(o=o.reverse()),{startLineNumber:i,endLineNumber:n,before:s,after:o}}function Ece(r,e,t){const i=Z2(r,e,t);return i?Ht.replace(new S(i.startLineNumber,1,i.endLineNumber,r.getLineMaxColumn(i.endLineNumber)),i.after.join(``)):null}class Y2 extends ce{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map((o,a)=>({selection:o,index:a,ignore:!1}));i.sort((o,a)=>S.compareRangesUsingStarts(o.selection,a.selection));let n=i[0];for(let o=1;o<i.length;o++){const a=i[o];n.selection.endLineNumber===a.selection.startLineNumber&&(n.index<a.index?a.ignore=!0:(n.ignore=!0,n=a))}const s=[];for(const o of i)s.push(new G2(o.selection,this.down,o.ignore));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class Tce extends Y2{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:f("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:x.MenubarSelectionMenu,group:"2_line",title:f({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}class Nce extends Y2{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:f("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:x.MenubarSelectionMenu,group:"2_line",title:f({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}class Mce extends ce{constructor(){super({id:"editor.action.duplicateSelection",label:f("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:I.writable,menuOpts:{menuId:x.MenubarSelectionMenu,group:"2_line",title:f({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],s=t.getSelections(),o=t.getModel();for(const a of s)if(a.isEmpty())n.push(new G2(a,!0));else{const l=new ue(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);n.push(new p9(l,o.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class X2 extends ce{constructor(e,t){super(t),this.down=e}run(e,t){const i=e.get(li),n=[],s=t.getSelections()||[],o=t.getOption(9);for(const a of s)n.push(new nI(a,this.down,o,i));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class Rce extends X2{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:f("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:x.MenubarSelectionMenu,group:"2_line",title:f({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}class Ace extends X2{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:f("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:x.MenubarSelectionMenu,group:"2_line",title:f({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}class Q2 extends ce{constructor(e,t){super(t),this.descending=e}run(e,t){const i=t.getSelections()||[];for(const s of i)if(!hc.canRun(t.getModel(),s,this.descending))return;const n=[];for(let s=0,o=i.length;s<o;s++)n[s]=new hc(i[s],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class Oce extends Q2{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:f("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:I.writable})}}class Pce extends Q2{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:f("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:I.writable})}}class Fce extends ce{constructor(){super({id:"editor.action.removeDuplicateLines",label:f("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:I.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel();if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;const n=[],s=[];let o=0;for(const a of t.getSel
`))),s.push(u),o+=a.endLineNumber-a.startLineNumber+1-c.length}t.pushUndoStop(),t.executeEdits(this.id,n,s),t.pushUndoStop()}}class S0 extends ce{constructor(){super({id:S0.ID,label:f("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:Ni(2089,2102),weight:100}})}run(e,t,i){let n=[];i.reason==="auto-save"&&(n=(t.getSelections()||[]).map(a=>new P(a.positionLineNumber,a.positionColumn)));const s=t.getSelection();if(s===null)return;const o=new Dce(s,n);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop()}}S0.ID="editor.action.trimTrailingWhitespace";class Bce extends ce{constructor(){super({id:"editor.action.deleteLines",label:f("lines.delete","Delete Line"),alias:"Delete Line",precondition:I.writable,kbOpts:{kbExpr:I.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 s=0;const o=[],a=[];for(let l=0,c=i.length;l<c;l++){const d=i[l];let h=d.startLineNumber,u=d.endLineNumber,g=1,p=n.getLineMaxColumn(u);u<n.getLineCount()?(u+=1,p=1):h>1&&(h-=1,g=n.getLineMaxColumn(h)),o.push(Ht.replace(new ue(h,g,u,p),"")),a.push(new ue(h-s,d.positionColumn,h-s,d.positionColumn)),s+=d.endLineNumber-d.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,a),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map(s=>{let o=s.endLineNumber;return s.startLineNumber<s.endLineNumber&&s.endColumn===1&&(o-=1),{startLineNumber:s.startLineNumber,selectionStartColumn:s.selectionStartColumn,endLineNumber:o,positionColumn:s.positionColumn}});t.sort((s,o)=>s.startLineNumber===o.startLineNumber?s.endLineNumber-o.endLineNumber:s.startLineNumber-o.startLineNumber);const i=[];let n=t[0];for(let s=1;s<t.length;s++)n.endLineNumber+1>=t[s].startLineNumber?n.endLineNumber=t[s].endLineNumber:(i.push(n),n=t[s]);return i.push(n),i}}class Wce extends ce{constructor(){super({id:"editor.action.indentLines",label:f("lines.indent","Indent Line"),alias:"Indent Line",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,$t.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class Vce extends ce{constructor(){super({id:"editor.action.outdentLines",label:f("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:2135,weight:100}})}run(e,t){Zu.Outdent.runEditorCommand(e,t,null)}}class Hce extends ce{constructor(){super({id:"editor.action.insertLineBefore",label:f("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,$t.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class zce extends ce{constructor(){super({id:"editor.action.insertLineAfter",label:f("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,$t.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class J2 extends ce{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let l=0,c=n.length-1;l<c;l++){const d=n[l],h=n[l+1];S.intersectRanges(d,h)===null?s.push(d):n[l+1]=S.plusRange(d,h)}s.push(n[n.length-1]);const o=this._getEndCursorState(i,s),a=s.map(l=>Ht.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,o),t.pushUndoStop()}}class Uce extends J2{constructor(){super({id:"deleteAllLeft",label:f("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let s=0;return t.forEach(o=>{le
`);return new t_(e,t,n,c,s,o,d)}constructor(e,t,i,n,s,o,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=o,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new hb(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 hb(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(124):null,!1);return i?new ue(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 hb(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 hb(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(124):null,!1);return i?new ue(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(124):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(124):null,!1,1073741824)}}class vh extends V{static get(e){return e.getContribution(vh.ID)}constructor(e){super(),this._sessionDispose=this._register(new Y),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=t_.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 ue(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
`):void 0}:{range:S.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(``):void 0}})}provideRenameEdits(e,t){return zd(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,i,n){return zd(this,void 0,void 0,function*(){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join(``)};const o=yield s.provideRenameEdits(this.model,this.position,e,n);if(o){if(o.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(o.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(f("no result","No result.")),n);return o})}}function Wde(r,e,t,i){return zd(this,void 0,void 0,function*(){const n=new v1(e,t,r),s=yield n.resolveRenameLocation(st.None);return s!=null&&s.rejectReason?{edits:[],rejectReason:s.rejectReason}:n.provideRenameEdits(i,st.None)})}let wh=class h3{static get(e){return e.getContribution(h3.ID)}constructor(e,t,i,n,s,o,a,l){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=o,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new Y,this._cts=new cn,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(aI,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return zd(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const i=this.editor.getPosition(),n=new v1(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;this._cts=new sh(this.editor,5);let s;try{const u=n.resolveRenameLocation(this._cts.token);this._progressService.showWhile(u,250),s=yield u}catch(u){(e=bs.get(this.editor))===null||e===void 0||e.showMessage(u||f("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i);return}if(!s)return;if(s.rejectReason){(t=bs.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,i);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new sh(this.editor,5,s.range);const o=this.editor.getSelection();let a=0,l=s.text.length;!S.isEmpty(o)&&!S.spansMultipleLines(o)&&S.containsRange(s.range,o)&&(a=Math.max(0,o.startColumn-s.range.startColumn),l=Math.min(s.range.endColumn,o.endColumn)-s.range.startColumn);const c=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),d=yield this._renameInputField.getInput(s.range,s.text,a,l,c,this._cts.token);if(typeof d=="boolean"){d&&this.editor.focus();return}this.editor.focus();const h=Yw(n.provideRenameEdits(d.newName,this._cts.token),this._cts.token).then(u=>zd(this,void 0,void 0,function*(){if(!(!u||!this.editor.hasModel())){if(u.rejectReason){this._notificationService.info(u.rejectReason);return}this.editor.setSelection(S.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(u,{editor:this.editor,showPreview:d.wantsPreview,label:f("label","Renaming '{0}' to '{1}'",s==null?void 0:s.text,d.newName),code:"undoredo.rename",quotableLabel:f("quotableLabel","Renaming {0} to {1}",s==null?void 0:s.text,d.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&rn(f("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,d.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(f("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),u=>{this._notificationService.error(f("rename.failed","Rename failed to compute edits")),this._logService.error(u)});return this._progressService.showWhile(h,250),h})}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};wh.ID="editor.contrib.renameController";wh=Bde([nd(1,Pe),nd(2,Ci),nd(3,k_),nd(4,Vc),nd(5,co),nd(6,iE),nd(7,ge)],wh);class Vde extends ce{constructor(){super({id:"editor.action.rename",label:f("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ne.and(I.writable,I.hasRenameProvider),kbOpts:{kbExpr:I.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(pt),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return Ee.isUri(n)&&P.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(o=>{o&&(o.setPosition(s),o.invokeW
- `+s;break;case 2:n+=`
- `+Si.auto_on;break;case 1:n+=`
- `+Si.auto_off,n+=" "+s;break}e.get(137)?n+=`
- `+this._descriptionForCommand(Ug.ID,Si.tabFocusModeOnMsg,Si.tabFocusModeOnMsgNoKb):n+=`
- `+this._descriptionForCommand(Ug.ID,Si.tabFocusModeOffMsg,Si.tabFocusModeOffMsgNoKb);const o=Je?Si.openDocMac:Si.openDocWinLinux;n+=`
- `+o,n+=`
`+Si.outroMsg,this._contentDomNode.domNode.appendChild(sW(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,xi(this._contentDomNode.domNode),this._editor.focus())}_layout(){const e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min($b.WIDTH,e.width-40)),i=Math.max(5,Math.min($b.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 s=Math.round((e.width-t)/2);this._domNode.setLeft(s)}};jg.ID="editor.contrib.accessibilityHelpWidget";jg.WIDTH=500;jg.HEIGHT=300;jg=N3([Ub(1,Ne),Ub(2,ii),Ub(3,Vs)],jg);class pue extends ce{constructor(){super({id:"editor.action.showAccessibilityHelp",label:Si.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){const i=yh.get(t);i==null||i.show()}}ht(yh.ID,yh,4);ee(pue);const mue=Qi.bindToContribution(yh.get);te(new mue({id:"closeAccessibilityHelp",precondition:M3,handler:r=>r.hide(),kbOpts:{weight:100+100,kbExpr:I.focus,primary:9,secondary:[1033]}}));class wI extends V{constructor(e){super(),this.editor=e,this.widget=null,la&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(86);!this.widget&&e?this.widget=new T0(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}wI.ID="editor.contrib.iPadShowKeyboard";class T0 extends V{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(j(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(j(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return T0.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}T0.ID="editor.contrib.ShowKeyboardWidget";ht(wI.ID,wI,3);var _ue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},UO=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Kg=class A3 extends V{static get(e){return e.getContribution(A3.ID)}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(Gt.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new N0(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Kg.ID="editor.contrib.inspectTokens";Kg=_ue([UO(1,Hs),UO(2,Ut)],Kg);class vue extends ce{constructor(){super({id:"editor.action.inspectTokens",label:lk.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=Kg.get(t);i==null||i.launch()}}function bue(r){let e="";for(let t=0,i=r.length;t<i;t++){const n=r.charCodeAt(t);switch(n){case 9:e+="→";break;case 32:e+="·";break;default:e+=String.fromCharCode(n)}}return e}function Cue(r,e){const t=Gt.get(e);if(t)return t;const i=r.encodeLanguageId(e);return{getInitialState:()=>pg,tokenize:(n,s,o)=>eE(e,o),tokenizeEncoded:(n,s,o)=>Zw(i,o)}}class N0 extends V{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=d
`):r}function YO(r){return typeof r.code=="string"&&typeof r.errno=="number"&&typeof r.syscall=="string"?f("nodeExceptionMessage","A system error occurred ({0})",r.message):r.message||f("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function V3(r=null,e=!1){if(!r)return f("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(r)){const t=qg(r),i=V3(t[0],e);return t.length>1?f("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(gs(r))return r;if(r.detail){const t=r.detail;if(t.error)return UL(t.error,e);if(t.exception)return UL(t.exception,e)}return r.stack?UL(r,e):r.message?r.message:f("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var ub=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(h){o(h)}}function l(d){try{c(i.throw(d))}catch(h){o(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Vu;(function(r){r[r.NO_ACTION=0]="NO_ACTION",r[r.CLOSE_PICKER=1]="CLOSE_PICKER",r[r.REFRESH_PICKER=2]="REFRESH_PICKER",r[r.REMOVE_ITEM=3]="REMOVE_ITEM"})(Vu||(Vu={}));function $L(r){const e=r;return Array.isArray(e.items)}function Eue(r){const e=r;return!!e.picks&&e.additionalPicks instanceof Promise}class R0 extends V{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){var n;const s=new Y;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o;const a=s.add(new dn),l=()=>ub(this,void 0,void 0,function*(){const c=a.value=new Y;o==null||o.dispose(!0),e.busy=!1,o=new cn(t);const d=o.token,h=e.value.substr(this.prefix.length).trim(),u=this._getPicks(h,c,d,i),g=(p,m)=>{var _;let b,v;if($L(p)?(b=p.items,v=p.active):b=p,b.length===0){if(m)return!1;h.length>0&&(!((_=this.options)===null||_===void 0)&&_.noResultsPick)&&(b=[this.options.noResultsPick])}return e.items=b,v&&(e.activeItems=[v]),!0};if(u!==null)if(Eue(u)){let p=!1,m=!1;yield Promise.all([(()=>ub(this,void 0,void 0,function*(){yield bc(R0.FAST_PICKS_RACE_DELAY),!d.isCancellationRequested&&(m||(p=g(u.picks,!0)))}))(),(()=>ub(this,void 0,void 0,function*(){e.busy=!0;try{const _=yield u.additionalPicks;if(d.isCancellationRequested)return;let b,v;$L(u.picks)?(b=u.picks.items,v=u.picks.active):b=u.picks;let C,w;if($L(_)?(C=_.items,w=_.active):C=_,C.length>0||!p){let L;if(!v&&!w){const T=e.activeItems[0];T&&b.indexOf(T)!==-1&&(L=T)}g({items:[...b,...C],active:v||w||L})}}finally{d.isCancellationRequested||(e.busy=!1),m=!0}}))()])}else if(!(u instanceof Promise))g(u);else{e.busy=!0;try{const p=yield u;if(d.isCancellationRequested)return;g(p)}finally{d.isCancellationRequested||(e.busy=!1)}}});return s.add(e.onDidChangeValue(()=>l())),l(),s.add(e.onDidAccept(c=>{const[d]=e.selectedItems;typeof(d==null?void 0:d.accept)=="function"&&(c.inBackground||e.hide(),d.accept(e.keyMods,c))})),s.add(e.onDidTriggerItemButton(({button:c,item:d})=>ub(this,void 0,void 0,function*(){var h,u;if(typeof d.trigger=="function"){const g=(u=(h=d.buttons)===null||h===void 0?void 0:h.indexOf(c))!==null&&u!==void 0?u:-1;if(g>=0){const p=d.trigger(g,e.keyMods),m=typeof p=="number"?p:yield p;if(t.isCancellationRequested)return;switch(m){case Vu.NO_ACTION:break;case Vu.CLOSE_PICKER:e.hide();break;case Vu.REFRESH_PICKER:l();break;case Vu.REMOVE_ITEM:{const _=e.items.indexOf(d);if(_!==-1){const b=e.items.slice(),v=b.splice(_,1),C=e.activeItems.filter(L=>L!==v[0]),w=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=b,C&&(e.activeItems=C),e.keepScrollPosition=w}break}}}}}))),s}}R0.FAST_PICKS_RACE_DELAY=200;var H3=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.leng
`});const s=JSON.parse(r.json||"{}"),a=((g=(u=((h=s.nodes[0])==null?void 0:h.properties).dynamic)==null?void 0:u.scriptData)==null?void 0:g.script)||"console.log()",l=((p=s.nodes[0])==null?void 0:p.id)||"",c=` const resolveFn = function (context, service, nodeId) { ${a} }; resolveFn(lf, service, ${JSON.stringify(l)});`,d=t?"lf.render()":`lf.render(${r.json})`;return`<html class="${e?"dark":""}"> <head> <!--LogicFlow core包css--> <link rel="stylesheet" href="./logicflow/core.css" /> <!--LogicFlow extension包css--> <link rel="stylesheet" href="./logicflow/extension.css" /> <link rel="stylesheet" href="./plugins/layui/css/layui.css" /> <link id="layui_theme_css" rel="stylesheet" /> <script src="./plugins/vue.min.js"><\/script> <script src="./plugins/axios.min.js"><\/script> <script src="./plugins/service.js"><\/script> <script src="./plugins/layui/layui.js"><\/script> <script src="./plugins/utils.js"><\/script> <script src="./plugins/dayjs.min.js"><\/script> <script src="./plugins/lodash.js"><\/script> <script src="./plugins/myDebounce.js"><\/script> <style> html, body { height: 100%; margin: 0; padding: 0; position: relative; } #container { height: calc(100% - 20px); } </style> <style id="_style">${r.css}</style> </head> <body> <div id="container"></div>
${i} <script> const lf = new LogicFlow({ container: document.querySelector("#container"), grid: false, background: { backgroundImage: 'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAwIDEwIEwgNDAgMTAgTSAxMCAwIEwgMTAgNDAgTSAwIDIwIEwgNDAgMjAgTSAyMCAwIEwgMjAgNDAgTSAwIDMwIEwgNDAgMzAgTSAzMCAwIEwgMzAgNDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2QwZDBkMCIgb3BhY2l0eT0iMC4yIiBzdHJva2Utd2lkdGg9IjEiLz48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDBkMGQwIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4=")', backgroundColor: '#ffffff', backgroundRepeat: 'repeat', backgroundSize: '', }, }); <\/script> <script type="module" id="_script"> ${r.javascript} try { ${d} } catch (erroInfo) { alert(erroInfo) } ${c}
window.addEventListener('message', function(event) { if (event.data === 'theme-dark') { document.documentElement.classList.add('dark') } else if (event.data === 'theme-light') { document.documentElement.classList.remove('dark') } })
window?.parent.postMessage('childFrameLoaded', '*'); <\/script> </body> </html`},I1=Q3(()=>J3()),Oue=Oc({__name:"MonacoEditor",props:{activeTab:null,scadaFiles:null},emits:["change","firstLoaded"],setup(r,{emit:e}){const t=r,i=e;self.MonacoEnvironment={getWorker(_,b){return b==="json"?new U3:b==="css"||b==="scss"||b==="less"?new $3:b==="html"||b==="handlebars"||b==="razor"?new j3:b==="typescript"||b==="javascript"?new K3:new z3}};const n=Ii(null);let s;const o=I1(),{activeTab:a,scadaFiles:l}=Nw(t),c=Ii({json:"",javascript:"",css:""}),d=Ii(!1);kI(()=>{s=aw.create(n.value,{language:a.value,theme:o.value?"vs-dark":"vs",fontSize:14}),i("change",c.value),s.onDidChangeModelContent(iP(()=>{c.value[a.value]!==s.getValue()&&(c.value[a.value]=s.getValue(),d.value=!0,i("change",c.value))},500))}),dl([a,l],([_,b],[v,C])=>{_!==v&&(d.value=!1),!d.value&&(c.value=b,fp(()=>{aw.setModelLanguage(s.getModel(),_),s.setValue(b[_])}))},{immediate:!0,deep:!0}),dl(o,_=>{s&&s.updateOptions({theme:_?"vs-dark":"vs"})},{immediate:!0});const h=nP(n,()=>{s.layout()});xI(()=>{s==null||s.dispose(),h.stop()});const u=Ii(!1),g=Ii({width:0,height:0}),p=()=>{u.value=!0;const _=document.getElementById("editorContainer");g.value={width:_.clientWidth,height:_.clientHeight},_.classList.add("editor-fullscreen"),s.layout({height:document.body.clientHeight,width:document.body.clientWidth})},m=()=>{u.value=!1,document.getElementById("editorContainer").classList.remove("editor-fullscreen"),s.layout({height:g.value.height,width:g.value.width})};return(_,b)=>(En(),eo("div",{id:"editorContainer",ref_key:"container",ref:n,style:{height:"calc(100% - 2.5rem)","text-align":"left"}},[u.value?lg("",!0):(En(),Kp(Bt(WP),{key:0,class:"absolute top-3 right-5 z-100",onClick:b[0]||(b[0]=v=>p())})),u.value?(En(),Kp(Bt(BP),{key:1,class:"absolute top-3 right-5 z-100",onClick:b[1]||(b[1]=v=>m())})):lg("",!0)],512))}});const Pue=EI(Oue,[["__scopeId","data-v-177f7241"]]),Fue={id:"configBlock"},Bue=Oc({__name:"configBlock",props:{eventMessages:null},emits:["updateForm"],setup(r,{emit:e}){const t=r,i=e,{eventMessages:n}=Nw(t),s=window.amisRequire("amis/embed");let o=null;const a=Ii("antd");let l={},c={};xI(()=>{o&&o.unmount()});const d=()=>{if(o){const h=()=>{const p=o.getComponentByName("page1.tab.basicPropForm"),m=()=>{c=p.getValues(),i("updateForm",{basicForm:c,dynamicForm:l})};p.props.store.$mobx.changeListeners.splice(-1,1),p.props.store.$mobx.changeListeners.push(m)};h();const u=p=>{p.newValue.value.tab==="交互"?setTimeout(()=>{const m=o.getComponentByName("page1.tab.dynamicService.normalService"),_=o.getComponentByName("page1.tab.dynamicService.eventsService"),b=o.getComponentByName("page1.tab.dynamicService.uiService"),v=o.getComponentByName("page1.tab.dynamicService.animationService"),C=o.getComponentByName("page1.tab.dynamicService.hiddenService");m&&m.setData(l.normalData||m.getData()),_&&_.setData(l.eventsData||_.getData()),b&&b.setData(l.uiData||b.getData()),v&&v.setData(l.animationData||v.getData()),C&&C.setData(l.hiddenData||C.getData());const w=()=>{const N=m.getData();l.normalData=N,i("updateForm",{basicForm:c,dynamicForm:l})},L=()=>{const N=_.getData();l.eventsData=N,i("updateForm",{basicForm:c,dynamicForm:l})},T=()=>{const N=b.getData();l.uiData=N,i("updateForm",{basicForm:c,dynamicForm:l})},y=()=>{const N=v.getData();l.animationData=N,i("updateForm",{basicForm:c,dynamicForm:l})},D=()=>{const N=C.getData();l.hiddenData=N,i("updateForm",{basicForm:c,dynamicForm:l})};m&&m.props.store.$mobx.changeListeners.splice(-1,1),_&&_.props.store.$mobx.changeListeners.splice(-1,1),b&&b.props.store.$mobx.changeListeners.splice(-1,1),v&&v.props.store.$mobx.changeListeners.splice(-1,1),C&&C.props.store.$mobx.changeListeners.splice(-1,1),m&&m.props.store.$mobx.changeListeners.push(w),_&&_.props.store.$mobx.changeListeners.push(L),b&&b.props.store.$mobx.changeListeners.push(T),v&&v.props.store.$mobx.changeListeners.push(y),C&&C.props.store.$mobx.changeListeners.push(D)},500):p.newValue.value.tab==="脚本解析"?setTimeout(()=>{const m=o.getComponentByName("page1.tab.scriptService");m.setData(l.scriptData||m.getData());const _=()=>{const b=m.getData()\r
return { normalData: [], uiData: [], animationData: [[]], // 多级
hiddenData: [[]], // 多级
} `);dl(()=>t.fakeDatas,p=>{p&&setTimeout(()=>{s.setValue(p)},500)},{immediate:!0,deep:!0});const l=Ii(!1);kI(()=>{s=aw.create(n.value,{language:"javascript",theme:o.value?"vs-dark":"vs",fontSize:14,value:a.value}),s.onDidChangeModelContent(iP(()=>{a.value=s.getValue(),l.value=!0,i("change",a.value)},500))}),dl(o,p=>{s&&s.updateOptions({theme:p?"vs-dark":"vs"})},{immediate:!0});const c=nP(n,()=>{s.layout()});xI(()=>{s==null||s.dispose(),c.stop()});const d=Ii(!1),h=Ii({width:0,height:0}),u=()=>{d.value=!0;const p=document.getElementById("fakeDataEditor");h.value={width:p.clientWidth,height:p.clientHeight},p.classList.add("editor-fullscreen"),s.layout({height:document.body.clientHeight,width:document.body.clientWidth})},g=()=>{d.value=!1,document.getElementById("fakeDataEditor").classList.remove("editor-fullscreen"),s.layout({height:h.value.height,width:h.value.width})};return(p,m)=>(En(),eo("div",{id:"fakeDataEditor",ref_key:"container",ref:n,style:{height:"calc(100% - 2.5rem)","text-align":"left"}},[d.value?lg("",!0):(En(),Kp(Bt(WP),{key:0,class:"absolute top-3 right-5 z-100",onClick:m[0]||(m[0]=_=>u())})),d.value?(En(),Kp(Bt(BP),{key:1,class:"absolute top-3 right-5 z-100",onClick:m[1]||(m[1]=_=>g())})):lg("",!0)],512))}});const Hue=EI(Vue,[["__scopeId","data-v-cfcc3346"]]),zue=["width","height"],Uue=["fill"],$ue=Oc({__name:"index",props:{color:null,width:null,height:null},setup(r){const e=r,{color:t,width:i,height:n}=Nw(e);return(s,o)=>(En(),eo("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:Bt(i),height:Bt(n)},[js("path",{d:"M514.525867 10.717867c279.790933 0 506.606933 226.816 506.606933 506.606933 0 279.790933-226.816 506.606933-506.606933 506.606933-279.790933 0-506.606933-226.816-506.606934-506.606933C7.918933 237.533867 234.734933 10.717867 514.525867 10.717867zM389.051733 322.56l-103.185066 103.185067a16.110933 16.110933 0 0 0 0 23.1424l103.185066 103.185066a16.5888 16.5888 0 0 0 23.1424 0 16.5888 16.5888 0 0 0 0-23.1424l-74.069333-74.069333h250.197333a102.126933 102.126933 0 0 1 0 204.1856H367.274667a17.066667 17.066667 0 0 0-17.134934 17.134933 17.066667 17.066667 0 0 0 17.134934 17.169067h221.320533a136.192 136.192 0 0 0 136.123733-136.123733 136.635733 136.635733 0 0 0-136.3968-136.3968H337.066667l75.093333-75.093334a16.5888 16.5888 0 0 0 0-23.176533 16.5888 16.5888 0 0 0-23.108267 0z",fill:Bt(t)},null,8,Uue)],8,zue))}}),jue=["width","height"],Kue=["fill"],que=Oc({__name:"index",props:{color:null,width:null,height:null},setup(r){const e=r,{color:t,width:i,height:n}=Nw(e);return(s,o)=>(En(),eo("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4015","xmlns:xlink":"http://www.w3.org/1999/xlink",width:Bt(i),height:Bt(n)},[js("path",{d:"M512 0C229.272524 0 0 229.272524 0 512s229.272524 512 512 512 512-229.272524 512-512S794.727476 0 512 0zM848.182428 322.366555L417.177554 753.359982a36.628661 36.628661 0 0 1-51.71509 0L175.817572 563.715091a36.628661 36.628661 0 0 1 51.726537-51.715091l163.7759 163.7759 405.135882-405.135882a36.628661 36.628661 0 0 1 51.71509 51.71509z",fill:Bt(t)},null,8,Kue)],8,jue))}}),Gue={p:"x-2",class:"w-full h-full relative pb-2"},Zue={class:"absolute left-5 top-2 z-1000"},Yue={key:0,class:"fixed w-full h-full left-0 right-0",style:{"z-index":"1200"}},Xue={id:"split-left",class:"h-full flex flex-col"},Que={id:"split-left-top",class:"relative overflow-hidden"},Jue={id:"split-left-bottom",class:"relative"},ege={class:"absolute right-2 top-2"},tge={id:"split-right",class:"h-full flex flex-col"},ige=Oc({__name:"index",setup(r){const e=nU(),t=Ii(),i=I1(),n=Ii([{text:"资源",value:"jsPlugin"},{text:"JS",value:"javascript"},{text:"CSS",value:"css"},{text:"组件数据",value:"json"},{text:"属性配置",value:"attrConfig"},{text:"模拟数据",value:"fakeData"}]),s=Ii("javascript"),o=Ii({jsPlugin:"",json:"",javascript:"",css:"",fakeData:""}),a=Ii(!1),l=Ii({jsPlugin:"",json:"",javascript:"",css:"",fakeData:""}),c=R=>{l.value=R,o.value={...o.value,...R}
|