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/5977.cb891d2c.async.js

2 lines
41 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[5977,9404],{71448: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(34076),t(60998),t(32838),t(84826),t(60066),t(54151),t(54807),t(88297),t(46343),t(4105),t(19451),t(52775),t(78013),t(34064),t(85628),t(79711),t(65586),t(17645),t(85211),t(65028),t(26021),t(63478),t(30245),t(26313),t(35274),t(51518),t(67614),t(63435),t(83861),t(34835),t(38762),t(71925),t(19257),t(50714),t(6181),t(6410),t(28630),t(29111),t(63618),t(48608),Dt.exports=t(68459),t(92973),t(72773),t(30219),t(10755),t(74121),t(77973),t(27246),t(82961),t(19959),t(23347),t(17323),t(24607),t(90130),t(72185),t(40882),t(14349),t(10715),t(88756),t(67748),t(30141),t(44115),t(65588),t(42716),t(83135),t(91067),t(63886),t(44865),t(41495),t(12076),t(38516),t(18504),t(28593),t(43069),t(50185),t(11745),t(96025),t(85713),t(98836),t(18625),t(25167),t(5512),t(59066),t(73363),t(5769),t(95630),t(12189),t(78605),t(17728),t(94503),t(66857),t(38341),t(61010),t(1099),t(49478),t(32985),t(72088),t(69746),t(94912),t(28464),t(24571),t(55670),t(77777),t(39393),t(81147),t(35550)},68459: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(55670),Tt=t(24607),dt=t(42716),ct=t(67748),I=t(2550),A=t(92973),ht=t(72773),ut=t(30219),Rt=t(10755),y=t(98909);(0,y.H)({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:function(){return t.e(4014).then(t.bind(t,74014))}});var Bn=t(74121),$n=t(77973),Yn=t(27246),Xn=t(82961),Gn=t(19959),Jn=t(23347),Zn=t(17323);(0,y.H)({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:function(){return t.e(8963).then(t.bind(t,18963))}});var bn=t(90130);(0,y.H)({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:function(){return t.e(8302).then(t.bind(t,78302))}}),(0,y.H)({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:function(){return t.e(1646).then(t.bind(t,51646))}}),(0,y.H)({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:function(){return t.e(981).then(t.bind(t,70981))}});var wn=t(72185),kn=t(40882),qn=t(14349),_n=t(10715);(0,y.H)({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:function(){return t.e(5290).then(t.bind(t,15290))}});var te=t(88756),ne=t(30141),ee=t(44115),oe=t(65588);(0,y.H)({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:function(){return t.e(5631).then(t.bind(t,15631))}});var ie=t(83135),se=t(91067);(0,y.H)({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:function(){return t.e(629).then(t.bind(t,80629))}});var re=t(63886);(0,y.H)({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:function(){return t.e(6774).then(t.bind(t,61880))}}),(0,y.H)({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:function(){return t.e(741).then(t.bind(t,30741))}});var ae=t(44865),le=t(41495),de=t(12076),ce=t(38516),he=t(18504),ue=t(28593),ge=t(43069),fe=t(50185),ve=t(11745),me=t(96025);(0,y.H)({id:"pla",extensions:[".pla"],loader:function(){return t.e(2386).then(t.bind(t,12386))}});var Se=t(85713),pe=t(98836),Ce=t(18625);(0,y.H)({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:function(){return t.e(3987).then(t.bind(t,36634))}});var Ie=t(25167),ye=t(5512);(0,y.H)({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:function(){return t.e(3133).then(t.bind(t,3133))}});var xe=t(59066),De=t(73363),Le=t(5769),Te=t(95630),Re=t(12189),Pe=t(78605),Oe=t(17728),Ae=t(94503),Ee=t(35550),Me=t(66857),Ne=t(38341),ze=t(61010),je=t(1099),Ue=t(49478);(0,y.H)({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:function(){return t.e(5679).then(t.bind(t,95679))}});var Ve=t(32985),He=t(72088),Fe=t(69746);(0,y.H)({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:function(){return t.e(9252).then(t.bind(t,39252))}}),(0,y.H)({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:function(){return t.e(9252).then(t.bind(t,39252))}});var Qe=t(94912),We=t(28464),Ke=t(24571),Be=t(77777),$e=t(39393),Ye=t(81147),Xe=t(46343),Ge=t(11036),Je=t(49140),Ze=t(46810),_t=t(58941),tn=t(94186),Pt=t(52411),g=t(4514),Z=t(17551),R=t(68987),m=t(13268),B=t(90689),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(60998),we=t(32838),ke=t(28630),qe=t(84826),_e=t(60066),to=t(54151),L=t(69323),x=t(17373),no=t(99851),ln=t(65028);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(54807),oo=t(88297),io=t(4105),so=t(19451),ro=t(52775),ao=t(78013),lo=t(34064),co=t(85628),$=t(96283),ft=t(72999),vt=t(5472),k=t(12027),Ot=t(16862),dn=t(16903),At=t(35884),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(67259),uo=t(17645),go=t(85211),fo=t(79711),E=t(82983),q=t(91167),Nt=t(44124),mt=t(31276),F=t(73468),z=t(44765),zt=t(96148);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(50431),Y=t(79881),vn=t(44619),Ht=t(78421),pt=t(70827),mn=t(97199),Ft=t(72146),P=t(27347),Sn=t(73831),U=t(44350),M=t(49055),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(63478),mo=t(26313),xn=t(43506),Ct=t(51737),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(35274),po=t(51518),Co=t(67614),Io=t(38762),yo=t(71925),xo=t(19257),Do=t(50714),On=t(95830);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(6410),En=t(9365),Mn=t(94726),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(26757),Zt=t(17539),Vn=t(32981),Hn=t(44544),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(29111),Ro=t(63618),Po=t(48608),Qn=t(5530),Oo=t(40745),Ao=t(34076),Eo=t(26021),Mo=t(30245),bt=t(44650),wt=t(82825),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(65586),zo=t(83861),jo=t(63435),Uo=t(34835),Vo=t(6181)}}]);