UNPKG

@arcgis/coding-components

Version:
5 lines • 1.08 MB
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */ import{$ as Uv,$a as bD,$b as WD,$c as li,$d as fa,$e as pl,$f as YE,$g as Ia,$h as Sn,$i as oR,$j as Dl,A as Zn,Aa as fo,Ab as dt,Ac as eb,Ad as fn,Ae as fE,Af as _l,Ag as r0,Ah as R0,Ai as Il,Aj as Na,Ak as jR,B as eD,Ba as ol,Bb as kD,Bc as U,Bd as sE,Be as rb,Bf as ub,Bg as s0,Bh as Da,Bi as gr,Bj as vR,Bk as KR,C as Jd,Ca as cD,Cb as Xv,Cc as ne,Cd as uu,Ce as _E,Cf as VE,Cg as Vu,Ch as yb,Ci as mr,Cj as Ju,Ck as Vb,D as tD,Da as hD,Db as Qv,Dc as De,Dd as gu,De as wu,Df as zE,Dg as ar,Dh as Ea,Di as pr,Dj as Nt,Dk as qR,E as oa,Ea as uD,Eb as ai,Ec as me,Ed as mu,Ee as Co,Ef as Sa,Eg as Cl,Eh as X,Ei as Dt,Ej as Tb,Ek as zb,F as iD,Fa as Jh,Fb as ca,Fc as k,Fd as Jr,Fe as Ca,Ff as or,Fg as So,Fh as O,Fi as fr,Fj as Ll,Fk as ag,G as Ve,Ga as gD,Gb as xe,Gc as UD,Gd as er,Ge as se,Gf as wa,Gg as ya,Gh as zu,Gi as zo,Gj as bR,Gk as GR,H as Bv,Ha as eu,Hb as MD,Hc as J,Hd as ga,He as de,Hf as gb,Hg as a0,Hh as Ra,Hi as Lb,Hj as bt,Hk as dg,I as el,Ia as Gv,Ib as tt,Ic as Y,Id as cl,Ie as vE,If as mb,Ig as d0,Ih as be,Ii as Kt,Ij as ro,Ik as Ko,J as Qi,Ja as tu,Jb as Si,Jc as Vt,Jd as aE,Je as W,Jf as UE,Jg as l0,Jh as cr,Ji as ye,Jj as eg,K as Xh,Ka as $r,Kb as te,Kc as di,Kd as ma,Ke as Fo,Kf as jE,Kg as rs,Kh as ka,Ki as Db,Kj as CR,Kk as $R,L as ki,La as iu,Lb as wi,Lc as jD,Ld as xi,Le as Qe,Lf as Eu,Lg as c0,Lh as hr,Li as yn,Lj as SR,Lk as ZR,M as na,Ma as re,Mb as TD,Mc as j,Md as hl,Me as yu,Mf as KE,Mg as Sl,Mh as xb,Mi as $0,Mj as wR,Mk as YR,N as Ze,Na as at,Nb as ND,Nc as bo,Nd as Oo,Ne as pt,Nf as qE,Ng as h0,Nh as k0,Ni as vt,Nj as yR,Nk as XR,O as Vv,Oa as mD,Ob as lu,Oc as Xt,Od as dE,Oe as sb,Of as Ru,Og as _b,Oh as M0,Oi as Ta,Oj as Pa,P as he,Pa as pD,Pb as Jv,Pc as KD,Pd as ul,Pe as bE,Pf as GE,Pg as xa,Ph as $i,Pi as Z0,Pj as xR,Q as R,Qa as da,Qb as PD,Qc as pn,Qd as gl,Qe as to,Qf as ku,Qg as vb,Qh as Bo,Qi as Eb,Qj as IR,R as L,Ra as ou,Rb as No,Rc as lt,Rd as ib,Re as Ho,Rf as $E,Rg as bb,Rh as Vo,Ri as Rb,Rj as LR,S as we,Sa as Zt,Sb as Ce,Sc as ge,Sd as pu,Se as CE,Sg as Cb,Sh as ss,Si as Y0,Sj as DR,T as oD,Ta as nl,Tb as OD,Tc as zt,Td as oe,Te as ft,Tf as Mu,Tg as u0,Th as Uu,Ti as X0,Tj as ER,U as Qh,Ua as fD,Ub as AD,Uc as Ki,Ud as hi,Ue as is,Uf as nr,Ug as g0,Uh as T0,Ui as Yu,Uj as Fe,V as st,Va as _D,Vb as Ue,Vc as qi,Vd as Ut,Ve as xu,Vf as Tu,Vg as wl,Vh as N0,Vi as Q0,Vj as Nb,W as ke,Wa as $v,Wb as yi,Wc as qD,Wd as _t,We as SE,Wf as Nu,Wg as dr,Wh as P0,Wi as J0,Wj as tg,X as H,Xa as si,Xb as Qn,Xc as GD,Xd as lE,Xe as wE,Xf as vn,Xg as ze,Xh as O0,Xi as Xu,Xj as ig,Y as zv,Ya as vD,Yb as FD,Yc as tb,Yd as pa,Ye as yE,Yf as pb,Yg as lr,Yh as A0,Yi as eR,Yj as Pb,Z as Q,Za as ut,Zb as HD,Zc as Ji,Zd as fu,Ze as xE,Zf as ZE,Zg as m0,Zh as F0,Zi as tR,Zj as RR,_ as Me,_a as nu,_b as cu,_c as $D,_d as Ne,_e as IE,_g as p0,_h as as,_i as iR,_j as kR,a as m,aa as Oe,ab as ru,ac as BD,ad as ZD,ae as Be,af as LE,ag as Pu,ah as ce,ai as ju,aj as wt,ak as Ob,b as x,ba as mo,bb as _o,bc as Zr,bd as ua,be as eo,bf as DE,bg as bn,bh as Wo,bi as Ku,bj as nR,bk as MR,c as ea,ca as nD,cb as vo,cc as ha,cd as YD,ce as cE,cf as ab,cg as XE,ch as Mt,ci as H0,cj as rR,ck as og,d as $L,da as vi,db as CD,dc as fe,dd as XD,de as tr,df as EE,dg as Ou,dh as Sb,di as W0,dj as _r,dk as Ab,e as ae,ea as Yn,eb as SD,ec as Yr,ed as al,ee as hE,ef as RE,eg as Au,eh as Tt,ei as nt,ej as sR,ek as Fb,f as _e,fa as po,fb as wD,fc as Ui,fd as Xe,fe as _u,ff as kE,fg as vl,fh as Gi,fi as ur,fj as ds,fk as Hb,g as Bt,ga as tl,gb as yD,gc as B,gd as QD,ge as _n,gf as ME,gg as fb,gh as f0,gi as yl,gj as aR,gk as TR,h as ta,ha as To,hb as la,hc as Xr,hd as JD,he as es,hf as Iu,hg as Fu,hh as Cn,hi as qu,hj as Et,hk as NR,i as Ri,ia as Le,ib as su,ic as F,id as eE,ie as vu,if as TE,ig as rr,ih as Qt,ii as B0,ij as vr,ik as PR,j as et,ja as ra,jb as xD,jc as VD,jd as tE,je as ob,jf as db,jg as QE,jh as ot,ji as V0,jj as dR,jk as ng,k as $h,ka as rD,kb as Zv,kc as Yt,kd as hu,ke as uE,kf as lb,kg as Hu,kh as wb,ki as z0,kj as Qu,kk as jo,l as ZL,la as ni,lb as au,lc as Wt,ld as Ye,le as S,lf as Lu,lg as je,lh as _0,li as wn,lj as oo,lk as OR,m as YL,ma as sD,mb as du,mc as zD,md as M,me as _a,mf as NE,mg as Ke,mh as v0,mi as Gu,mj as lR,mk as Wb,n as Zh,na as sa,nb as ID,nc as Jn,nd as dl,ne as gE,nf as PE,ng as sr,nh as La,ni as U0,nj as Uo,nk as AR,o as Yh,oa as aD,ob as LD,oc as Z,od as ci,oe as bu,of as OE,og as JE,oh as b0,oi as j0,oj as cR,ok as FR,p as XL,pa as aa,pb as DD,pd as Lt,pe as mE,pf as AE,pg as Wu,ph as C0,pi as Ma,pj as gi,pk as rg,q as ia,qa as mn,qb as T,qc as Ct,qd as q,qe as va,qf as FE,qg as e0,qh as S0,qi as xl,qj as hR,qk as HR,r as Wv,ra as dD,rb as zi,rc as ji,rd as D,re as ba,rf as HE,rg as Bu,rh as w0,ri as yo,rj as uR,rk as WR,s as Gr,sa as ri,sb as Yv,sc as z,sd as ll,se as pE,sf as os,sg as t0,sh as wo,si as K0,sj as no,sk as BR,t as Vi,ta as il,tb as rl,tc as St,td as iE,te as Cu,tf as ir,tg as i0,th as y0,ti as q0,tj as kb,tk as VR,u as le,ua as it,ub as ue,uc as ve,ud as K,ue as Su,uf as fl,ug as o0,uh as x0,ui as $u,uj as gR,uk as zR,v as Gn,va as Xn,vb as bi,vc as P,vd as C,ve as Ao,vf as WE,vg as n0,vh as io,vi as Ib,vj as mR,vk as sg,w as QL,wa as jv,wb as ED,wc as gt,wd as G,we as ml,wf as BE,wg as bl,wh as I0,wi as Ae,wj as Mb,wk as El,x as $n,xa as lD,xb as Ci,xc as mt,xd as oE,xe as nb,xf as Du,xg as Ii,xh as L0,xi as Zu,xj as pR,xk as Bb,y as oi,ya as Kv,yb as RD,yc as Po,yd as nE,ye as Mi,yf as cb,yg as ns,yh as D0,yi as ui,yj as fR,yk as UR,z as JL,za as qv,zb as sl,zc as Qr,zd as rE,ze as ts,zf as hb,zg as jt,zh as E0,zi as G0,zj as _R,zk as Oa}from"./LLPQEURF.js";var lg=class extends lt{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:x(85,"Toggle Collapse Unchanged Regions"),icon:U.map,toggled:k.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:k.has("isInDiffEditor"),menu:{when:k.has("isInDiffEditor"),id:j.EditorTitle,order:22,group:"navigation"}})}run(e,...t){let i=e.get(oe),o=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",o)}},Rl=class extends lt{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:x(86,"Toggle Show Moved Code Blocks"),precondition:k.has("isInDiffEditor")})}run(e,...t){let i=e.get(oe),o=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",o)}},kl=class extends lt{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:x(87,"Toggle Use Inline View When Space Is Limited"),precondition:k.has("isInDiffEditor")})}run(e,...t){let i=e.get(oe),o=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",o)}},Tl=x(88,"Diff Editor"),cg=class extends ci{constructor(){super({id:"diffEditor.switchSide",title:x(89,"Switch Side"),icon:U.arrowSwap,precondition:k.has("isInDiffEditor"),f1:!0,category:Tl})}runEditorCommand(e,t,i){let o=ls(e);if(o instanceof ds){if(i&&i.dryRun)return{destinationSelection:o.mapToOtherSide().destinationSelection};o.switchSide()}}},hg=class extends ci{constructor(){super({id:"diffEditor.exitCompareMove",title:x(90,"Exit Compare Move"),icon:U.close,precondition:S.comparingMovedCode,f1:!1,category:Tl,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){let o=ls(e);o instanceof ds&&o.exitCompareMove()}},ug=class extends ci{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:x(91,"Collapse All Unchanged Regions"),icon:U.fold,precondition:k.has("isInDiffEditor"),f1:!0,category:Tl})}runEditorCommand(e,t,...i){let o=ls(e);o instanceof ds&&o.collapseAllUnchangedRegions()}},gg=class extends ci{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:x(92,"Show All Unchanged Regions"),icon:U.unfold,precondition:k.has("isInDiffEditor"),f1:!0,category:Tl})}runEditorCommand(e,t,...i){let o=ls(e);o instanceof ds&&o.showAllUnchangedRegions()}},Aa=class extends lt{constructor(){super({id:"diffEditor.revert",title:x(93,"Revert"),f1:!0,category:Tl,precondition:k.has("isInDiffEditor")})}run(e,t){return t?this.runViaToolbarContext(e,t):this.runViaCursorOrSelection(e)}runViaCursorOrSelection(e){let t=ls(e);t instanceof ds&&t.revertFocusedRangeMappings()}runViaToolbarContext(e,t){let i=$T(e,t.originalUri,t.modifiedUri);i instanceof ds&&i.revertRangeMappings(t.mapping.innerChanges??[])}},QR=x(94,"Accessible Diff Viewer"),Fa=class r extends lt{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:r.id,title:x(95,"Go to Next Difference"),category:QR,precondition:k.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){ls(e)?.accessibleDiffViewerNext()}},Ml=class r extends lt{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:r.id,title:x(96,"Go to Previous Difference"),category:QR,precondition:k.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){ls(e)?.accessibleDiffViewerPrev()}};function $T(r,e,t){return r.get(ve).listDiffEditors().find(n=>{let s=n.getModifiedEditor(),a=n.getOriginalEditor();return s&&s.getModel()?.uri.toString()===t.toString()&&a&&a.getModel()?.uri.toString()===e.toString()})||null}function ls(r){let t=r.get(ve).listDiffEditors(),i=cu();if(i){for(let o of t)if(o.getContainerDomNode().contains(i))return o}return null}ge(lg);ge(Rl);ge(kl);Xt.appendMenuItem(j.EditorTitle,{command:{id:new kl().desc.id,title:m(119,"Use Inline View When Space Is Limited"),toggled:k.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:k.has("isInDiffEditor")},order:11,group:"1_diff",when:k.and(S.diffEditorRenderSideBySideInlineBreakpointReached,k.has("isInDiffEditor"))});Xt.appendMenuItem(j.EditorTitle,{command:{id:new Rl().desc.id,title:m(120,"Show Moved Code Blocks"),icon:U.move,toggled:UD.create("config.diffEditor.experimental.showMoves",!0),precondition:k.has("isInDiffEditor")},order:10,group:"1_diff",when:k.has("isInDiffEditor")});ge(Aa);for(let r of[{icon:U.arrowRight,key:S.diffEditorInlineMode.toNegated()},{icon:U.discard,key:S.diffEditorInlineMode}])Xt.appendMenuItem(j.DiffEditorHunkToolbar,{command:{id:new Aa().desc.id,title:m(121,"Revert Block"),icon:r.icon},when:k.and(S.diffEditorModifiedWritable,r.key),order:5,group:"primary"}),Xt.appendMenuItem(j.DiffEditorSelectionToolbar,{command:{id:new Aa().desc.id,title:m(122,"Revert Selection"),icon:r.icon},when:k.and(S.diffEditorModifiedWritable,r.key),order:5,group:"primary"});ge(cg);ge(hg);ge(ug);ge(gg);Xt.appendMenuItem(j.EditorTitle,{command:{id:Fa.id,title:m(123,"Open Accessible Diff Viewer"),precondition:k.has("isInDiffEditor")},order:10,group:"2_diff",when:k.and(S.accessibleDiffViewerVisible.negate(),k.has("isInDiffEditor"))});me.registerCommandAlias("editor.action.diffReview.next",Fa.id);ge(Fa);me.registerCommandAlias("editor.action.diffReview.prev",Ml.id);ge(Ml);var ZT=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(s=r[a])&&(n=(o<3?s(n):o>3?s(e,t,n):s(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},YT=function(r,e){return function(t,i){e(t,i,r)}},Ub,mg=new J("selectionAnchorSet",!1),br=class{static{Ub=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(e){return e.getContribution(Ub.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=mg.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(G.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new nt().appendText(m(798,"Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Ct(m(799,"Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(G.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};br=Ub=ZT([YT(1,Y)],br);var jb=class extends M{constructor(){super({id:"editor.action.setSelectionAnchor",label:x(800,"Set Selection Anchor"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:Ve(2089,2080),weight:100}})}async run(e,t){br.get(t)?.setSelectionAnchor()}},Kb=class extends M{constructor(){super({id:"editor.action.goToSelectionAnchor",label:x(801,"Go to Selection Anchor"),precondition:mg})}async run(e,t){br.get(t)?.goToSelectionAnchor()}},qb=class extends M{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:x(802,"Select from Anchor to Cursor"),precondition:mg,kbOpts:{kbExpr:S.editorTextFocus,primary:Ve(2089,2089),weight:100}})}async run(e,t){br.get(t)?.selectFromAnchorToCursor()}},Gb=class extends M{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:x(803,"Cancel Selection Anchor"),precondition:mg,kbOpts:{kbExpr:S.editorTextFocus,primary:9,weight:100}})}async run(e,t){br.get(t)?.cancelSelectionAnchor()}};K(br.ID,br,4);D(jb);D(Kb);D(qb);D(Gb);var XT=W("editorOverviewRuler.bracketMatchForeground","#A0A0A0",m(804,"Overview ruler marker color for matching brackets.")),$b=class extends M{constructor(){super({id:"editor.action.jumpToBracket",label:x(806,"Go to Bracket"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:3165,weight:100}})}run(e,t){cs.get(t)?.jumpToBracket()}},Zb=class extends M{constructor(){super({id:"editor.action.selectToBracket",label:x(807,"Select to Bracket"),precondition:void 0,metadata:{description:x(808,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){let o=!0;i&&i.selectBrackets===!1&&(o=!1),cs.get(t)?.selectToBracket(o)}},Yb=class extends M{constructor(){super({id:"editor.action.removeBrackets",label:x(809,"Remove Brackets"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:2561,weight:100},canTriggerInlineEdits:!0})}run(e,t){cs.get(t)?.removeBrackets(this.id)}},Xb=class{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}},cs=class r extends L{static{this.ID="editor.contrib.bracketMatchingController"}static get(e){return e.getContribution(r.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Le(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(80),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(80)&&(this._matchBrackets=this._editor.getOption(80),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{let o=i.getStartPosition(),n=e.bracketPairs.matchBracket(o),s=null;if(n)n[0].containsPosition(o)&&!n[1].containsPosition(o)?s=n[1].getStartPosition():n[1].containsPosition(o)&&(s=n[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(o);if(a)s=a[1].getStartPosition();else{let d=e.bracketPairs.findNextBracket(o);d&&d.range&&(s=d.range.getStartPosition())}}return s?new G(s.lineNumber,s.column,s.lineNumber,s.column):new G(o.lineNumber,o.column,o.lineNumber,o.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(o=>{let n=o.getStartPosition(),s=t.bracketPairs.matchBracket(n);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(n),!s)){let l=t.bracketPairs.findNextBracket(n);l&&l.range&&(s=t.bracketPairs.matchBracket(l.range.getStartPosition()))}let a=null,d=null;if(s){s.sort(C.compareRangesUsingStarts);let[l,c]=s;if(a=e?l.getStartPosition():l.getEndPosition(),d=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(n)){let h=a;a=d,d=h}}a&&d&&i.push(new G(a.lineNumber,a.column,d.lineNumber,d.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(i=>{let o=i.getPosition(),n=t.bracketPairs.matchBracket(o);n||(n=t.bracketPairs.findEnclosingBrackets(o)),n&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:n[0],text:""},{range:n[1],text:""}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=X.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Ke(XT),position:xi.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=X.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(let i of this._lastBracketsData){let o=i.brackets;o&&(e[t++]={range:o[0],options:i.options},e[t++]={range:o[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),i=t.getVersionId(),o=[];this._lastVersionId===i&&(o=this._lastBracketsData);let n=[],s=0;for(let h=0,u=e.length;h<u;h++){let g=e[h];g.isEmpty()&&(n[s++]=g.getStartPosition())}n.length>1&&n.sort(P.compare);let a=[],d=0,l=0,c=o.length;for(let h=0,u=n.length;h<u;h++){let g=n[h];for(;l<c&&o[l].position.isBefore(g);)l++;if(l<c&&o[l].position.equals(g))a[d++]=o[l];else{let p=t.bracketPairs.matchBracket(g,20),f=r._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!p&&this._matchBrackets==="always"&&(p=t.bracketPairs.findEnclosingBrackets(g,20),f=r._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[d++]=new Xb(g,p,f)}}this._lastBracketsData=a,this._lastVersionId=i}};K(cs.ID,cs,1);D(Zb);D($b);D(Yb);Xt.appendMenuItem(j.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:m(805,"Go to &&Bracket")},order:2});var pg=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let i=this._selection.startLineNumber,o=this._selection.startColumn,n=this._selection.endColumn;if(!(this._isMovingLeft&&o===1)&&!(!this._isMovingLeft&&n===e.getLineMaxColumn(i)))if(this._isMovingLeft){let s=new C(i,o-1,i,o),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new C(i,n,i,n),a)}else{let s=new C(i,n,i,n+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new C(i,o,i,o),a)}}computeCursorState(e,t){return this._isMovingLeft?new G(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new G(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}};var fg=class extends M{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],o=t.getSelections();for(let n of o)i.push(new pg(n,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}},Qb=class extends fg{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:x(810,"Move Selected Text Left"),precondition:S.writable})}},Jb=class extends fg{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:x(811,"Move Selected Text Right"),precondition:S.writable})}};D(Qb);D(Jb);var eC=class extends M{constructor(){super({id:"editor.action.transposeLetters",label:x(812,"Transpose Letters"),precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),o=[],n=t.getSelections();for(let s of n){if(!s.isEmpty())continue;let a=s.startLineNumber,d=s.startColumn,l=i.getLineMaxColumn(a);if(a===1&&(d===1||d===2&&l===2))continue;let c=d===l?s.getPosition():gu.rightPosition(i,s.getPosition().lineNumber,s.getPosition().column),h=gu.leftPosition(i,c),u=gu.leftPosition(i,h),g=i.getValueInRange(C.fromPositions(u,h)),p=i.getValueInRange(C.fromPositions(h,c)),f=C.fromPositions(u,c);o.push(new fn(f,p+g))}o.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop())}};D(eC);var QT=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(s=r[a])&&(n=(o<3?s(n):o>3?s(e,t,n):s(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},JT=function(r,e){return function(t,i){e(t,i,r)}},eN=X.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:eu,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),tC=class r extends L{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(e,t,i,o,n){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=n,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(o),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=F(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=F("span.icon");this.domNode.append(t),t.classList.add(...ne.asClassNameArray(U.loading),"codicon-modifier-spin");let i=()=>{let o=this.editor.getOption(75);this.domNode.style.height=`${o}px`,this.domNode.style.width=`${Math.ceil(.8*o)}px`};i(),this._register(this.editor.onDidChangeConfiguration(o=>{(o.hasChanged(61)||o.hasChanged(75))&&i()})),this._register(te(this.domNode,fe.CLICK,o=>{this.delegate.cancel()}))}getId(){return r.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}},Ha=class extends L{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new we),this._currentWidget=this._register(new we),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,o,n){let s=this._operationIdPool++;this._currentOperation=s,this.clear(),this._showPromise.value=po(()=>{let a=C.fromPositions(e);this._currentDecorations.set([{range:a,options:eN}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(tC,this.id,this._editor,a,t,o))},n??this._showDelay);try{return await i}finally{this._currentOperation===s&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};Ha=QT([JT(2,z)],Ha);var JR=St("productService");function Nl(r,e){return{id:e,asString:async()=>r,asFile:()=>{},value:typeof r=="string"?r:void 0}}function ek(r,e,t,i){let o={id:rr(),name:r,uri:e,data:t};return{id:i,asString:async()=>"",asFile:()=>o,value:void 0}}var Wa=class{constructor(){this._entries=new Map}get size(){let e=0;for(let t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){let t=[...this._entries.keys()];return ki.some(this,([i,o])=>o.asFile())&&t.push("files"),tk(_g(e),t)}get(e){return this._entries.get(this.toKey(e))?.[0]}append(e,t){let i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(let[e,t]of this._entries)for(let i of t)yield[e,i]}toKey(e){return _g(e)}};function _g(r){return r.toLowerCase()}function iC(r,e){return tk(_g(r),e.map(_g))}function tk(r,e){if(r==="*/*")return e.length>0;if(e.includes(r))return!0;let t=r.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;let[i,o,n]=t;return n==="*"?e.some(s=>s.startsWith(o+"/")):!1}var hs=Object.freeze({create:r=>nu(r.map(e=>e.toString())).join(`\r `),split:r=>r.split(`\r `),parse:r=>hs.split(r).filter(e=>!e.startsWith("#"))});var Ie=class r{static{this.sep="."}static{this.None=new r("@@none@@")}static{this.Empty=new r("")}constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+r.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new r((this.value?[this.value,...e]:e).join(r.sep))}};var nC={EDITORS:"CodeEditors",FILES:"CodeFiles"},oC=class{},tN={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Vt.add(tN.DragAndDropContribution,new oC);var vg=class r{static{this.INSTANCE=new r}constructor(){}static getInstance(){return r.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};function rC(r){if(Zn&&typeof globalThis.vscode?.webUtils?.getPathForFile=="function")return globalThis.vscode?.webUtils?.getPathForFile(r)}function sC(r){let e=new Wa;for(let t of r.items){let i=t.type;if(t.kind==="string"){let o=new Promise(n=>t.getAsString(n));e.append(i,Nl(o))}else if(t.kind==="file"){let o=t.getAsFile();o&&e.append(i,iN(o))}}return e}function iN(r){let e=rC(r),t=e?re.parse(e):void 0;return ek(r.name,t,async()=>new Uint8Array(await r.arrayBuffer()))}var oN=Object.freeze([nC.EDITORS,nC.FILES,ss.RESOURCES,ss.INTERNAL_URI_LIST]);function bg(r,e=!1){let t=sC(r),i=t.get(ss.INTERNAL_URI_LIST);if(i)t.replace(_t.uriList,i);else if(e||!t.has(_t.uriList)){let o=[];for(let n of r.items){let s=n.getAsFile();if(s){let a=rC(s);try{a?o.push(re.file(a).toString()):o.push(re.parse(s.name,!0).toString())}catch{}}}o.length&&t.replace(_t.uriList,Nl(hs.create(o)))}for(let o of oN)t.delete(o);return t}var nN=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(s=r[a])&&(n=(o<3?s(n):o>3?s(e,t,n):s(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},ik=function(r,e){return function(t,i){e(t,i,r)}},Cg,Pt=class{static{Cg=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new J("messageVisible",!1,m(1287,"Whether the editor is currently showing an inline message"))}static get(e){return e.getContribution(Cg.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new we,this._messageListeners=new R,this._mouseOverMessage=!1,this._editor=e,this._visible=Cg.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){if(Ct(yl(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),yl(e)){let o=this._messageListeners.add(Gu(e,{actionHandler:(n,s)=>{this.closeMessage(),hR(this._openerService,n,s.isTrusted)}}));this._messageWidget.value=new Pl(this._editor,t,o.element)}else this._messageWidget.value=new Pl(this._editor,t,e);this._messageListeners.add(ke.debounce(this._editor.onDidBlurEditorText,(o,n)=>n,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&FD(cu(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(te(this._messageWidget.value.getDomNode(),fe.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(te(this._messageWidget.value.getDomNode(),fe.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(o=>{o.target.position&&(i?i.containsPosition(o.target.position)||this.closeMessage():i=new C(t.lineNumber-3,1,o.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Pl.fadeOut(this._messageWidget.value))}};Pt=Cg=nN([ik(1,Y),ik(2,Uo)],Pt);var rN=Ye.bindToContribution(Pt.get);q(new rN({id:"leaveEditorMessage",precondition:Pt.MESSAGE_VISIBLE,handler:r=>r.closeMessage(),kbOpts:{weight:130,primary:9}}));var Pl=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},o){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";let n=document.createElement("div");n.classList.add("anchor","top"),this._domNode.appendChild(n);let s=document.createElement("div");typeof o=="string"?(s.classList.add("message"),s.textContent=o):(o.classList.add("message"),s.appendChild(o)),this._domNode.appendChild(s);let a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};K(Pt.ID,Pt,4);var dC=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(s=r[a])&&(n=(o<3?s(n):o>3?s(e,t,n):s(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Ol=function(r,e){return function(t,i){e(t,i,r)}},Al=class{constructor(e){this.copyMimeTypes=[],this.kind=e,this.providedDropEditKinds=[this.kind],this.providedPasteEditKinds=[this.kind]}async provideDocumentPasteEdits(e,t,i,o,n){let s=await this.getEdit(i,n);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,i,o){let n=await this.getEdit(i,o);if(n)return{edits:[{insertText:n.insertText,title:n.title,kind:n.kind,handledMimeType:n.handledMimeType,yieldTo:n.yieldTo}],dispose(){}}}},xn=class r extends Al{static{this.id="text"}constructor(){super(Ie.Empty.append("text","plain")),this.id=r.id,this.dropMimeTypes=[_t.text],this.pasteMimeTypes=[_t.text]}async getEdit(e,t){let i=e.get(_t.text);if(!i||e.has(_t.uriList))return;let o=await i.asString();return{handledMimeType:_t.text,title:m(926,"Insert Plain Text"),insertText:o,kind:this.kind}}},Sg=class extends Al{constructor(){super(Ie.Empty.append("uri","path","absolute")),this.dropMimeTypes=[_t.uriList],this.pasteMimeTypes=[_t.uriList]}async getEdit(e,t){let i=await ok(e);if(!i.length||t.isCancellationRequested)return;let o=0,n=i.map(({uri:a,originalText:d})=>a.scheme===at.file?a.fsPath:(o++,d)).join(" "),s;return o>0?s=i.length>1?m(927,"Insert Uris"):m(928,"Insert Uri"):s=i.length>1?m(929,"Insert Paths"):m(930,"Insert Path"),{handledMimeType:_t.uriList,insertText:n,title:s,kind:this.kind}}},wg=class extends Al{constructor(e){super(Ie.Empty.append("uri","path","relative")),this._workspaceContextService=e,this.dropMimeTypes=[_t.uriList],this.pasteMimeTypes=[_t.uriList]}async getEdit(e,t){let i=await ok(e);if(!i.length||t.isCancellationRequested)return;let o=si(i.map(({uri:n})=>{let s=this._workspaceContextService.getWorkspaceFolder(n);return s?XD(s.uri,n):void 0}));if(o.length)return{handledMimeType:_t.uriList,insertText:o.join(" "),title:i.length>1?m(931,"Insert Relative Paths"):m(932,"Insert Relative Path"),kind:this.kind}}};wg=dC([Ol(0,no)],wg);var aC=class{constructor(){this.kind=new Ie("html"),this.providedPasteEditKinds=[this.kind],this.copyMimeTypes=[],this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:_t.text}]}async provideDocumentPasteEdits(e,t,i,o,n){if(o.triggerKind!==Cl.PasteAs&&!o.only?.contains(this.kind))return;let a=await i.get("text/html")?.asString();if(!(!a||n.isCancellationRequested))return{dispose(){},edits:[{insertText:a,yieldTo:this._yieldTo,title:m(933,"Insert HTML"),kind:this.kind}]}}};async function ok(r){let e=r.get(_t.uriList);if(!e)return[];let t=await e.asString(),i=[];for(let o of hs.parse(t))try{i.push({uri:re.parse(o),originalText:o})}catch{}return i}var us={scheme:"*",hasAccessToAllModels:!0},yg=class extends L{constructor(e,t){super(),this._register(e.documentDropEditProvider.register(us,new xn)),this._register(e.documentDropEditProvider.register(us,new Sg)),this._register(e.documentDropEditProvider.register(us,new wg(t)))}};yg=dC([Ol(0,O),Ol(1,no)],yg);var xg=class extends L{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register(us,new xn)),this._register(e.documentPasteEditProvider.register(us,new Sg)),this._register(e.documentPasteEditProvider.register(us,new wg(t))),this._register(e.documentPasteEditProvider.register(us,new aC))}};xg=dC([Ol(0,O),Ol(1,no)],xg);var lC=class r{constructor(){this.value="",this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e=this.pos,t=0,i=this.value.charCodeAt(e),o;if(o=r._table[i],typeof o=="number")return this.pos+=1,{type:o,pos:e,len:1};if(r.isDigitCharacter(i)){o=8;do t+=1,i=this.value.charCodeAt(e+t);while(r.isDigitCharacter(i));return this.pos+=t,{type:o,pos:e,len:t}}if(r.isVariableCharacter(i)){o=9;do i=this.value.charCodeAt(e+ ++t);while(r.isVariableCharacter(i)||r.isDigitCharacter(i));return this.pos+=t,{type:o,pos:e,len:t}}o=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof r._table[i]>"u"&&!r.isDigitCharacter(i)&&!r.isVariableCharacter(i));return this.pos+=t,{type:o,pos:e,len:t}}},Cr=class{constructor(){this._children=[]}appendChild(e){return e instanceof Ot&&this._children[this._children.length-1]instanceof Ot?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:i}=e,o=i.children.indexOf(e),n=i.children.slice(0);n.splice(o,1,...t),i._children=n,(function s(a,d){for(let l of a)l.parent=d,s(l.children,l)})(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Ba)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},Ot=class r extends Cr{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new r(this.value)}},Ig=class extends Cr{},Ti=class r extends Ig{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof gs?this._children[0]:void 0}clone(){let e=new r(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},gs=class r extends Cr{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Ot&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new r;return this.options.forEach(e.appendChild,e),e}},cC=class r extends Cr{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,i=!1,o=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(n=>n instanceof xo&&!!n.elseValue)&&(o=this._replace([])),o}_replace(e){let t="";for(let i of this._children)if(i instanceof xo){let o=e[i.index]||"";o=i.resolve(o),t+=o}else t+=i.toString();return t}toString(){return""}clone(){let e=new r;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}},xo=class r extends Cr{constructor(e,t,i,o){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=o}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map((i,o)=>o===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new r(this.index,this.shorthandName,this.ifValue,this.elseValue)}},Fl=class r extends Ig{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new Ot(t)],!0):!1}clone(){let e=new r(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};function nk(r,e){let t=[...r];for(;t.length>0;){let i=t.shift();if(!e(i))break;t.unshift(...i.children)}}var Ba=class r extends Cr{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(i){return i instanceof Ti&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){let{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(o=>o===e?(i=!0,!1):(t+=o.len(),!0)),i?t:-1}fullLen(e){let t=0;return nk([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof Ti&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Fl&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new r;return this._children=this.children.map(t=>t.clone()),e}walk(e){nk(this.children,e)}},Li=class{constructor(){this._scanner=new lC,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){let o=new Ba;return this.parseFragment(e,o),this.ensureFinalTabstop(o,i??!1,t??!1),o}parseFragment(e,t){let i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let o=new Map,n=[];t.walk(d=>(d instanceof Ti&&(d.isFinalTabstop?o.set(0,void 0):!o.has(d.index)&&d.children.length>0?o.set(d.index,d.children):n.push(d)),!0));let s=(d,l)=>{let c=o.get(d.index);if(!c)return;let h=new Ti(d.index);h.transform=d.transform;for(let u of c){let g=u.clone();h.appendChild(g),g instanceof Ti&&o.has(g.index)&&!l.has(g.index)&&(l.add(g.index),s(g,l),l.delete(g.index))}t.replace(d,[h])},a=new Set;for(let d of n)s(d,a);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(n=>n.index===0)||e.appendChild(new Ti(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let o=this._scanner.next();if(o.type!==0&&o.type!==4&&o.type!==5)return!1}this._token=this._scanner.next()}let i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new Ot(t)),!0):!1}_parseTabstopOrVariableName(e){let t,i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Ti(Number(t)):new Fl(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t,i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);let n=new Ti(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new Ot("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else if(n.index>0&&this._accept(7)){let s=new gs;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(s),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i)}_parseChoiceElement(e){let t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let o;if((o=this._accept(5,!0))?o=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||o:o=this._accept(void 0,!0),!o)return this._backTo(t),!1;i.push(o)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new Ot(i.join(""))),!0)}_parseComplexVariable(e){let t,i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);let n=new Fl(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new Ot("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i)}_parseTransform(e){let t=new cC,i="",o="";for(;!this._accept(6);){let n;if(n=this._accept(5,!0)){n=this._accept(6,!0)||n,i+=n;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let n;if(n=this._accept(5,!0)){n=this._accept(5,!0)||this._accept(6,!0)||n,t.appendChild(new Ot(n));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){o+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,o)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);let o=this._accept(8,!0);if(o)if(i){if(this._accept(4))return e.appendChild(new xo(Number(o))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new xo(Number(o))),!0;else return this._backTo(t),!1;if(this._accept(6)){let n=this._accept(9,!0);return!n||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new xo(Number(o),n)),!0)}else if(this._accept(11)){let n=this._until(4);if(n)return e.appendChild(new xo(Number(o),void 0,n,void 0)),!0}else if(this._accept(12)){let n=this._until(4);if(n)return e.appendChild(new xo(Number(o),void 0,void 0,n)),!0}else if(this._accept(13)){let n=this._until(1);if(n){let s=this._until(4);if(s)return e.appendChild(new xo(Number(o),void 0,n,s)),!0}}else{let n=this._until(4);if(n)return e.appendChild(new xo(Number(o),void 0,void 0,n)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Ot(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}};function Lg(r,e,t){return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:t.additionalEdit?.edits??[]}:{edits:[...e.map(i=>new dR(r,{range:i,text:typeof t.insertText=="string"?Li.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...t.additionalEdit?.edits??[]]}}function Dg(r){function e(s,a){return"mimeType"in s?s.mimeType===a.handledMimeType:!!a.kind&&s.kind.contains(a.kind)}let t=new Map;for(let s of r)for(let a of s.yieldTo??[])for(let d of r)if(d!==s&&e(a,d)){let l=t.get(s);l||(l=[],t.set(s,l)),l.push(d)}if(!t.size)return Array.from(r);let i=new Set,o=[];function n(s){if(!s.length)return[];let a=s[0];if(o.includes(a))return console.warn("Yield to cycle detected",a),s;if(i.has(a))return n(s.slice(1));let d=[],l=t.get(a);return l&&(o.push(a),d=n(l),o.pop()),i.add(a),[...d,a,...n(s.slice(1))]}return n(Array.from(r))}function hC(r,e){return e&&(r.stack||r.stacktrace)?m(29,"{0}: {1}",sk(r),rk(r.stack)||rk(r.stacktrace)):sk(r)}function rk(r){return Array.isArray(r)?r.join(` `):r}function sk(r){return r.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${r.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof r.code=="string"&&typeof r.errno=="number"&&typeof r.syscall=="string"?m(30,"A system error occurred ({0})",r.message):r.message||m(31,"An unknown error occurred. Please consult the log for more details.")}function Va(r=null,e=!1){if(!r)return m(32,"An unknown error occurred. Please consult the log for more details.");if(Array.isArray(r)){let t=si(r),i=Va(t[0],e);return t.length>1?m(33,"{0} ({1} errors in total)",i,t.length):i}if(Yh(r))return r;if(r.detail){let t=r.detail;if(t.error)return hC(t.error,e);if(t.exception)return hC(t.exception,e)}return r.stack?hC(r,e):r.message?r.message:m(34,"An unknown error occurred. Please consult the log for more details.")}var ak=function(r,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(s=r[a])&&(n=(o<3?s(n):o>3?s(e,t,n):s(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Eg=function(r,e){return function(t,i){e(t,i,r)}},fC="acceptSelectedCodeAction",_C="previewSelectedCodeAction",uC=class{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.group?.title??e.label??""}disposeTemplate(e){}},gC=class{get templateId(){return"separator"}renderTemplate(e){e.classList.add("separator");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.label??""}disposeTemplate(e){}},mC=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);let t=document.createElement("div");t.className="icon",e.append(t);let i=document.createElement("span");i.className="title",e.append(i);let o=document.createElement("span");o.className="description",e.append(o);let n=new Na(e,oa);return{container:e,icon:t,text:i,description:o,keybinding:n}}renderElement(e,t,i){if(e.group?.icon?(i.icon.className=ne.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=de(e.group.icon.color.id))):(i.icon.className=ne.asClassName(U.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;VD(!e.hideIcon,i.icon),i.text.textContent=Mg(e.label),e.keybinding?(i.description.textContent=e.keybinding.getLabel(),i.description.style.display="inline",i.description.style.letterSpacing="0.5px"):e.description?(i.description.textContent=Mg(e.description),i.description.style.display="inline"):(i.description.textContent="",i.description.style.display="none");let o=this._keybindingService.lookupKeybinding(fC)?.getLabel(),n=this._keybindingService.lookupKeybinding(_C)?.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.tooltip?i.container.title=e.tooltip:e.disabled?i.container.title=e.label:o&&n?this._supportsPreview&&e.canPreview?i.container.title=m(1653,"{0} to Apply, {1} to Preview",o,n):i.container.ti