You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/4670.4230178b.async.js

2 lines
41 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[4670,9404],{55826:function(Dt,lt,t){self.MonacoEnvironment=function(Lt){function Tt(dt){return dt.replace(/\/$/,"")}return{globalAPI:!1,getWorkerUrl:function(dt,ct){var I=t.p,A=(I?Tt(I)+"/":"")+Lt[ct];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(A)){var ht=String(window.location),ut=ht.substr(0,ht.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(A.substring(0,ut.length)!==ut){/^(\/\/)/.test(A)&&(A=window.location.protocol+A);var Rt="/*"+ct+'*/importScripts("'+A+'");',y=new Blob([Rt],{type:"application/javascript"});return URL.createObjectURL(y)}}return A}}}({editorWorkerService:"editor.worker.js",css:"css.worker.js",html:"html.worker.js",json:"json.worker.js",typescript:"ts.worker.js",javascript:"ts.worker.js",less:"css.worker.js",scss:"css.worker.js",handlebars:"html.worker.js",razor:"html.worker.js"}),t(46005),t(18870),t(9740),t(62015),t(9093),t(49946),t(51567),t(76522),t(68770),t(42834),t(87596),t(40539),t(5697),t(23111),t(44818),t(2268),t(60996),t(2765),t(20926),t(33184),t(24719),t(96016),t(59089),t(88863),t(23659),t(38486),t(74395),t(13679),t(69896),t(45048),t(16607),t(5964),t(93379),t(74480),t(15662),t(19720),t(77847),t(43497),t(99453),t(60661),Dt.exports=t(44434),t(29126),t(89808),t(13598),t(52042),t(11336),t(76334),t(30253),t(47940),t(18162),t(79556),t(56292),t(40605),t(24129),t(97820),t(40927),t(26220),t(1526),t(40902),t(68423),t(17476),t(16745),t(43763),t(72323),t(36831),t(66079),t(82665),t(77365),t(6595),t(75769),t(51714),t(86935),t(62893),t(27616),t(83335),t(46266),t(89723),t(48746),t(94992),t(16563),t(85098),t(83187),t(76194),t(5566),t(26254),t(5734),t(40191),t(93127),t(34483),t(40840),t(2375),t(96461),t(76628),t(40185),t(68262),t(96337),t(87530),t(25929),t(6205),t(46837),t(88307),t(15422),t(58203),t(81905),t(94199),t(37266)},44434:function(Dt,lt,t){"use strict";t.r(lt),t.d(lt,{CancellationTokenSource:function(){return I.CancellationTokenSource},Emitter:function(){return I.Emitter},KeyCode:function(){return I.KeyCode},KeyMod:function(){return I.KeyMod},MarkerSeverity:function(){return I.MarkerSeverity},MarkerTag:function(){return I.MarkerTag},Position:function(){return I.Position},Range:function(){return I.Range},Selection:function(){return I.Selection},SelectionDirection:function(){return I.SelectionDirection},Token:function(){return I.Token},Uri:function(){return I.Uri},__esModule:function(){return I.__esModule},editor:function(){return I.editor},languages:function(){return I.languages}});var Lt=t(15422),Tt=t(40605),dt=t(72323),ct=t(68423),I=t(50048),A=t(29126),ht=t(89808),ut=t(13598),Rt=t(52042),y=t(25552);(0,y.H)({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:function(){return t.e(7131).then(t.bind(t,47131))}});var Bn=t(11336),$n=t(76334),Yn=t(30253),Xn=t(47940),Gn=t(18162),Jn=t(79556),Zn=t(56292);(0,y.H)({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:function(){return t.e(9343).then(t.bind(t,39343))}});var bn=t(24129);(0,y.H)({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:function(){return t.e(2814).then(t.bind(t,12814))}}),(0,y.H)({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:function(){return t.e(2365).then(t.bind(t,92240))}}),(0,y.H)({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:function(){return t.e(4188).then(t.bind(t,14188))}});var wn=t(97820),kn=t(40927),qn=t(26220),_n=t(1526);(0,y.H)({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:function(){return t.e(3632).then(t.bind(t,48534))}});var te=t(40902),ne=t(17476),ee=t(16745),oe=t(43763);(0,y.H)({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:function(){return t.e(4946).then(t.bind(t,34946))}});var ie=t(36831),se=t(66079);(0,y.H)({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:function(){return t.e(4912).then(t.bind(t,64912))}});var re=t(82665);(0,y.H)({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:function(){return t.e(4028).then(t.bind(t,94028))}}),(0,y.H)({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:function(){return t.e(8906).then(t.bind(t,38906))}});var ae=t(77365),le=t(6595),de=t(75769),ce=t(51714),he=t(86935),ue=t(62893),ge=t(27616),fe=t(83335),ve=t(46266),me=t(89723);(0,y.H)({id:"pla",extensions:[".pla"],loader:function(){return t.e(3682).then(t.bind(t,23682))}});var Se=t(48746),pe=t(94992),Ce=t(16563);(0,y.H)({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:function(){return t.e(3760).then(t.bind(t,63760))}});var Ie=t(85098),ye=t(83187);(0,y.H)({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:function(){return t.e(9400).then(t.bind(t,69400))}});var xe=t(76194),De=t(5566),Le=t(26254),Te=t(5734),Re=t(40191),Pe=t(93127),Oe=t(34483),Ae=t(40840),Ee=t(37266),Me=t(2375),Ne=t(96461),ze=t(76628),je=t(40185),Ue=t(68262);(0,y.H)({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:function(){return t.e(5962).then(t.bind(t,85962))}});var Ve=t(96337),He=t(87530),Fe=t(25929);(0,y.H)({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:function(){return t.e(1886).then(t.bind(t,81886))}}),(0,y.H)({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:function(){return t.e(1886).then(t.bind(t,81886))}});var Qe=t(6205),We=t(46837),Ke=t(88307),Be=t(58203),$e=t(81905),Ye=t(94199),Xe=t(68770),Ge=t(50124),Je=t(92913),Ze=t(75623),_t=t(35996),tn=t(59365),Pt=t(22258),g=t(16830),Z=t(3860),R=t(29102),m=t(63580),B=t(38819),nn=function(a,n,e,o){var s=arguments.length,i=s<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,e):o,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,n,e,o);else for(var l=a.length-1;l>=0;l--)(r=a[l])&&(i=(s<3?r(i):s>3?r(n,e,i):r(n,e))||i);return s>3&&i&&Object.defineProperty(n,e,i),i},en=function(a,n){return function(e,o){n(e,o,a)}},b=function(a,n,e,o){function s(i){return i instanceof e?i:new e(function(r){r(i)})}return new(e||(e=Promise))(function(i,r){function l(d){try{u(o.next(d))}catch(c){r(c)}}function h(d){try{u(o.throw(d))}catch(c){r(c)}}function u(d){d.done?i(d.value):s(d.value).then(l,h)}u((o=o.apply(a,n||[])).next())})};const w=new B.uy("selectionAnchorSet",!1);let O=class kt{constructor(n,e){this.editor=n,this.selectionAnchorSetContextKey=w.bindTo(e),this.modelChangeListener=n.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(n){return n.getContribution(kt.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const n=this.editor.getPosition(),e=this.decorationId?[this.decorationId]:[],o=this.editor.deltaDecorations(e,[{range:Z.Y.fromPositions(n,n),options:{description:"selection-anchor",stickiness:1,hoverMessage:new tn.W5().appendText((0,m.N)("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=o[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,_t.Z9)((0,m.N)("anchorSet","Anchor set at {0}:{1}",n.lineNumber,n.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const n=this.editor.getModel().getDecorationRange(this.decorationId);n&&this.editor.setPosition(n.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const n=this.editor.getModel().getDecorationRange(this.decorationId);if(n){const e=this.editor.getPosition();this.editor.setSelection(Z.Y.fromPositions(n.getStartPosition(),e)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};O.ID="editor.contrib.selectionAnchorController",O=nn([en(1,B.i6)],O);class on extends g.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,m.N)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:R.u.editorTextFocus,primary:(0,Pt.gx)(2089,2080),weight:100}})}run(n,e){return b(this,void 0,void 0,function*(){O.get(e).setSelectionAnchor()})}}class sn extends g.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,m.N)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:w})}run(n,e){return b(this,void 0,void 0,function*(){O.get(e).goToSelectionAnchor()})}}class rn extends g.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,m.N)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:w,kbOpts:{kbExpr:R.u.editorTextFocus,primary:(0,Pt.gx)(2089,2089),weight:100}})}run(n,e){return b(this,void 0,void 0,function*(){O.get(e).selectFromAnchorToCursor()})}}class an extends g.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,m.N)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:w,kbOpts:{kbExpr:R.u.editorTextFocus,primary:9,weight:100}})}run(n,e){return b(this,void 0,void 0,function*(){O.get(e).cancelSelectionAnchor()})}}(0,g._K)(O.ID,O),(0,g.Qr)(on),(0,g.Qr)(sn),(0,g.Qr)(rn),(0,g.Qr)(an);var be=t(18870),we=t(9740),ke=t(77847),qe=t(62015),_e=t(9093),to=t(49946),L=t(5976),x=t(24314),no=t(64494),ln=t(33184);class gt extends L.JT{constructor(n){super(),this._editor=n,this._register(n.onMouseDown(e=>this.onMouseDown(e)))}dispose(){super.dispose()}onMouseDown(n){var e;if(n.target.type!==6||![...((e=n.target.element)===null||e===void 0?void 0:e.classList.values())||[]].find(r=>r.startsWith("ced-colorBox"))||!n.target.range)return;const i=this._editor.getContribution(ln.ModesHoverController.ID);if(!i.isColorPickerVisible()){const r=new x.e(n.target.range.startLineNumber,n.target.range.startColumn+1,n.target.range.endLineNumber,n.target.range.endColumn+1);i.showContentHover(r,0,!1)}}}gt.ID="editor.contrib.colorContribution",(0,g._K)(gt.ID,gt);var eo=t(51567),oo=t(76522),io=t(42834),so=t(87596),ro=t(40539),ao=t(5697),lo=t(23111),co=t(44818),$=t(71050),ft=t(98401),vt=t(70666),k=t(51200),Ot=t(88216),dn=t(86895),At=t(94565),Et=function(a,n,e,o){function s(i){return i instanceof e?i:new e(function(r){r(i)})}return new(e||(e=Promise))(function(i,r){function l(d){try{u(o.next(d))}catch(c){r(c)}}function h(d){try{u(o.throw(d))}catch(c){r(c)}}function u(d){d.done?i(d.value):s(d.value).then(l,h)}u((o=o.apply(a,n||[])).next())})};function Mt(a,n,e){return Et(this,void 0,void 0,function*(){const o=yield dn.C3.create(a,e);return n?o.asListOfDocumentSymbols():o.getTopLevelSymbols()})}At.P.registerCommand("_executeDocumentSymbolProvider",function(a,...n){return Et(this,void 0,void 0,function*(){const[e]=n;(0,ft.p_)(vt.o.isUri(e));const o=a.get(k.q).getModel(e);if(o)return Mt(o,!1,$.T.None);const s=yield a.get(Ot.S).createModelReference(e);try{return yield Mt(s.object.textEditorModel,!1,$.T.None)}finally{s.dispose()}})});var ho=t(24822),uo=t(2765),go=t(20926),fo=t(2268),E=t(97295),q=t(10291),Nt=t(69386),mt=t(24979),F=t(94660),z=t(51491),zt=t(41157);function jt(a,n,e,o){if(a.getLineCount()===1&&a.getLineMaxColumn(1)===1)return[];const s=F.zu.getIndentationRules(a.getLanguageId());if(!s)return[];for(e=Math.min(e,a.getLineCount());n<=e&&s.unIndentedLinePattern;){let v=a.getLineContent(n);if(!s.unIndentedLinePattern.test(v))break;n++}if(n>e-1)return[];const{tabSize:i,indentSize:r,insertSpaces:l}=a.getOptions(),h=(v,C)=>(C=C||1,q.U.shiftIndent(v,v.length+C,i,r,l)),u=(v,C)=>(C=C||1,q.U.unshiftIndent(v,v.length+C,i,r,l));let d=[],c,p=a.getLineContent(n),f=p;if(o!=null){c=o;let v=E.V8(p);f=c+p.substring(v.length),s.decreaseIndentPattern&&s.decreaseIndentPattern.test(f)&&(c=u(c),f=c+p.substring(v.length)),p!==f&&d.push(Nt.h.replaceMove(new Z.Y(n,1,n,v.length+1),mt.yO.normalizeIndentation(c,r,l)))}else c=E.V8(p);let S=c;s.increaseIndentPattern&&s.increaseIndentPattern.test(f)?(S=h(S),c=h(c)):s.indentNextLinePattern&&s.indentNextLinePattern.test(f)&&(S=h(S)),n++;for(let v=n;v<=e;v++){let C=a.getLineContent(v),T=E.V8(C),D=S+C.substring(T.length);s.decreaseIndentPattern&&s.decreaseIndentPattern.test(D)&&(S=u(S),c=u(c)),T!==S&&d.push(Nt.h.replaceMove(new Z.Y(v,1,v,T.length+1),mt.yO.normalizeIndentation(S,r,l))),!(s.unIndentedLinePattern&&s.unIndentedLinePattern.test(C))&&(s.increaseIndentPattern&&s.increaseIndentPattern.test(D)?(c=h(c),S=c):s.indentNextLinePattern&&s.indentNextLinePattern.test(D)?S=h(S):S=c)}return d}class _ extends g.R6{constructor(){super({id:_.ID,label:m.N("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:R.u.writable})}run(n,e){let o=e.getModel();if(!o)return;let s=o.getOptions(),i=e.getSelection();if(!i)return;const r=new gn(i,s.tabSize);e.pushUndoStop(),e.executeCommands(this.id,[r]),e.pushUndoStop(),o.updateOptions({insertSpaces:!0})}}_.ID="editor.action.indentationToSpaces";class tt extends g.R6{constructor(){super({id:tt.ID,label:m.N("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:R.u.writable})}run(n,e){let o=e.getModel();if(!o)return;let s=o.getOptions(),i=e.getSelection();if(!i)return;const r=new fn(i,s.tabSize);e.pushUndoStop(),e.executeCommands(this.id,[r]),e.pushUndoStop(),o.updateOptions({insertSpaces:!1})}}tt.ID="editor.action.indentationToTabs";class Ut extends g.R6{constructor(n,e){super(e),this.insertSpaces=n}run(n,e){const o=n.get(zt.eJ),s=n.get(k.q);let i=e.getModel();if(!i)return;const r=s.getCreationOptions(i.getLanguageId(),i.uri,i.isForSimpleWidget),l=[1,2,3,4,5,6,7,8].map(u=>({id:u.toString(),label:u.toString(),description:u===r.tabSize?m.N("configuredTabSize","Configured Tab Size"):void 0})),h=Math.min(i.getOptions().tabSize-1,7);setTimeout(()=>{o.pick(l,{placeHolder:m.N({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:l[h]}).then(u=>{u&&i&&!i.isDisposed()&&i.updateOptions({tabSize:parseInt(u.label,10),insertSpaces:this.insertSpaces})})},50)}}class nt extends Ut{constructor(){super(!1,{id:nt.ID,label:m.N("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}nt.ID="editor.action.indentUsingTabs";class et extends Ut{constructor(){super(!0,{id:et.ID,label:m.N("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}et.ID="editor.action.indentUsingSpaces";class ot extends g.R6{constructor(){super({id:ot.ID,label:m.N("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(n,e){const o=n.get(k.q);let s=e.getModel();if(!s)return;const i=o.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget);s.detectIndentation(i.insertSpaces,i.tabSize)}}ot.ID="editor.action.detectIndentation";class cn extends g.R6{constructor(){super({id:"editor.action.reindentlines",label:m.N("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:R.u.writable})}run(n,e){let o=e.getModel();if(!o)return;let s=jt(o,1,o.getLineCount());s.length>0&&(e.pushUndoStop(),e.executeEdits(this.id,s),e.pushUndoStop())}}class hn extends g.R6{constructor(){super({id:"editor.action.reindentselectedlines",label:m.N("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:R.u.writable})}run(n,e){let o=e.getModel();if(!o)return;let s=e.getSelections();if(s===null)return;let i=[];for(let r of s){let l=r.startLineNumber,h=r.endLineNumber;if(l!==h&&r.endColumn===1&&h--,l===1){if(l===h)continue}else l--;let u=jt(o,l,h);i.push(...u)}i.length>0&&(e.pushUndoStop(),e.executeEdits(this.id,i),e.pushUndoStop())}}class un{constructor(n,e){this._initialSelection=e,this._edits=[],this._selectionId=null;for(let o of n)o.range&&typeof o.text=="string"&&this._edits.push(o)}getEditOperations(n,e){for(let s of this._edits)e.addEditOperation(x.e.lift(s.range),s.text);let o=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(o=!0,this._selectionId=e.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(o=!0,this._selectionId=e.trackSelection(this._initialSelection,!1))),o||(this._selectionId=e.trackSelection(this._initialSelection))}computeCursorState(n,e){return e.getTrackedSelection(this._selectionId)}}class St{constructor(n){this.callOnDispose=new L.SL,this.callOnModel=new L.SL,this.editor=n,this.callOnDispose.add(n.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(n.onDidChangeModel(()=>this.update())),this.callOnDispose.add(n.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(9)<4||this.editor.getOption(47))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:n})=>{this.trigger(n)}))}trigger(n){let e=this.editor.getSelections();if(e===null||e.length>1)return;const o=this.editor.getModel();if(!o||!o.isCheapToTokenize(n.getStartPosition().lineNumber))return;const s=this.editor.getOption(9),{tabSize:i,indentSize:r,insertSpaces:l}=o.getOptions();let h=[],u={shiftIndent:f=>q.U.shiftIndent(f,f.length+1,i,r,l),unshiftIndent:f=>q.U.unshiftIndent(f,f.length+1,i,r,l)},d=n.startLineNumber;for(;d<=n.endLineNumber;){if(this.shouldIgnoreLine(o,d)){d++;continue}break}if(d>n.endLineNumber)return;let c=o.getLineContent(d);if(!/\S/.test(c.substring(0,n.startColumn-1))){const f=F.zu.getGoodIndentForLine(s,o,o.getLanguageId(),d,u);if(f!==null){let S=E.V8(c),v=z.Y(f,i),C=z.Y(S,i);if(v!==C){let T=z.J(v,i,l);h.push({range:new x.e(d,1,d,S.length+1),text:T}),c=T+c.substr(S.length)}else{let T=F.zu.getIndentMetadata(o,d);if(T===0||T===8)return}}}const p=d;for(;d<n.endLineNumber;){if(!/\S/.test(o.getLineContent(d+1))){d++;continue}break}if(d!==n.endLineNumber){let f={getLineTokens:v=>o.getLineTokens(v),getLanguageId:()=>o.getLanguageId(),getLanguageIdAtPosition:(v,C)=>o.getLanguageIdAtPosition(v,C),getLineContent:v=>v===p?c:o.getLineContent(v)},S=F.zu.getGoodIndentForLine(s,f,o.getLanguageId(),d+1,u);if(S!==null){let v=z.Y(S,i),C=z.Y(E.V8(o.getLineContent(d+1)),i);if(v!==C){let T=v-C;for(let D=d+1;D<=n.endLineNumber;D++){let V=o.getLineContent(D),H=E.V8(V),J=z.Y(H,i)+T,K=z.J(J,i,l);K!==H&&h.push({range:new x.e(D,1,D,H.length+1),text:K})}}}}if(h.length>0){this.editor.pushUndoStop();let f=new un(h,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",f),this.editor.pushUndoStop()}}shouldIgnoreLine(n,e){n.forceTokenization(e);let o=n.getLineFirstNonWhitespaceColumn(e);if(o===0)return!0;let s=n.getLineTokens(e);if(s.getCount()>0){let i=s.findTokenIndexAtOffset(o);if(i>=0&&s.getStandardTokenType(i)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}St.ID="editor.contrib.autoIndentOnPaste";function Vt(a,n,e,o){if(a.getLineCount()===1&&a.getLineMaxColumn(1)===1)return;let s="";for(let r=0;r<e;r++)s+=" ";let i=new RegExp(s,"gi");for(let r=1,l=a.getLineCount();r<=l;r++){let h=a.getLineFirstNonWhitespaceColumn(r);if(h===0&&(h=a.getLineMaxColumn(r)),h===1)continue;const u=new x.e(r,1,r,h),d=a.getValueInRange(u),c=o?d.replace(/\t/ig,s):d.replace(i," ");n.addEditOperation(u,c)}}class gn{constructor(n,e){this.selection=n,this.tabSize=e,this.selectionId=null}getEditOperations(n,e){this.selectionId=e.trackSelection(this.selection),Vt(n,e,this.tabSize,!0)}computeCursorState(n,e){return e.getTrackedSelection(this.selectionId)}}class fn{constructor(n,e){this.selection=n,this.tabSize=e,this.selectionId=null}getEditOperations(n,e){this.selectionId=e.trackSelection(this.selection),Vt(n,e,this.tabSize,!1)}computeCursorState(n,e){return e.getTrackedSelection(this.selectionId)}}(0,g._K)(St.ID,St),(0,g.Qr)(_),(0,g.Qr)(tt),(0,g.Qr)(nt),(0,g.Qr)(et),(0,g.Qr)(ot),(0,g.Qr)(cn),(0,g.Qr)(hn);var j=t(15393),Y=t(17301),vn=t(89954),Ht=t(43702),pt=t(11640),mn=t(64141),Ft=t(50187),P=t(60303),Sn=t(5405),U=t(73910),M=t(97781),pn=function(a,n,e,o){var s=arguments.length,i=s<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,e):o,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,n,e,o);else for(var l=a.length-1;l>=0;l--)(r=a[l])&&(i=(s<3?r(i):s>3?r(n,e,i):r(n,e))||i);return s>3&&i&&Object.defineProperty(n,e,i),i},Cn=function(a,n){return function(e,o){n(e,o,a)}},it=function(a,n,e,o){function s(i){return i instanceof e?i:new e(function(r){r(i)})}return new(e||(e=Promise))(function(i,r){function l(d){try{u(o.next(d))}catch(c){r(c)}}function h(d){try{u(o.throw(d))}catch(c){r(c)}}function u(d){d.done?i(d.value):s(d.value).then(l,h)}u((o=o.apply(a,n||[])).next())})};const In=1500;class Qt{constructor(){this._data=new Ht.Y9}push(n,e){const o=this._data.get(n.uri);o===void 0?this._data.set(n.uri,new Set([e])):o.add(e)}pop(n,e){const o=this._data.get(n.uri);o&&(o.delete(e),o.size===0&&this._data.delete(n.uri))}has(n,e){var o;return!!(!((o=this._data.get(n.uri))===null||o===void 0)&&o.has(e))}}function Wt(a,n,e,o){return it(this,void 0,void 0,function*(){const s=[],r=P.mX.ordered(a).reverse().map(l=>n.map(h=>it(this,void 0,void 0,function*(){try{e.push(a,l);const u=yield l.provideInlayHints(a,h,o);u!=null&&u.length&&s.push(u.filter(d=>h.containsPosition(d.position)))}catch(u){(0,Y.Cp)(u)}finally{e.pop(a,l)}})));return yield Promise.all(r.flat()),s.flat().sort((l,h)=>Ft.L.compare(l.position,h.position))})}class st{constructor(){this._entries=new Ht.z6(50)}get(n){const e=st._key(n);return this._entries.get(e)}set(n,e){const o=st._key(n);this._entries.set(o,e)}static _key(n){return`${n.uri.toString()}/${n.getVersionId()}`}}let Q=class qt{constructor(n,e){this._editor=n,this._codeEditorService=e,this._decorationOwnerId=++qt._decorationOwnerIdPool,this._disposables=new L.SL,this._sessionDisposables=new L.SL,this._getInlayHintsDelays=new Sn.Y(P.mX,25,500),this._cache=new st,this._decorations=new Map,this._disposables.add(P.mX.onDidChange(()=>this._update())),this._disposables.add(n.onDidChangeModel(()=>this._update())),this._disposables.add(n.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(n.onDidChangeConfiguration(o=>{o.hasChanged(125)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),this._removeAllDecorations(),!this._editor.getOption(125).enabled)return;const n=this._editor.getModel();if(!n||!P.mX.has(n))return;const e=this._cache.get(n);e&&this._updateHintsDecorators([n.getFullModelRange()],e);const o=new Qt,s=new j.pY(()=>it(this,void 0,void 0,function*(){const r=Date.now(),l=new $.A;this._sessionDisposables.add((0,L.OF)(()=>l.dispose(!0)));const h=this._getHintsRanges(),u=yield Wt(n,h,o,l.token);s.delay=this._getInlayHintsDelays.update(n,Date.now()-r),!l.token.isCancellationRequested&&(this._updateHintsDecorators(h,u),this._cache.set(n,Array.from(this._decorations.values()).map(d=>d.hint)))}),this._getInlayHintsDelays.get(n));this._sessionDisposables.add(s),this._sessionDisposables.add(this._editor.onDidChangeModelContent(()=>s.schedule())),this._disposables.add(this._editor.onDidScrollChange(()=>s.schedule())),s.schedule();const i=new L.SL;this._sessionDisposables.add(i);for(const r of P.mX.all(n))typeof r.onDidChangeInlayHints=="function"&&i.add(r.onDidChangeInlayHints(()=>{o.has(n,r)||s.schedule()}))}_getHintsRanges(){const e=this._editor.getModel(),o=this._editor.getVisibleRangesPlusViewportAboveBelow(),s=[];for(const i of o.sort(x.e.compareRangesUsingStarts)){const r=e.validateRange(new x.e(i.startLineNumber-30,i.startColumn,i.endLineNumber+30,i.endColumn));s.length===0||!x.e.areIntersectingOrTouching(s[s.length-1],r)?s.push(r):s[s.length-1]=x.e.plusRange(s[s.length-1],r)}return s}_updateHintsDecorators(n,e){const{fontSize:o,fontFamily:s}=this._getLayoutInfo(),i=this._editor.getModel(),r=[],l=[],h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,s);for(const c of e){const{text:p,position:f,whitespaceBefore:S,whitespaceAfter:v}=c,C=S?o/3|0:0,T=v?o/3|0:0,D={contentText:yn(p),fontSize:`${o}px`,margin:`0px ${T}px 0px ${C}px`,fontFamily:`var(${h}), ${mn.hL.fontFamily}`,padding:`1px ${Math.max(1,o/4)|0}px`,borderRadius:`${o/4|0}px`,verticalAlign:"middle",backgroundColor:(0,M.EN)(U.Pp),color:(0,M.EN)(U.VV)};c.kind===P.gl.Parameter?(D.backgroundColor=(0,M.EN)(U.ph),D.color=(0,M.EN)(U.HC)):c.kind===P.gl.Type&&(D.backgroundColor=(0,M.EN)(U.bK),D.color=(0,M.EN)(U.hX));let V={beforeInjectedText:Object.assign(Object.assign({},D),{affectsLetterSpacing:!0})},H=x.e.fromPositions(f),W=i.getWordAtPosition(f),J=!1;W&&(W.endColumn===f.column?(V.afterInjectedText=V.beforeInjectedText,V.beforeInjectedText=void 0,J=!0,H=Kt(W,f.lineNumber)):W.startColumn===f.column&&(J=!0,H=Kt(W,f.lineNumber)));const K="inlayHints-"+(0,vn.vp)(V).toString(16);if(this._codeEditorService.registerDecorationType("inlay-hints-controller",K,V,void 0,this._editor),r.push(K),l.push({range:H,options:Object.assign(Object.assign({},this._codeEditorService.resolveDecorationOptions(K,!0)),{showIfCollapsed:!J,stickiness:0})})>In)break}const u=[];for(const c of n)for(const{id:p}of i.getDecorationsInRange(c,this._decorationOwnerId,!0)){const f=this._decorations.get(p);f&&(u.push(p),this._codeEditorService.removeDecorationType(f.decorationTypeId),this._decorations.delete(p))}const d=i.deltaDecorations(u,l,this._decorationOwnerId);for(let c=0;c<d.length;c++)this._decorations.set(d[c],{hint:e[c],decorationTypeId:r[c]})}_getLayoutInfo(){const n=this._editor.getOption(125),e=this._editor.getOption(45);let o=n.fontSize;(!o||o<5||o>e)&&(o=e*.9|0);const s=n.fontFamily||this._editor.getOption(42);return{fontSize:o,fontFamily:s}}_removeAllDecorations(){this._editor.deltaDecorations(Array.from(this._decorations.keys()),[]);for(let n of this._decorations.values())this._codeEditorService.removeDecorationType(n.decorationTypeId);this._decorations.clear()}};Q.ID="editor.contrib.InlayHints",Q._decorationOwnerIdPool=0,Q=pn([Cn(1,pt.$)],Q);function Kt(a,n){return new x.e(n,a.startColumn,n,a.endColumn)}function yn(a){return a.replace(/[ \t]/g,"\xA0")}(0,g._K)(Q.ID,Q),At.P.registerCommand("_executeInlayHintProvider",(a,...n)=>it(void 0,void 0,void 0,function*(){const[e,o]=n;(0,ft.p_)(vt.o.isUri(e)),(0,ft.p_)(x.e.isIRange(o));const s=yield a.get(Ot.S).createModelReference(e);try{return yield Wt(s.object.textEditorModel,[x.e.lift(o)],new Qt,$.T.None)}finally{s.dispose()}}));var vo=t(96016),mo=t(88863),xn=t(9488),Ct=t(41264),Dn=function(a,n,e,o){var s=arguments.length,i=s<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,e):o,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,n,e,o);else for(var l=a.length-1;l>=0;l--)(r=a[l])&&(i=(s<3?r(i):s>3?r(n,e,i):r(n,e))||i);return s>3&&i&&Object.defineProperty(n,e,i),i},Ln=function(a,n){return function(e,o){n(e,o,a)}},It=function(a,n,e,o){function s(i){return i instanceof e?i:new e(function(r){r(i)})}return new(e||(e=Promise))(function(i,r){function l(d){try{u(o.next(d))}catch(c){r(c)}}function h(d){try{u(o.throw(d))}catch(c){r(c)}}function u(d){d.done?i(d.value):s(d.value).then(l,h)}u((o=o.apply(a,n||[])).next())})};const Bt=new B.uy("LinkedEditingInputVisible",!1),$t="linked-editing-decoration";let N=class xt extends L.JT{constructor(n,e){super(),this._debounceDuration=200,this._localToDispose=this._register(new L.SL),this._editor=n,this._enabled=!1,this._visibleContextKey=Bt.bindTo(e),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new L.SL),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(o=>{(o.hasChanged(61)||o.hasChanged(81))&&this.reinitialize(!1)})),this._register(P.id.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}static get(n){return n.getContribution(xt.ID)}reinitialize(n){const e=this._editor.getModel(),o=e!==null&&(this._editor.getOption(61)||this._editor.getOption(81))&&P.id.has(e);if(o===this._enabled&&!n||(this._enabled=o,this.clearRanges(),this._localToDispose.clear(),!o||e===null))return;this._languageWordPattern=F.zu.getWordDefinition(e.getLanguageId()),this._localToDispose.add(e.onDidChangeLanguageConfiguration(()=>{this._languageWordPattern=F.zu.getWordDefinition(e.getLanguageId())}));const s=new j.vp(this._debounceDuration),i=()=>{this._rangeUpdateTriggerPromise=s.trigger(()=>this.updateRanges(),this._debounceDuration)},r=new j.vp(0),l=h=>{this._rangeSyncTriggerPromise=r.trigger(()=>this._syncRanges(h))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{i()})),this._localToDispose.add(this._editor.onDidChangeModelContent(h=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const u=e.getDecorationRange(this._currentDecorations[0]);if(u&&h.changes.every(d=>u.intersectRanges(d.range))){l(this._currentDecorations);return}}i()})),this._localToDispose.add({dispose:()=>{s.cancel(),r.cancel()}}),this.updateRanges()}_syncRanges(n){if(!this._editor.hasModel()||n!==this._currentDecorations||n.length===0)return;const e=this._editor.getModel(),o=e.getDecorationRange(n[0]);if(!o||o.startLineNumber!==o.endLineNumber)return this.clearRanges();const s=e.getValueInRange(o);if(this._currentWordPattern){const r=s.match(this._currentWordPattern);if((r?r[0].length:0)!==s.length)return this.clearRanges()}let i=[];for(let r=1,l=n.length;r<l;r++){const h=e.getDecorationRange(n[r]);if(h)if(h.startLineNumber!==h.endLineNumber)i.push({range:h,text:s});else{let u=e.getValueInRange(h),d=s,c=h.startColumn,p=h.endColumn;const f=E.Mh(u,d);c+=f,u=u.substr(f),d=d.substr(f);const S=E.P1(u,d);p-=S,u=u.substr(0,u.length-S),d=d.substr(0,d.length-S),(c!==p||d.length!==0)&&i.push({range:new x.e(h.startLineNumber,c,h.endLineNumber,p),text:d})}}if(i.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const r=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",i),this._editor._getViewModel().setPrevEditOperationType(r)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,[]),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(n=!1){return It(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}const e=this._editor.getPosition();if(!this._enabled&&!n||this._editor.getSelections().length>1){this.clearRanges();return}const o=this._editor.getModel(),s=o.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===s){if(e.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const r=o.getDecorationRange(this._currentDecorations[0]);if(r&&r.containsPosition(e))return}}this._currentRequestPosition=e,this._currentRequestModelVersion=s;const i=(0,j.PG)(r=>It(this,void 0,void 0,function*(){try{const l=yield Yt(o,e,r);if(i!==this._currentRequest||(this._currentRequest=null,s!==o.getVersionId()))return;let h=[];l!=null&&l.ranges&&(h=l.ranges),this._currentWordPattern=(l==null?void 0:l.wordPattern)||this._languageWordPattern;let u=!1;for(let c=0,p=h.length;c<p;c++)if(x.e.containsPosition(h[c],e)){if(u=!0,c!==0){const f=h[c];h.splice(c,1),h.unshift(f)}break}if(!u){this.clearRanges();return}const d=h.map(c=>({range:c,options:xt.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,d)}catch(l){(0,Y.VV)(l)||(0,Y.dL)(l),(this._currentRequest===i||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=i,i})}};N.ID="editor.contrib.linkedEditing",N.DECORATION=mt.qx.register({description:"linked-editing",stickiness:0,className:$t}),N=Dn([Ln(1,B.i6)],N);class Tn extends g.R6{constructor(){super({id:"editor.action.linkedEditing",label:m.N("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:B.Ao.and(R.u.writable,R.u.hasRenameProvider),kbOpts:{kbExpr:R.u.editorTextFocus,primary:3132,weight:100}})}runCommand(n,e){const o=n.get(pt.$),[s,i]=Array.isArray(e)&&e||[void 0,void 0];return vt.o.isUri(s)&&Ft.L.isIPosition(i)?o.openCodeEditor({resource:s},o.getActiveCodeEditor()).then(r=>{r&&(r.setPosition(i),r.invokeWithinContext(l=>(this.reportTelemetry(l,r),this.run(l,r))))},Y.dL):super.runCommand(n,e)}run(n,e){const o=N.get(e);return o?Promise.resolve(o.updateRanges(!0)):Promise.resolve()}}const Rn=g._l.bindToContribution(N.get);(0,g.fK)(new Rn({id:"cancelLinkedEditingInput",precondition:Bt,handler:a=>a.clearRanges(),kbOpts:{kbExpr:R.u.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));function Yt(a,n,e){const o=P.id.ordered(a);return(0,j.Ps)(o.map(s=>()=>It(this,void 0,void 0,function*(){try{return yield s.provideLinkedEditingRanges(a,n,e)}catch(i){(0,Y.Cp)(i);return}})),s=>!!s&&xn.Of(s==null?void 0:s.ranges))}const Pn=(0,U.P6)("editor.linkedEditingBackground",{dark:Ct.Il.fromHex("#f00").transparent(.3),light:Ct.Il.fromHex("#f00").transparent(.3),hc:Ct.Il.fromHex("#f00").transparent(.3)},m.N("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,M.Ic)((a,n)=>{const e=a.getColor(Pn);e&&n.addRule(`.monaco-editor .${$t} { background: ${e}; border-left-color: ${e}; }`)}),(0,g.sb)("_executeLinkedEditingProvider",(a,n)=>Yt(a,n,$.T.None)),(0,g._K)(N.ID,N),(0,g.Qr)(Tn);var So=t(23659),po=t(38486),Co=t(74395),Io=t(16607),yo=t(5964),xo=t(93379),Do=t(74480),On=t(84013);class An extends g.R6{constructor(){super({id:"editor.action.forceRetokenize",label:m.N("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(n,e){if(!e.hasModel())return;const o=e.getModel();o.resetTokenization();const s=new On.G(!0);o.forceTokenization(o.getLineCount()),s.stop(),console.log(`tokenization took ${s.elapsed()}`)}}(0,g.Qr)(An);var Lo=t(19720),En=t(95935),Mn=t(28820),Nn=function(a,n,e,o){var s=arguments.length,i=s<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,e):o,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,n,e,o);else for(var l=a.length-1;l>=0;l--)(r=a[l])&&(i=(s<3?r(i):s>3?r(n,e,i):r(n,e))||i);return s>3&&i&&Object.defineProperty(n,e,i),i},Xt=function(a,n){return function(e,o){n(e,o,a)}},zn=function(a,n,e,o){function s(i){return i instanceof e?i:new e(function(r){r(i)})}return new(e||(e=Promise))(function(i,r){function l(d){try{u(o.next(d))}catch(c){r(c)}}function h(d){try{u(o.throw(d))}catch(c){r(c)}}function u(d){d.done?i(d.value):s(d.value).then(l,h)}u((o=o.apply(a,n||[])).next())})};const Gt="ignoreUnusualLineTerminators";function jn(a,n,e){a.setModelProperty(n.uri,Gt,e)}function Un(a,n){return a.getModelProperty(n.uri,Gt)}let X=class extends L.JT{constructor(n,e,o){super(),this._editor=n,this._dialogService=e,this._codeEditorService=o,this._config=this._editor.getOption(112),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(112)&&(this._config=this._editor.getOption(112),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(s=>{s.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return zn(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const n=this._editor.getModel();if(!n.mightContainUnusualLineTerminators()||Un(this._codeEditorService,n)===!0||this._editor.getOption(80))return;if(this._config==="auto"){n.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(yield this._dialogService.confirm({title:m.N("unusualLineTerminators.title","Unusual Line Terminators"),message:m.N("unusualLineTerminators.message","Detected unusual line terminators"),detail:m.N("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,En.EZ)(n.uri)),primaryButton:m.N("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:m.N("unusualLineTerminators.ignore","Ignore")})).confirmed){jn(this._codeEditorService,n,!0);return}n.removeUnusualLineTerminators(this._editor.getSelections())})}};X.ID="editor.contrib.unusualLineTerminatorsDetector",X=Nn([Xt(1,Mn.S),Xt(2,pt.$)],X),(0,g._K)(X.ID,X);var Jt=t(32670),Zt=t(32334),Vn=t(65072),Hn=t(33108),Fn=function(a,n,e,o){var s=arguments.length,i=s<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,e):o,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,n,e,o);else for(var l=a.length-1;l>=0;l--)(r=a[l])&&(i=(s<3?r(i):s>3?r(n,e,i):r(n,e))||i);return s>3&&i&&Object.defineProperty(n,e,i),i},yt=function(a,n){return function(e,o){n(e,o,a)}};let G=class extends L.JT{constructor(n,e,o,s){super(),this._modelService=e,this._themeService=o,this._configurationService=s,this._editor=n,this._tokenizeViewport=new j.pY(()=>this._tokenizeViewportNow(),100),this._outstandingRequests=[],this._register(this._editor.onDidScrollChange(()=>{this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModelContent(i=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(P.K7.onDidChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._configurationService.onDidChangeConfiguration(i=>{i.affectsConfiguration(Zt.e3)&&(this._cancelAll(),this._tokenizeViewport.schedule())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))}_cancelAll(){for(const n of this._outstandingRequests)n.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(n){for(let e=0,o=this._outstandingRequests.length;e<o;e++)if(this._outstandingRequests[e]===n){this._outstandingRequests.splice(e,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const n=this._editor.getModel();if(n.hasCompleteSemanticTokens())return;if(!(0,Zt.tw)(n,this._themeService,this._configurationService)){n.hasSomeSemanticTokens()&&n.setSemanticTokens(null,!1);return}if(!(0,Jt.KO)(n)){n.hasSomeSemanticTokens()&&n.setSemanticTokens(null,!1);return}const e=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(e.map(o=>this._requestRange(n,o)))}_requestRange(n,e){const o=n.getVersionId(),s=(0,j.PG)(i=>Promise.resolve((0,Jt.OG)(n,e,i)));return s.then(i=>{if(!i||!i.tokens||n.isDisposed()||n.getVersionId()!==o)return;const{provider:r,tokens:l}=i,h=this._modelService.getSemanticTokensProviderStyling(r);n.setPartialSemanticTokens(e,(0,Vn.h)(l,h,n.getLanguageId()))}).then(()=>this._removeOutstandingRequest(s),()=>this._removeOutstandingRequest(s)),s}};G.ID="editor.contrib.viewportSemanticTokens",G=Fn([yt(1,k.q),yt(2,M.XE),yt(3,Hn.Ui)],G),(0,g._K)(G.ID,G);var To=t(43497),Ro=t(99453),Po=t(60661),Qn=t(20913),Oo=t(15375),Ao=t(46005),Eo=t(24719),Mo=t(59089),bt=t(89872),wt=t(90725),Wn=function(a,n,e,o){var s=arguments.length,i=s<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,e):o,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,n,e,o);else for(var l=a.length-1;l>=0;l--)(r=a[l])&&(i=(s<3?r(i):s>3?r(n,e,i):r(n,e))||i);return s>3&&i&&Object.defineProperty(n,e,i),i},Kn=function(a,n){return function(e,o){n(e,o,a)}};let rt=class at{constructor(n){this.quickInputService=n,this.registry=bt.B.as(wt.IP.Quickaccess)}provide(n){const e=new L.SL;e.add(n.onDidAccept(()=>{const[i]=n.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),e.add(n.onDidChangeValue(i=>{const r=this.registry.getQuickAccessProvider(i.substr(at.PREFIX.length));r&&r.prefix&&r.prefix!==at.PREFIX&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})}));const{editorProviders:o,globalProviders:s}=this.getQuickAccessProviders();return n.items=o.length===0||s.length===0?[...o.length===0?s:o]:[{label:(0,m.N)("globalCommands","global commands"),type:"separator"},...s,{label:(0,m.N)("editorCommands","editor commands"),type:"separator"},...o],e}getQuickAccessProviders(){const n=[],e=[];for(const o of this.registry.getQuickAccessProviders().sort((s,i)=>s.prefix.localeCompare(i.prefix)))if(o.prefix!==at.PREFIX)for(const s of o.helpEntries){const i=s.prefix||o.prefix,r=i||"\u2026";(s.needsEditor?e:n).push({prefix:i,label:r,ariaLabel:(0,m.N)("helpPickAriaLabel","{0}, {1}",r,s.description),description:s.description})}return{editorProviders:e,globalProviders:n}}};rt.PREFIX="?",rt=Wn([Kn(0,zt.eJ)],rt),bt.B.as(wt.IP.Quickaccess).registerQuickAccessProvider({ctor:rt,prefix:"",helpEntries:[{description:Qn.ld.helpQuickAccessActionLabel,needsEditor:!0}]});var No=t(60996),zo=t(69896),jo=t(13679),Uo=t(45048),Vo=t(15662)}}]);