amis-rpc-design/dist/9762.ed26fa83.bundle.js
2023-10-07 19:42:30 +08:00

2 lines
5.9 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see 9762.ed26fa83.bundle.js.LICENSE.txt */
"use strict";(self.webpackChunkamis_rpc_design=self.webpackChunkamis_rpc_design||[]).push([[9762],{23875:(e,t,i)=>{i.d(t,{$W:()=>_,Dt:()=>f,G6:()=>p,MG:()=>m,Pf:()=>u,WP:()=>r,fX:()=>a,i7:()=>g,ie:()=>l,mX:()=>d,px:()=>s,vU:()=>c});var n=i(77538);class o{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}function s(){return o.INSTANCE.getZoomLevel()}function r(){return o.INSTANCE.getTimeSinceLastZoomLevelChanged()}function a(e){return o.INSTANCE.onDidChangeZoomLevel(e)}function l(){return o.INSTANCE.getZoomFactor()}function d(){return o.INSTANCE.getPixelRatio()}o.INSTANCE=new o;const h=navigator.userAgent,c=h.indexOf("Firefox")>=0,u=h.indexOf("AppleWebKit")>=0,g=h.indexOf("Chrome")>=0,p=!g&&h.indexOf("Safari")>=0,m=!g&&!p&&u,f=h.indexOf("Android")>=0,_=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches},41459:(e,t,i)=>{i.d(t,{D:()=>s});var n=i(23875),o=i(84483);const s={clipboard:{writeText:o.tY||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:o.tY||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:o.tY||n.$W?0:navigator.keyboard||n.G6?1:2,touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}},94961:(e,t,i)=>{i.d(t,{P$:()=>s,TN:()=>o,go:()=>n});const n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i(73543).vW.text,TERMINALS:"Terminals"};class o{constructor(e){this.data=e}update(){}getData(){return this.data}}const s={CurrentDragAndDropData:void 0}},48696:(e,t,i)=>{i.d(t,{$:()=>pe,$Z:()=>me,Ay:()=>Z,Ce:()=>de,Cp:()=>fe,D6:()=>M,DI:()=>B,Dx:()=>T,FK:()=>V,Fx:()=>U,Gw:()=>b,H$:()=>_e,If:()=>H,Lo:()=>C,OO:()=>q,PO:()=>g,R3:()=>le,RE:()=>S,Re:()=>te,Ro:()=>A,Uh:()=>ve,Uw:()=>p,V3:()=>be,Y_:()=>I,_0:()=>se,_h:()=>ye,_q:()=>Se,dS:()=>Q,dp:()=>P,fk:()=>X,go:()=>ae,i:()=>F,jL:()=>x,j_:()=>y,jg:()=>K,jt:()=>Ce,lI:()=>L,mc:()=>he,mu:()=>v,nm:()=>f,qV:()=>w,tw:()=>ie,uB:()=>Le,uN:()=>ee,uU:()=>j,vL:()=>oe,vY:()=>G,w:()=>W,wY:()=>we,wn:()=>z,xQ:()=>O,zB:()=>ne});var n=i(23875),o=i(41459),s=i(63304),r=i(76049),a=i(10554),l=i(98147),d=i(77538),h=i(48646),c=i(31633),u=i(84483);function g(e){for(;e.firstChild;)e.firstChild.remove()}function p(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class m{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function f(e,t,i,n){return new m(e,t,i,n)}function _(e){return function(t){return e(new r.n(t))}}let v=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t?o=_(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=function(e){return function(t){return e(new s.y(t))}}(i)),f(e,t,o,n)},b=function(e,t,i){return C(e,_(t),i)};function C(e,t,i){return f(e,u.gn&&o.D.pointerEvents?ie.POINTER_DOWN:ie.MOUSE_DOWN,t,i)}function w(e,t,i){return f(e,u.gn&&o.D.pointerEvents?ie.POINTER_UP:ie.MOUSE_UP,t,i)}function y(e,t){return f(e,"mouseout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}function S(e,t){return f(e,"pointerout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}let L,x,k=null;class N{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,l.dL)(e)}}static sort(e,t){return t.priority-e.priority}}!function(){let e=[],t=null,i=!1,n=!1,o=()=>{for(i=!1,t=e,e=[],n=!0;t.length>0;)t.sort(N.sort),t.shift().execute();n=!1};x=(t,n=0)=>{let s=new N(t,n);return e.push(s),i||(i=!0,function(e){if(!k){const e=e=>setTimeout((()=>e((new Date).getTime())),0);k=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}k.call(self,e)}(o)),s},L=(e,i)=>{if(n){let n=new N(e,i);return t.push(n),n}return x(e,i)}}();const D=function(e,t){return t};class E extends h.JT{constructor(e,t,i,n=D,o=8){super();let s=null,r=0,l=this._register(new a._F),d=()=>{r=(new Date).getTime(),i(s),s=null};this._register(f(e,t,(e=>{s=n(s,e);let t=(new Date).getTime()-r;t>=o?(l.cancel(),d()):l.setIfNotSet(d,o-t)})))}}function I(e,t,i,n,o){return new E(e,t,i,n,o)}function T(e){return document.defaultView.getComputedStyle(e,null)}function M(e){if(e!==document.body)return new A(e.clientWidth,e.clientHeight);if(u.gn&&window.visualViewport)return new A(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new A(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new A(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new A(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class R{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=T(e),o="0";return n&&(o=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),R.convertToPixels(e,o)}static getBorderLeftWidth(e){return R.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return R.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return R.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return R.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return R.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return R.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return R.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return R.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return R.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return R.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return R.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return R.getDimension(e,"margin-bottom","marginBottom")}}class A{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new A(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof A?e:new A(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function O(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;const o=$(e)?null:T(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=R.getBorderLeftWidth(e),i+=R.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function P(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}function F(e){let t=e.getBoundingClientRect();return{left:t.left+B.scrollX,top:t.top+B.scrollY,width:t.width,height:t.height}}const B=new class{get scrollX(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function W(e){let t=R.getMarginLeft(e)+R.getMarginRight(e);return e.offsetWidth+t}function V(e){let t=R.getBorderLeftWidth(e)+R.getBorderRightWidth(e),i=R.getPaddingLeft(e)+R.getPaddingRight(e);return e.offsetWidth-t-i}function H(e){let t=R.getBorderTopWidth(e)+R.getBorderBottomWidth(e),i=R.getPaddingTop(e)+R.getPaddingBottom(e);return e.offsetHeight-t-i}function z(e){let t=R.getMarginTop(e)+R.getMarginBottom(e);return e.offsetHeight+t}function K(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function U(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}function j(e,t,i){return!!U(e,t,i)}function $(e){return e&&!!e.host&&!!e.mode}function q(e){return!!Z(e)}function Z(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return $(e)?e:null}function G(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Q(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let Y=null;function J(){return Y||(Y=Q()),Y}function X(e,t,i=J()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function ee(e,t=J()){if(!t)return;let i=function(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}(t),n=[];for(let t=0;t<i.length;t++)-1!==i[t].selectorText.indexOf(e)&&n.push(t);for(let e=n.length-1;e>=0;e--)t.sheet.deleteRule(n[e])}function te(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const ie={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.Pf?"webkitAnimationStart":"animationstart",ANIMATION_END:n.Pf?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.Pf?"webkitAnimationIteration":"animationiteration"},ne={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function oe(e){let t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function se(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class re extends h.JT{constructor(e){super(),this._onDidFocus=this._register(new d.Q5),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new d.Q5),this.onDidBlur=this._onDidBlur.event;let t=K(document.activeElement,e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,window.setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{K(document.activeElement,e)!==t&&(t?o():n())},this._register(f(e,ie.FOCUS,n,!0)),this._register(f(e,ie.BLUR,o,!0))}}function ae(e){return new re(e)}function le(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function de(e,t){return e.insertBefore(t,e.firstChild),t}function he(e,...t){e.innerText="",le(e,...t)}const ce=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var ue;function ge(e,t,i,...n){let o=ce.exec(t);if(!o)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let s,r=o[1]||"div";return s=e!==ue.HTML?document.createElementNS(e,r):document.createElement(r),o[3]&&(s.id=o[3]),o[4]&&(s.className=o[4].replace(/\./g," ").trim()),Object.keys(i).forEach((e=>{const t=i[e];void 0!==t&&(/^on\w+$/.test(e)?s[e]=t:"selected"===e?t&&s.setAttribute(e,"true"):s.setAttribute(e,t))})),s.append(...n),s}function pe(e,t,...i){return ge(ue.HTML,e,t,...i)}function me(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function fe(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function _e(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function ve(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function be(e){window.open(e,"_blank","noopener")}function Ce(e){const t=()=>{e(),i=x(t)};let i=x(t);return(0,h.OF)((()=>i.dispose()))}function we(e){return e?`url('${c.Gi.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function ye(e){return`'${e.replace(/'/g,"%27")}'`}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(ue||(ue={})),pe.SVG=function(e,t,...i){return ge(ue.SVG,e,t,...i)},c.WX.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");class Se extends d.Q5{constructor(){super(),this._subscriptions=new h.SL,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(f(window,"keydown",(e=>{if(e.defaultPrevented)return;const t=new s.y(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),this._subscriptions.add(f(window,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),this._subscriptions.add(f(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(f(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(f(document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),this._subscriptions.add(f(window,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Se.instance||(Se.instance=new Se),Se.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function Le(e,t){const i=window.matchMedia(e);"function"==typeof i.addEventListener?i.addEventListener("change",t):i.addListener(t)}},74152:(e,t,i)=>{i.d(t,{Y:()=>o,p:()=>s});var n=i(77538);class o{constructor(e,t,i){const o=e=>this.emitter.fire(e);this.emitter=new n.Q5({onFirstListenerAdd:()=>e.addEventListener(t,o,i),onLastListenerRemove:()=>e.removeEventListener(t,o,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function s(e){return e.preventDefault(),e.stopPropagation(),e}},82704:(e,t,i)=>{i.d(t,{X:()=>o,Z:()=>n});class n{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function o(e){return new n(e)}},14271:(e,t,i)=>{i.d(t,{BO:()=>s,IY:()=>o,az:()=>r});var n=i(48696);function o(e,t={}){const i=r(t);return i.textContent=e,i}function s(e,t={}){const i=r(t);return l(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const s=[],r=new a(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==d(r.peek(),t);if(i&&(e=r.next()),i||0===d(e,t)||e!==r.peek())if("\n"===e)2===o.type&&(o=s.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),s.push(o),o=t}else o.content+=e;else{r.advance(),2===o.type&&(o=s.pop());const i=d(e,t);if(o.type===i||5===o.type&&6===i)o=s.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),s.push(o),o=e}}}return 2===o.type&&(o=s.pop()),s.length,i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function r(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i,o){let s;if(2===t.type)s=document.createTextNode(t.content||"");else if(3===t.type)s=document.createElement("b");else if(4===t.type)s=document.createElement("i");else if(7===t.type&&o)s=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");e.href="#",i.disposables.add(n.mu(e,"click",(e=>{i.callback(String(t.index),e)}))),s=e}else 8===t.type?s=document.createElement("br"):1===t.type&&(s=e);s&&e!==s&&e.appendChild(s),s&&Array.isArray(t.children)&&t.children.forEach((e=>{l(s,e,i,o)}))}function d(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},64573:(e,t,i)=>{i.d(t,{Z:()=>d,e:()=>l});var n=i(48696),o=i(300),s=i(76049),r=i(48646),a=i(84483);function l(e,t){let i=new s.n(t);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}}class d{constructor(){this._hooks=new r.SL,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,i,r,l){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=r,this._onStopCallback=l;const d=o.E.getSameOriginWindowChain(),h=a.gn?"pointermove":"mousemove",c=d.map((e=>e.window.document)),u=n.Ay(e);u&&c.unshift(u);for(const e of c)this._hooks.add(n.Y_(e,h,(e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)}),((e,t)=>this._mouseMoveEventMerger(e,t)))),this._hooks.add(n.nm(e,"mouseup",(e=>this.stopMonitoring(!0))));if(o.E.hasDifferentOriginAncestor()){let e=d[d.length-1];this._hooks.add(n.nm(e.window.document,"mouseout",(e=>{"html"===new s.n(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(n.nm(e.window.document,"mouseover",(e=>{"html"===new s.n(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(n.nm(e.window.document.body,"mouseleave",(e=>{this.stopMonitoring(!0)})))}}}},300:(e,t,i)=>{i.d(t,{E:()=>r});let n=!1,o=null;function s(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return n=!0,null}catch(e){return n=!0,null}return e.parent}class r{static getSameOriginWindowChain(){if(!o){o=[];let e,t=window;do{e=s(t),e?o.push({window:t,iframeElement:t.frameElement||null}):o.push({window:t,iframeElement:null}),t=e}while(t)}return o.slice(0)}static hasDifferentOriginAncestor(){return o||this.getSameOriginWindowChain(),n}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,o=this.getSameOriginWindowChain();for(const e of o){if(i+=e.window.scrollY,n+=e.window.scrollX,e.window===t)break;if(!e.iframeElement)break;let o=e.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}},63304:(e,t,i)=>{i.d(t,{y:()=>d});var n=i(23875),o=i(96332),s=i(82095),r=i(84483);const a=r.dz?256:2048,l=r.dz?2048:256;class d{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.keyCode=function(e){if(e.charCode){let t=String.fromCharCode(e.charCode).toUpperCase();return o.kL.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(n.vU){if(59===t)return 80;if(107===t)return 81;if(109===t)return 83;if(r.dz&&224===t)return 57}else if(n.Pf){if(91===t)return 57;if(r.dz&&93===t)return 57;if(!r.dz&&92===t)return 57}return o.H_[t]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=a),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=l),t|=e,t}_computeRuntimeKeybinding(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new s.QC(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}},76049:(e,t,i)=>{i.d(t,{n:()=>r,q:()=>a});var n=i(23875),o=i(300),s=i(84483);class r{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=o.E.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class a{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){let t=e,i=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.vU&&!s.dz?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)n.G6&&s.ED?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.vU&&!s.dz?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}},63030:(e,t,i)=>{i.d(t,{o:()=>l,t:()=>n});var n,o=i(48696),s=i(76345),r=i(97768),a=i(48646);!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(n||(n={}));class l extends a.JT{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(o.nm(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(o.nm(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(o.nm(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.targets.push(e),{dispose:()=>{l.INSTANCE.targets=l.INSTANCE.targets.filter((t=>t!==e))}}):a.JT.None}static ignoreTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.ignoreTargets.push(e),{dispose:()=>{l.INSTANCE.ignoreTargets=l.INSTANCE.ignoreTargets.filter((t=>t!==e))}}):a.JT.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,o=e.targetTouches.length;i<o;i++){let o=e.targetTouches.item(i);this.activeTouches[o.identifier]={id:o.identifier,initialTarget:o.target,initialTimeStamp:t,initialPageX:o.pageX,initialPageY:o.pageY,rollingTimestamps:[t],rollingPageX:[o.pageX],rollingPageY:[o.pageY]};let s=this.newGestureEvent(n.Start,o.target);s.pageX=o.pageX,s.pageY=o.pageY,this.dispatchEvent(s)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e){let t=Date.now(),i=Object.keys(this.activeTouches).length;for(let o=0,r=e.changedTouches.length;o<r;o++){let r=e.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(r.identifier))){console.warn("move of an UNKNOWN touch",r);continue}let a=this.activeTouches[r.identifier],d=Date.now()-a.initialTimeStamp;if(d<l.HOLD_DELAY&&Math.abs(a.initialPageX-s.Gb(a.rollingPageX))<30&&Math.abs(a.initialPageY-s.Gb(a.rollingPageY))<30){let e=this.newGestureEvent(n.Tap,a.initialTarget);e.pageX=s.Gb(a.rollingPageX),e.pageY=s.Gb(a.rollingPageY),this.dispatchEvent(e)}else if(d>=l.HOLD_DELAY&&Math.abs(a.initialPageX-s.Gb(a.rollingPageX))<30&&Math.abs(a.initialPageY-s.Gb(a.rollingPageY))<30){let e=this.newGestureEvent(n.Contextmenu,a.initialTarget);e.pageX=s.Gb(a.rollingPageX),e.pageY=s.Gb(a.rollingPageY),this.dispatchEvent(e)}else if(1===i){let e=s.Gb(a.rollingPageX),i=s.Gb(a.rollingPageY),n=s.Gb(a.rollingTimestamps)-a.rollingTimestamps[0],o=e-a.rollingPageX[0],r=i-a.rollingPageY[0];const l=this.targets.filter((e=>a.initialTarget instanceof Node&&e.contains(a.initialTarget)));this.inertia(l,t,Math.abs(o)/n,o>0?1:-1,e,Math.abs(r)/n,r>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(n.End,a.initialTarget)),delete this.activeTouches[r.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>l.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t<this.ignoreTargets.length;t++)if(e.initialTarget instanceof Node&&this.ignoreTargets[t].contains(e.initialTarget))return;this.targets.forEach((t=>{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}))}inertia(e,t,i,s,r,a,d,h){this.handle=o.jL((()=>{let o=Date.now(),c=o-t,u=0,g=0,p=!0;i+=l.SCROLL_FRICTION*c,a+=l.SCROLL_FRICTION*c,i>0&&(p=!1,u=s*i*c),a>0&&(p=!1,g=d*a*c);let m=this.newGestureEvent(n.Change);m.translationX=u,m.translationY=g,e.forEach((e=>e.dispatchEvent(m))),p||this.inertia(e,o,i,s,r+u,a,d,h+g)}))}onTouchMove(e){let t=Date.now();for(let i=0,o=e.changedTouches.length;i<o;i++){let o=e.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("end of an UNKNOWN touch",o);continue}let r=this.activeTouches[o.identifier],a=this.newGestureEvent(n.Change,r.initialTarget);a.translationX=o.pageX-s.Gb(r.rollingPageX),a.translationY=o.pageY-s.Gb(r.rollingPageY),a.pageX=o.pageX,a.pageY=o.pageY,this.dispatchEvent(a),r.rollingPageX.length>3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(o.pageX),r.rollingPageY.push(o.pageY),r.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}l.SCROLL_FRICTION=-.005,l.HOLD_DELAY=700,l.CLEAR_TAP_COUNT_TIME=400,function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([r.H],l,"isTouchDevice",null)},42071:(e,t,i)=>{i.d(t,{Y:()=>u,g:()=>g});var n=i(23875),o=i(94961),s=i(48696),r=i(63030),a=i(92981),l=i(48646),d=i(84483),h=i(56718),c=(i(36362),i(85337));class u extends l.JT{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof a.aU&&this._register(t.onDidChange((e=>{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new a.Wi)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(r.o.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,n.vU&&this._register((0,s.nm)(e,s.tw.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(o.go.TEXT,this._action.label)})))),this._register((0,s.nm)(t,r.t.Tap,(e=>this.onClick(e,!0)))),this._register((0,s.nm)(t,s.tw.MOUSE_DOWN,(e=>{i||s.zB.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),d.dz&&this._register((0,s.nm)(t,s.tw.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,s.nm)(t,s.tw.CLICK,(e=>{s.zB.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register((0,s.nm)(t,s.tw.DBLCLICK,(e=>{s.zB.stop(e,!0)}))),[s.tw.MOUSE_UP,s.tw.MOUSE_OUT].forEach((e=>{this._register((0,s.nm)(t,e,(e=>{s.zB.stop(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;s.zB.stop(e,!0);const n=h.Jp(this._context)?(null===(i=this.options)||void 0===i?void 0:i.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class g extends u{constructor(e,t,i={}){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=(0,s.R3)(this.element,(0,s.$)("a.action-label"))),this.label&&(this._action.id===a.Z0.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&((0,s.R3)(this.element,(0,s.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=c.N({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}},7912:(e,t,i)=>{i.d(t,{o:()=>c});var n=i(48696),o=i(63304),s=i(42071),r=i(92981),a=i(77538),l=i(48646),d=i(56718),h=(i(36362),function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))});class c extends l.JT{constructor(e,t={}){var i,l,d,h,c,u;let g,p;switch(super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new a.Q5),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new a.Q5({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new a.Q5),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new a.Q5),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(l=this.options.orientation)&&void 0!==l?l:0,this._triggerKeys={keyDown:null!==(h=null===(d=this.options.triggerKeys)||void 0===d?void 0:d.keyDown)&&void 0!==h&&h,keys:null!==(u=null===(c=this.options.triggerKeys)||void 0===c?void 0:c.keys)&&void 0!==u?u:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new r.Wi,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._register(this._actionRunner.onBeforeRun((e=>this._onBeforeRun.fire(e)))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:g=[15],p=[17];break;case 1:g=[16],p=[18],this.domNode.className+=" vertical"}this._register(n.nm(this.domNode,n.tw.KEY_DOWN,(e=>{const t=new o.y(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;g&&(t.equals(g[0])||t.equals(g[1]))?i=this.focusPrevious():p&&(t.equals(p[0])||t.equals(p[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof s.Y&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(n.nm(this.domNode,n.tw.KEY_UP,(e=>{const t=new o.y(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()}))),this.focusTracker=this._register(n.go(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{n.vY()!==this.domNode&&n.jg(n.vY(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;e<this.actionsList.children.length;e++){const t=this.actionsList.children[e];if(n.jg(n.vY(),t)){this.focusedItem=e;break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach((t=>t.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach((t=>t.actionRunner=e)))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let o=d.hj(t.index)?t.index:null;i.forEach((e=>{const i=document.createElement("li");let r;i.className="action-item",i.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(n.nm(i,n.tw.CONTEXT_MENU,(e=>{n.zB.stop(e,!0)}))),this.options.actionViewItemProvider&&(r=this.options.actionViewItemProvider(e)),r||(r=new s.g(this.context,e,t)),r.actionRunner=this._actionRunner,r.setActionContext(this.context),r.render(i),this.focusable&&r instanceof s.Y&&0===this.viewItems.length&&r.setFocusable(!0),null===o||o<0||o>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(r),this._actionIds.push(e.id)):(this.actionsList.insertBefore(i,this.actionsList.children[o]),this.viewItems.splice(o,0,r),this._actionIds.splice(o,0,e.id),o++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem)}clear(){(0,l.B9)(this.viewItems),this.viewItems=[],this._actionIds=[],n.PO(this.actionsList)}length(){return this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus()}else void 0!==t&&(this.focusedItem=t),this.updateFocus()}focusFirst(){return this.focusedItem=this.length()>1?1:0,this.focusPrevious()}focusLast(){return this.focusedItem=this.length()<2?0:this.length()-2,this.focusNext()}focusNext(){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(),!0}focusPrevious(){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(!0),!0}updateFocus(e,t){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t});for(let i=0;i<this.viewItems.length;i++){const n=this.viewItems[i],o=n;if(i===this.focusedItem){let i=!0;d.mf(o.focus)||(i=!1),this.options.focusOnlyEnabledItems&&d.mf(n.isEnabled)&&!n.isEnabled()&&(i=!1),i?o.focus(e):this.actionsList.focus({preventScroll:t})}else d.mf(o.blur)&&o.blur()}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof s.Y){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return h(this,void 0,void 0,(function*(){yield this._actionRunner.run(e,t)}))}dispose(){(0,l.B9)(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}},40700:(e,t,i)=>{i.d(t,{Z9:()=>k,wW:()=>x,i7:()=>N});var n=i(48696),o=i(84483),s=i(93379),r=i.n(s),a=i(7795),l=i.n(a),d=i(90569),h=i.n(d),c=i(3565),u=i.n(c),g=i(19216),p=i.n(g),m=i(44589),f=i.n(m),_=i(88200),v={};v.styleTagTransform=f(),v.setAttributes=u(),v.insert=h().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p(),r()(_.Z,v),_.Z&&_.Z.locals&&_.Z.locals;const b=2e4;let C,w,y,S,L;function x(e){C=document.createElement("div"),C.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),C.appendChild(e),e};w=t(),y=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),C.appendChild(e),e};S=i(),L=i(),e.appendChild(C)}function k(e){C&&(w.textContent!==e?(n.PO(y),D(w,e)):(n.PO(w),D(y,e)))}function N(e){C&&(o.dz?k(e):S.textContent!==e?(n.PO(L),D(S,e)):(n.PO(S),D(L,e)))}function D(e,t){n.PO(e),t.length>b&&(t=t.substr(0,b)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},25074:(e,t,i)=>{i.d(t,{a:()=>C});var n=i(85095),o=i(93379),s=i.n(o),r=i(7795),a=i.n(r),l=i(90569),d=i.n(l),h=i(3565),c=i.n(h),u=i(19216),g=i.n(u),p=i(44589),m=i.n(p),f=i(93883),_={};_.styleTagTransform=m(),_.setAttributes=c(),_.insert=d().bind(null,"head"),_.domAPI=a(),_.insertStyleElement=g(),s()(f.Z,_),f.Z&&f.Z.locals&&f.Z.locals;var v=i(70953),b={};function C(e){let t=e.definition;for(;t instanceof n.lA;)t=t.definition;return`.codicon-${e.id}:before { content: '${t.fontCharacter}'; }`}b.styleTagTransform=m(),b.setAttributes=c(),b.insert=d().bind(null,"head"),b.domAPI=a(),b.insertStyleElement=g(),s()(v.Z,b),v.Z&&v.Z.locals&&v.Z.locals},7842:(e,t,i)=>{i.d(t,{Z:()=>y});var n=i(48696),o=i(66051),s=i(20620),r=i(96024),a=i(93379),l=i.n(a),d=i(7795),h=i.n(d),c=i(90569),u=i.n(c),g=i(3565),p=i.n(g),m=i(19216),f=i.n(m),_=i(44589),v=i.n(_),b=i(21761),C={};C.styleTagTransform=v(),C.setAttributes=p(),C.insert=u().bind(null,"head"),C.domAPI=h(),C.insertStyleElement=f(),l()(b.Z,C),b.Z&&b.Z.locals&&b.Z.locals;const w={badgeBackground:o.Il.fromHex("#4D4D4D"),badgeForeground:o.Il.fromHex("#FFFFFF")};class y{constructor(e,t){this.count=0,this.options=t||Object.create(null),(0,s.jB)(this.options,w,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=(0,n.R3)(e,(0,n.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=(0,r.WU)(this.countFormat,this.count),this.element.title=(0,r.WU)(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}},75526:(e,t,i)=>{i.d(t,{q:()=>r});var n=i(48696),o=i(87668),s=i(20620);class r{constructor(e,t){this.supportIcons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=r.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&s.fS(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t<i.start){const s=this.text.substring(t,i.start);e.push(n.$("span",void 0,...this.supportIcons?(0,o.T)(s):[s])),t=i.end}const s=this.text.substring(i.start,i.end),r=n.$("span.highlight",void 0,...this.supportIcons?(0,o.T)(s):[s]);i.extraClasses&&r.classList.add(i.extraClasses),e.push(r),t=i.end}if(t<this.text.length){const i=this.text.substring(t);e.push(n.$("span",void 0,...this.supportIcons?(0,o.T)(i):[i]))}n.mc(this.domNode,...e),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(e,t){let i=0,n=0;return e.replace(/\r\n|\r|\n/g,((e,o)=>{n="\r\n"===e?-1:0,o+=i;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=n),e.end>=o&&(e.end+=n));return i+=n,"⏎"}))}}},9569:(e,t,i)=>{i.d(t,{g:()=>I});var n=i(48696),o=i(75526),s=i(10554),r=i(28245),a=i(70880),l=i(48646),d=i(56718),h=i(85337),c=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class u{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t){var i;return c(this,void 0,void 0,(function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(void 0===e||(0,d.HD)(e)||e instanceof HTMLElement)n=e;else if((0,d.mf)(e.markdown)){this._hoverWidget||this.show((0,h.N)("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new r.A;const i=this._cancellationTokenSource.token;if(n=yield e.markdown(i),this.isDisposed||i.isCancellationRequested)return}else n=null!==(i=e.markdown)&&void 0!==i?i:e.markdownNotSupportedFallback;this.show(n,t)}))}show(e,t){const i=this._hoverWidget;if(this.hasContent(e)){const n={content:e,target:this.target,showPointer:"element"===this.hoverDelegate.placement,hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!i};this._hoverWidget=this.hoverDelegate.showHover(n,t)}null==i||i.dispose()}hasContent(e){return!(!e||(0,a.Fr)(e)&&!e.value)}get isDisposed(){var e;return null===(e=this._hoverWidget)||void 0===e?void 0:e.isDisposed}dispose(){var e,t;null===(e=this._hoverWidget)||void 0===e||e.dispose(),null===(t=this._cancellationTokenSource)||void 0===t||t.dispose(!0),this._cancellationTokenSource=void 0}}var g=i(20620),p=i(45706),m=i(93379),f=i.n(m),_=i(7795),v=i.n(_),b=i(90569),C=i.n(b),w=i(3565),y=i.n(w),S=i(19216),L=i.n(S),x=i(44589),k=i.n(x),N=i(8158),D={};D.styleTagTransform=k(),D.setAttributes=y(),D.insert=C().bind(null,"head"),D.domAPI=v(),D.insertStyleElement=L(),f()(N.Z,D),N.Z&&N.Z.locals&&N.Z.locals;class E{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class I extends l.JT{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new E(n.R3(e,n.$(".monaco-icon-label")))),this.labelContainer=n.R3(this.domNode.element,n.$(".monaco-icon-label-container"));const i=n.R3(this.labelContainer,n.$("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new E(n.R3(this.labelContainer,n.$("span.monaco-icon-description-container")))),(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new M(i,!!t.supportIcons):this.nameNode=new T(i),(null==t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new o.q(n.R3(this.descriptionContainer.element,n.$("span.label-description")),!!t.supportIcons):this.descriptionNodeFactory=()=>this._register(new E(n.R3(this.descriptionContainer.element,n.$("span.label-description")))),this.hoverDelegate=null==t?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover((null==i?void 0:i.descriptionTitle)?this.labelContainer:this.element,null==i?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof o.q?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,null==i?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(null==i?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const i=function(e,t,i){let o,r;const a=(t,i)=>{var n;t&&(null==r||r.dispose(),r=void 0),i&&(null==o||o.dispose(),o=void 0),null===(n=e.onDidHideHover)||void 0===n||n.call(e)},d=(n,o,a)=>new s._F((()=>c(this,void 0,void 0,(function*(){r&&!r.isDisposed||(r=new u(e,a||t,n>0),yield r.update(i,o))}))),n),h=n.nm(t,n.tw.MOUSE_OVER,(()=>{if(o)return;const i=new l.SL;i.add(n.nm(t,n.tw.MOUSE_LEAVE,(e=>a(!1,e.fromElement===t)),!0)),i.add(n.nm(t,n.tw.MOUSE_DOWN,(()=>a(!0,!0)),!0));const s={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>s.x=e.x+10;i.add(n.nm(t,n.tw.MOUSE_MOVE,e,!0))}i.add(d(e.delay,!1,s)),o=i}),!0);return{show:e=>{a(!1,!0),d(0,e)},hide:()=>{a(!0,!0)},update:e=>c(this,void 0,void 0,(function*(){i=e,yield null==r?void 0:r.update(i)})),dispose:()=>{h.dispose(),a(!0,!0)}}}(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else!function(e,t){(0,d.HD)(t)?e.title=t:(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class T{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,g.fS)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=n.R3(this.container,n.$("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){const o=e[i],s=(null==t?void 0:t.domId)&&`${null==t?void 0:t.domId}_${i}`;n.R3(this.container,n.$("a.label-name",{id:s,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},o)),i<e.length-1&&n.R3(this.container,n.$("span.label-separator",void 0,(null==t?void 0:t.separator)||"/"))}}}}class M{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,g.fS)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new o.q(n.R3(this.container,n.$("a.label-name",{id:null==t?void 0:t.domId})),this.supportIcons)),this.singleLabel.set(e,null==t?void 0:t.matches,void 0,null==t?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(null==t?void 0:t.separator)||"/",s=function(e,t,i){if(!i)return;let n=0;return e.map((e=>{const o={start:n,end:n+e.length},s=i.map((e=>p.e.intersect(o,e))).filter((e=>!p.e.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,s}))}(e,i,null==t?void 0:t.matches);for(let r=0;r<e.length;r++){const a=e[r],l=s?s[r]:void 0,d=(null==t?void 0:t.domId)&&`${null==t?void 0:t.domId}_${r}`,h=n.$("a.label-name",{id:d,"data-icon-label-count":e.length,"data-icon-label-index":r,role:"treeitem"});new o.q(n.R3(this.container,h),this.supportIcons).set(a,l,void 0,null==t?void 0:t.labelEscapeNewLines),r<e.length-1&&n.R3(h,n.$("span.label-separator",void 0,i))}}}}},87668:(e,t,i)=>{i.d(t,{T:()=>r});var n=i(48696),o=i(85095);const s=new RegExp(`(\\\\)?\\$\\((${o.dT.iconNameExpression}(?:${o.dT.iconModifierExpression})?)\\)`,"g");function r(e){const t=new Array;let i,n=0,o=0;for(;null!==(i=s.exec(e));){o=i.index||0,t.push(e.substring(n,o)),n=(i.index||0)+i[0].length;const[,s,r]=i;t.push(s?`$(${r})`:a({id:r}))}return n<e.length&&t.push(e.substring(n)),t}function a(e){const t=n.$("span");return t.classList.add(...o.dT.asClassNameArray(e)),t}},97691:(e,t,i)=>{i.d(t,{p:()=>R,W:()=>M});var n=i(48696),o=i(74152),s=i(14271),r=i(7912),a=i(40700),l=i(45019),d=i(35248),h=i(66051),c=i(77538);class u{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class g{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new u(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var p=i(20620),m=i(93379),f=i.n(m),_=i(7795),v=i.n(_),b=i(90569),C=i.n(b),w=i(3565),y=i.n(w),S=i(19216),L=i.n(S),x=i(44589),k=i.n(x),N=i(74040),D={};D.styleTagTransform=k(),D.setAttributes=y(),D.insert=C().bind(null,"head"),D.domAPI=v(),D.insertStyleElement=L(),f()(N.Z,D),N.Z&&N.Z.locals&&N.Z.locals;var E=i(85337);const I=n.$,T={inputBackground:h.Il.fromHex("#3C3C3C"),inputForeground:h.Il.fromHex("#CCCCCC"),inputValidationInfoBorder:h.Il.fromHex("#55AAFF"),inputValidationInfoBackground:h.Il.fromHex("#063B49"),inputValidationWarningBorder:h.Il.fromHex("#B89500"),inputValidationWarningBackground:h.Il.fromHex("#352A05"),inputValidationErrorBorder:h.Il.fromHex("#BE1100"),inputValidationErrorBackground:h.Il.fromHex("#5A1D1D")};class M extends d.${constructor(e,t,i){var s;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new c.Q5),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new c.Q5),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),(0,p.jB)(this.options,T,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(s=this.options.tooltip)&&void 0!==s?s:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=n.R3(e,I(".monaco-inputbox.idle"));let a=this.options.flexibleHeight?"textarea":"input",d=n.R3(this.element,I(".ibwrapper"));if(this.input=n.R3(d,I(a+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=n.R3(d,I("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new l.NB(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),n.R3(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new o.Y(document,"selectionchange")),i=c.ju.filter(t.event,(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===d}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this.ignoreGesture(this.input),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new r.o(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:n.wn(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return n.w(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;this.mirror&&(t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0)),this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?`1px solid ${i.border}`:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null==e?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t,i=()=>e.style.width=n.w(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=n.R3(t,I(".monaco-inputbox-container")),i();const o={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?(0,s.BO)(this.message.content,o):(0,s.IY)(this.message.content,o);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=a.background?a.background.toString():"",r.style.color=a.foreground?a.foreground.toString():"",r.style.border=a.border?`1px solid ${a.border}`:"",n.R3(e,r),null},onHide:()=>{this.state="closed"},layout:i}),t=3===this.message.type?E.N("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?E.N("alertWarningMessage","Warning: {0}",this.message.content):E.N("alertInfoMessage","Info: {0}",this.message.content),a.Z9(t),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=n.wn(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class R extends M{constructor(e,t,i){const n=E.N({key:"history.inputbox.hint",comment:["Text will be prefixed with ⇅ plus a single space, then used as a hint where input field keeps history"]},"for history"),o=` or ⇅ ${n}`,s=` (⇅ ${n})`;super(e,t,i),this.history=new g(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(o)&&!this.placeholder.endsWith(s)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?o:s,t=this.placeholder+e;i.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||r()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>r())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(s)||e(o)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,a.i7(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,a.i7(this.value))}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}},68413:(e,t,i)=>{i.d(t,{kX:()=>S,Bv:()=>N});var n=i(23875),o=i(94961),s=i(48696),r=i(74152),a=i(63030),l=i(45019),d=i(76345),h=i(10554),c=i(97768),u=i(77538),g=i(48646),p=i(20620),m=i(45706),f=i(55924);function _(e,t){const i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end<n.range.start)break;const t=m.e.intersect(e,n.range);m.e.isEmpty(t)||i.push({range:t,size:n.size})}return i}function v({start:e,end:t},i){return{start:e+i,end:t+i}}class b{constructor(){this.groups=[],this._size=0}splice(e,t,i=[]){const n=i.length-t,o=_({start:0,end:e},this.groups),s=_({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((e=>({range:v(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(let n of e){const e=n.range.start,o=n.range.end,s=n.size;i&&s===i.size?i.range.end=o:(i={range:{start:e,end:o},size:s},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(o,r,s),this._size=this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const o=n.range.end-n.range.start,s=i+o*n.size;if(e<s)return t+Math.floor((e-i)/n.size);t+=o,i=s}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const o=n.range.end-n.range.start,s=i+o;if(e<s)return t+(e-i)*n.size;t+=o*n.size,i=s}return-1}}class C{constructor(e){this.renderers=e,this.cache=new Map}alloc(e){let t=this.getTemplateCache(e).pop();if(!t){const i=(0,s.$)(".monaco-list-row");t={domNode:i,templateId:e,templateData:this.getRenderer(e).renderTemplate(i)}}return t}release(e){e&&this.releaseRow(e)}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(t.classList.remove("scrolling"),function(e){try{e.parentElement&&e.parentElement.removeChild(e)}catch(e){}}(t)),this.getTemplateCache(i).push(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach(((e,t)=>{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null})),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const y={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class S{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class L{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class x{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;t<e.files.length;t++){const i=e.files.item(t);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}class k{constructor(e){(null==e?void 0:e.getSetSize)?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(e,t,i)=>i,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class N{constructor(e,t,i,n=y){if(this.virtualDelegate=t,this.domId="list_id_"+ ++N.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new h.vp(50),this.splicing=!1,this.dragOverAnimationStopDisposable=g.JT.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=g.JT.None,this.onDragLeaveTimeout=g.JT.None,this.disposables=new g.SL,this._onDidChangeContentHeight=new u.Q5,this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new b;for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new C(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=(0,p.CJ)(n,(e=>e.horizontalScrolling),y.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===n.additionalScrollHeight?0:n.additionalScrollHeight,this.accessibilityProvider=new k(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(0,p.CJ)(n,(e=>e.transformOptimization),y.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(a.o.addTarget(this.rowsContainer)),this.scrollable=new f.Rm((0,p.CJ)(n,(e=>e.smoothScrolling),!1)?125:0,(e=>(0,s.jL)(e))),this.scrollableElement=this.disposables.add(new l.$Z(this.rowsContainer,{alwaysConsumeMouseWheel:(0,p.CJ)(n,(e=>e.alwaysConsumeMouseWheel),y.alwaysConsumeMouseWheel),horizontal:1,vertical:(0,p.CJ)(n,(e=>e.verticalScrollMode),y.verticalScrollMode),useShadows:(0,p.CJ)(n,(e=>e.useShadows),y.useShadows),mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,s.nm)(this.rowsContainer,a.t.Change,(e=>this.onTouchChange(e)))),this.disposables.add((0,s.nm)(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add((0,s.nm)(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add((0,s.nm)(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add((0,s.nm)(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add((0,s.nm)(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=(0,p.CJ)(n,(e=>e.setRowLineHeight),y.setRowLineHeight),this.setRowHeight=(0,p.CJ)(n,(e=>e.setRowHeight),y.setRowHeight),this.supportDynamicHeights=(0,p.CJ)(n,(e=>e.supportDynamicHeights),y.supportDynamicHeights),this.dnd=(0,p.CJ)(n,(e=>e.dnd),y.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,s.FK)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.mouseWheelScrollSensitivity&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},s=m.e.intersect(n,o),r=new Map;for(let e=s.start;e<s.end;e++){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.row){let i=r.get(t.templateId);i||(i=[],r.set(t.templateId,i));const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),i.push(t.row)}t.row=null}const a={start:e+t,end:this.items.length},l=m.e.intersect(a,n),d=m.e.relativeComplement(a,n),h=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:g.JT.None})));let c;0===e&&t>=this.items.length?(this.rangeMap=new b,this.rangeMap.splice(0,0,h),c=this.items,this.items=h):(this.rangeMap.splice(e,t,h),c=this.items.splice(e,t,...h));const u=i.length-t,p=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),f=v(l,u),_=m.e.intersect(p,f);for(let e=_.start;e<_.end;e++)this.updateItemInDOM(this.items[e],e);const C=m.e.relativeComplement(f,p);for(const e of C)for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t);const w=d.map((e=>v(e,u))),y=[{start:e,end:e+i.length},...w].map((e=>m.e.intersect(p,e))),S=this.getNextToLastElement(y);for(const e of y)for(let t=e.start;t<e.end;t++){const e=this.items[t],i=r.get(e.templateId),n=null==i?void 0:i.pop();this.insertItemInDOM(t,S,n)}for(const e of r.values())for(const t of e)this.cache.release(t);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),c.map((e=>e.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,s.jL)((()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:"number"==typeof e?e:(0,s.If)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,s.FK)(this.domNode)})}render(e,t,i,n,o,s=!1){const r=this.getRenderRange(t,i),a=m.e.relativeComplement(r,e),l=m.e.relativeComplement(e,r),d=this.getNextToLastElement(a);if(s){const t=m.e.intersect(e,r);for(let e=t.start;e<t.end;e++)this.updateItemInDOM(this.items[e],e)}for(const e of a)for(let t=e.start;t<e.end;t++)this.insertItemInDOM(t,d);for(const e of l)for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t);void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==o&&(this.rowsContainer.style.width=`${Math.max(o,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t,i){const n=this.items[e];n.row||(n.row=null!=i?i:this.cache.alloc(n.templateId));const o=this.accessibilityProvider.getRole(n.element)||"listitem";n.row.domNode.setAttribute("role",o);const r=this.accessibilityProvider.isChecked(n.element);void 0!==r&&n.row.domNode.setAttribute("aria-checked",String(!!r)),n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const a=this.renderers.get(n.templateId);if(!a)throw new Error(`No renderer found for template id ${n.templateId}`);a&&a.renderElement(n.element,e,n.row.templateData,n.size);const l=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!l,l&&(n.dragStartDisposable=(0,s.nm)(n.row.domNode,"dragstart",(e=>this.onDragStart(n.element,l,e)))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=n.vU?"-moz-fit-content":"fit-content",e.width=(0,s.FK)(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return u.ju.map(this.disposables.add(new r.Y(this.domNode,"click")).event,(e=>this.toMouseEvent(e)))}get onMouseDblClick(){return u.ju.map(this.disposables.add(new r.Y(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)))}get onMouseMiddleClick(){return u.ju.filter(u.ju.map(this.disposables.add(new r.Y(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e))),(e=>1===e.browserEvent.button))}get onMouseDown(){return u.ju.map(this.disposables.add(new r.Y(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)))}get onContextMenu(){return u.ju.any(u.ju.map(this.disposables.add(new r.Y(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e))),u.ju.map(this.disposables.add(new r.Y(this.domNode,a.t.Contextmenu)).event,(e=>this.toGestureEvent(e))))}get onTouchStart(){return u.ju.map(this.disposables.add(new r.Y(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)))}get onTap(){return u.ju.map(this.disposables.add(new r.Y(this.rowsContainer,a.t.Tap)).event,(e=>this.toGestureEvent(e)))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(o.go.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(n,i)),void 0===e&&(e=String(n.length));const t=(0,s.$)(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>document.body.removeChild(t)),0)}this.currentDragData=new S(n),o.P$.CurrentDragAndDropData=new L(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),o.P$.CurrentDragAndDropData&&"vscode-ui"===o.P$.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(o.P$.CurrentDragAndDropData)this.currentDragData=o.P$.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new x}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?"copy":"move",i="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],i=(0,d.EB)(i).filter((e=>e>=-1&&e<this.length)).sort(((e,t)=>e-t)),i=-1===i[0]?[-1]:i,n=this.currentDragFeedback,s=i,Array.isArray(n)&&Array.isArray(s)?(0,d.fS)(n,s):n===s)return!0;var n,s;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,g.OF)((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of i){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,g.OF)((()=>{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,h.Vg)((()=>this.clearDragOverFeedback()),100),this.currentDragData&&(null===(i=(t=this.dnd).onDragLeave)||void 0===i||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,o.P$.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,o.P$.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=g.JT.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,s.xQ)(this.domNode).top;this.dragOverAnimationDisposable=(0,s.jt)(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,h.Vg)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let o,s;e===this.elementTop(n.start)?(o=n.start,s=0):n.end-n.start>1&&(o=n.start+1,s=this.elementTop(o)-e);let r=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e<a.end;e++){const t=this.probeDynamicHeight(e);0!==t&&this.rangeMap.splice(e,1,[this.items[e]]),r+=t,l=l||0!==t}if(!l){0!==r&&this.eventuallyUpdateScrollDimensions();const t=m.e.relativeComplement(n,a);for(const e of t)for(let t=e.start;t<e.end;t++)this.items[t].row&&this.removeItemFromDOM(t);const l=m.e.relativeComplement(a,n);for(const e of l)for(let t=e.start;t<e.end;t++){const e=t+1,i=e<this.items.length?this.items[e].row:null,n=i?i.domNode:null;this.insertItemInDOM(t,n)}for(let e=a.start;e<a.end;e++)this.items[e].row&&this.updateItemInDOM(this.items[e],e);if("number"==typeof o){const t=this.scrollable.getFutureScrollPosition().scrollTop-e,n=this.elementTop(o)-s+t;this.setScrollTop(n,i)}return void this._onDidChangeContentHeight.fire(this.contentHeight)}}}probeDynamicHeight(e){const t=this.items[e];if(this.virtualDelegate.getDynamicHeight){const e=this.virtualDelegate.getDynamicHeight(t.element);if(null!==e){const i=t.size;return t.size=e,t.lastDynamicHeightWidth=this.renderWidth,e-i}}if(!t.hasDynamicHeight||t.lastDynamicHeightWidth===this.renderWidth)return 0;if(this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(t.element))return 0;const i=t.size;if(!this.setRowHeight&&t.row){let e=t.row.domNode.offsetHeight;return t.size=e,t.lastDynamicHeightWidth=this.renderWidth,e-i}const n=this.cache.alloc(t.templateId);n.domNode.style.height="",this.rowsContainer.appendChild(n.domNode);const o=this.renderers.get(t.templateId);return o&&(o.renderElement(t.element,e,n.templateData,void 0),o.disposeElement&&o.disposeElement(t.element,e,n.templateData,void 0)),t.size=n.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(t.element,t.size),t.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(n.domNode),this.cache.release(n),t.size-i}getNextToLastElement(e){const t=e[e.length-1];if(!t)return null;const i=this.items[t.end];return i&&i.row?i.row.domNode:null}getElementDomId(e){return`${this.domId}_${e}`}dispose(){if(this.items){for(const e of this.items)if(e.row){const t=this.renderers.get(e.row.templateId);t&&(t.disposeElement&&t.disposeElement(e.element,-1,e.row.templateData,void 0),t.disposeTemplate(e.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,g.B9)(this.disposables)}}N.InstanceCount=0,w([c.H],N.prototype,"onMouseClick",null),w([c.H],N.prototype,"onMouseDblClick",null),w([c.H],N.prototype,"onMouseMiddleClick",null),w([c.H],N.prototype,"onMouseDown",null),w([c.H],N.prototype,"onContextMenu",null),w([c.H],N.prototype,"onTouchStart",null),w([c.H],N.prototype,"onTap",null)},14785:(e,t,i)=>{i.d(t,{WK:()=>M,wD:()=>W,aV:()=>q,sx:()=>B,cK:()=>E,hD:()=>I,wn:()=>P,Zo:()=>O});var n=i(48696),o=i(74152),s=i(63304),r=i(63030),a=i(40700);class l{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}var d=i(76345),h=i(10554),c=i(66051),u=i(97768),g=i(77538),p=i(45303),m=i(48646),f=i(43758),_=i(20620),v=i(84483),b=i(56718);i(71512);class C extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var w,y=i(68413),S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class x{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index<e?n.push(o):o.index>=e+t&&n.push({index:o.index+i-t,templateData:o.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class k{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new g.Q5,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new x(this)}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const o=i.length-t,s=e+t,r=[...this.sortedIndexes.filter((t=>t<e)),...i.map(((t,i)=>t?i+e:-1)).filter((e=>-1!==e)),...this.sortedIndexes.filter((e=>e>=s)).map((e=>e+o))],a=this.length+o;if(this.sortedIndexes.length>0&&0===r.length&&a>0){const t=null!==(n=this.sortedIndexes.find((t=>t>=e)))&&void 0!==n?n:a-1;r.push(Math.min(t,a-1))}this.renderer.splice(e,t,i.length),this._set(r,r),this.length=a}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(K),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const s=z(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return(0,d.ry)(this.sortedIndexes,e,K)>=0}dispose(){(0,m.B9)(this._onChange)}}S([u.H],k.prototype,"renderer",null);class N extends k{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class D{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,i.map((()=>!1)));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString())),o=i.map((e=>n.indexOf(this.identityProvider.getId(e).toString())>-1));this.trait.splice(e,t,o)}}function E(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function I(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&!!e.parentElement&&I(e.parentElement)}class T{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new m.SL,this.multipleSelectionDisposables=new m.SL,this.onKeyDown.filter((e=>3===e.keyCode)).on(this.onEnter,this,this.disposables),this.onKeyDown.filter((e=>16===e.keyCode)).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter((e=>18===e.keyCode)).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter((e=>11===e.keyCode)).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter((e=>12===e.keyCode)).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter((e=>9===e.keyCode)).on(this.onEscape,this,this.disposables),!1!==i.multipleSelectionSupport&&this.onKeyDown.filter((e=>(v.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keydown")).event).filter((e=>!E(e.target))).map((e=>new s.y(e)))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter((e=>(v.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,d.w6)(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}S([u.H],T.prototype,"onKeyDown",null),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(w||(w={}));const M=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class R{constructor(e,t,i,n){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=n,this.enabled=!1,this.state=w.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new m.SL,this.disposables=new m.SL,this.updateOptions(e.options)}updateOptions(e){void 0===e.enableKeyboardNavigation||e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=g.ju.chain(this.enabledDisposables.add(new o.Y(this.view.domNode,"keydown")).event).filter((e=>!E(e.target))).filter((()=>this.automaticKeyboardNavigation||this.triggered)).map((e=>new s.y(e))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>{e.stopPropagation(),e.preventDefault()})).map((e=>e.browserEvent.key)).event,t=g.ju.debounce(e,(()=>null),800);g.ju.reduce(g.ju.any(e,t),((e,t)=>null===t?null:(e||"")+t))(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&(0,a.Z9)(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=w.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===w.Idle?1:0;this.state=w.Typing;for(let t=0;t<this.list.length;t++){const o=(i+t+n)%this.list.length,s=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(o)),r=s&&s.toString();if(void 0===r||(0,p.Ji)(e,r))return this.previouslyFocused=i,this.list.setFocus([o]),void this.list.reveal(o)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class A{constructor(e,t){this.list=e,this.view=t,this.disposables=new m.SL,g.ju.chain(this.disposables.add(new o.Y(t.domNode,"keydown")).event).filter((e=>!E(e.target))).map((e=>new s.y(e))).filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const o=window.getComputedStyle(n);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function O(e){return v.dz?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function P(e){return e.browserEvent.shiftKey}const F={isSelectionSingleChangeEvent:O,isSelectionRangeChangeEvent:P};class B{constructor(e){this.list=e,this.disposables=new m.SL,this._onPointer=new g.Q5,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||F),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(r.o.addTarget(e.getHTMLElement()))),g.ju.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||F))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){I(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(I(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(E(e.browserEvent.target)||I(e.browserEvent.target))return;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionRangeChangeEvent(e)||this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),(i=e.browserEvent)instanceof MouseEvent&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(E(e.browserEvent.target)||I(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=Math.min(i,t),o=Math.max(i,t),s=(0,d.w6)(n,o+1),r=this.list.getSelection(),a=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;for(;o>=0&&e[o]===t-(i-o);)n.push(e[o--]);for(n.reverse(),o=i;o<e.length&&e[o]===t+(o-i);)n.push(e[o++]);return n}(z(r,[i]),i);if(0===a.length)return;const l=z(s,function(e,t){const i=[];let n=0,o=0;for(;n<e.length||o<t.length;)if(n>=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]<t[o]?i.push(e[n++]):o++}return i}(r,a));this.list.setSelection(l,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const i=this.list.getSelection(),n=i.filter((e=>e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class W{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):v.dz||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t}`),this.styleElement.textContent=i.join("\n")}}const V={listFocusBackground:c.Il.fromHex("#7FB0D0"),listActiveSelectionBackground:c.Il.fromHex("#0E639C"),listActiveSelectionForeground:c.Il.fromHex("#FFFFFF"),listActiveSelectionIconForeground:c.Il.fromHex("#FFFFFF"),listFocusAndSelectionBackground:c.Il.fromHex("#094771"),listFocusAndSelectionForeground:c.Il.fromHex("#FFFFFF"),listInactiveSelectionBackground:c.Il.fromHex("#3F3F46"),listInactiveSelectionIconForeground:c.Il.fromHex("#FFFFFF"),listHoverBackground:c.Il.fromHex("#2A2D2E"),listDropBackground:c.Il.fromHex("#383B3D"),treeIndentGuidesStroke:c.Il.fromHex("#a9a9a9"),tableColumnsBorder:c.Il.fromHex("#cccccc").transparent(.2)},H={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function z(e,t){const i=[];let n=0,o=0;for(;n<e.length||o<t.length;)if(n>=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]<t[o]?i.push(e[n++]):i.push(t[o++])}return i}const K=(e,t)=>e-t;class U{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let o=0;for(const s of this.renderers)s.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){let o=0;for(const s of this.renderers)s.disposeElement&&s.disposeElement(e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class j{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.setAttribute("aria-level",`${o}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class ${constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var o,s;null===(s=(o=this.dnd).onDragLeave)||void 0===s||s.call(o,e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class q{constructor(e,t,i,o,s=H){var r;this.user=e,this._options=s,this.focus=new k("focused"),this.anchor=new k("anchor"),this.eventBufferer=new g.E7,this._ariaLabel="",this.disposables=new m.SL,this._onDidDispose=new g.Q5,this.onDidDispose=this._onDidDispose.event;const a=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(r=this._options.accessibilityProvider)||void 0===r?void 0:r.getWidgetRole():"list";this.selection=new N("listbox"!==a),(0,_.jB)(s,V,!1);const d=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(d.push(new j(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map((e=>new U(e.templateId,[...d,e])));const h=Object.assign(Object.assign({},s),{dnd:s.dnd&&new $(this,s.dnd)});if(this.view=new y.Bv(t,i,o,h),this.view.domNode.setAttribute("role",a),s.styleController)this.styleController=s.styleController(this.view.domId);else{const e=(0,n.dS)(this.view.domNode);this.styleController=new W(e,this.view.domId)}if(this.spliceable=new l([new D(this.focus,this.view,s.identityProvider),new D(this.selection,this.view,s.identityProvider),new D(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new A(this,this.view)),("boolean"!=typeof s.keyboardSupport||s.keyboardSupport)&&(this.keyboardController=new T(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const e=s.keyboardNavigationDelegate||M;this.typeLabelController=new R(this,this.view,s.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return g.ju.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)))}get onDidChangeSelection(){return g.ju.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keydown")).event).map((e=>new s.y(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map(o.p).filter((()=>!1)).event,i=g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keyup")).event).forEach((()=>e=!1)).map((e=>new s.y(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map(o.p).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})).event,n=g.ju.chain(this.view.onContextMenu).filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:{x:i.pageX+1,y:i.pageY},browserEvent:i}))).event;return g.ju.any(t,i,n)}get onKeyDown(){return this.disposables.add(new o.Y(this.view.domNode,"keydown")).event}get onDidFocus(){return g.ju.signal(this.disposables.add(new o.Y(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new B(this)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),null===(t=this.keyboardController)||void 0===t||t.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new C(this.user,`Invalid start index: ${e}`);if(t<0)throw new C(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new C(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new C(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,d.Xh)(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new C(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findNextIndex(o.length>0?o[0]+e:0,t,n);s>-1&&this.setFocus([s],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);s>-1&&this.setFocus([s],i)}focusNextPage(e,t){return L(this,void 0,void 0,(function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.view.element(i),o=this.getFocusedElements()[0];if(o!==n){const n=this.findPreviousIndex(i,!1,t);n>-1&&o!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==n&&(this.setFocus([]),yield(0,h.Vs)(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return L(this,void 0,void 0,(function*(){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const o=this.view.element(i),s=this.getFocusedElements()[0];if(s!==o){const n=this.findNextIndex(i,!1,t);n>-1&&s!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),yield(0,h.Vs)(0),yield this.focusPreviousPage(e,t))}}))}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e>=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e<0&&!t)return-1;if(e=(this.length+e%this.length)%this.length,!i||i(this.element(e)))return e;e--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map((e=>this.view.element(e)))}reveal(e,t){if(e<0||e>=this.length)throw new C(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if((0,b.hj)(t)){const e=o-this.view.renderHeight;this.view.setScrollTop(e*(0,f.u)(t,0,1)+n)}else{const e=n+o,t=i+this.view.renderHeight;n<i&&e>=t||(n<i||e>=t&&o>=this.view.renderHeight?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new C(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(i<t||i+n>t+this.view.renderHeight)return null;const o=n-this.view.renderHeight;return Math.abs((t-i)/o)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}S([u.H],q.prototype,"onDidChangeFocus",null),S([u.H],q.prototype,"onDidChangeSelection",null),S([u.H],q.prototype,"onContextMenu",null),S([u.H],q.prototype,"onKeyDown",null),S([u.H],q.prototype,"onDidFocus",null)},89477:(e,t,i)=>{i.d(t,{S:()=>_});var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(422),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;const _="monaco-mouse-cursor-text"},86629:(e,t,i)=>{i.d(t,{l:()=>x,g:()=>M});var n=i(48696),o=i(74152),s=i(63030),r=i(10554),a=i(97768),l=i(77538),d=i(48646),h=i(84483),c=i(93379),u=i.n(c),g=i(7795),p=i.n(g),m=i(90569),f=i.n(m),_=i(3565),v=i.n(_),b=i(19216),C=i.n(b),w=i(44589),y=i.n(w),S=i(89760),L={};L.styleTagTransform=y(),L.setAttributes=v(),L.insert=f().bind(null,"head"),L.domAPI=p(),L.insertStyleElement=C(),u()(S.Z,L),S.Z&&S.Z.locals&&S.Z.locals;var x,k=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(x||(x={}));const N=new l.Q5,D=new l.Q5;class E{constructor(){this.disposables=new d.SL}get onPointerMove(){return this.disposables.add(new o.Y(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new o.Y(window,"mouseup")).event}dispose(){this.disposables.dispose()}}k([a.H],E.prototype,"onPointerMove",null),k([a.H],E.prototype,"onPointerUp",null);class I{constructor(e){this.el=e,this.disposables=new d.SL}get onPointerMove(){return this.disposables.add(new o.Y(this.el,s.t.Change)).event}get onPointerUp(){return this.disposables.add(new o.Y(this.el,s.t.End)).event}dispose(){this.disposables.dispose()}}k([a.H],I.prototype,"onPointerMove",null),k([a.H],I.prototype,"onPointerUp",null);class T{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}k([a.H],T.prototype,"onPointerMove",null),k([a.H],T.prototype,"onPointerUp",null);class M extends d.JT{constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new r.vp(this.hoverDelay)),this._state=3,this._onDidEnablementChange=this._register(new l.Q5),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new l.Q5),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new l.Q5),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new l.Q5),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new l.Q5),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new d.SL),this.orthogonalStartDragHandleDisposables=this._register(new d.SL),this.orthogonalEndSashDisposables=this._register(new d.SL),this.orthogonalEndDragHandleDisposables=this._register(new d.SL),this.el=(0,n.R3)(e,(0,n.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),h.dz&&this.el.classList.add("mac");const a=this._register(new o.Y(this.el,"mousedown")).event;this._register(a((e=>this.onPointerStart(e,new E)),this));const c=this._register(new o.Y(this.el,"dblclick")).event;this._register(c(this.onPointerDoublePress,this));const u=this._register(new o.Y(this.el,"mouseenter")).event;this._register(u((()=>M.onMouseEnter(this))));const g=this._register(new o.Y(this.el,"mouseleave")).event;this._register(g((()=>M.onMouseLeave(this)))),this._register(s.o.addTarget(this.el));const p=l.ju.map(this._register(new o.Y(this.el,s.t.Start)).event,(e=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(p((e=>this.onPointerStart(e,new I(this.el))),this));const m=this._register(new o.Y(this.el,s.t.Tap)).event,f=l.ju.map(l.ju.filter(l.ju.debounce(m,((e,t)=>{var i;return{event:t,count:(null!==(i=null==e?void 0:e.count)&&void 0!==i?i:0)+1}}),250),(({count:e})=>2===e)),(({event:e})=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(f(this.onPointerDoublePress,this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(N.event((e=>{this.size=e,this.layout()})))),this._register(D.event((e=>this.hoverDelay=e))),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,n.R3)(this.el,(0,n.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,d.OF)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new o.Y(this._orthogonalStartDragHandle,"mouseenter")).event((()=>M.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new o.Y(this._orthogonalStartDragHandle,"mouseleave")).event((()=>M.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,n.R3)(this.el,(0,n.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,d.OF)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new o.Y(this._orthogonalEndDragHandle,"mouseenter")).event((()=>M.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new o.Y(this._orthogonalEndDragHandle,"mouseleave")).event((()=>M.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){n.zB.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new T(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new T(t))),!this.state)return;const o=(0,n.H$)("iframe");for(const e of o)e.style.pointerEvents="none";const s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=(0,n.dS)(this.el),u=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":h.dz?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":h.dz?"col-resize":"ew-resize",c.textContent=`* { cursor: ${e} !important; }`},g=new d.SL;u(),i||this.onDidEnablementChange(u,null,g),t.onPointerMove((e=>{n.zB.stop(e,!1);const t={startX:s,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a};this._onDidChange.fire(t)}),null,g),t.onPointerUp((e=>{n.zB.stop(e,!1),this.el.removeChild(c),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose();for(const e of o)e.style.pointerEvents="auto"}),null,g),g.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&M.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&M.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){M.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(e){if(e.target&&e.target instanceof HTMLElement)return e.target.classList.contains("orthogonal-drag-handle")?e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},45019:(e,t,i)=>{i.d(t,{s$:()=>U,NB:()=>z,$Z:()=>K});var n=i(23875),o=i(48696),s=i(82704),r=i(76049),a=i(64573),l=i(35248),d=i(10554);class h extends l.${constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new a.Z),this.onmousedown(this.bgDomNode,(e=>this._arrowMouseDown(e))),this.onmousedown(this.domNode,(e=>this._arrowMouseDown(e))),this._mousedownRepeatTimer=this._register(new d.zh),this._mousedownScheduleRepeatTimer=this._register(new d._F)}_arrowMouseDown(e){this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet((()=>{this._mousedownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,a.e,(e=>{}),(()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()}}var c=i(48646);class u extends c.JT{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new d._F)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}var g=i(84483);class p extends l.${constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new u(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new a.Z),this._shouldRender=!0,this.domNode=(0,s.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,(e=>this._domNodeMouseDown(e)))}_createArrow(e){const t=this._register(new h(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,s.X)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))})),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);i<=o&&o<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{}))):this._onMouseDown(e)}_onMouseDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,i=e.browserEvent.offsetY;else{const n=o.i(this.domNode.domNode);t=e.posx-n.left,i=e.posy-n.top}const n=this._mouseDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))}_sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,a.e,(e=>{const t=this._sliderOrthogonalMousePosition(e),s=Math.abs(t-n);if(g.ED&&s>140)return void this._setDesiredScrollPositionNow(o.getScrollPosition());const r=this._sliderMousePosition(e)-i;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}class m{constructor(e,t,i,n,o,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new m(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,o){const s=Math.max(0,i-e),r=Math.max(0,s-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*r/n))),d=(r-l)/(n-i),h=o*d;return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:d,computedSliderPosition:Math.round(h)}}_refreshComputedValues(){const e=m._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return t<this._computedSliderPosition?i-=this._visibleSize:i+=this._visibleSize,i}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;const t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}var f=i(85095);const _=(0,f.CM)("scrollbar-button-left",f.lA.triangleLeft),v=(0,f.CM)("scrollbar-button-right",f.lA.triangleRight);class b extends p{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new m(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){const e=(t.arrowSize-11)/2,i=(t.horizontalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,1,0))}),this._createArrow({className:"scra",icon:v,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}const C=(0,f.CM)("scrollbar-button-up",f.lA.triangleUp),w=(0,f.CM)("scrollbar-button-down",f.lA.triangleDown);class y extends p{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new m(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:C,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,1))}),this._createArrow({className:"scra",icon:w,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var S=i(77538),L=i(55924),x=i(93379),k=i.n(x),N=i(7795),D=i.n(N),E=i(90569),I=i.n(E),T=i(3565),M=i.n(T),R=i(19216),A=i.n(R),O=i(44589),P=i.n(O),F=i(95447),B={};B.styleTagTransform=P(),B.setAttributes=M(),B.insert=I().bind(null,"head"),B.domAPI=D(),B.insertStyleElement=A(),k()(F.Z,B),F.Z&&F.Z.locals&&F.Z.locals;class W{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class V{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}accept(e,t,i){const n=new W(e,t,i);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return-1===this._front&&-1===this._rear||this._memory[this._rear],this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}V.INSTANCE=new V;class H extends l.${constructor(e,t,i){super(),this._onScroll=this._register(new S.Q5),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new S.Q5),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,g.dz&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new y(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new b(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,s.X)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,s.X)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,s.X)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onnonbubblingmouseout(this._listenOnDomNode,(e=>this._onMouseOut(e))),this._hideTimeout=this._register(new d._F),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,c.B9)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,g.dz&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,c.B9)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new r.q(e))};this._mouseWheelToDispose.push(o.nm(this._listenOnDomNode,o.tw.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=V.INSTANCE;{const i=window.devicePixelRatio/(0,n.ie)();g.ED||g.IJ?t.accept(Date.now(),e.deltaX/i,e.deltaY/i):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(n)>=Math.abs(o)?o=0:n=0),this._options.flipAxes&&([n,o]=[o,n]);const s=!g.dz&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||o||(o=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=50*n,t=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(o){const e=50*o,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}a=this._scrollable.validateScrollPosition(a),(r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0)}let o=i;!o&&this._options.alwaysConsumeMouseWheel&&(o=!0),!o&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(o=!0),o&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",o=t?" top":"",s=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class z extends H{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new L.Rm(0,(e=>o.jL(e)));super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class K extends H{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class U extends z{constructor(e,t){super(e,t),this._element=e,this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)})),this.scanDomNode()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},23599:(e,t,i)=>{i.d(t,{M:()=>M,z:()=>R});var n=i(48696),o=i(86629),s=i(45019),r=i(76345),a=i(66051),l=i(77538),d=i(48646),h=i(43758),c=i(55924),u=i(56718),g=i(93379),p=i.n(g),m=i(7795),f=i.n(m),_=i(90569),v=i.n(_),b=i(3565),C=i.n(b),w=i(19216),y=i.n(w),S=i(44589),L=i.n(S),x=i(10156),k={};k.styleTagTransform=L(),k.setAttributes=C(),k.insert=v().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=y(),p()(x.Z,k),x.Z&&x.Z.locals&&x.Z.locals;const N={separatorBorder:a.Il.transparent};class D{constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"==typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=(0,h.u)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class E extends D{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class I extends D{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var T,M;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(T||(T={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(M||(M={}));class R extends d.JT{constructor(e,t={}){var i,o;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=T.Idle,this._onDidSashChange=this._register(new l.Q5),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new l.Q5),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=u.o8(t.orientation)?0:t.orientation,this.inverseAltBehavior=!!t.inverseAltBehavior,this.proportionalLayout=!!u.o8(t.proportionalLayout)||!!t.proportionalLayout,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=(0,n.R3)(this.el,(0,n.$)(".sash-container")),this.viewContainer=(0,n.$)(".split-view-container"),this.scrollable=new c.Rm(125,n.jL),this.scrollableElement=this._register(new s.$Z(this.viewContainer,{vertical:0===this.orientation?null!==(i=t.scrollbarVisibility)&&void 0!==i?i:1:2,horizontal:1===this.orientation?null!==(o=t.scrollbarVisibility)&&void 0!==o?o:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{this.viewContainer.scrollTop=e.scrollTop,this.viewContainer.scrollLeft=e.scrollLeft}))),(0,n.R3)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||N),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=u.o8(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let t=0;t<this.viewItems.length;t++){const i=this.viewItems[t];i.size=(0,h.u)(Math.round(this.proportions[t]*e),i.minimumSize,i.maximumSize)}else{const t=(0,r.w6)(this.viewItems.length),n=t.filter((e=>1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.size/this.contentSize)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const o=this.sashItems.findIndex((t=>t.sash===e)),s=(0,d.F8)((0,n.nm)(document.body,"keydown",(e=>a(this.sashDragState.current,e.altKey))),(0,n.nm)(document.body,"keyup",(()=>a(this.sashDragState.current,!1)))),a=(e,t)=>{const i=this.viewItems.map((e=>e.size));let n,a,l=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(o===this.sashItems.length-1){const e=this.viewItems[o];l=(e.minimumSize-e.size)/2,d=(e.maximumSize-e.size)/2}else{const e=this.viewItems[o+1];l=(e.size-e.maximumSize)/2,d=(e.size-e.minimumSize)/2}if(!t){const e=(0,r.w6)(o,-1),t=(0,r.w6)(o+1,this.viewItems.length),s=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),l=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),d=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),h=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),c=Math.max(s,h),u=Math.min(d,l),g=this.findFirstSnapIndex(e),p=this.findFirstSnapIndex(t);if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?c-t:c+t,size:e.size}}if("number"==typeof p){const e=this.viewItems[p],t=Math.floor(e.viewMinimumSize/2);a={index:p,limitDelta:e.visible?u+t:u-t,size:e.size}}}this.sashDragState={start:e,current:e,index:o,sizes:i,minDelta:l,maxDelta:d,alt:t,snapBefore:n,snapAfter:a,disposable:s}};a(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:s,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const d=e-i,h=this.resize(t,d,n,void 0,void 0,s,r,a,l);if(o){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,o=this.viewItems[n],s=o.size-o.maximumSize,r=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-h,i,void 0,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=(0,h.u)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==T.Idle)throw new Error("Cant modify splitview");if(this.state=T.Busy,e<0||e>=this.viewItems.length)return;const i=(0,r.w6)(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],o=i.filter((e=>2===this.viewItems[e].priority)),s=this.viewItems[e];t=Math.round(t),t=(0,h.u)(t,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(n,o),this.state=T.Idle}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=(0,h.u)(i,t.minimumSize,t.maximumSize);const n=(0,r.w6)(this.viewItems.length),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));this.relayout(o,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,s){if(this.state!==T.Idle)throw new Error("Cant modify splitview");this.state=T.Busy;const a=(0,n.$)(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(a):this.viewContainer.insertBefore(a,this.viewContainer.children.item(i));const h=e.onDidChange((e=>this.onViewChange(p,e))),c=(0,d.OF)((()=>this.viewContainer.removeChild(a))),u=(0,d.F8)(h,c);let g;g="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const p=0===this.orientation?new E(a,e,g,u):new I(a,e,g,u);if(this.viewItems.splice(i,0,p),this.viewItems.length>1){let e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const t=0===this.orientation?new o.g(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new o.g(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),s=l.ju.map(t.onDidStart,n)(this.onSashStart,this),a=l.ju.map(t.onDidChange,n)(this.onSashChange,this),h=l.ju.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),c=h(this.onSashEnd,this),u=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=(0,r.w6)(e,-1),n=(0,r.w6)(e+1,this.viewItems.length),o=this.findFirstSnapIndex(i),s=this.findFirstSnapIndex(n);("number"!=typeof o||this.viewItems[o].visible)&&("number"!=typeof s||this.viewItems[s].visible)&&this._onDidSashReset.fire(e)})),g=(0,d.F8)(s,a,c,u,t),p={sash:t,disposable:g};this.sashItems.splice(i-1,0,p)}let m;a.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(m=[t.index]),s||this.relayout([i],m),this.state=T.Idle,s||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,o,s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,d){if(e<0||e>=this.viewItems.length)return 0;const c=(0,r.w6)(e,-1),u=(0,r.w6)(e+1,this.viewItems.length);if(o)for(const e of o)(0,r.zI)(c,e),(0,r.zI)(u,e);if(n)for(const e of n)(0,r.al)(c,e),(0,r.al)(u,e);const g=c.map((e=>this.viewItems[e])),p=c.map((e=>i[e])),m=u.map((e=>this.viewItems[e])),f=u.map((e=>i[e])),_=c.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),v=c.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),b=0===u.length?Number.POSITIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),C=0===u.length?Number.NEGATIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),w=Math.max(_,C,s),y=Math.min(b,v,a);let S=!1;if(l){const e=this.viewItems[l.index],i=t>=l.limitDelta;S=i!==e.visible,e.setVisible(i,l.size)}if(!S&&d){const e=this.viewItems[d.index],i=t<d.limitDelta;S=i!==e.visible,e.setVisible(i,d.size)}if(S)return this.resize(e,t,i,n,o,s,a);for(let e=0,i=t=(0,h.u)(t,w,y);e<g.length;e++){const t=g[e],n=(0,h.u)(p[e]+i,t.minimumSize,t.maximumSize);i-=n-p[e],t.size=n}for(let e=0,i=t;e<m.length;e++){const t=m[e],n=(0,h.u)(f[e]-i,t.minimumSize,t.maximumSize);i+=n-f[e],t.size=n}return t}distributeEmptySpace(e){const t=this.viewItems.reduce(((e,t)=>e+t.size),0);let i=this.size-t;const n=(0,r.w6)(this.viewItems.length-1,-1),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));for(const e of s)(0,r.zI)(n,e);for(const e of o)(0,r.al)(n,e);"number"==typeof e&&(0,r.al)(n,e);for(let e=0;0!==i&&e<n.length;e++){const t=this.viewItems[n[e]],o=(0,h.u)(t.size+i,t.minimumSize,t.maximumSize);i-=o-t.size,t.size=o}}layoutViews(){this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const o=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const s=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let a=0;for(let e=0;e<this.sashItems.length;e++){const{sash:n}=this.sashItems[e];a+=this.viewItems[e].size;const l=!(t[e]&&s[e+1]),d=!(i[e]&&o[e+1]);if(l&&d){const i=(0,r.w6)(e,-1),s=(0,r.w6)(e+1,this.viewItems.length),l=this.findFirstSnapIndex(i),d=this.findFirstSnapIndex(s),h="number"==typeof l&&!this.viewItems[l].visible,c="number"==typeof d&&!this.viewItems[d].visible;h&&o[e]&&(a>0||this.startSnappingEnabled)?n.state=1:c&&t[e]&&(a<this.contentSize||this.endSnappingEnabled)?n.state=2:n.state=0}else n.state=l&&!d?1:!l&&d?2:3}}getSashPosition(e){let t=0;for(let i=0;i<this.sashItems.length;i++)if(t+=this.viewItems[i].size,this.sashItems[i].sash===e)return t;return 0}findFirstSnapIndex(e){for(const t of e){const e=this.viewItems[t];if(e.visible&&e.snap)return t}for(const t of e){const e=this.viewItems[t];if(e.visible&&e.maximumSize-e.minimumSize>0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),this.viewItems.forEach((e=>e.dispose())),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[]}}},35248:(e,t,i)=>{i.d(t,{$:()=>l});var n=i(48696),o=i(63304),s=i(76049),r=i(63030),a=i(48646);class l extends a.JT{onclick(e,t){this._register(n.nm(e,n.tw.CLICK,(e=>t(new s.n(e)))))}onmousedown(e,t){this._register(n.nm(e,n.tw.MOUSE_DOWN,(e=>t(new s.n(e)))))}onmouseover(e,t){this._register(n.nm(e,n.tw.MOUSE_OVER,(e=>t(new s.n(e)))))}onnonbubblingmouseout(e,t){this._register(n.j_(e,(e=>t(new s.n(e)))))}onkeydown(e,t){this._register(n.nm(e,n.tw.KEY_DOWN,(e=>t(new o.y(e)))))}onkeyup(e,t){this._register(n.nm(e,n.tw.KEY_UP,(e=>t(new o.y(e)))))}oninput(e,t){this._register(n.nm(e,n.tw.INPUT,t))}onblur(e,t){this._register(n.nm(e,n.tw.BLUR,t))}onfocus(e,t){this._register(n.nm(e,n.tw.FOCUS,t))}ignoreGesture(e){r.o.ignoreTarget(e)}}},92981:(e,t,i)=>{i.d(t,{Wi:()=>l,Z0:()=>d,aU:()=>a,eZ:()=>c,wY:()=>h});var n=i(77538),o=i(48646),s=i(85337),r=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class a extends o.JT{constructor(e,t="",i="",o=!0,s){super(),this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=o,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return r(this,void 0,void 0,(function*(){this._actionCallback&&(yield this._actionCallback(e))}))}}class l extends o.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new n.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new n.Q5),this.onDidRun=this._onDidRun.event}run(e,t){return r(this,void 0,void 0,(function*(){if(!e.enabled)return;let i;this._onBeforeRun.fire({action:e});try{yield this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}))}runAction(e,t){return r(this,void 0,void 0,(function*(){yield e.run(t)}))}}class d extends a{constructor(e){super(d.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}d.ID="vs.actions.separator";class h{constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=e,this.label=t,this.class=n,this._actions=i}get actions(){return this._actions}dispose(){}run(){return r(this,void 0,void 0,(function*(){}))}}class c extends a{constructor(){super(c.ID,s.N("submenu.empty","(empty)"),void 0,!1)}}c.ID="vs.actions.empty"},76345:(e,t,i)=>{function n(e,t=0){return e[e.length-(1+t)]}function o(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function s(e,t,i=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n<o;n++)if(!i(e[n],t[n]))return!1;return!0}function r(e,t,i){let n=0,o=e.length-1;for(;n<=o;){const s=(n+o)/2|0,r=i(e[s],t);if(r<0)n=s+1;else{if(!(r>0))return s;o=s-1}}return-(n+1)}function a(e,t){let i=0,n=e.length;if(0===n)return 0;for(;i<n;){const o=Math.floor((i+n)/2);t(e[o])?n=o:i=o+1}return i}function l(e,t,i){if((e|=0)>=t.length)throw new TypeError("invalid index");let n=t[Math.floor(t.length*Math.random())],o=[],s=[],r=[];for(let e of t){const t=i(e,n);t<0?o.push(e):t>0?s.push(e):r.push(e)}return e<o.length?l(e,o,i):e<o.length+r.length?r[0]:l(e-(o.length+r.length),s,i)}function d(e,t){const i=[];let n;for(const o of e.slice(0).sort(t))n&&0===t(n[0],o)?n.push(o):(n=[o],i.push(n));return i}function h(e){return e.filter((e=>!!e))}function c(e){return!Array.isArray(e)||0===e.length}function u(e){return Array.isArray(e)&&e.length>0}function g(e,t=(e=>e)){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function p(e,t){const i=function(e,t){for(let i=e.length-1;i>=0;i--)if(t(e[i]))return i;return-1}(e,t);if(-1!==i)return e[i]}function m(e,t){return e.length>0?e[0]:t}function f(e){return[].concat(...e)}function _(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;e<t;e++)n.push(e);else for(let e=i;e>t;e--)n.push(e);return n}function v(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function b(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function C(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function w(e){return Array.isArray(e)?e:[e]}function y(e,t,i,n){const o=S(e,t),s=e.splice(o,i);return function(e,t,i){const n=S(e,t),o=e.length,s=i.length;e.length=o+s;for(let t=o-1;t>=n;t--)e[t+s]=e[t];for(let t=0;t<s;t++)e[t+n]=i[t]}(e,o,n),s}function S(e,t){return t<0?Math.max(t+e.length,0):Math.min(t,e.length)}i.d(t,{EB:()=>g,Gb:()=>n,H9:()=>L,HW:()=>l,JH:()=>o,Of:()=>u,XY:()=>c,Xh:()=>m,Zv:()=>v,_2:()=>w,al:()=>C,dF:()=>p,db:()=>y,fS:()=>s,kX:()=>h,lG:()=>a,ry:()=>r,vM:()=>d,w6:()=>_,xH:()=>f,zI:()=>b});class L{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){return this.items[this.firstIdx]}}},86963:(e,t,i)=>{function n(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}i.d(t,{ok:()=>n})},10554:(e,t,i)=>{i.d(t,{J8:()=>a,PG:()=>l,Ps:()=>m,To:()=>b,Ue:()=>C,Vg:()=>p,Vs:()=>g,_F:()=>f,eP:()=>d,jT:()=>w,pY:()=>v,rH:()=>u,vp:()=>c,zh:()=>_});var n=i(28245),o=i(98147),s=i(48646),r=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function a(e){return!!e&&"function"==typeof e.then}function l(e){const t=new n.A,i=e(t.token),s=new Promise(((e,n)=>{const s=t.token.onCancellationRequested((()=>{s.dispose(),t.dispose(),n((0,o.F0)())}));Promise.resolve(i).then((i=>{s.dispose(),t.dispose(),e(i)}),(e=>{s.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return s.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return s.finally(e)}}}function d(e,t,i){return Promise.race([e,new Promise((e=>t.onCancellationRequested((()=>e(i)))))])}class h{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}}class c{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}}))),this.timeout=setTimeout((()=>{this.timeout=null,this.doResolve&&this.doResolve(null)}),t),this.completionPromise}isTriggered(){return null!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject((0,o.F0)()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancel()}}class u{constructor(e){this.delayer=new c(e),this.throttler=new h}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}dispose(){this.delayer.dispose()}}function g(e,t){return t?new Promise(((i,n)=>{const s=setTimeout((()=>{r.dispose(),i()}),e),r=t.onCancellationRequested((()=>{clearTimeout(s),r.dispose(),n((0,o.F0)())}))})):l((t=>g(e,t)))}function p(e,t=0){const i=setTimeout(e,t);return(0,s.OF)((()=>clearTimeout(i)))}function m(e,t=(e=>!!e),i=null){let n=0;const o=e.length,s=()=>{if(n>=o)return Promise.resolve(i);const r=e[n++];return Promise.resolve(r()).then((e=>t(e)?Promise.resolve(e):s()))};return s()}class f{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class _{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class v{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let b;b="function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback?e=>{const t=setTimeout((()=>{const t=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining:()=>Math.max(0,t-Date.now())}))}));let i=!1;return{dispose(){i||(i=!0,clearTimeout(t))}}}:(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}};class C{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=b((()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}var w;!function(e){e.settled=function(e){return r(this,void 0,void 0,(function*(){let t;const i=yield Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i}))},e.withAsyncBody=function(e){return new Promise(((t,i)=>r(this,void 0,void 0,(function*(){try{yield e(t,i)}catch(e){i(e)}}))))}}(w||(w={}))},3355:(e,t,i)=>{i.d(t,{Ag:()=>l,Cg:()=>c,KN:()=>s,Q$:()=>h,T4:()=>d,mP:()=>r,oq:()=>a});const n="undefined"!=typeof Buffer;let o;class s{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return n&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new s(e)}toString(){return n?this.buffer.toString():(o||(o=new TextDecoder),o.decode(this.buffer))}}function r(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function a(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function l(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function d(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function h(e,t){return e[t]}function c(e,t,i){e[i]=t}},28245:(e,t,i)=>{i.d(t,{A:()=>a,T:()=>s});var n=i(77538);const o=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var s;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof r||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.ju.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o})}(s||(s={}));class r{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new n.Q5),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new r),this._token}cancel(){this._token?this._token instanceof r&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof r&&this._token.dispose():this._token=s.None}}},85095:(e,t,i)=>{i.d(t,{CM:()=>r,JL:()=>a,dT:()=>d,fK:()=>s,lA:()=>l});var n=i(77538);const o=new class{constructor(){this._icons=new Map,this._onDidRegister=new n.Q5}add(e){const t=this._icons.get(e.id);t?e.description?t.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}},s=o;function r(e,t){return new l(e,t)}function a(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}class l{constructor(e,t,i){this.id=e,this.definition=t,this.description=i,o.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var d;!function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){if(e instanceof l)return["codicon","codicon-"+e.id];const n=t.exec(e.id);if(!n)return i(l.error);let[,o,s]=n;const r=["codicon","codicon-"+o];return s&&r.push("codicon-modifier-"+s.substr(1)),r}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")}}(d||(d={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(l||(l={}))},59642:(e,t,i)=>{i.d(t,{E:()=>o,r:()=>s});const n=Object.prototype.hasOwnProperty;function o(e,t){for(let i in e)if(n.call(e,i)&&!1===t({key:i,value:e[i]},(function(){delete e[i]})))return}class s{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}}},66051:(e,t,i)=>{function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{Il:()=>a,VS:()=>o,tx:()=>r});class o{constructor(e,t,i,o=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,i,o){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,d=0;const h=(a+r)/2,c=r-a;if(c>0){switch(d=Math.min(h<=.5?c/(2*h):c/(2-2*h),1),r){case t:l=(i-n)/c+(i<n?6:0);break;case i:l=(n-t)/c+2;break;case n:l=(t-i)/c+4}l*=60,l=Math.round(l)}return new s(l,d,h,o)}static _hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:r}=e;let a,l,d;if(0===i)a=l=d=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;a=s._hue2rgb(o,e,t+1/3),l=s._hue2rgb(o,e,t),d=s._hue2rgb(o,e,t-1/3)}return new o(Math.round(255*a),Math.round(255*l),Math.round(255*d),r)}}class r{constructor(e,t,i,o){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),s=o-Math.min(t,i,n),a=0===o?0:s/o;let l;return l=0===s?0:o===t?((i-n)/s%6+6)%6:o===i?(n-t)/s+2:(t-i)/s+4,new r(Math.round(60*l),a,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r;let[d,h,c]=[0,0,0];return t<60?(d=r,h=a):t<120?(d=a,h=r):t<180?(h=r,c=a):t<240?(h=a,c=r):t<300?(d=a,c=r):t<=360&&(d=r,c=a),d=Math.round(255*(d+l)),h=Math.round(255*(h+l)),c=Math.round(255*(c+l)),new o(d,h,c,s)}}class a{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof o)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof r))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=r.toRGBA(e)}}static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)}equals(e){return!!e&&o.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)}getRelativeLuminance(){return n(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()<e.getRelativeLuminance()}lighten(e){return new a(new s(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new a(new s(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:t,g:i,b:n,a:s}=this.rgba;return new a(new o(t,i,n,s*e))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new a(new o(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=a.Format.CSS.format(this)),this._toString}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),o=t.getRelativeLuminance();return i=i*(o-n)/o,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;const n=e.getRelativeLuminance();return i=i*(n-t.getRelativeLuminance())/n,e.darken(i)}}a.white=new a(new o(255,255,255,1)),a.black=new a(new o(0,0,0,1)),a.red=new a(new o(255,0,0,1)),a.blue=new a(new o(0,0,255,1)),a.cyan=new a(new o(0,255,255,1)),a.lightgrey=new a(new o(211,211,211,1)),a.transparent=new a(new o(0,0,0,0)),function(e){let t;!function(t){let i;!function(t){function i(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function n(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`},t.formatHSL=function(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)`:e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return`hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})`},t.formatHex=function(e){return`#${i(e.rgba.r)}${i(e.rgba.g)}${i(e.rgba.b)}`},t.formatHexA=function(t,n=!1){return n&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${i(t.rgba.r)}${i(t.rgba.g)}${i(t.rgba.b)}${i(Math.round(255*t.rgba.a))}`},t.format=function(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)},t.parseHex=function(t){const i=t.length;if(0===i)return null;if(35!==t.charCodeAt(0))return null;if(7===i){const i=16*n(t.charCodeAt(1))+n(t.charCodeAt(2)),s=16*n(t.charCodeAt(3))+n(t.charCodeAt(4)),r=16*n(t.charCodeAt(5))+n(t.charCodeAt(6));return new e(new o(i,s,r,1))}if(9===i){const i=16*n(t.charCodeAt(1))+n(t.charCodeAt(2)),s=16*n(t.charCodeAt(3))+n(t.charCodeAt(4)),r=16*n(t.charCodeAt(5))+n(t.charCodeAt(6)),a=16*n(t.charCodeAt(7))+n(t.charCodeAt(8));return new e(new o(i,s,r,a/255))}if(4===i){const i=n(t.charCodeAt(1)),s=n(t.charCodeAt(2)),r=n(t.charCodeAt(3));return new e(new o(16*i+i,16*s+s,16*r+r))}if(5===i){const i=n(t.charCodeAt(1)),s=n(t.charCodeAt(2)),r=n(t.charCodeAt(3)),a=n(t.charCodeAt(4));return new e(new o(16*i+i,16*s+s,16*r+r,(16*a+a)/255))}return null}}(i=t.CSS||(t.CSS={}))}(t=e.Format||(e.Format={}))}(a||(a={}))},97768:(e,t,i)=>{function n(e,t,i){let n=null,o=null;if("function"==typeof i.value?(n="value",o=i.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",o=i.get),!o)throw new Error("not supported");const s=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[s]}}i.d(t,{H:()=>n})},68081:(e,t,i)=>{i.d(t,{Hs:()=>h,a$:()=>r});class n{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var o=i(14938);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i<n;i++)t[i]=e.charCodeAt(i);return t}}function r(e,t,i){return new h(new s(e),new s(t)).ComputeDiff(i).changes}class a{static Assert(e,t){if(!e)throw new Error(t)}}class l{static Copy(e,t,i,n,o){for(let s=0;s<o;s++)i[n+s]=e[t+s]}static Copy2(e,t,i,n,o){for(let s=0;s<o;s++)i[n+s]=e[t+s]}}class d{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class h{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,o,s]=h._getElements(e),[r,a,l]=h._getElements(t);this._hasStrings=s&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(h._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i<n;i++)e[i]=(0,o.Cv)(t[i],0);return[t,e,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}ElementsAreStrictEqual(e,t){return!!this.ElementsAreEqual(e,t)&&h._getStrictElement(this._originalSequence,e)===h._getStrictElement(this._modifiedSequence,t)}static _getStrictElement(e,t){return"function"==typeof e.getStrictElement?e.getStrictElement(t):null}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,i,n,o){const s=[!1];let r=this.ComputeDiffRecursive(e,t,i,n,s);return o&&(r=this.PrettifyChanges(r)),{quitEarly:s[0],changes:r}}ComputeDiffRecursive(e,t,i,o,s){for(s[0]=!1;e<=t&&i<=o&&this.ElementsAreEqual(e,i);)e++,i++;for(;t>=e&&o>=i&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||i>o){let s;return i<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new n(e,0,i,o-i+1)]):e<=t?(a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[new n(e,t-e+1,i,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const r=[0],l=[0],d=this.ComputeRecursionPoint(e,t,i,o,r,l,s),h=r[0],c=l[0];if(null!==d)return d;if(!s[0]){const r=this.ComputeDiffRecursive(e,h,i,c,s);let a=[];return a=s[0]?[new n(h+1,t-(h+1)+1,c+1,o-(c+1)+1)]:this.ComputeDiffRecursive(h+1,t,c+1,o,s),this.ConcatenateChanges(r,a)}return[new n(e,t-e+1,i,o-i+1)]}WALKTRACE(e,t,i,o,s,r,a,l,h,c,u,g,p,m,f,_,v,b){let C=null,w=null,y=new d,S=t,L=i,x=p[0]-_[0]-o,k=-1073741824,N=this.m_forwardHistory.length-1;do{const t=x+e;t===S||t<L&&h[t-1]<h[t+1]?(m=(u=h[t+1])-x-o,u<k&&y.MarkNextChange(),k=u,y.AddModifiedElement(u+1,m),x=t+1-e):(m=(u=h[t-1]+1)-x-o,u<k&&y.MarkNextChange(),k=u-1,y.AddOriginalElement(u,m+1),x=t-1-e),N>=0&&(e=(h=this.m_forwardHistory[N])[0],S=1,L=h.length-1)}while(--N>=-1);if(C=y.getReverseChanges(),b[0]){let e=p[0]+1,t=_[0]+1;if(null!==C&&C.length>0){const i=C[C.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}w=[new n(e,g-e+1,t,f-t+1)]}else{y=new d,S=r,L=a,x=p[0]-_[0]-l,k=1073741824,N=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=x+s;e===S||e<L&&c[e-1]>=c[e+1]?(m=(u=c[e+1]-1)-x-l,u>k&&y.MarkNextChange(),k=u+1,y.AddOriginalElement(u+1,m+1),x=e+1-s):(m=(u=c[e-1])-x-l,u>k&&y.MarkNextChange(),k=u,y.AddModifiedElement(u+1,m+1),x=e-1-s),N>=0&&(s=(c=this.m_reverseHistory[N])[0],S=1,L=c.length-1)}while(--N>=-1);w=y.getChanges()}return this.ConcatenateChanges(C,w)}ComputeRecursionPoint(e,t,i,o,s,r,a){let d=0,h=0,c=0,u=0,g=0,p=0;e--,i--,s[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(o-i),f=m+1,_=new Int32Array(f),v=new Int32Array(f),b=o-i,C=t-e,w=e-i,y=t-o,S=(C-b)%2==0;_[b]=e,v[C]=t,a[0]=!1;for(let L=1;L<=m/2+1;L++){let m=0,x=0;c=this.ClipDiagonalBound(b-L,L,b,f),u=this.ClipDiagonalBound(b+L,L,b,f);for(let e=c;e<=u;e+=2){d=e===c||e<u&&_[e-1]<_[e+1]?_[e+1]:_[e-1]+1,h=d-(e-b)-w;const i=d;for(;d<t&&h<o&&this.ElementsAreEqual(d+1,h+1);)d++,h++;if(_[e]=d,d+h>m+x&&(m=d,x=h),!S&&Math.abs(e-C)<=L-1&&d>=v[e])return s[0]=d,r[0]=h,i<=v[e]&&L<=1448?this.WALKTRACE(b,c,u,w,C,g,p,y,_,v,d,t,s,h,o,r,S,a):null}const k=(m-e+(x-i)-L)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,k))return a[0]=!0,s[0]=m,r[0]=x,k>0&&L<=1448?this.WALKTRACE(b,c,u,w,C,g,p,y,_,v,d,t,s,h,o,r,S,a):(e++,i++,[new n(e,t-e+1,i,o-i+1)]);g=this.ClipDiagonalBound(C-L,L,C,f),p=this.ClipDiagonalBound(C+L,L,C,f);for(let n=g;n<=p;n+=2){d=n===g||n<p&&v[n-1]>=v[n+1]?v[n+1]-1:v[n-1],h=d-(n-C)-y;const l=d;for(;d>e&&h>i&&this.ElementsAreEqual(d,h);)d--,h--;if(v[n]=d,S&&Math.abs(n-b)<=L&&d<=_[n])return s[0]=d,r[0]=h,l>=_[n]&&L<=1448?this.WALKTRACE(b,c,u,w,C,g,p,y,_,v,d,t,s,h,o,r,S,a):null}if(L<=1447){let e=new Int32Array(u-c+2);e[0]=b-c+1,l.Copy2(_,c,e,1,u-c+1),this.m_forwardHistory.push(e),e=new Int32Array(p-g+2),e[0]=C-g+1,l.Copy2(v,g,e,1,p-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,c,u,w,C,g,p,y,_,v,d,t,s,h,o,r,S,a)}PrettifyChanges(e){for(let t=0;t<e.length;t++){const i=e[t],n=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,o=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,s=i.originalLength>0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength<n&&i.modifiedStart+i.modifiedLength<o&&(!s||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!r||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const e=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!e)break;i.originalStart++,i.modifiedStart++}let a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(let t=e.length-1;t>=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,o=i.modifiedStart+i.modifiedLength}const s=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,d=i.modifiedStart-e;if(t<n||d<o)break;if(s&&!this.OriginalElementsAreEqual(t,t+i.originalLength))break;if(r&&!this.ModifiedElementsAreEqual(d,d+i.modifiedLength))break;const h=(t===n&&d===o?5:0)+this._boundaryScore(t,i.originalLength,d,i.modifiedLength);h>l&&(l=h,a=e)}i.originalStart-=a,i.modifiedStart-=a;const d=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],d)&&(e[t-1]=d[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t<i;t++){const i=e[t-1],n=e[t],o=n.originalStart-i.originalStart-i.originalLength,s=i.originalStart,r=n.originalStart+n.originalLength,a=r-s,l=i.modifiedStart,d=n.modifiedStart+n.modifiedLength,h=d-l;if(o<5&&a<20&&h<20){const e=this._findBetterContiguousSequence(s,a,l,h,o);if(e){const[t,s]=e;t===i.originalStart+i.originalLength&&s===i.modifiedStart+i.modifiedLength||(i.originalLength=t-i.originalStart,i.modifiedLength=s-i.modifiedStart,n.originalStart=t+o,n.modifiedStart=s+o,n.originalLength=r-n.originalStart,n.modifiedLength=d-n.modifiedStart)}}}return e}_findBetterContiguousSequence(e,t,i,n,o){if(t<o||n<o)return null;const s=e+t-o+1,r=i+n-o+1;let a=0,l=0,d=0;for(let t=e;t<s;t++)for(let e=i;e<r;e++){const i=this._contiguousSequenceScore(t,e,o);i>0&&i>a&&(a=i,l=t,d=e)}return a>0?[l,d]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let o=0;o<i;o++){if(!this.ElementsAreEqual(e+o,t+o))return 0;n+=this._originalStringElements[e+o].length}return n}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){let i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return l.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],l.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return l.Copy(e,0,i,0,e.length),l.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const o=e.originalStart;let s=e.originalLength;const r=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n(o,s,r,a),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e<n)return e;const o=t%2==0;return e<0?o===(i%2==0)?0:1:o===((n-i-1)%2==0)?n-1:n-2}}},98147:(e,t,i)=>{i.d(t,{B8:()=>u,Cp:()=>s,F0:()=>d,L6:()=>c,VV:()=>l,b1:()=>h,dL:()=>o,ri:()=>r});const n=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function o(e){l(e)||n.onUnexpectedError(e)}function s(e){l(e)||n.onUnexpectedExternalError(e)}function r(e){if(e instanceof Error){let{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack}}return e}const a="Canceled";function l(e){return e instanceof Error&&e.name===a&&e.message===a}function d(){const e=new Error(a);return e.name=e.message,e}function h(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function c(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class u extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}},77538:(e,t,i)=>{i.d(t,{D0:()=>c,E7:()=>u,K3:()=>h,Q5:()=>d,ZD:()=>g,ju:()=>n});var n,o=i(98147),s=i(48646),r=i(87022),a=i(42267);!function(e){function t(e){return(t,i=null,n)=>{let o,s=!1;return o=e((e=>{if(!s)return o?o.dispose():s=!0,t.call(i,e)}),null,n),s&&o.dispose(),o}}function i(e,t){return a(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)))}function n(e,t){return a(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)))}function o(e,t){return a(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)))}function r(e,t,n){let o=n;return i(e,(e=>(o=t(o,e),o)))}function a(e){let t;const i=new d({onFirstListenerAdd(){t=e(i.fire,i)},onLastListenerRemove(){t.dispose()}});return i.event}function l(e,t,i=100,n=!1,o){let s,r,a,l=0;const h=new d({leakWarningThreshold:o,onFirstListenerAdd(){s=e((e=>{l++,r=t(r,e),n&&!a&&(h.fire(r),r=void 0),clearTimeout(a),a=setTimeout((()=>{const e=r;r=void 0,a=void 0,(!n||l>1)&&h.fire(e),l=0}),i)}))},onLastListenerRemove(){s.dispose()}});return h.event}function h(e,t=((e,t)=>e===t)){let i,n=!0;return o(e,(e=>{const o=n||!t(e,i);return n=!1,i=e,o}))}e.None=()=>s.JT.None,e.once=t,e.map=i,e.forEach=n,e.filter=o,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>(0,s.F8)(...e.map((e=>e((e=>t.call(i,e)),null,n))))},e.reduce=r,e.debounce=l,e.latch=h,e.split=function(t,i){return[e.filter(t,i),e.filter(t,(e=>!i(e)))]},e.buffer=function(e,t=!1,i=[]){let n=i.slice(),o=e((e=>{n?n.push(e):r.fire(e)}));const s=()=>{n&&n.forEach((e=>r.fire(e))),n=null},r=new d({onFirstListenerAdd(){o||(o=e((e=>r.fire(e))))},onFirstListenerDidAdd(){n&&(t?setTimeout(s):s())},onLastListenerRemove(){o&&o.dispose(),o=null}});return r.event};class c{constructor(e){this.event=e}map(e){return new c(i(this.event,e))}forEach(e){return new c(n(this.event,e))}filter(e){return new c(o(this.event,e))}reduce(e,t){return new c(r(this.event,e,t))}latch(){return new c(h(this.event))}debounce(e,t=100,i=!1,n){return new c(l(this.event,e,t,i,n))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){return t(this.event)(e,i,n)}}e.chain=function(e){return new c(e)},e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new d({onFirstListenerAdd:()=>e.on(t,n),onLastListenerRemove:()=>e.removeListener(t,n)});return o.event},e.fromDOMEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new d({onFirstListenerAdd:()=>e.addEventListener(t,n),onLastListenerRemove:()=>e.removeEventListener(t,n)});return o.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))}}(n||(n={}));class l{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${l._idPool++}`}start(e){this._stopWatch=new a.G(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}l._idPool=0;class d{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new l(this._options._profName):void 0}get event(){return this._event||(this._event=(e,t,i)=>{var n;this._listeners||(this._listeners=new r.S);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(t?[e,t]:e);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const l=null===(n=this._leakageMon)||void 0===n?void 0:n.check(this._listeners.size),d=(0,s.OF)((()=>{l&&l(),!this._disposed&&(a(),this._options&&this._options.onLastListenerRemove)&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this))}));return i instanceof s.SL?i.add(d):Array.isArray(i)&&i.push(d),d}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new r.S);for(let t of this._listeners)this._deliveryQueue.push([t,e]);for(null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){(0,o.dL)(e)}}null===(i=this._perfMon)||void 0===i||i.stop()}}dispose(){var e,t,i,n,o;this._disposed||(this._disposed=!0,null===(e=this._listeners)||void 0===e||e.clear(),null===(t=this._deliveryQueue)||void 0===t||t.clear(),null===(n=null===(i=this._options)||void 0===i?void 0:i.onLastListenerRemove)||void 0===n||n.call(i),null===(o=this._leakageMon)||void 0===o||o.dispose())}}class h extends d{constructor(e){super(e),this._isPaused=0,this._eventQueue=new r.S,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class c extends h{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class u{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}}class g{constructor(){this.listening=!1,this.inputEvent=n.None,this.inputEventListener=s.JT.None,this.emitter=new d({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},80453:(e,t,i)=>{i.d(t,{KM:()=>a,fn:()=>r,oP:()=>d,vY:()=>l});var n=i(67802),o=i(84483),s=i(96024);function r(e){return-1===e.indexOf("/")&&(e=function(e){return e.replace(/[\\/]/g,n.KR.sep)}(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function a(e,t,i,o=n.ir){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(i){if(!(0,s.ok)(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===o&&i--,e.charAt(i)===o}return t.charAt(t.length-1)!==o&&(t+=o),0===e.indexOf(t)}function l(e){const t=(0,n.Fv)(e);return o.ED?!(e.length>3)&&d(t)&&(2===e.length||92===t.charCodeAt(2)):t===n.KR.sep}function d(e){return!!o.ED&&((t=e.charCodeAt(0))>=65&&t<=90||t>=97&&t<=122)&&58===e.charCodeAt(1);var t}},45303:(e,t,i)=>{i.d(t,{CL:()=>z,EW:()=>K,Ji:()=>r,KZ:()=>C,Oh:()=>k,ir:()=>a,jB:()=>N,l7:()=>j,mB:()=>D,or:()=>s});var n=i(82173),o=i(96024);function s(...e){return function(t,i){for(let n=0,o=e.length;n<o;n++){const o=e[n](t,i);if(o)return o}return null}}const r=function(e,t,i){if(!i||i.length<t.length)return null;let n;return n=e?o.ok(i,t):0===i.indexOf(t),n?t.length>0?[{start:0,end:t.length}]:[]:null}.bind(void 0,!0);function a(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function l(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let o=null;return(o=l(e,t,i+1,n+1))?f({start:n,end:n+1},o):null}return l(e,t,i,n+1)}function d(e){return 97<=e&&e<=122}function h(e){return 65<=e&&e<=90}function c(e){return 48<=e&&e<=57}function u(e){return 32===e||9===e||10===e||13===e}const g=new Set;function p(e){return u(e)||g.has(e)}function m(e){return d(e)||h(e)||c(e)}function f(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function _(e,t){for(let i=t;i<e.length;i++){const t=e.charCodeAt(i);if(h(t)||c(t)||i>0&&!m(e.charCodeAt(i-1)))return i}return e.length}function v(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let o=null,s=n+1;for(o=v(e,t,i+1,n+1);!o&&(s=_(t,s))<t.length;)o=v(e,t,i+1,s),s++;return null===o?null:f({start:n,end:n+1},o)}}function b(e,t){if(!t)return null;if(0===(t=t.trim()).length)return null;if(!function(e){let t=0,i=0,n=0,o=0;for(let s=0;s<e.length;s++)n=e.charCodeAt(s),h(n)&&t++,d(n)&&i++,u(n)&&o++;return 0!==t&&0!==i||0!==o?t<=5:e.length<=30}(e))return null;if(t.length>60)return null;const i=function(e){let t=0,i=0,n=0,o=0,s=0;for(let r=0;r<e.length;r++)s=e.charCodeAt(r),h(s)&&t++,d(s)&&i++,m(s)&&n++,c(s)&&o++;return{upperPercent:t/e.length,lowerPercent:i/e.length,alphaPercent:n/e.length,numericPercent:o/e.length}}(t);if(!function(e){const{upperPercent:t,lowerPercent:i,alphaPercent:n,numericPercent:o}=e;return i>.2&&t<.8&&n>.6&&o<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,o=0;for(e=e.toLowerCase();o<t.length&&null===(n=v(e,t,0,o));)o=_(t,o+1);return n}function C(e,t,i=!1){if(!t||0===t.length)return null;let n=null,o=0;for(e=e.toLowerCase(),t=t.toLowerCase();o<t.length&&null===(n=w(e,t,0,o,i));)o=y(t,o+1);return n}function w(e,t,i,n,o){if(i===e.length)return[];if(n===t.length)return null;if((s=e.charCodeAt(i))===(r=t.charCodeAt(n))||p(s)&&p(r)){let s=null,r=n+1;if(s=w(e,t,i+1,n+1,o),!o)for(;!s&&(r=y(t,r))<t.length;)s=w(e,t,i+1,r,o),r++;return null===s?null:f({start:n,end:n+1},s)}return null;var s,r}function y(e,t){for(let i=t;i<e.length;i++)if(p(e.charCodeAt(i))||i>0&&p(e.charCodeAt(i-1)))return i;return e.length}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach((e=>g.add(e.charCodeAt(0))));const S=s(r,b,a),L=s(r,b,(function(e,t){return l(e.toLowerCase(),t.toLowerCase(),0,0)})),x=new n.z6(1e4);function k(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=x.get(e);n||(n=new RegExp(o.un(e),"i"),x.set(e,n));const s=n.exec(t);return s?[{start:s.index,end:s.index+s[0].length}]:i?L(e,t):S(e,t)}function N(e,t,i,n,o,s){const r=Math.min(13,e.length);for(;i<r;i++){const r=K(e,t,i,n,o,s,!1);if(r)return r}return[0,s]}function D(e){if(void 0===e)return[];const t=[],i=e[1];for(let n=e.length-1;n>1;n--){const o=e[n]+i,s=t[t.length-1];s&&s.end===o?s.end=o+1:t.push({start:o,end:o+1})}return t}const E=128;function I(){const e=[],t=[];for(let e=0;e<=E;e++)t[e]=0;for(let i=0;i<=E;i++)e.push(t.slice(0));return e}function T(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const M=T(2*E),R=T(2*E),A=I(),O=I(),P=I(),F=!1;function B(e,t,i,n,o){function s(e,t,i=" "){for(;e.length<t;)e=i+e;return e}let r=` | |${n.split("").map((e=>s(e,3))).join("|")}\n`;for(let n=0;n<=i;n++)r+=0===n?" |":`${t[n-1]}|`,r+=e[n].slice(0,o+1).map((e=>s(e.toString(),3))).join("|")+"\n";return r}function W(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!o.C8(i)}}function V(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function H(e,t,i){return t[e]!==i[e]}var z;function K(e,t,i,n,o,s,r){const a=e.length>E?E:e.length,l=n.length>E?E:n.length;if(i>=a||s>=l||a-i>l-s)return;if(!function(e,t,i,n,o,s,r=!1){for(;t<i&&o<s;)e[t]===n[o]&&(r&&(M[t]=o),t+=1),o+=1;return t===i}(t,i,a,o,s,l,!0))return;!function(e,t,i,n,o,s){let r=e-1,a=t-1;for(;r>=i&&a>=n;)o[r]===s[a]&&(R[r]=a,r--),a--}(a,l,i,s,t,o);let d=1,h=1,c=i,u=s;const g=[!1];for(d=1,c=i;c<a;d++,c++){const r=M[c],p=R[c],m=c+1<a?R[c+1]:l;for(h=r-s+1,u=r;u<m;h++,u++){let a=Number.MIN_SAFE_INTEGER,m=!1;u<=p&&(a=U(e,t,c,i,n,o,u,l,s,0===A[d-1][h-1],g));let f=0;a!==Number.MAX_SAFE_INTEGER&&(m=!0,f=a+O[d-1][h-1]);const _=u>r,v=_?O[d][h-1]+(A[d][h-1]>0?-5:0):0,b=u>r+1&&A[d][h-1]>0,C=b?O[d][h-2]+(A[d][h-2]>0?-5:0):0;if(b&&(!_||C>=v)&&(!m||C>=f))O[d][h]=C,P[d][h]=3,A[d][h]=0;else if(_&&(!m||v>=f))O[d][h]=v,P[d][h]=2,A[d][h]=0;else{if(!m)throw new Error("not possible");O[d][h]=f,P[d][h]=1,A[d][h]=A[d-1][h-1]+1}}}if(F&&function(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(B(O,e,e.length,i,i.length)),console.log(B(P,e,e.length,i,i.length)),console.log(B(A,e,e.length,i,i.length))}(e,i,n,s),!g[0]&&!r)return;d--,h--;const p=[O[d][h],s];let m=0,f=0;for(;d>=1;){let e=h;do{const t=P[d][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+d-1]===o[s+h-1]&&!H(e+s-1,n,o)&&m+1>A[d][e]&&(e=h),e===h?m++:m=1,f||(f=e),d--,h=e-1,p.push(h)}l===a&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function U(e,t,i,n,o,s,r,a,l,d,h){if(t[i]!==s[r])return Number.MIN_SAFE_INTEGER;let c=1,u=!1;return r===i-n?c=e[i]===o[r]?7:5:!H(r,o,s)||0!==r&&H(r-1,o,s)?!W(s,r)||0!==r&&W(s,r-1)?(W(s,r-1)||V(s,r-1))&&(c=5,u=!0):c=5:(c=e[i]===o[r]?7:5,u=!0),c>1&&i===n&&(h[0]=!0),u||(u=H(r,o,s)||W(s,r-1)||V(s,r-1)),i===n?r>l&&(c-=u?3:5):c+=d?u?2:0:u?0:1,r+1===a&&(c-=u?3:5),c}function j(e,t,i,n,o,s,r){return function(e,t,i,n,o,s,r,a){let l=K(e,t,i,n,o,s,a);if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;r<t;r++){const t=$(e,r);if(t){const e=K(t,t.toLowerCase(),i,n,o,s,a);e&&(e[0]-=3,(!l||e[0]>l[0])&&(l=e))}}}return l}(e,t,i,n,o,s,0,r)}function $(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(z||(z={}))},32683:(e,t,i)=>{function n(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}i.d(t,{I:()=>n})},15284:(e,t,i)=>{i.d(t,{EQ:()=>E,Qc:()=>I});var n=i(10554),o=i(80453),s=i(82173),r=i(67802),a=i(96024);const l="**",d="/",h="[/\\\\]",c="[^/\\\\]",u=/\//g;function g(e){switch(e){case 0:return"";case 1:return`${c}*?`;default:return`(?:${h}|${c}+${h}|${h}${c}+)*?`}}function p(e,t){if(!e)return[];const i=[];let n=!1,o=!1,s="";for(const r of e){switch(r){case t:if(!n&&!o){i.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1}s+=r}return s&&i.push(s),i}function m(e){if(!e)return"";let t="";const i=p(e,d);if(i.every((e=>e===l)))t=".*";else{let e=!1;i.forEach(((n,o)=>{if(n===l)return void(e||(t+=g(2),e=!0));let s=!1,r="",u=!1,f="";for(const e of n)if("}"!==e&&s)r+=e;else if(!u||"]"===e&&f)switch(e){case"{":s=!0;continue;case"[":u=!0;continue;case"}":const i=`(?:${p(r,",").map((e=>m(e))).join("|")})`;t+=i,s=!1,r="";break;case"]":t+="["+f+"]",u=!1,f="";break;case"?":t+=c;continue;case"*":t+=g(1);continue;default:t+=a.ec(e)}else{let t;t="-"===e?e:"^"!==e&&"!"!==e||f?e===d?"":a.ec(e):"^",f+=t}o<i.length-1&&(i[o+1]!==l||o+2<i.length)&&(t+=h),e=!1}))}return t}const f=/^\*\*\/\*\.[\w\.-]+$/,_=/^\*\*\/([\w\.-]+)\/?$/,v=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,b=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,C=/^\*\*((\/[\w\.-]+)+)\/?$/,w=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,y=new s.z6(1e4),S=function(){return!1},L=function(){return null};function x(e,t){if(!e)return L;let i;i="string"!=typeof e?e.pattern:e,i=i.trim();const n=`${i}_${!!t.trimForExclusions}`;let o,s=y.get(n);if(s)return k(s,e);if(f.test(i)){const e=i.substr(4);s=function(t,n){return"string"==typeof t&&t.endsWith(e)?i:null}}else s=(o=_.exec(N(i,t)))?function(e,t){const i=`/${e}`,n=`\\${e}`,o=function(o,s){return"string"!=typeof o?null:s?s===e?t:null:o===e||o.endsWith(i)||o.endsWith(n)?t:null},s=[e];return o.basenames=s,o.patterns=[t],o.allBasenames=s,o}(o[1],i):(t.trimForExclusions?b:v).test(i)?function(e,t){const i=T(e.slice(1,-1).split(",").map((e=>x(e,t))).filter((e=>e!==L)),e),n=i.length;if(!n)return L;if(1===n)return i[0];const o=function(t,n){for(let o=0,s=i.length;o<s;o++)if(i[o](t,n))return e;return null},s=i.find((e=>!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(o.allPaths=r),o}(i,t):(o=C.exec(N(i,t)))?D(o[1].substr(1),i,!0):(o=w.exec(N(i,t)))?D(o[1],i,!1):function(e){try{const t=new RegExp(`^${m(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return L}}(i);return y.set(n,s),k(s,e)}function k(e,t){return"string"==typeof t?e:function(i,n){return o.KM(i,t.base)?e(r.Gf(t.base,i),n):null}}function N(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function D(e,t,i){const n=r.ir===r.KR.sep,o=n?e:e.replace(u,r.ir),s=r.ir+o,a=r.KR.sep+e,l=i?function(i,r){return"string"!=typeof i||i!==o&&!i.endsWith(s)&&(n||i!==e&&!i.endsWith(a))?null:t}:function(i,s){return"string"!=typeof i||i!==o&&(n||i!==e)?null:t};return l.allPaths=[(i?"*/":"./")+e],l}function E(e,t,i){return!(!e||"string"!=typeof t)&&I(e)(t,void 0,i)}function I(e,t={}){if(!e)return S;if("string"==typeof e||function(e){const t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern}(e)){const i=x(e,t);if(i===L)return S;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=T(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return L;const o=x(e,i);if(o===L)return L;if("boolean"==typeof t)return o;if(t){const i=t.when;if("string"==typeof i){const t=(t,s,r,a)=>{if(!a||!o(t,s))return null;const l=a(i.replace("$(basename)",r));return(0,n.J8)(l)?l.then((t=>t?e:null)):l?e:null};return t.requiresSiblings=!0,t}}return o}(i,e[i],t))).filter((e=>e!==L))),o=i.length;if(!o)return L;if(!i.some((e=>!!e.requiresSiblings))){if(1===o)return i[0];const e=function(e,t){for(let n=0,o=i.length;n<o;n++){const o=i[n](e,t);if(o)return o}return null},t=i.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const n=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return n.length&&(e.allPaths=n),e}const s=function(e,t,n){let o;for(let s=0,a=i.length;s<a;s++){const a=i[s];a.requiresSiblings&&n&&(t||(t=r.EZ(e)),o||(o=t.substr(0,t.length-r.DZ(e).length)));const l=a(e,t,o,n);if(l)return l}return null},a=i.find((e=>!!e.allBasenames));a&&(s.allBasenames=a.allBasenames);const l=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(s.allPaths=l),s}(e,t)}function T(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let o;if(t){o=[];for(let e=0,i=n.length;e<i;e++)o.push(t)}else o=i.reduce(((e,t)=>{const i=t.patterns;return i?e.concat(i):e}),[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};s.basenames=n,s.patterns=o,s.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(s),r}},14938:(e,t,i)=>{i.d(t,{Cv:()=>a,SP:()=>s,vp:()=>o,yP:()=>c});var n=i(96024);function o(e){return s(e,0)}function s(e,t){switch(typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?(i=e,n=r(104579,n=t),i.reduce(((e,t)=>s(t,e)),n)):function(e,t){return t=r(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=a(i,t),s(e[i],t))),t)}(e,t);case"string":return a(e,t);case"boolean":return function(e,t){return r(e?433:863,t)}(e,t);case"number":return r(e,t);case"undefined":return r(937,t);default:return r(617,t)}var i,n}function r(e,t){return(t<<5)-t+e|0}function a(e,t){t=r(149417,t);for(let i=0,n=e.length;i<n;i++)t=r(e.charCodeAt(i),t);return t}function l(e,t,i=32){const n=i-t;return(e<<t|(~((1<<n)-1)&e)>>>n)>>>0}function d(e,t=0,i=e.byteLength,n=0){for(let o=0;o<i;o++)e[t+o]=n}function h(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length<t;)e=i+e;return e}((e>>>0).toString(16),t/4)}class c{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let o,s,r=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(o=a,s=-1,a=0):(o=e.charCodeAt(0),s=0);;){let l=o;if(n.ZG(o)){if(!(s+1<t)){a=o;break}{const t=e.charCodeAt(s+1);n.YK(t)?(s++,l=n.rL(o,t)):l=65533}}else n.YK(o)&&(l=65533);if(r=this._push(i,r,l),s++,!(s<t))break;o=e.charCodeAt(s)}this._buffLen=r,this._leftoverHighSurrogate=a}_push(e,t,i){return i<128?e[t++]=i:i<2048?(e[t++]=192|(1984&i)>>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),h(this._h0)+h(this._h1)+h(this._h2)+h(this._h3)+h(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,d(this._buff,this._buffLen),this._buffLen>56&&(this._step(),d(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=c._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,l(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,o,s=this._h0,r=this._h1,a=this._h2,d=this._h3,h=this._h4;for(let t=0;t<80;t++)t<20?(i=r&a|~r&d,n=1518500249):t<40?(i=r^a^d,n=1859775393):t<60?(i=r&a|r&d|a&d,n=2400959708):(i=r^a^d,n=3395469782),o=l(s,5)+i+h+n+e.getUint32(4*t,!1)&4294967295,h=d,d=a,a=l(r,30),r=s,s=o;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+d&4294967295,this._h4=this._h4+h&4294967295}}c._bigBlock32=new DataView(new ArrayBuffer(320))},70880:(e,t,i)=>{i.d(t,{CP:()=>r,Fr:()=>a,W5:()=>s,oR:()=>l,v1:()=>d});var n=i(98147),o=i(32881);class s{constructor(e="",t=!1){var i,o,s;if(this.value=e,"string"!=typeof this.value)throw(0,n.b1)("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(o=t.supportThemeIcons)&&void 0!==o&&o,this.supportHtml=null!==(s=t.supportHtml)&&void 0!==s&&s)}appendText(e,t=0){var i;return this.value+=(i=this.supportThemeIcons?(0,o.Qo)(e):e,i.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")).replace(/([ \t]+)/g,((e,t)=>"&nbsp;".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}}function r(e){return a(e)?!e.value:!Array.isArray(e)||e.every(r)}function a(e){return e instanceof s||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function l(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}function d(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),o=e?e[1]:"",s=i?i[1]:"",r=isFinite(parseInt(s)),a=isFinite(parseInt(o));r&&t.push(`width="${s}"`),a&&t.push(`height="${o}"`)}return{href:e,dimensions:t}}},32881:(e,t,i)=>{i.d(t,{Gt:()=>m,Ho:()=>p,Qo:()=>d,f$:()=>c,x$:()=>g});var n=i(85095),o=i(45303),s=i(96024);const r="$(",a=new RegExp(`\\$\\(${n.dT.iconNameExpression}(?:${n.dT.iconModifierExpression})?\\)`,"g"),l=new RegExp(`(\\\\)?${a.source}`,"g");function d(e){return e.replace(l,((e,t)=>t?e:`\\${e}`))}const h=new RegExp(`\\\\${a.source}`,"g");function c(e){return e.replace(h,(e=>`\\${e}`))}const u=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function g(e){return-1===e.indexOf(r)?e:e.replace(u,((e,t,i,n)=>i?e:t||n||""))}function p(e){const t=e.indexOf(r);return-1===t?{text:e}:function(e,t){const i=[];let n="";function o(e){if(e){n+=e;for(const t of e)i.push(h)}}let s,a,l=-1,d="",h=0,c=t;const u=e.length;for(o(e.substr(0,t));c<u;)s=e[c],a=e[c+1],s===r[0]&&a===r[1]?(l=c,o(d),d=r,c++):")"===s&&-1!==l?(h+=c-l+1,l=-1,d=""):-1!==l?/^[a-z0-9\-]$/i.test(s)?d+=s:(o(d),l=-1,d=""):o(s),c++;return o(d),{text:n,iconOffsets:i}}(e,t)}function m(e,t,i=!1){const{text:n,iconOffsets:r}=t;if(!r||0===r.length)return(0,o.Oh)(e,n,i);const a=(0,s.j3)(n," "),l=n.length-a.length,d=(0,o.Oh)(e,a,i);if(d)for(const e of d){const t=r[e.start+l]+l;e.start+=t,e.end+=t}return d}},23231:(e,t,i)=>{i.d(t,{R:()=>n,a:()=>o});class n{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const o=new n("id#")},59842:(e,t,i)=>{var n;i.d(t,{$:()=>n}),function(e){e.is=function(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]};const t=Object.freeze([]);e.empty=function(){return t},e.single=function*(e){yield e},e.from=function(e){return e||t},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.concatNested=function*(e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t<i;t++)yield e[t]},e.consume=function(t,i=Number.POSITIVE_INFINITY){const n=[];if(0===i)return[n,t];const o=t[Symbol.iterator]();for(let t=0;t<i;t++){const t=o.next();if(t.done)return[n,e.empty()];n.push(t.value)}return[n,{[Symbol.iterator]:()=>o}]},e.equals=function(e,t,i=((e,t)=>e===t)){const n=e[Symbol.iterator](),o=t[Symbol.iterator]();for(;;){const e=n.next(),t=o.next();if(e.done!==t.done)return!1;if(e.done)return!0;if(!i(e.value,t.value))return!1}}}(n||(n={}))},96332:(e,t,i)=>{i.d(t,{H_:()=>a,Vd:()=>u,gx:()=>m,kL:()=>p});class n{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new n,s=new n,r=new n,a=new Array(230),l={},d=[],h=Object.create(null),c=Object.create(null),u=[],g=[];for(let e=0;e<=193;e++)u[e]=-1;for(let e=0;e<=126;e++)g[e]=-1;var p;function m(e,t){return(e|(65535&t)<<16>>>0)>>>0}!function(){const e="",t=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[0,1,1,"Hyper",0,e,0,e,e,e],[0,1,2,"Super",0,e,0,e,e,e],[0,1,3,"Fn",0,e,0,e,e,e],[0,1,4,"FnLock",0,e,0,e,e,e],[0,1,5,"Suspend",0,e,0,e,e,e],[0,1,6,"Resume",0,e,0,e,e,e],[0,1,7,"Turbo",0,e,0,e,e,e],[0,1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[0,1,9,"WakeUp",0,e,0,e,e,e],[31,0,10,"KeyA",31,"A",65,"VK_A",e,e],[32,0,11,"KeyB",32,"B",66,"VK_B",e,e],[33,0,12,"KeyC",33,"C",67,"VK_C",e,e],[34,0,13,"KeyD",34,"D",68,"VK_D",e,e],[35,0,14,"KeyE",35,"E",69,"VK_E",e,e],[36,0,15,"KeyF",36,"F",70,"VK_F",e,e],[37,0,16,"KeyG",37,"G",71,"VK_G",e,e],[38,0,17,"KeyH",38,"H",72,"VK_H",e,e],[39,0,18,"KeyI",39,"I",73,"VK_I",e,e],[40,0,19,"KeyJ",40,"J",74,"VK_J",e,e],[41,0,20,"KeyK",41,"K",75,"VK_K",e,e],[42,0,21,"KeyL",42,"L",76,"VK_L",e,e],[43,0,22,"KeyM",43,"M",77,"VK_M",e,e],[44,0,23,"KeyN",44,"N",78,"VK_N",e,e],[45,0,24,"KeyO",45,"O",79,"VK_O",e,e],[46,0,25,"KeyP",46,"P",80,"VK_P",e,e],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[48,0,27,"KeyR",48,"R",82,"VK_R",e,e],[49,0,28,"KeyS",49,"S",83,"VK_S",e,e],[50,0,29,"KeyT",50,"T",84,"VK_T",e,e],[51,0,30,"KeyU",51,"U",85,"VK_U",e,e],[52,0,31,"KeyV",52,"V",86,"VK_V",e,e],[53,0,32,"KeyW",53,"W",87,"VK_W",e,e],[54,0,33,"KeyX",54,"X",88,"VK_X",e,e],[55,0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[22,0,36,"Digit1",22,"1",49,"VK_1",e,e],[23,0,37,"Digit2",23,"2",50,"VK_2",e,e],[24,0,38,"Digit3",24,"3",51,"VK_3",e,e],[25,0,39,"Digit4",25,"4",52,"VK_4",e,e],[26,0,40,"Digit5",26,"5",53,"VK_5",e,e],[27,0,41,"Digit6",27,"6",54,"VK_6",e,e],[28,0,42,"Digit7",28,"7",55,"VK_7",e,e],[29,0,43,"Digit8",29,"8",56,"VK_8",e,e],[30,0,44,"Digit9",30,"9",57,"VK_9",e,e],[21,0,45,"Digit0",21,"0",48,"VK_0",e,e],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[10,1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,e,0,e,e,e],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[59,1,64,"F1",59,"F1",112,"VK_F1",e,e],[60,1,65,"F2",60,"F2",113,"VK_F2",e,e],[61,1,66,"F3",61,"F3",114,"VK_F3",e,e],[62,1,67,"F4",62,"F4",115,"VK_F4",e,e],[63,1,68,"F5",63,"F5",116,"VK_F5",e,e],[64,1,69,"F6",64,"F6",117,"VK_F6",e,e],[65,1,70,"F7",65,"F7",118,"VK_F7",e,e],[66,1,71,"F8",66,"F8",119,"VK_F8",e,e],[67,1,72,"F9",67,"F9",120,"VK_F9",e,e],[68,1,73,"F10",68,"F10",121,"VK_F10",e,e],[69,1,74,"F11",69,"F11",122,"VK_F11",e,e],[70,1,75,"F12",70,"F12",123,"VK_F12",e,e],[0,1,76,"PrintScreen",0,e,0,e,e,e],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",e,e],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[14,1,80,"Home",14,"Home",36,"VK_HOME",e,e],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[13,1,83,"End",13,"End",35,"VK_END",e,e],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",e,e],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",e,e],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",e,e],[3,1,94,"NumpadEnter",3,e,0,e,e,e],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",e,e],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",e,e],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",e,e],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",e,e],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",e,e],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",e,e],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",e,e],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",e,e],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",e,e],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",e,e],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",e,e],[58,1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[0,1,108,"Power",0,e,0,e,e,e],[0,1,109,"NumpadEqual",0,e,0,e,e,e],[71,1,110,"F13",71,"F13",124,"VK_F13",e,e],[72,1,111,"F14",72,"F14",125,"VK_F14",e,e],[73,1,112,"F15",73,"F15",126,"VK_F15",e,e],[74,1,113,"F16",74,"F16",127,"VK_F16",e,e],[75,1,114,"F17",75,"F17",128,"VK_F17",e,e],[76,1,115,"F18",76,"F18",129,"VK_F18",e,e],[77,1,116,"F19",77,"F19",130,"VK_F19",e,e],[0,1,117,"F20",0,e,0,"VK_F20",e,e],[0,1,118,"F21",0,e,0,"VK_F21",e,e],[0,1,119,"F22",0,e,0,"VK_F22",e,e],[0,1,120,"F23",0,e,0,"VK_F23",e,e],[0,1,121,"F24",0,e,0,"VK_F24",e,e],[0,1,122,"Open",0,e,0,e,e,e],[0,1,123,"Help",0,e,0,e,e,e],[0,1,124,"Select",0,e,0,e,e,e],[0,1,125,"Again",0,e,0,e,e,e],[0,1,126,"Undo",0,e,0,e,e,e],[0,1,127,"Cut",0,e,0,e,e,e],[0,1,128,"Copy",0,e,0,e,e,e],[0,1,129,"Paste",0,e,0,e,e,e],[0,1,130,"Find",0,e,0,e,e,e],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",e,e],[0,1,136,"KanaMode",0,e,0,e,e,e],[0,0,137,"IntlYen",0,e,0,e,e,e],[0,1,138,"Convert",0,e,0,e,e,e],[0,1,139,"NonConvert",0,e,0,e,e,e],[0,1,140,"Lang1",0,e,0,e,e,e],[0,1,141,"Lang2",0,e,0,e,e,e],[0,1,142,"Lang3",0,e,0,e,e,e],[0,1,143,"Lang4",0,e,0,e,e,e],[0,1,144,"Lang5",0,e,0,e,e,e],[0,1,145,"Abort",0,e,0,e,e,e],[0,1,146,"Props",0,e,0,e,e,e],[0,1,147,"NumpadParenLeft",0,e,0,e,e,e],[0,1,148,"NumpadParenRight",0,e,0,e,e,e],[0,1,149,"NumpadBackspace",0,e,0,e,e,e],[0,1,150,"NumpadMemoryStore",0,e,0,e,e,e],[0,1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[0,1,152,"NumpadMemoryClear",0,e,0,e,e,e],[0,1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[0,1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[0,1,155,"NumpadClear",0,e,0,e,e,e],[0,1,156,"NumpadClearEntry",0,e,0,e,e,e],[5,1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[4,1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[6,1,0,e,6,"Alt",18,"VK_MENU",e,e],[57,1,0,e,57,"Meta",0,"VK_COMMAND",e,e],[5,1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[4,1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[6,1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[57,1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[5,1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[4,1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[6,1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[57,1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[0,1,165,"BrightnessUp",0,e,0,e,e,e],[0,1,166,"BrightnessDown",0,e,0,e,e,e],[0,1,167,"MediaPlay",0,e,0,e,e,e],[0,1,168,"MediaRecord",0,e,0,e,e,e],[0,1,169,"MediaFastForward",0,e,0,e,e,e],[0,1,170,"MediaRewind",0,e,0,e,e,e],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",e,e],[0,1,174,"Eject",0,e,0,e,e,e],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[0,1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[0,1,180,"SelectTask",0,e,0,e,e,e],[0,1,181,"LaunchScreenSaver",0,e,0,e,e,e],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[0,1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[0,1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[0,1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[0,1,189,"ZoomToggle",0,e,0,e,e,e],[0,1,190,"MailReply",0,e,0,e,e,e],[0,1,191,"MailForward",0,e,0,e,e,e],[0,1,192,"MailSend",0,e,0,e,e,e],[109,1,0,e,109,"KeyInComposition",229,e,e,e],[111,1,0,e,111,"ABNT_C2",194,"VK_ABNT_C2",e,e],[91,1,0,e,91,"OEM_8",223,"VK_OEM_8",e,e],[0,1,0,e,0,e,0,"VK_CLEAR",e,e],[0,1,0,e,0,e,0,"VK_KANA",e,e],[0,1,0,e,0,e,0,"VK_HANGUL",e,e],[0,1,0,e,0,e,0,"VK_JUNJA",e,e],[0,1,0,e,0,e,0,"VK_FINAL",e,e],[0,1,0,e,0,e,0,"VK_HANJA",e,e],[0,1,0,e,0,e,0,"VK_KANJI",e,e],[0,1,0,e,0,e,0,"VK_CONVERT",e,e],[0,1,0,e,0,e,0,"VK_NONCONVERT",e,e],[0,1,0,e,0,e,0,"VK_ACCEPT",e,e],[0,1,0,e,0,e,0,"VK_MODECHANGE",e,e],[0,1,0,e,0,e,0,"VK_SELECT",e,e],[0,1,0,e,0,e,0,"VK_PRINT",e,e],[0,1,0,e,0,e,0,"VK_EXECUTE",e,e],[0,1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[0,1,0,e,0,e,0,"VK_HELP",e,e],[0,1,0,e,0,e,0,"VK_APPS",e,e],[0,1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[0,1,0,e,0,e,0,"VK_PACKET",e,e],[0,1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_ATTN",e,e],[0,1,0,e,0,e,0,"VK_CRSEL",e,e],[0,1,0,e,0,e,0,"VK_EXSEL",e,e],[0,1,0,e,0,e,0,"VK_EREOF",e,e],[0,1,0,e,0,e,0,"VK_PLAY",e,e],[0,1,0,e,0,e,0,"VK_ZOOM",e,e],[0,1,0,e,0,e,0,"VK_NONAME",e,e],[0,1,0,e,0,e,0,"VK_PA1",e,e],[0,1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]];let i=[],n=[];for(const e of t){const[t,p,m,f,_,v,b,C,w,y]=e;if(n[m]||(n[m]=!0,d[m]=f,h[f]=m,c[f.toLowerCase()]=m,p&&(u[m]=_,0!==_&&3!==_&&5!==_&&4!==_&&6!==_&&57!==_&&(g[_]=m))),!i[_]){if(i[_]=!0,!v)throw new Error(`String representation missing for key code ${_} around scan code ${f}`);o.define(_,v),s.define(_,w||v),r.define(_,y||w||v)}b&&(a[b]=_),C&&(l[C]=_)}g[3]=46}(),function(e){e.toString=function(e){return o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return r.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||r.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}}(p||(p={}))},66188:(e,t,i)=>{i.d(t,{X4:()=>r,jC:()=>a,xo:()=>s});var n=i(85337);class o{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=i(s);if(null===r)return null;n[o]=l(s,r,this.modifierLabels[e])}return n.join(" ")}}const s=new o({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:n.N({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.N({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.N({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.N({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.N({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.N({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.N({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.N({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),r=new o({ctrlKey:n.N({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.N({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.N({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.N({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:n.N({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.N({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.N({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.N({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.N({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.N({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.N({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.N({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),a=new o({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"});function l(e,t,i){if(null===t)return"";const n=[];return e.ctrlKey&&n.push(i.ctrlKey),e.shiftKey&&n.push(i.shiftKey),e.altKey&&n.push(i.altKey),e.metaKey&&n.push(i.metaKey),""!==t&&n.push(t),n.join(i.separator)}},82095:(e,t,i)=>{i.d(t,{BQ:()=>l,QC:()=>r,X_:()=>a,f1:()=>d,gm:()=>o});var n=i(98147);function o(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new a(0!==n?[s(i,t),s(n,t)]:[s(i,t)])}function s(e,t){const i=!!(2048&e),n=!!(256&e);return new r(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}class r{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=o}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new a([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class a{constructor(e){if(0===e.length)throw(0,n.b1)("parts");this.parts=e}}class l{constructor(e,t,i,n,o,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=o,this.keyAriaLabel=s}}class d{}},48646:(e,t,i)=>{i.d(t,{B9:()=>u,F8:()=>g,JT:()=>f,Jz:()=>v,OF:()=>p,SL:()=>m,Wf:()=>c,XK:()=>_,dk:()=>d});var n=i(32683),o=i(59842);let s=null;function r(e){return null==s||s.trackDisposable(e),e}function a(e){null==s||s.markAsDisposed(e)}function l(e,t){null==s||s.setParent(e,t)}function d(e){return null==s||s.markAsSingleton(e),e}class h extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function c(e){return"function"==typeof e.dispose&&0===e.dispose.length}function u(e){if(o.$.is(e)){let t=[];for(const i of e)if(i)try{i.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new h(t);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function g(...e){const t=p((()=>u(e)));return function(e,t){if(s)for(const i of e)s.setParent(i,t)}(e,t),t}function p(e){const t=r({dispose:(0,n.I)((()=>{a(t),e()}))});return t}class m{constructor(){this._toDispose=new Set,this._isDisposed=!1,r(this)}dispose(){this._isDisposed||(a(this),this._isDisposed=!0,this.clear())}clear(){try{u(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return l(e,this),this._isDisposed?m.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}m.DISABLE_DISPOSED_WARNING=!1;class f{constructor(){this._store=new m,r(this),l(this._store,this)}dispose(){a(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}f.None=Object.freeze({dispose(){}});class _{constructor(){this._isDisposed=!1,r(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),e&&l(e,this),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,a(this),null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e&&l(e,null),e}}class v{constructor(e){this.object=e}dispose(){}}},87022:(e,t,i)=>{i.d(t,{S:()=>o});class n{constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}n.Undefined=new n(void 0);class o{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){let e=this._first;for(;e!==n.Undefined;){const t=e.next;e.prev=n.Undefined,e.next=n.Undefined,e=t}this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==n.Undefined;)yield e.element,e=e.next}}},82173:(e,t,i)=>{i.d(t,{Id:()=>c,Y9:()=>g,z6:()=>m});var n,o,s=i(96024);class r{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){return e.charCodeAt(0)-this._value.charCodeAt(this._pos)}value(){return this._value[this._pos]}}class a{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++)if(46===this._value.charCodeAt(this._to)){if(!e)break;this._from++}else e=!1;return this}cmp(e){return this._caseSensitive?(0,s.TT)(e,this._value,0,e.length,this._from,this._to):(0,s.j_)(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class l{constructor(e=!0,t=!0){this._splitOnBackslash=e,this._caseSensitive=t}reset(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++){const t=this._value.charCodeAt(this._to);if(47===t||this._splitOnBackslash&&92===t){if(!e)break;this._from++}else e=!1}return this}cmp(e){return this._caseSensitive?(0,s.TT)(e,this._value,0,e.length,this._from,this._to):(0,s.j_)(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class d{constructor(e){this._ignorePathCasing=e,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new l(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(1===this._states[this._stateIdx])return(0,s.zY)(e,this._value.scheme);if(2===this._states[this._stateIdx])return(0,s.zY)(e,this._value.authority);if(3===this._states[this._stateIdx])return this._pathIterator.cmp(e);if(4===this._states[this._stateIdx])return(0,s.qu)(e,this._value.query);if(5===this._states[this._stateIdx])return(0,s.qu)(e,this._value.fragment);throw new Error}value(){if(1===this._states[this._stateIdx])return this._value.scheme;if(2===this._states[this._stateIdx])return this._value.authority;if(3===this._states[this._stateIdx])return this._pathIterator.value();if(4===this._states[this._stateIdx])return this._value.query;if(5===this._states[this._stateIdx])return this._value.fragment;throw new Error}}class h{constructor(){this.height=1}rotateLeft(){const e=this.right;return this.right=e.left,e.left=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){const e=this.left;return this.left=e.right,e.right=this,this.updateHeight(),e.updateHeight(),e}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var e,t;return null!==(t=null===(e=this.left)||void 0===e?void 0:e.height)&&void 0!==t?t:0}get heightRight(){var e,t;return null!==(t=null===(e=this.right)||void 0===e?void 0:e.height)&&void 0!==t?t:0}}class c{constructor(e){this._iter=e}static forUris(e=(()=>!1)){return new c(new d(e))}static forStrings(){return new c(new r)}static forConfigKeys(){return new c(new a)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new h,this._root.segment=i.value());const o=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new h,n.left.segment=i.value()),o.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new h,n.right.segment=i.value()),o.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new h,n.mid.segment=i.value()),o.push([0,n]),n=n.mid}}const s=n.value;n.value=t,n.key=e;for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i<-1||i>1){const i=o[e][0],n=o[e+1][0];if(1===i&&1===n)o[e][1]=t.rotateLeft();else if(-1===i&&-1===n)o[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=o[e+1][1]=o[e+1][1].rotateRight(),o[e][1]=t.rotateLeft();else{if(-1!==i||1!==n)throw new Error;t.left=o[e+1][1]=o[e+1][1].rotateLeft(),o[e][1]=t.rotateRight()}if(e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}return s}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),o=[];let s=this._root;for(;s;){const e=n.cmp(s.segment);if(e>0)o.push([-1,s]),s=s.left;else if(e<0)o.push([1,s]),s=s.right;else{if(!n.hasNext())break;n.next(),o.push([0,s]),s=s.mid}}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){const e=this._min(s.right),{key:t,value:i,segment:n}=e;this._delete(e.key,!1),s.key=t,s.value=i,s.segment=n}else{const e=null!==(i=s.left)&&void 0!==i?i:s.right;if(o.length>0){const[t,i]=o[o.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=o[e+1][1]=o[e+1][1].rotateRight()),o[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=o[e+1][1]=o[e+1][1].rotateLeft()),o[e][1]=t.rotateRight()),e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())return i.mid?this._entries(i.mid):void 0;t.next(),i=i.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){e&&(e.left&&(yield*this._entries(e.left)),e.value&&(yield[e.key,e.value]),e.mid&&(yield*this._entries(e.mid)),e.right&&(yield*this._entries(e.right)))}}class u{constructor(e,t){this.uri=e,this.value=t}}class g{constructor(e,t){this[n]="ResourceMap",e instanceof g?(this.map=new Map(e.map),this.toKey=null!=t?t:g.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:g.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),new u(e,t)),this}get(e){var t;return null===(t=this.map.get(this.toKey(e)))||void 0===t?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(let[t,i]of this.map)e(i.value,i.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}}g.defaultToKey=e=>e.toString();class p{constructor(){this[o]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(o=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class m extends p{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},96136:(e,t,i)=>{let n;i.d(t,{Qc:()=>s,Th:()=>o}),e=i.hmd(e),function(){function t(e){n=e()}var i,o;t.amd=!0,i=this,o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function i(e,i){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,i){if(e){if("string"==typeof e)return t(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,i):void 0}}(e))||i&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n={exports:{}};n.exports={defaults:{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:function(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}},changeDefaults:function(e){n.exports.defaults=e}};var o=/[&<>"']/,s=/[&<>"']/g,r=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},d=function(e){return l[e]},h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(e){return e.replace(h,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var u=/(^|[^\[])\^/g,g=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},f=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t,i){var n=e.length;if(0===n)return"";for(var o=0;o<n;){var s=e.charAt(n-o-1);if(s!==t||i){if(s===t||!i)break;o++}else o++}return e.substr(0,n-o)}var C=function(e,t){if(t){if(o.test(e))return e.replace(s,d)}else if(r.test(e))return e.replace(a,d);return e},w=c,y=function(e){for(var t,i,n=1;n<arguments.length;n++)for(i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},S=b,L=n.exports.defaults,x=S,k=function(e,t){var i=e.replace(/\|/g,(function(e,t,i){for(var n=!1,o=t;--o>=0&&"\\"===i[o];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i[0].trim()||i.shift(),i[i.length-1].trim()||i.pop(),i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i},N=C,D=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var i=e.length,n=0,o=0;o<i;o++)if("\\"===e[o])o++;else if(e[o]===t[0])n++;else if(e[o]===t[1]&&--n<0)return o;return-1};function E(e,t,i,n){var o=t.href,s=t.title?N(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;var a={type:"link",raw:i,href:o,title:s,text:r,tokens:n.inlineTokens(r,[])};return n.state.inLink=!1,a}return{type:"image",raw:i,href:o,title:s,text:N(r)}}var I=function(){function e(e){this.options=e||L}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:x(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=x(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}var o={type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:[]};return this.lexer.inline(o.text,o.tokens),o}},t.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var i=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(i,[]),text:i}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,n,o,s,r,a,l,d,h,c,u=t[1].trim(),g=u.length>1,p={type:"list",raw:"",ordered:g,start:g?+u.slice(0,-1):"",loose:!1,items:[]};u=g?"\\d{1,9}\\"+u.slice(-1):"\\"+u,this.options.pedantic&&(u=g?u:"[*+-]");for(var m=new RegExp("^( {0,3}"+u+")((?: [^\\n]*| *)(?:\\n[^\\n]*)*(?:\\n|$))");e&&!this.rules.block.hr.test(e)&&(t=m.exec(e));){h=t[2].split("\n"),this.options.pedantic?(s=2,c=h[0].trimLeft()):(s=t[2].search(/[^ ]/),s=t[1].length+(s>4?1:s),c=h[0].slice(s-t[1].length)),a=!1,i=t[0],!h[0]&&/^ *$/.test(h[1])&&(i=t[1]+h.slice(0,2).join("\n")+"\n",p.loose=!0,h=[]);var f=new RegExp("^ {0,"+Math.min(3,s-1)+"}(?:[*+-]|\\d{1,9}[.)])");for(r=1;r<h.length;r++){if(d=h[r],this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),f.test(d)){i=t[1]+h.slice(0,r).join("\n")+"\n";break}if(a){if(!(d.search(/[^ ]/)>=s)&&d.trim()){i=t[1]+h.slice(0,r).join("\n")+"\n";break}c+="\n"+d.slice(s)}else d.trim()||(a=!0),d.search(/[^ ]/)>=s?c+="\n"+d.slice(s):c+="\n"+d}p.loose||(l?p.loose=!0:/\n *\n *$/.test(i)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(c))&&(o="[ ] "!==n[0],c=c.replace(/^\[[ xX]\] +/,"")),p.items.push({type:"list_item",raw:i,task:!!n,checked:o,loose:!1,text:c}),p.raw+=i,e=e.slice(i.length)}p.items[p.items.length-1].raw=i.trimRight(),p.items[p.items.length-1].text=c.trimRight(),p.raw=p.raw.trimRight();var _=p.items.length;for(r=0;r<_;r++)this.lexer.state.top=!1,p.items[r].tokens=this.lexer.blockTokens(p.items[r].text,[]),p.items[r].tokens.some((function(e){return"space"===e.type}))&&(p.loose=!0,p.items[r].loose=!0);return p}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t){var i={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(i.type="paragraph",i.text=this.options.sanitizer?this.options.sanitizer(t[0]):N(t[0]),i.tokens=[],this.lexer.inline(i.text,i.tokens)),i}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:k(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,o,s,r,a=i.align.length;for(n=0;n<a;n++)/^ *-+: *$/.test(i.align[n])?i.align[n]="right":/^ *:-+: *$/.test(i.align[n])?i.align[n]="center":/^ *:-+ *$/.test(i.align[n])?i.align[n]="left":i.align[n]=null;for(a=i.rows.length,n=0;n<a;n++)i.rows[n]=k(i.rows[n],i.header.length).map((function(e){return{text:e}}));for(a=i.header.length,o=0;o<a;o++)i.header[o].tokens=[],this.lexer.inlineTokens(i.header[o].text,i.header[o].tokens);for(a=i.rows.length,o=0;o<a;o++)for(r=i.rows[o],s=0;s<r.length;s++)r[s].tokens=[],this.lexer.inlineTokens(r[s].text,r[s].tokens);return i}}},t.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t){var i={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(i.text,i.tokens),i}},t.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t){var i={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(i.text,i.tokens),i}},t.text=function(e){var t=this.rules.block.text.exec(e);if(t){var i={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(i.text,i.tokens),i}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:N(t[1])}},t.tag=function(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):N(t[0]):t[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;var n=x(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var o=D(t[2],"()");if(o>-1){var s=(0===t[0].indexOf("!")?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,s).trim(),t[3]=""}}var r=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);l&&(r=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(i)?r.slice(1):r.slice(1,-1)),E(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0],this.lexer)}},t.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return E(i,n,i[0],this.lexer)}},t.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var o=n[1]||n[2]||"";if(!o||o&&(""===i||this.rules.inline.punctuation.exec(i))){var s,r,a=n[0].length-1,l=a,d=0,h="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);null!=(n=h.exec(t));)if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(r=s.length,n[3]||n[4])l+=r;else if(!((n[5]||n[6])&&a%3)||(a+r)%3){if(!((l-=r)>0)){if(r=Math.min(r,r+l+d),Math.min(a,r)%2){var c=e.slice(1,a+n.index+r);return{type:"em",raw:e.slice(0,a+n.index+r+1),text:c,tokens:this.lexer.inlineTokens(c,[])}}var u=e.slice(2,a+n.index+r-1);return{type:"strong",raw:e.slice(0,a+n.index+r+1),text:u,tokens:this.lexer.inlineTokens(u,[])}}}else d+=r}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return n&&o&&(i=i.substring(1,i.length-1)),i=N(i,!0),{type:"codespan",raw:t[0],text:i}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}},t.autolink=function(e,t){var i,n,o=this.rules.inline.autolink.exec(e);if(o)return n="@"===o[2]?"mailto:"+(i=N(this.options.mangle?t(o[1]):o[1])):i=N(o[1]),{type:"link",raw:o[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},t.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,o;if("@"===i[2])o="mailto:"+(n=N(this.options.mangle?t(i[0]):i[0]));else{var s;do{s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(s!==i[0]);n=N(i[0]),o="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t){var i,n=this.rules.inline.text.exec(e);if(n)return i=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):N(n[0]):n[0]:N(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:i}},e}(),T={exec:function(){}},M=function(e,t){e=e.source||e,t=t||"";var i={replace:function(t,n){return n=(n=n.source||n).replace(u,"$1"),e=e.replace(t,n),i},getRegex:function(){return new RegExp(e,t)}};return i},R=y,A={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:T,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};A.def=M(A.def).replace("label",A._label).replace("title",A._title).getRegex(),A.bullet=/(?:[*+-]|\d{1,9}[.)])/,A.listItemStart=M(/^( *)(bull) */).replace("bull",A.bullet).getRegex(),A.list=M(A.list).replace(/bull/g,A.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+A.def.source+")").getRegex(),A._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",A._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,A.html=M(A.html,"i").replace("comment",A._comment).replace("tag",A._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),A.paragraph=M(A._paragraph).replace("hr",A.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",A._tag).getRegex(),A.blockquote=M(A.blockquote).replace("paragraph",A.paragraph).getRegex(),A.normal=R({},A),A.gfm=R({},A.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)\\|?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),A.gfm.table=M(A.gfm.table).replace("hr",A.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",A._tag).getRegex(),A.pedantic=R({},A.normal,{html:M("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",A._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:T,paragraph:M(A.normal._paragraph).replace("hr",A.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",A.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var O={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:T,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:T,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};O.punctuation=M(O.punctuation).replace(/punctuation/g,O._punctuation).getRegex(),O.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,O.escapedEmSt=/\\\*|\\_/g,O._comment=M(A._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),O.emStrong.lDelim=M(O.emStrong.lDelim).replace(/punct/g,O._punctuation).getRegex(),O.emStrong.rDelimAst=M(O.emStrong.rDelimAst,"g").replace(/punct/g,O._punctuation).getRegex(),O.emStrong.rDelimUnd=M(O.emStrong.rDelimUnd,"g").replace(/punct/g,O._punctuation).getRegex(),O._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,O._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,O._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,O.autolink=M(O.autolink).replace("scheme",O._scheme).replace("email",O._email).getRegex(),O._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,O.tag=M(O.tag).replace("comment",O._comment).replace("attribute",O._attribute).getRegex(),O._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,O._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,O._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,O.link=M(O.link).replace("label",O._label).replace("href",O._href).replace("title",O._title).getRegex(),O.reflink=M(O.reflink).replace("label",O._label).getRegex(),O.reflinkSearch=M(O.reflinkSearch,"g").replace("reflink",O.reflink).replace("nolink",O.nolink).getRegex(),O.normal=R({},O),O.pedantic=R({},O.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:M(/^!?\[(label)\]\((.*?)\)/).replace("label",O._label).getRegex(),reflink:M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",O._label).getRegex()}),O.gfm=R({},O.normal,{escape:M(O.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),O.gfm.url=M(O.gfm.url,"i").replace("email",O.gfm._extended_email).getRegex(),O.breaks=R({},O.gfm,{br:M(O.br).replace("{2,}","*").getRegex(),text:M(O.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var P={block:A,inline:O},F=I,B=n.exports.defaults,W=P.block,V=P.inline,H=function(e,t){if(t<1)return"";for(var i="";t>1;)1&t&&(i+=e),t>>=1,e+=e;return i+e};function z(e){return e.replace(/---/g,"—").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function K(e){var t,i,n="",o=e.length;for(t=0;t<o;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}var U=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||B,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var t={block:W.normal,inline:V.normal};this.options.pedantic?(t.block=W.pedantic,t.inline=V.pedantic):this.options.gfm&&(t.block=W.gfm,this.options.breaks?t.inline=V.breaks:t.inline=V.gfm),this.tokenizer.rules=t}t.lex=function(e,i){return new t(i).lex(e)},t.lexInline=function(e,i){return new t(i).inlineTokens(e)};var i,n,o=t.prototype;return o.lex=function(e){var t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens},o.blockTokens=function(e,t){var i,n,o,s,r=this;for(void 0===t&&(t=[]),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(i=n.call({lexer:r},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)}))))if(i=this.tokenizer.space(e))e=e.substring(i.raw.length),i.type&&t.push(i);else if(i=this.tokenizer.code(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?t.push(i):(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.list(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.html(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.def(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(n.raw+="\n"+i.raw,n.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.table(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.lheading(e))e=e.substring(i.raw.length),t.push(i);else if(o=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,i=e.slice(1),n=void 0;r.options.extensions.startBlock.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}(),this.state.top&&(i=this.tokenizer.paragraph(o)))n=t[t.length-1],s&&"paragraph"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i),s=o.length!==e.length,e=e.substring(i.raw.length);else if(i=this.tokenizer.text(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return this.state.top=!0,t},o.inline=function(e,t){this.inlineQueue.push({src:e,tokens:t})},o.inlineTokens=function(e,t){var i,n,o,s=this;void 0===t&&(t=[]);var r,a,l,d=e;if(this.tokens.links){var h=Object.keys(this.tokens.links);if(h.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(d));)h.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(d=d.slice(0,r.index)+"["+H("a",r[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(d));)d=d.slice(0,r.index)+"["+H("a",r[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(d));)d=d.slice(0,r.index)+"++"+d.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(i=n.call({lexer:s},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)}))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,d,l))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e,K))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e,K))){if(o=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,i=e.slice(1),n=void 0;s.options.extensions.startInline.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}(),i=this.tokenizer.inlineText(o,z))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(l=i.raw.slice(-1)),a=!0,(n=t[t.length-1])&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(i.raw.length),t.push(i);return t},i=t,n=[{key:"rules",get:function(){return{block:W,inline:V}}}],null&&e(i.prototype,null),n&&e(i,n),t}(),j=n.exports.defaults,$=function(e,t,i){if(e){var n;try{n=decodeURIComponent(c(i)).replace(g,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!p.test(i)&&(i=function(e,t){m[" "+e]||(f.test(e)?m[" "+e]=e+"/":m[" "+e]=b(e,"/",!0));var i=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(_,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(v,"$1")+t:e+t}(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(e){return null}return i},q=C,Z=function(){function e(e){this.options=e||j}var t=e.prototype;return t.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,n);null!=o&&o!==e&&(i=!0,e=o)}return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="'+this.options.langPrefix+q(n,!0)+'">'+(i?e:q(e,!0))+"</code></pre>\n":"<pre><code>"+(i?e:q(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,i,n){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+n.slug(i)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"</"+n+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"</"+i+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,i){if(null===(e=$(this.options.sanitize,this.options.baseUrl,e)))return i;var n='<a href="'+q(e)+'"';return t&&(n+=' title="'+t+'"'),n+">"+i+"</a>"},t.image=function(e,t,i){if(null===(e=$(this.options.sanitize,this.options.baseUrl,e)))return i;var n='<img src="'+e+'" alt="'+i+'"';return t&&(n+=' title="'+t+'"'),n+(this.options.xhtml?"/>":">")},t.text=function(e){return e},e}(),G=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),Q=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),Y=Z,J=G,X=Q,ee=n.exports.defaults,te=w,ie=function(){function e(e){this.options=e||ee,this.options.renderer=this.options.renderer||new Y,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new J,this.slugger=new X}e.parse=function(t,i){return new e(i).parse(t)},e.parseInline=function(t,i){return new e(i).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var i,n,o,s,r,a,l,d,h,c,u,g,p,m,f,_,v,b,C,w="",y=e.length;for(i=0;i<y;i++)if(c=e[i],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[c.type])||!1===(C=this.options.extensions.renderers[c.type].call({parser:this},c))&&["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type))switch(c.type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(c.tokens),c.depth,te(this.parseInline(c.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(c.text,c.lang,c.escaped);continue;case"table":for(d="",l="",s=c.header.length,n=0;n<s;n++)l+=this.renderer.tablecell(this.parseInline(c.header[n].tokens),{header:!0,align:c.align[n]});for(d+=this.renderer.tablerow(l),h="",s=c.rows.length,n=0;n<s;n++){for(l="",r=(a=c.rows[n]).length,o=0;o<r;o++)l+=this.renderer.tablecell(this.parseInline(a[o].tokens),{header:!1,align:c.align[o]});h+=this.renderer.tablerow(l)}w+=this.renderer.table(d,h);continue;case"blockquote":h=this.parse(c.tokens),w+=this.renderer.blockquote(h);continue;case"list":for(u=c.ordered,g=c.start,p=c.loose,s=c.items.length,h="",n=0;n<s;n++)_=(f=c.items[n]).checked,v=f.task,m="",f.task&&(b=this.renderer.checkbox(_),p?f.tokens.length>0&&"paragraph"===f.tokens[0].type?(f.tokens[0].text=b+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&"text"===f.tokens[0].tokens[0].type&&(f.tokens[0].tokens[0].text=b+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(f.tokens,p),h+=this.renderer.listitem(m,v,_);w+=this.renderer.list(h,u,g);continue;case"html":w+=this.renderer.html(c.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(c.tokens));continue;case"text":for(h=c.tokens?this.parseInline(c.tokens):c.text;i+1<y&&"text"===e[i+1].type;)h+="\n"+((c=e[++i]).tokens?this.parseInline(c.tokens):c.text);w+=t?this.renderer.paragraph(h):h;continue;default:var S='Token with "'+c.type+'" type was not found.';if(this.options.silent)return void console.error(S);throw new Error(S)}else w+=C||"";return w},t.parseInline=function(e,t){t=t||this.renderer;var i,n,o,s="",r=e.length;for(i=0;i<r;i++)if(n=e[i],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type])||!1===(o=this.options.extensions.renderers[n.type].call({parser:this},n))&&["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type))switch(n.type){case"escape":case"text":s+=t.text(n.text);break;case"html":s+=t.html(n.text);break;case"link":s+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":s+=t.image(n.href,n.title,n.text);break;case"strong":s+=t.strong(this.parseInline(n.tokens,t));break;case"em":s+=t.em(this.parseInline(n.tokens,t));break;case"codespan":s+=t.codespan(n.text);break;case"br":s+=t.br();break;case"del":s+=t.del(this.parseInline(n.tokens,t));break;default:var a='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(a);throw new Error(a)}else s+=o||"";return s},e}(),ne=U,oe=ie,se=I,re=Z,ae=G,le=Q,de=y,he=function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},ce=C,ue=n.exports.getDefaults,ge=n.exports.changeDefaults,pe=n.exports.defaults;function me(e,t,i){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(i=t,t=null),t=de({},me.defaults,t||{}),he(t),i){var n,o=t.highlight;try{n=ne.lex(e,t)}catch(e){return i(e)}var s=function(e){var s;if(!e)try{t.walkTokens&&me.walkTokens(n,t.walkTokens),s=oe.parse(n,t)}catch(t){e=t}return t.highlight=o,e?i(e):i(null,s)};if(!o||o.length<3)return s();if(delete t.highlight,!n.length)return s();var r=0;return me.walkTokens(n,(function(e){"code"===e.type&&(r++,setTimeout((function(){o(e.text,e.lang,(function(t,i){if(t)return s(t);null!=i&&i!==e.text&&(e.text=i,e.escaped=!0),0==--r&&s()}))}),0))})),void(0===r&&s())}try{var a=ne.lex(e,t);return t.walkTokens&&me.walkTokens(a,t.walkTokens),oe.parse(a,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+ce(e.message+"",!0)+"</pre>";throw e}}return me.options=me.setOptions=function(e){return de(me.defaults,e),ge(me.defaults),me},me.getDefaults=ue,me.defaults=pe,me.use=function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var o,s=de.apply(void 0,[{}].concat(i)),r=me.defaults.extensions||{renderers:{},childTokens:{}};i.forEach((function(t){if(t.extensions&&(o=!0,t.extensions.forEach((function(e){if(!e.name)throw new Error("extension name required");if(e.renderer){var t=r.renderers?r.renderers[e.name]:null;r.renderers[e.name]=t?function(){for(var i=arguments.length,n=new Array(i),o=0;o<i;o++)n[o]=arguments[o];var s=e.renderer.apply(this,n);return!1===s&&(s=t.apply(this,n)),s}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");r[e.level]?r[e.level].unshift(e.tokenizer):r[e.level]=[e.tokenizer],e.start&&("block"===e.level?r.startBlock?r.startBlock.push(e.start):r.startBlock=[e.start]:"inline"===e.level&&(r.startInline?r.startInline.push(e.start):r.startInline=[e.start]))}e.childTokens&&(r.childTokens[e.name]=e.childTokens)}))),t.renderer&&function(){var e=me.defaults.renderer||new re,i=function(i){var n=e[i];e[i]=function(){for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];var a=t.renderer[i].apply(e,s);return!1===a&&(a=n.apply(e,s)),a}};for(var n in t.renderer)i(n);s.renderer=e}(),t.tokenizer&&function(){var e=me.defaults.tokenizer||new se,i=function(i){var n=e[i];e[i]=function(){for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];var a=t.tokenizer[i].apply(e,s);return!1===a&&(a=n.apply(e,s)),a}};for(var n in t.tokenizer)i(n);s.tokenizer=e}(),t.walkTokens){var i=me.defaults.walkTokens;s.walkTokens=function(n){t.walkTokens.call(e,n),i&&i(n)}}o&&(s.extensions=r),me.setOptions(s)}))},me.walkTokens=function(e,t){for(var n,o=function(){var e=n.value;switch(t(e),e.type){case"table":for(var o,s=i(e.header);!(o=s()).done;){var r=o.value;me.walkTokens(r.tokens,t)}for(var a,l=i(e.rows);!(a=l()).done;)for(var d,h=i(a.value);!(d=h()).done;){var c=d.value;me.walkTokens(c.tokens,t)}break;case"list":me.walkTokens(e.items,t);break;default:me.defaults.extensions&&me.defaults.extensions.childTokens&&me.defaults.extensions.childTokens[e.type]?me.defaults.extensions.childTokens[e.type].forEach((function(i){me.walkTokens(e[i],t)})):e.tokens&&me.walkTokens(e.tokens,t)}},s=i(e);!(n=s()).done;)o()},me.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=de({},me.defaults,t||{}),he(t);try{var i=ne.lexInline(e,t);return t.walkTokens&&me.walkTokens(i,t.walkTokens),oe.parseInline(i,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+ce(e.message+"",!0)+"</pre>";throw e}},me.Parser=oe,me.parser=oe.parse,me.Renderer=re,me.TextRenderer=ae,me.Lexer=ne,me.lexer=ne.lex,me.Tokenizer=se,me.Slugger=le,me.parse=me,me},"object"==typeof exports?e.exports=o():t.amd?t(o):(i="undefined"!=typeof globalThis?globalThis:i||self).marked=o()}(),n.Parser,n.parser;var o=n.Renderer,s=(n.TextRenderer,n.Lexer,n.lexer,n.Tokenizer,n.Slugger,n.parse)},32094:(e,t,i)=>{i.d(t,{Q:()=>s});var n=i(3355),o=i(51732);function s(e){let t=JSON.parse(e);return t=r(t),t}function r(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return o.o.revive(e);case 2:return new RegExp(e.source,e.flags)}if(e instanceof n.KN||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i<e.length;++i)e[i]=r(e[i],t+1);else for(const i in e)Object.hasOwnProperty.call(e,i)&&(e[i]=r(e[i],t+1))}return e}},73543:(e,t,i)=>{i.d(t,{G8:()=>p,bS:()=>g,sA:()=>u,vW:()=>n});var n,o=i(15284),s=i(31633),r=i(67802),a=i(82219),l=i(96024);!function(e){e.text="text/plain",e.binary="application/octet-stream",e.unknown="application/unknown",e.markdown="text/markdown",e.latex="text/latex"}(n||(n={}));let d=[],h=[],c=[];function u(e,t=!1){const i=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,o.Qc)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(r.KR.sep)>=0}}(e);d.push(i),i.userConfigured?c.push(i):h.push(i),t&&!i.userConfigured&&d.forEach((e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))}))}function g(e){e?(d=d.filter((e=>!e.userConfigured)),c=[]):(d=[],h=[],c=[])}function p(e,t){let i;if(e)switch(e.scheme){case s.lg.file:i=e.fsPath;break;case s.lg.data:i=a.Vb.parseMetaData(e).get(a.Vb.META_DATA_LABEL);break;default:i=e.path}if(!i)return[n.unknown];i=i.toLowerCase();const o=(0,r.EZ)(i),u=m(i,o,c);if(u)return[u,n.text];const g=m(i,o,h);if(g)return[g,n.text];if(t){const e=function(e){if((0,l.uS)(e)&&(e=e.substr(1)),e.length>0)for(let t=d.length-1;t>=0;t--){const i=d[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i.mime}return null}(t);if(e)return[e,n.text]}return[n.unknown]}function m(e,t,i){var n;let o=null,s=null,r=null;for(let a=i.length-1;a>=0;a--){const l=i[a];if(t===l.filenameLowercase){o=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const i=l.filepatternOnPath?e:t;(null===(n=l.filepatternLowercase)||void 0===n?void 0:n.call(l,i))&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&t.endsWith(l.extensionLowercase)&&(r=l)}return o?o.mime:s?s.mime:r?r.mime:null}},31633:(e,t,i)=>{i.d(t,{Gi:()=>l,WX:()=>r,lg:()=>n});var n,o=i(84483),s=i(51732);!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractive="vscode-interactive",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp"}(n||(n={}));const r=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&(i=`[${i}]`);const r=this._ports[t],a=this._connectionTokens[t];let l=`path=${encodeURIComponent(e.path)}`;return"string"==typeof a&&(l+=`&tkn=${encodeURIComponent(a)}`),s.o.from({scheme:o.$L?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${r}`,path:"/vscode-remote-resource",query:l})}};class a{asBrowserUri(e,t){const i=this.toUri(e,t);return i.scheme===n.vscodeRemote?r.rewrite(i):i.scheme===n.file&&(o.tY||"function"==typeof o.li.importScripts&&o.li.origin===`${n.vscodeFileResource}://${a.FALLBACK_AUTHORITY}`)?i.with({scheme:n.vscodeFileResource,authority:i.authority||a.FALLBACK_AUTHORITY,query:null,fragment:null}):i}toUri(e,t){return s.o.isUri(e)?e:s.o.parse(t.toUrl(e))}}a.FALLBACK_AUTHORITY="vscode-app";const l=new a},43758:(e,t,i)=>{function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{n:()=>o,u:()=>n});class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this}get value(){return this._val}}},20620:(e,t,i)=>{i.d(t,{CJ:()=>c,I8:()=>o,_A:()=>s,fS:()=>h,jB:()=>d,rs:()=>a});var n=i(56718);function o(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((i=>{e[i]&&"object"==typeof e[i]?t[i]=o(e[i]):t[i]=e[i]})),t}function s(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(r.call(e,i)){const n=e[i];"object"!=typeof n||Object.isFrozen(n)||t.push(n)}}return e}const r=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if((0,n.Jp)(e))return e;const o=t(e);if(void 0!==o)return o;if((0,n.kJ)(e)){const n=[];for(const o of e)n.push(l(o,t,i));return n}if((0,n.Kn)(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(let o in e)r.call(e,o)&&(n[o]=l(e[o],t,i));return i.delete(e),n}return e}function d(e,t,i=!0){return(0,n.Kn)(e)?((0,n.Kn)(t)&&Object.keys(t).forEach((o=>{o in e?i&&((0,n.Kn)(e[o])&&(0,n.Kn)(t[o])?d(e[o],t[o],i):e[o]=t[o]):e[o]=t[o]})),e):t}function h(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(!h(e[i],t[i]))return!1}else{const o=[];for(n in e)o.push(n);o.sort();const s=[];for(n in t)s.push(n);if(s.sort(),!h(o,s))return!1;for(i=0;i<o.length;i++)if(!h(e[o[i]],t[o[i]]))return!1}return!0}function c(e,t,i){const n=t(e);return void 0===n?i:n}},67802:(e,t,i)=>{i.d(t,{EZ:()=>x,XX:()=>L,DZ:()=>k,Fv:()=>w,KR:()=>C,Gf:()=>S,DB:()=>y,ir:()=>N,Ku:()=>b});var n=i(84483);let o;if(void 0!==n.li.vscode&&void 0!==n.li.vscode.process){const e=n.li.vscode.process;o={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd(),nextTick:e=>(0,n.xS)(e)}}else o="undefined"!=typeof process?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd(),nextTick:e=>process.nextTick(e)}:{get platform(){return n.ED?"win32":n.dz?"darwin":"linux"},get arch(){},nextTick:e=>(0,n.xS)(e),get env(){return{}},cwd:()=>"/"};const s=o.cwd,r=o.env,a=o.platform,l=46,d=47,h=92,c=58;class u extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${o} ${n} of type ${t}`;s+=". Received type "+typeof i,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function g(e,t){if("string"!=typeof e)throw new u(t,"string",e)}function p(e){return e===d||e===h}function m(e){return e===d}function f(e){return e>=65&&e<=90||e>=97&&e<=122}function _(e,t,i,n){let o="",s=0,r=-1,a=0,h=0;for(let c=0;c<=e.length;++c){if(c<e.length)h=e.charCodeAt(c);else{if(n(h))break;h=d}if(n(h)){if(r===c-1||1===a);else if(2===a){if(o.length<2||2!==s||o.charCodeAt(o.length-1)!==l||o.charCodeAt(o.length-2)!==l){if(o.length>2){const e=o.lastIndexOf(i);-1===e?(o="",s=0):(o=o.slice(0,e),s=o.length-1-o.lastIndexOf(i)),r=c,a=0;continue}if(0!==o.length){o="",s=0,r=c,a=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",s=2)}else o.length>0?o+=`${i}${e.slice(r+1,c)}`:o=e.slice(r+1,c),s=c-r-1;r=c,a=0}else h===l&&-1!==a?++a:a=-1}return o}function v(e,t){if(null===t||"object"!=typeof t)throw new u("pathObject","Object",t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const b={resolve(...e){let t="",i="",n=!1;for(let o=e.length-1;o>=-1;o--){let a;if(o>=0){if(a=e[o],g(a,"path"),0===a.length)continue}else 0===t.length?a=s():(a=r[`=${t}`]||s(),(void 0===a||a.slice(0,2).toLowerCase()!==t.toLowerCase()&&a.charCodeAt(2)===h)&&(a=`${t}\\`));const l=a.length;let d=0,u="",m=!1;const _=a.charCodeAt(0);if(1===l)p(_)&&(d=1,m=!0);else if(p(_))if(m=!0,p(a.charCodeAt(1))){let e=2,t=e;for(;e<l&&!p(a.charCodeAt(e));)e++;if(e<l&&e!==t){const i=a.slice(t,e);for(t=e;e<l&&p(a.charCodeAt(e));)e++;if(e<l&&e!==t){for(t=e;e<l&&!p(a.charCodeAt(e));)e++;e!==l&&e===t||(u=`\\\\${i}\\${a.slice(t,e)}`,d=e)}}}else d=1;else f(_)&&a.charCodeAt(1)===c&&(u=a.slice(0,2),d=2,l>2&&p(a.charCodeAt(2))&&(m=!0,d=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(i=`${a.slice(d)}\\${i}`,n=m,m&&t.length>0)break}return i=_(i,!n,"\\",p),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){g(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const s=e.charCodeAt(0);if(1===t)return m(s)?"\\":e;if(p(s))if(o=!0,p(e.charCodeAt(1))){let o=2,s=o;for(;o<t&&!p(e.charCodeAt(o));)o++;if(o<t&&o!==s){const r=e.slice(s,o);for(s=o;o<t&&p(e.charCodeAt(o));)o++;if(o<t&&o!==s){for(s=o;o<t&&!p(e.charCodeAt(o));)o++;if(o===t)return`\\\\${r}\\${e.slice(s)}\\`;o!==s&&(i=`\\\\${r}\\${e.slice(s,o)}`,n=o)}}}else n=1;else f(s)&&e.charCodeAt(1)===c&&(i=e.slice(0,2),n=2,t>2&&p(e.charCodeAt(2))&&(o=!0,n=3));let r=n<t?_(e.slice(n),!o,"\\",p):"";return 0!==r.length||o||(r="."),r.length>0&&p(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?o?`\\${r}`:r:o?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){g(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return p(i)||t>2&&f(i)&&e.charCodeAt(1)===c&&p(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n<e.length;++n){const o=e[n];g(o,"path"),o.length>0&&(void 0===t?t=i=o:t+=`\\${o}`)}if(void 0===t)return".";let n=!0,o=0;if("string"==typeof i&&p(i.charCodeAt(0))){++o;const e=i.length;e>1&&p(i.charCodeAt(1))&&(++o,e>2&&(p(i.charCodeAt(2))?++o:n=!1))}if(n){for(;o<t.length&&p(t.charCodeAt(o));)o++;o>=2&&(t=`\\${t.slice(o)}`)}return b.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";const i=b.resolve(e),n=b.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let o=0;for(;o<e.length&&e.charCodeAt(o)===h;)o++;let s=e.length;for(;s-1>o&&e.charCodeAt(s-1)===h;)s--;const r=s-o;let a=0;for(;a<t.length&&t.charCodeAt(a)===h;)a++;let l=t.length;for(;l-1>a&&t.charCodeAt(l-1)===h;)l--;const d=l-a,c=r<d?r:d;let u=-1,p=0;for(;p<c;p++){const i=e.charCodeAt(o+p);if(i!==t.charCodeAt(a+p))break;i===h&&(u=p)}if(p!==c){if(-1===u)return n}else{if(d>c){if(t.charCodeAt(a+p)===h)return n.slice(a+p+1);if(2===p)return n.slice(a+p)}r>c&&(e.charCodeAt(o+p)===h?u=p:2===p&&(u=3)),-1===u&&(u=0)}let m="";for(p=o+u+1;p<=s;++p)p!==s&&e.charCodeAt(p)!==h||(m+=0===m.length?"..":"\\..");return a+=u,m.length>0?`${m}${n.slice(a,l)}`:(n.charCodeAt(a)===h&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=b.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===h){if(t.charCodeAt(1)===h){const e=t.charCodeAt(2);if(63!==e&&e!==l)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(f(t.charCodeAt(0))&&t.charCodeAt(1)===c&&t.charCodeAt(2)===h)return`\\\\?\\${t}`;return e},dirname(e){g(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return p(o)?e:".";if(p(o)){if(i=n=1,p(e.charCodeAt(1))){let o=2,s=o;for(;o<t&&!p(e.charCodeAt(o));)o++;if(o<t&&o!==s){for(s=o;o<t&&p(e.charCodeAt(o));)o++;if(o<t&&o!==s){for(s=o;o<t&&!p(e.charCodeAt(o));)o++;if(o===t)return e;o!==s&&(i=n=o+1)}}}}else f(o)&&e.charCodeAt(1)===c&&(i=t>2&&p(e.charCodeAt(2))?3:2,n=i);let s=-1,r=!0;for(let i=t-1;i>=n;--i)if(p(e.charCodeAt(i))){if(!r){s=i;break}}else r=!1;if(-1===s){if(-1===i)return".";s=i}return e.slice(0,s)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,o=-1,s=!0;if(e.length>=2&&f(e.charCodeAt(0))&&e.charCodeAt(1)===c&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(p(l)){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(p(e.charCodeAt(i))){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){g(e,"path");let t=0,i=-1,n=0,o=-1,s=!0,r=0;e.length>=2&&e.charCodeAt(1)===c&&f(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(p(t)){if(!s){n=a+1;break}}else-1===o&&(s=!1,o=a+1),t===l?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===o||0===r||1===r&&i===o-1&&i===n+1?"":e.slice(i,o)},format:v.bind(null,"\\"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return p(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(p(o)){if(n=1,p(e.charCodeAt(1))){let t=2,o=t;for(;t<i&&!p(e.charCodeAt(t));)t++;if(t<i&&t!==o){for(o=t;t<i&&p(e.charCodeAt(t));)t++;if(t<i&&t!==o){for(o=t;t<i&&!p(e.charCodeAt(t));)t++;t===i?n=t:t!==o&&(n=t+1)}}}}else if(f(o)&&e.charCodeAt(1)===c){if(i<=2)return t.root=t.dir=e,t;if(n=2,p(e.charCodeAt(2))){if(3===i)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let s=-1,r=n,a=-1,d=!0,h=e.length-1,u=0;for(;h>=n;--h)if(o=e.charCodeAt(h),p(o)){if(!d){r=h+1;break}}else-1===a&&(d=!1,a=h+1),o===l?-1===s?s=h:1!==u&&(u=1):-1!==s&&(u=-1);return-1!==a&&(-1===s||0===u||1===u&&s===a-1&&s===r+1?t.base=t.name=e.slice(r,a):(t.name=e.slice(r,s),t.base=e.slice(r,a),t.ext=e.slice(s,a))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},C={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:s();g(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===d)}return t=_(t,!i,"/",m),i?`/${t}`:t.length>0?t:"."},normalize(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===d,i=e.charCodeAt(e.length-1)===d;return 0===(e=_(e,!t,"/",m)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(g(e,"path"),e.length>0&&e.charCodeAt(0)===d),join(...e){if(0===e.length)return".";let t;for(let i=0;i<e.length;++i){const n=e[i];g(n,"path"),n.length>0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":C.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";if((e=C.resolve(e))===(t=C.resolve(t)))return"";const i=e.length,n=i-1,o=t.length-1,s=n<o?n:o;let r=-1,a=0;for(;a<s;a++){const i=e.charCodeAt(1+a);if(i!==t.charCodeAt(1+a))break;i===d&&(r=a)}if(a===s)if(o>s){if(t.charCodeAt(1+a)===d)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>s&&(e.charCodeAt(1+a)===d?r=a:0===a&&(r=0));let l="";for(a=1+r+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==d||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+r)}`},toNamespacedPath:e=>e,dirname(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===d;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===d){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===d){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===d){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){g(e,"path");let t=-1,i=0,n=-1,o=!0,s=0;for(let r=e.length-1;r>=0;--r){const a=e.charCodeAt(r);if(a!==d)-1===n&&(o=!1,n=r+1),a===l?-1===t?t=r:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){i=r+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===i+1?"":e.slice(t,n)},format:v.bind(null,"/"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===d;let n;i?(t.root="/",n=1):n=0;let o=-1,s=0,r=-1,a=!0,h=e.length-1,c=0;for(;h>=n;--h){const t=e.charCodeAt(h);if(t!==d)-1===r&&(a=!1,r=h+1),t===l?-1===o?o=h:1!==c&&(c=1):-1!==o&&(c=-1);else if(!a){s=h+1;break}}if(-1!==r){const n=0===s&&i?1:s;-1===o||0===c||1===c&&o===r-1&&o===s+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,o),t.base=e.slice(n,r),t.ext=e.slice(o,r))}return s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};C.win32=b.win32=b,C.posix=b.posix=C;const w="win32"===a?b.normalize:C.normalize,y="win32"===a?b.resolve:C.resolve,S="win32"===a?b.relative:C.relative,L="win32"===a?b.dirname:C.dirname,x="win32"===a?b.basename:C.basename,k="win32"===a?b.extname:C.extname,N="win32"===a?b.sep:C.sep},84483:(e,t,i)=>{var n;i.d(t,{$L:()=>L,ED:()=>C,IJ:()=>y,OS:()=>D,WE:()=>k,dz:()=>w,gn:()=>x,li:()=>f,r:()=>T,tY:()=>S,xS:()=>N});const o="en";let s,r,a=!1,l=!1,d=!1,h=!1,c=!1,u=!1,g=!1,p=null,m=null;const f="object"==typeof self?self:"object"==typeof i.g?i.g:{};let _;void 0!==f.vscode&&void 0!==f.vscode.process?_=f.vscode.process:"undefined"!=typeof process&&(_=process);const v="string"==typeof(null===(n=null==_?void 0:_.versions)||void 0===n?void 0:n.electron)&&"renderer"===_.type;if("object"!=typeof navigator||v)if("object"==typeof _){a="win32"===_.platform,l="darwin"===_.platform,d="linux"===_.platform,h=d&&!!_.env.SNAP&&!!_.env.SNAP_REVISION,s=o,p=o;const e=_.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];s=t.locale,p=i||o,m=t._translationsConfigFile}catch(e){}c=!0}else console.error("Unable to resolve platform.");else r=navigator.userAgent,a=r.indexOf("Windows")>=0,l=r.indexOf("Macintosh")>=0,g=(r.indexOf("Macintosh")>=0||r.indexOf("iPad")>=0||r.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,d=r.indexOf("Linux")>=0,u=!0,s=navigator.language,p=s;let b=0;l?b=1:a?b=3:d&&(b=2);const C=a,w=l,y=d,S=c,L=u,x=g,k=r,N=function(){if(f.setImmediate)return f.setImmediate.bind(f);if("function"==typeof f.postMessage&&!f.importScripts){let e=[];f.addEventListener("message",(t=>{if(t.data&&t.data.vscodeSetImmediateId)for(let i=0,n=e.length;i<n;i++){const n=e[i];if(n.id===t.data.vscodeSetImmediateId)return e.splice(i,1),void n.callback()}}));let t=0;return i=>{const n=++t;e.push({id:n,callback:i}),f.postMessage({vscodeSetImmediateId:n},"*")}}if("function"==typeof(null==_?void 0:_.nextTick))return _.nextTick.bind(_);const e=Promise.resolve();return t=>e.then(t)}(),D=l||g?2:a?1:3;let E=!0,I=!1;function T(){if(!I){I=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);E=513===t[0]}return E}},45706:(e,t,i)=>{var n;i.d(t,{e:()=>n}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},s={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(s)||n.push(s),n}}(n||(n={}))},82219:(e,t,i)=>{i.d(t,{AH:()=>m,EZ:()=>u,Hx:()=>c,SF:()=>d,Vb:()=>_,Vo:()=>p,XX:()=>g,Xy:()=>h,i3:()=>f,z_:()=>l});var n=i(80453),o=i(31633),s=i(67802),r=i(96024),a=i(51732);function l(e){return(0,a.q)(e,!0)}const d=new class{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:(0,r.qu)(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}joinPath(e,...t){return a.o.joinPath(e,...t)}basenameOrAuthority(e){return u(e)||e.authority}basename(e){return s.KR.basename(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===o.lg.file?t=a.o.file(s.XX(l(e))).path:(t=s.KR.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===o.lg.file?a.o.file(s.Fv(l(e))).path:s.KR.normalize(e.path),e.with({path:t})}resolvePath(e,t){if(e.scheme===o.lg.file){const i=a.o.file(s.DB(l(e),t));return e.with({authority:i.authority,path:i.path})}return t=n.fn(t),e.with({path:s.KR.resolve(e.path,t)})}}((()=>!1)),h=d.isEqual.bind(d),c=d.basenameOrAuthority.bind(d),u=d.basename.bind(d),g=d.dirname.bind(d),p=d.joinPath.bind(d),m=d.normalizePath.bind(d),f=d.resolvePath.bind(d);var _;!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(_||(_={}))},55924:(e,t,i)=>{i.d(t,{Rm:()=>r});var n=i(77538),o=i(48646);class s{constructor(e,t,i,n,o,s){this._scrollStateBrand=void 0,e|=0,t|=0,i|=0,n|=0,o|=0,s|=0,this.rawScrollLeft=i,this.rawScrollTop=s,e<0&&(e=0),i+e>t&&(i=t-e),i<0&&(i=0),n<0&&(n=0),s+n>o&&(s=o-n),s<0&&(s=0),this.width=e,this.scrollWidth=t,this.scrollLeft=i,this.height=n,this.scrollHeight=o,this.scrollTop=s}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new s(void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new s(this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:o,heightChanged:s,scrollHeightChanged:r,scrollTopChanged:a}}}class r extends o.JT{constructor(e,t){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new n.Q5),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e,this._scheduleAtNextAnimationFrame=t,this._state=new s(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new d(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=d.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*(1-(n=1-t,Math.pow(n,3)));var n}}class d{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let r,a;return e<t?(r=e+.75*i,a=t-.75*i):(r=e-.75*i,a=t+.75*i),n=l(e,r),o=l(a,t),s=.33,function(e){return e<s?n(e/s):o((e-s)/(1-s))}}var n,o,s;return l(e,t)}dispose(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const t=(e-this.startTime)/this.duration;if(t<1){const e=this.scrollLeft(t),i=this.scrollTop(t);return new a(e,i,!1)}return new a(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,t,i){return d.start(e,t,i)}static start(e,t,i){i+=10;const n=Date.now()-10;return new d(e,t,n,i)}}},7474:(e,t,i)=>{i.d(t,{Z:()=>s});var n,o=i(96024);!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(n||(n={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(s){return s?o.qq(t,s)?e.Error:o.qq(i,s)||o.qq("warn",s)?e.Warning:o.qq(n,s)?e.Info:e.Ignore:e.Ignore},e.toString=function(o){switch(o){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(n||(n={}));const s=n},42267:(e,t,i)=>{i.d(t,{G:()=>s});var n=i(84483);const o=n.li.performance&&"function"==typeof n.li.performance.now;class s{constructor(e){this._highResolution=o&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new s(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?n.li.performance.now():Date.now()}}},96024:(e,t,i)=>{function n(e){return!e||"string"!=typeof e||0===e.trim().length}i.d(t,{$i:()=>z,C8:()=>q,GF:()=>g,HO:()=>P,IO:()=>p,K7:()=>$,Kw:()=>Q,LC:()=>_,Mh:()=>D,P1:()=>E,PJ:()=>Y,Qe:()=>K,R1:()=>u,RP:()=>V,S6:()=>J,TT:()=>w,Ut:()=>B,V8:()=>v,WU:()=>s,YK:()=>T,YU:()=>r,ZG:()=>I,ZH:()=>R,ab:()=>U,c1:()=>Z,df:()=>x,ec:()=>a,fi:()=>X,fy:()=>l,j3:()=>d,j_:()=>S,m5:()=>n,mK:()=>L,mr:()=>m,oH:()=>te,oL:()=>h,ok:()=>N,ow:()=>b,qq:()=>k,qu:()=>C,rL:()=>M,uS:()=>G,un:()=>c,uq:()=>f,vH:()=>O,xe:()=>j,zY:()=>y});const o=/{(\d+)}/g;function s(e,...t){return 0===t.length?e:e.replace(o,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function r(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}}))}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t=" "){return h(d(e,t),t)}function d(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function h(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,s=-1;for(;s=e.lastIndexOf(t,o-1),-1!==s&&s+i===o;){if(0===s)return"";o=s}return e.substring(0,o)}function c(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function u(e){return e.replace(/\*/g,"")}function g(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function p(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function m(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function f(e){return e.split(/\r\n|\r|\n/)}function _(e){for(let t=0,i=e.length;t<i;t++){const i=e.charCodeAt(t);if(32!==i&&9!==i)return t}return-1}function v(e,t=0,i=e.length){for(let n=t;n<i;n++){const i=e.charCodeAt(n);if(32!==i&&9!==i)return e.substring(t,n)}return e.substring(t,i)}function b(e,t=e.length-1){for(let i=t;i>=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function C(e,t){return e<t?-1:e>t?1:0}function w(e,t,i=0,n=e.length,o=0,s=t.length){for(;i<n&&o<s;i++,o++){let n=e.charCodeAt(i),s=t.charCodeAt(o);if(n<s)return-1;if(n>s)return 1}const r=n-i,a=s-o;return r<a?-1:r>a?1:0}function y(e,t){return S(e,t,0,e.length,0,t.length)}function S(e,t,i=0,n=e.length,o=0,s=t.length){for(;i<n&&o<s;i++,o++){let r=e.charCodeAt(i),a=t.charCodeAt(o);if(r===a)continue;if(r>=128||a>=128)return w(e.toLowerCase(),t.toLowerCase(),i,n,o,s);L(r)&&(r-=32),L(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=s-o;return r<a?-1:r>a?1:0}function L(e){return e>=97&&e<=122}function x(e){return e>=65&&e<=90}function k(e,t){return e.length===t.length&&0===S(e,t)}function N(e,t){const i=t.length;return!(t.length>e.length)&&0===S(e,t,0,i)}function D(e,t){let i,n=Math.min(e.length,t.length);for(i=0;i<n;i++)if(e.charCodeAt(i)!==t.charCodeAt(i))return i;return n}function E(e,t){let i,n=Math.min(e.length,t.length);const o=e.length-1,s=t.length-1;for(i=0;i<n;i++)if(e.charCodeAt(o-i)!==t.charCodeAt(s-i))return i;return n}function I(e){return 55296<=e&&e<=56319}function T(e){return 56320<=e&&e<=57343}function M(e,t){return t-56320+(e-55296<<10)+65536}function R(e,t,i){const n=e.charCodeAt(i);if(I(n)&&i+1<t){const t=e.charCodeAt(i+1);if(T(t))return M(n,t)}return n}function A(e,t){const i=e.charCodeAt(t-1);if(T(i)&&t>1){const n=e.charCodeAt(t-2);if(I(n))return M(n,i)}return i}function O(e,t){const i=ee.getInstance(),n=t,o=e.length,s=R(e,o,t);t+=s>=65536?2:1;let r=i.getGraphemeBreakType(s);for(;t<o;){const n=R(e,o,t),s=i.getGraphemeBreakType(n);if(X(r,s))break;t+=n>=65536?2:1,r=s}return t-n}function P(e,t){const i=ee.getInstance(),n=t,o=A(e,t);t-=o>=65536?2:1;let s=i.getGraphemeBreakType(o);for(;t>0;){const n=A(e,t),o=i.getGraphemeBreakType(n);if(X(o,s))break;t-=n>=65536?2:1,s=o}return n-t}const F=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function B(e){return F.test(e)}const W=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function V(e){return W.test(e)}const H=/^[\t\n\r\x20-\x7E]*$/;function z(e){return H.test(e)}const K=/[\u2028\u2029]/;function U(e){return K.test(e)}function j(e){for(let t=0,i=e.length;t<i;t++)if($(e.charCodeAt(t)))return!0;return!1}function $(e){return(e=+e)>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function q(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129750}const Z=String.fromCharCode(65279);function G(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function Q(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function Y(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function J(e){return ee.getInstance().getGraphemeBreakType(e)}function X(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class ee{constructor(){this._data=JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}static getInstance(){return ee._INSTANCE||(ee._INSTANCE=new ee),ee._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(e<t[3*n])n*=2;else{if(!(e>t[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function te(e,t){if(0===e)return 0;const i=function(e,t){let i=A(t,e);for(e-=ie(i);ne(i)||65039===i||8419===i;){if(0===e)return;i=A(t,e),e-=ie(i)}if(q(i)){if(e>=0){const i=A(t,e);8205===i&&(e-=ie(i))}return e}}(e,t);return void 0!==i?i:e-ie(A(t,e))}function ie(e){return e>=65536?2:1}function ne(e){return 127995<=e&&e<=127999}ee._INSTANCE=null},56718:(e,t,i)=>{function n(e){return Array.isArray(e)}function o(e){return"string"==typeof e}function s(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function r(e){return"number"==typeof e&&!isNaN(e)}function a(e){return!0===e||!1===e}function l(e){return void 0===e}function d(e){return!h(e)}function h(e){return l(e)||null===e}function c(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function u(e){if(h(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function g(e){return"function"==typeof e}function p(e,t){const i=Math.min(e.length,t.length);for(let n=0;n<i;n++)m(e[n],t[n])}function m(e,t){if(o(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(g(t)){try{if(e instanceof t)return}catch(e){}if(!h(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function f(e){const t=[];for(const i of function(e){let t=[],i=Object.getPrototypeOf(e);for(;Object.prototype!==i;)t=t.concat(Object.getOwnPropertyNames(i)),i=Object.getPrototypeOf(i);return t}(e))"function"==typeof e[i]&&t.push(i);return t}function _(e,t){const i=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let n={};for(const t of e)n[t]=i(t);return n}function v(e){return null===e?void 0:e}function b(e,t="Unreachable"){throw new Error(t)}i.d(t,{$E:()=>f,$K:()=>d,D8:()=>p,HD:()=>o,IU:()=>_,Jp:()=>h,Kn:()=>s,cW:()=>u,f6:()=>v,hj:()=>r,jn:()=>a,kJ:()=>n,mf:()=>g,o8:()=>l,p_:()=>c,vE:()=>b})},21915:(e,t,i)=>{function n(e){return e<0?0:e>255?255:0|e}function o(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,{A:()=>o,K:()=>n})},51732:(e,t,i)=>{i.d(t,{o:()=>u,q:()=>v});var n=i(67802),o=i(84483);const s=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const d="",h="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{constructor(e,t,i,n,o,s=!1){"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,i||d),this.query=n||d,this.fragment=o||d,l(this,s))}static isUri(e){return e instanceof u||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===i?i=this.authority:null===i&&(i=d),void 0===n?n=this.path:null===n&&(n=d),void 0===o?o=this.query:null===o&&(o=d),void 0===s?s=this.fragment:null===s&&(s=d),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&s===this.fragment?this:new p(t,i,n,o,s)}static parse(e,t=!1){const i=c.exec(e);return i?new p(i[2]||d,y(i[4]||d),y(i[5]||d),y(i[7]||d),y(i[9]||d),t):new p(d,d,d,d,d)}static file(e){let t=d;if(o.ED&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){const i=e.indexOf(h,2);-1===i?(t=e.substring(2),e=h):(t=e.substring(2,i),e=e.substring(i)||h)}return new p("file",t,e,d,d)}static from(e){const t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=o.ED&&"file"===e.scheme?u.file(n.Ku.join(v(e,!0),...t)).path:n.KR.join(e.path,...t),e.with({path:i})}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{const t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===g?e.fsPath:null,t}}return e}}const g=o.ED?1:void 0;class p extends u{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(e,t){let i,n=-1;for(let o=0;o<e.length;o++){const s=e.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s)-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));const t=m[s];void 0!==t?(-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),i+=t):-1===n&&(n=o)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function _(e){let t;for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);35===n||63===n?(void 0===t&&(t=e.substr(0,i)),t+=m[n]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function v(e,t){let i;return i=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,o.ED&&(i=i.replace(/\//g,"\\")),i}function b(e,t){const i=t?_:f;let n="",{scheme:o,authority:s,path:r,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(s||"file"===o)&&(n+=h,n+=h),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.indexOf(":"),-1===e?n+=i(t,!1):(n+=i(t.substr(0,e),!1),n+=":",n+=i(t.substr(e+1),!1)),n+="@"}s=s.toLowerCase(),e=s.indexOf(":"),-1===e?n+=i(s,!1):(n+=i(s.substr(0,e),!1),n+=s.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0)}return a&&(n+="?",n+=i(a,!1)),l&&(n+="#",n+=t?l:f(l,!1)),n}function C(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+C(e.substr(3)):e}}const w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function y(e){return e.match(w)?e.replace(w,(e=>C(e))):e}},24556:(e,t,i)=>{i.d(t,{Jq:()=>o,X5:()=>n,jG:()=>s});const n={ctrlCmd:!1,alt:!1};var o,s;!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(o||(o={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(s||(s={}))},34906:(e,t,i)=>{i.d(t,{Mj:()=>n.Mj});var n=i(90850)},69836:(e,t,i)=>{i.d(t,{V:()=>f,P:()=>p});var n=i(23875),o=i(77538),s=i(48646),r=i(84483),a=i(38562);class l{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class d{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=this._bareFontInfo.getMassagedFontFamily(n.G6?a.hL.fontFamily:null),t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";const i=document.createElement("div");i.style.fontFamily=e,i.style.fontWeight=this._bareFontInfo.fontWeight,i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(i);const o=document.createElement("div");o.style.fontFamily=e,o.style.fontWeight="bold",o.style.fontSize=this._bareFontInfo.fontSize+"px",o.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,o.style.lineHeight=this._bareFontInfo.lineHeight+"px",o.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(o);const s=document.createElement("div");s.style.fontFamily=e,s.style.fontWeight=this._bareFontInfo.fontWeight,s.style.fontSize=this._bareFontInfo.fontSize+"px",s.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,s.style.lineHeight=this._bareFontInfo.lineHeight+"px",s.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",s.style.fontStyle="italic",t.appendChild(s);const r=[];for(const e of this._requests){let t;0===e.type&&(t=i),2===e.type&&(t=o),1===e.type&&(t=s),t.appendChild(document.createElement("br"));const n=document.createElement("span");d._render(n,e),t.appendChild(n),r.push(n)}this._container=t,this._testElements=r}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e<t;e++){const t=this._requests[e],i=this._testElements[e];t.fulfill(i.offsetWidth/256)}}}var h=i(76052),c=i(38701),u=i(18146);class g{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map((e=>this._values[e]))}}function p(){m.INSTANCE.clearCache()}class m extends s.JT{constructor(){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._cache=new g,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new g,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readConfiguration(e){if(!this._cache.has(e)){let t=m._actualReadConfiguration(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new u.pR({zoomLevel:n.px(),pixelRatio:n.mX(),fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}static createRequest(e,t,i,n){const o=new l(e,t);return i.push(o),n&&n.push(o),o}static _actualReadConfiguration(e){const t=[],i=[],o=this.createRequest("n",0,t,i),s=this.createRequest("",0,t,null),r=this.createRequest(" ",0,t,i),l=this.createRequest("0",0,t,i),h=this.createRequest("1",0,t,i),c=this.createRequest("2",0,t,i),g=this.createRequest("3",0,t,i),p=this.createRequest("4",0,t,i),m=this.createRequest("5",0,t,i),f=this.createRequest("6",0,t,i),_=this.createRequest("7",0,t,i),v=this.createRequest("8",0,t,i),b=this.createRequest("9",0,t,i),C=this.createRequest("→",0,t,i),w=this.createRequest("→",0,t,null),y=this.createRequest("·",0,t,i),S=this.createRequest(String.fromCharCode(11825),0,t,null),L="|/-_ilm%";for(let e=0,n=8;e<n;e++)this.createRequest(L.charAt(e),0,t,i),this.createRequest(L.charAt(e),1,t,i),this.createRequest(L.charAt(e),2,t,i);!function(e,t){new d(e,t).read()}(e,t);const x=Math.max(l.width,h.width,c.width,g.width,p.width,m.width,f.width,_.width,v.width,b.width);let k=e.fontFeatureSettings===a.n0.OFF;const N=i[0].width;for(let e=1,t=i.length;k&&e<t;e++){const t=N-i[e].width;if(t<-.001||t>.001){k=!1;break}}let D=!0;k&&w.width!==N&&(D=!1),w.width>C.width&&(D=!1);const E=n.WP()>2e3;return new u.pR({zoomLevel:n.px(),pixelRatio:n.mX(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:k,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:D,spaceWidth:r.width,middotWidth:y.width,wsmiddotWidth:S.width,maxDigitWidth:x},E)}}m.INSTANCE=new m;class f extends c.fv{constructor(e,t,i=null,o){super(e,t),this.accessibilityService=o,this._elementSizeObserver=this._register(new h.I(i,t.dimension,(()=>this._recomputeOptions()))),this._register(m.INSTANCE.onDidChange((()=>this._recomputeOptions()))),this._validatedOptions.get(10)&&this._elementSizeObserver.startObserving(),this._register(n.fX((e=>this._recomputeOptions()))),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions()))),this._recomputeOptions()}static applyFontInfoSlow(e,t){e.style.fontFamily=t.getMassagedFontFamily(n.G6?a.hL.fontFamily:null),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}static applyFontInfo(e,t){e.setFontFamily(t.getMassagedFontFamily(n.G6?a.hL.fontFamily:null)),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}observeReferenceElement(e){this._elementSizeObserver.observe(e)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let e="";return n.G6||n.MG||(e+="no-user-select "),n.G6&&(e+="no-minimap-shadow "),r.dz&&(e+="mac "),e}_getEnvConfiguration(){return{extraEditorClassName:f._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:n.Pf||n.vU,pixelRatio:n.mX(),zoomLevel:n.px(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(e){return m.INSTANCE.readConfiguration(e)}}},76052:(e,t,i)=>{i.d(t,{I:()=>o});var n=i(48646);class o extends n.JT{constructor(e,t,i){super(),this.referenceDomElement=e,this.changeCallback=i,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){"undefined"!=typeof ResizeObserver?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver((e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()})),this.resizeObserver.observe(this.referenceDomElement)):-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval((()=>this.observe()),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this.referenceDomElement&&(i=this.referenceDomElement.clientWidth,n=this.referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this.width===i&&this.height===n||(this.width=i,this.height=n,e&&this.changeCallback())}}},83345:(e,t,i)=>{i.d(t,{wk:()=>N,Ox:()=>m});var n=i(85337),o=i(23875),s=i(56718),r=i(40700),a=i(87107),l=i(96615),d=i(80919),h=i(24028),c=i(78891);class u{static columnSelect(e,t,i,n,o,s){let r=Math.abs(o-i)+1,a=i>o,l=n>s,u=n<s,g=[];for(let o=0;o<r;o++){let r=i+(a?-o:o),p=d.io.columnFromVisibleColumn2(e,t,r,n),m=d.io.columnFromVisibleColumn2(e,t,r,s),f=d.io.visibleColumnFromColumn2(e,t,new h.L(r,p)),_=d.io.visibleColumnFromColumn2(e,t,new h.L(r,m));if(u){if(f>s)continue;if(_<n)continue}if(l){if(_>n)continue;if(f<s)continue}g.push(new d.rS(new c.e(r,p,r,p),0,new h.L(r,m),0))}if(0===g.length)for(let e=0;e<r;e++){const n=i+(a?-e:e),o=t.getLineMaxColumn(n);g.push(new d.rS(new c.e(n,o,n,o),0,new h.L(n,o),0))}return{viewStates:g,reversed:a,fromLineNumber:i,fromVisualColumn:n,toLineNumber:o,toVisualColumn:s}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>0&&n--,u.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),s=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=o;i<=s;i++){const o=t.getLineMaxColumn(i),s=d.io.visibleColumnFromColumn2(e,t,new h.L(i,o));n=Math.max(n,s)}let r=i.toViewVisualColumn;return r<n&&r++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,r)}static columnSelectUp(e,t,i,n){const o=n?e.pageSize:1,s=Math.max(1,i.toViewLineNumber-o);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,s,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){const o=n?e.pageSize:1,s=Math.min(t.getLineCount(),i.toViewLineNumber+o);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,s,i.toViewVisualColumn)}}var g,p,m,f=i(52303),_=i(11090),v=i(44884),b=i(51778),C=i(72396),w=i(95272);class y extends a._l{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}}!function(e){e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:function(e){if(!s.Kn(e))return!1;const t=e;return!(!s.HD(t.to)||!s.o8(t.by)&&!s.HD(t.by)||!s.o8(t.value)&&!s.hj(t.value)||!s.o8(t.revealCursor)&&!s.jn(t.revealCursor))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=function(t){let i,n;switch(t.to){case e.RawDirection.Up:i=1;break;case e.RawDirection.Down:i=2;break;default:return null}switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Page:n=3;break;case e.RawUnit.HalfPage:n=4;break;default:n=2}return{direction:i,unit:n,value:Math.floor(t.value||1),revealCursor:!!t.revealCursor,select:!!t.select}}}(g||(g={})),function(e){e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:function(e){if(!s.Kn(e))return!1;const t=e;return!(!s.hj(t.lineNumber)&&!s.HD(t.lineNumber)||!s.o8(t.at)&&!s.HD(t.at))},schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(p||(p={}));class S{constructor(e){e.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(l.$).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(l.$).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){return this.runEditorCommand(e,t,i)||!0}}!function(e){class t extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!0)}}e.MoveTo=(0,a.fK)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.fK)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends y{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,i.viewStates.map((e=>d.Vi.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}e.ColumnSelect=(0,a.fK)(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){const o=e.model.validatePosition(n.position),s=e.coordinatesConverter.validateViewPosition(new h.L(n.viewPosition.lineNumber,n.viewPosition.column),o);let r=n.doColumnSelect?i.fromViewLineNumber:s.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return u.columnSelect(e.cursorConfig,e,r,a,s.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectRight(e.cursorConfig,e,i)}});class s extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=(0,a.fK)(new s({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.fK)(new s({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=(0,a.fK)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.fK)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3596,linux:{primary:0}}}));class m extends y{constructor(){super({id:"cursorMove",precondition:void 0,description:_.N.description})}runCoreEditorCommand(e,t){const i=_.N.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,m._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return _.P.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return _.P.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=m,e.CursorMove=(0,a.fK)(new m);class f extends y{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=(0,a.fK)(new f({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.fK)(new f({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1039}})),e.CursorRight=(0,a.fK)(new f({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.fK)(new f({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1041}})),e.CursorUp=(0,a.fK)(new f({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.fK)(new f({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.fK)(new f({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.fK)(new f({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1035}})),e.CursorDown=(0,a.fK)(new f({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.fK)(new f({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.fK)(new f({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.fK)(new f({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.fK)(new class extends y{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let i;i=t.wholeLine?_.P.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):_.P.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,s=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;i<r;i++){const r=n[i];if((!o||r.modelState.selection.containsPosition(o))&&(!s||r.viewState.selection.containsPosition(s)))return n.splice(i,1),e.model.pushStackElement(),void e.setCursorStates(t.source,3,n)}}n.push(i),e.model.pushStackElement(),e.setCursorStates(t.source,3,n)}}),e.LastCursorMoveToSelect=(0,a.fK)(new class extends y{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0);o[i]=_.P.moveTo(e,n[i],!0,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class v extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToBeginningOfLine(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorHome=(0,a.fK)(new v({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),e.CursorHomeSelect=(0,a.fK)(new v({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class C extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i],o=n.modelState.position.lineNumber;t[i]=d.Vi.fromModelState(n.modelState.move(this._inSelectionMode,o,1,0))}return t}}e.CursorLineStart=(0,a.fK)(new C({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:287}}})),e.CursorLineStartSelect=(0,a.fK)(new C({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:1311}}}));class w extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToEndOfLine(e,e.getCursorStates(),this._inSelectionMode,t.sticky||!1)),e.revealPrimaryCursor(t.source,!0)}}e.CursorEnd=(0,a.fK)(new w({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:0,kbExpr:b.u.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:n.N("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),e.CursorEndSelect=(0,a.fK)(new w({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:0,kbExpr:b.u.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:n.N("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class L extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e,e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e,t){const i=[];for(let n=0,o=t.length;n<o;n++){const o=t[n],s=o.modelState.position.lineNumber,r=e.model.getLineMaxColumn(s);i[n]=d.Vi.fromModelState(o.modelState.move(this._inSelectionMode,s,r,0))}return i}}e.CursorLineEnd=(0,a.fK)(new L({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:291}}})),e.CursorLineEndSelect=(0,a.fK)(new L({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:1315}}}));class x extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToBeginningOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorTop=(0,a.fK)(new x({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2062,mac:{primary:2064}}})),e.CursorTopSelect=(0,a.fK)(new x({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3086,mac:{primary:3088}}}));class k extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToEndOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorBottom=(0,a.fK)(new k({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2061,mac:{primary:2066}}})),e.CursorBottomSelect=(0,a.fK)(new k({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3085,mac:{primary:3090}}}));class N extends y{constructor(){super({id:"editorScroll",precondition:void 0,description:g.description})}runCoreEditorCommand(e,t){const i=g.parse(t);i&&this._runEditorScroll(e,t.source,i)}_runEditorScroll(e,t,i){const n=this._computeDesiredScrollTop(e,i);if(i.revealCursor){const o=e.getCompletelyVisibleViewRangeAtScrollTop(n);e.setCursorStates(t,3,[_.P.findPositionInViewportIfOutside(e,e.getPrimaryCursorState(),o,i.select)])}e.setScrollTop(n,0)}_computeDesiredScrollTop(e,t){if(1===t.unit){const i=e.getCompletelyVisibleViewRange(),n=e.coordinatesConverter.convertViewRangeToModelRange(i);let o;o=1===t.direction?Math.max(1,n.startLineNumber-t.value):Math.min(e.model.getLineCount(),n.startLineNumber+t.value);const s=e.coordinatesConverter.convertModelPositionToViewPosition(new h.L(o,1));return e.getVerticalOffsetForLineNumber(s.lineNumber)}let i;i=3===t.unit?e.cursorConfig.pageSize*t.value:4===t.unit?Math.round(e.cursorConfig.pageSize/2)*t.value:t.value;const n=(1===t.direction?-1:1)*i;return e.getScrollTop()+n*e.cursorConfig.lineHeight}}e.EditorScrollImpl=N,e.EditorScroll=(0,a.fK)(new N),e.ScrollLineUp=(0,a.fK)(new class extends y{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),e.ScrollPageUp=(0,a.fK)(new class extends y{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),e.ScrollLineDown=(0,a.fK)(new class extends y{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),e.ScrollPageDown=(0,a.fK)(new class extends y{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class D extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.word(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position)]),e.revealPrimaryCursor(t.source,!0)}}e.WordSelect=(0,a.fK)(new D({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),e.WordSelectDrag=(0,a.fK)(new D({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),e.LastCursorWordSelect=(0,a.fK)(new class extends y{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0),s=n[i];o[i]=_.P.word(e,s,s.modelState.hasSelection(),t.position),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class E extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.line(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!1)}}e.LineSelect=(0,a.fK)(new E({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),e.LineSelectDrag=(0,a.fK)(new E({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class I extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0);o[i]=_.P.line(e,n[i],this._inSelectionMode,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}}e.LastCursorLineSelect=(0,a.fK)(new I({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),e.LastCursorLineSelectDrag=(0,a.fK)(new I({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),e.ExpandLineSelection=(0,a.fK)(new class extends y{constructor(){super({id:"expandLineSelection",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2090}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.expandLineSelection(e,e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}}),e.CancelSelection=(0,a.fK)(new class extends y{constructor(){super({id:"cancelSelection",precondition:b.u.hasNonEmptySelection,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.cancelSelection(e,e.getPrimaryCursorState())]),e.revealPrimaryCursor(t.source,!0)}}),e.RemoveSecondaryCursors=(0,a.fK)(new class extends y{constructor(){super({id:"removeSecondaryCursors",precondition:b.u.hasMultipleSelections,kbOpts:{weight:1,kbExpr:b.u.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[e.getPrimaryCursorState()]),e.revealPrimaryCursor(t.source,!0),(0,r.i7)(n.N("removedCursor","Removed secondary cursors"))}}),e.RevealLine=(0,a.fK)(new class extends y{constructor(){super({id:"revealLine",precondition:void 0,description:p.description})}runCoreEditorCommand(e,t){const i=t,n=i.lineNumber||0;let o="number"==typeof n?n+1:parseInt(n)+1;o<1&&(o=1);const s=e.model.getLineCount();o>s&&(o=s);const r=new c.e(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case p.RawAtArgument.Top:a=3;break;case p.RawAtArgument.Center:a=1;break;case p.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends S{constructor(){super(a.Sq)}runDOMCommand(){o.vU&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[_.P.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.fK)(new class extends y{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[d.Vi.fromModelSelection(t.selection)])}})}(m||(m={}));const L=C.Ao.and(b.u.textInputFocus,b.u.columnSelection);function x(e,t){w.W.registerKeybindingRule({id:e,primary:t,when:L,weight:1})}function k(e){return e.register(),e}var N;x(m.CursorColumnSelectLeft.id,1039),x(m.CursorColumnSelectRight.id,1041),x(m.CursorColumnSelectUp.id,1040),x(m.CursorColumnSelectPageUp.id,1035),x(m.CursorColumnSelectDown.id,1042),x(m.CursorColumnSelectPageDown.id,1036),function(e){class t extends a._l{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.fK)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.fK)(new class extends t{constructor(){super({id:"outdent",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:C.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.fK)(new class extends t{constructor(){super({id:"tab",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:C.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.fK)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=f.A.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.fK)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=f.A.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends S{constructor(){super(a.n_)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(80))return t.getModel().undo()}},e.Redo=new class extends S{constructor(){super(a.kz)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(80))return t.getModel().redo()}}}(N||(N={}));class D extends a.mY{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(l.$).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function E(e,t){k(new D("default:"+e,e)),k(new D(e,e,t))}E("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),E("replacePreviousChar"),E("compositionType"),E("compositionStart"),E("compositionEnd"),E("paste"),E("cut")},43770:(e,t,i)=>{i.d(t,{Fz:()=>_,Nl:()=>f,RA:()=>m,pd:()=>n});var n,o=i(23875),s=i(48696),r=i(10554),a=i(77538),l=i(48646),d=i(73543),h=i(84483),c=i(96024),u=i(11193),g=i(24028),p=i(87178);!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(n||(n={}));const m={forceCopyWithSyntaxHighlighting:!1};class f{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}f.INSTANCE=new f;class _ extends l.JT{constructor(e,t){super(),this.textArea=t,this._onFocus=this._register(new a.Q5),this.onFocus=this._onFocus.event,this._onBlur=this._register(new a.Q5),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new a.Q5),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new a.Q5),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new a.Q5),this.onCut=this._onCut.event,this._onPaste=this._register(new a.Q5),this.onPaste=this._onPaste.event,this._onType=this._register(new a.Q5),this.onType=this._onType.event,this._onCompositionStart=this._register(new a.Q5),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new a.Q5),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new a.Q5),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new a.Q5),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=e,this._textArea=this._register(new b(t)),this._asyncTriggerCut=this._register(new r.pY((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new r.pY((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=u.un.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let i=null;this._register(s.mu(t.domNode,"keydown",(e=>{(109===e.keyCode||this._isDoingComposition&&1===e.keyCode)&&e.stopPropagation(),e.equals(9)&&e.preventDefault(),i=e,this._onKeyDown.fire(e)}))),this._register(s.mu(t.domNode,"keyup",(e=>{this._onKeyUp.fire(e)}))),this._register(s.nm(t.domNode,"compositionstart",(e=>{if(u.al&&console.log("[compositionstart]",e),!this._isDoingComposition){if(this._isDoingComposition=!0,h.dz&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&(i&&i.equals(109)&&("ArrowRight"===i.code||"ArrowLeft"===i.code)||o.vU))return u.al&&console.log("[compositionstart] Handling long press case on macOS + arrow key or Firefox",e),this._textAreaState=new u.un(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new g.L(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),void this._onCompositionStart.fire({revealDeltaColumns:-1});o.Dt?this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart}):(this._setAndWriteTextAreaState("compositionstart",u.un.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0}))}})));const l=e=>{const t=this._textAreaState,i=u.un.readFromTextArea(this._textArea);return[i,u.un.deduceInput(t,i,e)]},d=()=>{const e=this._textAreaState,t=u.un.readFromTextArea(this._textArea);return[t,u.un.deduceAndroidCompositionInput(e,t)]},p=e=>{const t=this._textAreaState,i=u.un.selectedText(e);return[i,{text:i.value,replacePrevCharCnt:t.selectionEnd-t.selectionStart,replaceNextCharCnt:0,positionDelta:0}]};this._register(s.nm(t.domNode,"compositionupdate",(e=>{if(u.al&&console.log("[compositionupdate]",e),o.Dt){const[t,i]=d();return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const[t,i]=p(e.data||"");this._textAreaState=t,this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(s.nm(t.domNode,"compositionend",(e=>{if(u.al&&console.log("[compositionend]",e),!this._isDoingComposition)return;if(this._isDoingComposition=!1,o.Dt){const[e,t]=d();return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const[t,i]=p(e.data||"");this._textAreaState=t,this._onType.fire(i),(o.i7||o.vU)&&(this._textAreaState=u.un.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()}))),this._register(s.nm(t.domNode,"input",(()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[e,t]=l(h.dz);0===t.replacePrevCharCnt&&1===t.text.length&&c.ZG(t.text.charCodeAt(0))||(this._textAreaState=e,0===this._nextCommand?""===t.text&&0===t.replacePrevCharCnt||this._onType.fire(t):(""===t.text&&0===t.replacePrevCharCnt||this._firePaste(t.text,null),this._nextCommand=0))}))),this._register(s.nm(t.domNode,"cut",(e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(s.nm(t.domNode,"copy",(e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(s.nm(t.domNode,"paste",(e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),v.canUseTextData(e)){const[t,i]=v.getTextData(e);""!==t&&this._firePaste(t,i)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",u.un.EMPTY),this._nextCommand=1}))),this._register(s.nm(t.domNode,"focus",(()=>{const e=this._hasFocus;this._setHasFocus(!0),o.G6&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(s.nm(t.domNode,"blur",(()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(s.nm(t.domNode,n.Tap,(()=>{o.Dt&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return s.nm(document,"selectionchange",(t=>{if(!this._hasFocus)return;if(this._isDoingComposition)return;if(!o.i7)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const r=this._textArea.getValue();if(this._textAreaState.value!==r)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const d=this._textAreaState.deduceEditorPosition(a),h=this._host.deduceModelPosition(d[0],d[1],d[2]),c=this._textAreaState.deduceEditorPosition(l),u=this._host.deduceModelPosition(c[0],c[1],c[2]),g=new p.Y(h.lineNumber,h.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(g)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const e=s.Ay(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):s.Uw(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(v.canUseTextData(e)),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};f.INSTANCE.set(o.vU?t.text.replace(/\r\n/g,"\n"):t.text,i),v.canUseTextData(e)?v.setTextData(e,t.text,t.html,i):this._setAndWriteTextAreaState("copy or cut",u.un.selectedText(t.text))}_firePaste(e,t){t||(t=f.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}class v{static canUseTextData(e){return!!e.clipboardData}static getTextData(e){if(e.clipboardData){e.preventDefault();const t=e.clipboardData.getData(d.vW.text);let i=null;const n=e.clipboardData.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return[t,i]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(e,t,i,n){if(e.clipboardData)return e.clipboardData.setData(d.vW.text,t),"string"==typeof i&&e.clipboardData.setData("text/html",i),e.clipboardData.setData("vscode-editor-data",JSON.stringify(n)),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class b extends l.JT{constructor(e){super(),this._actual=e,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(e,t){const i=this._actual.domNode;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(e,t,i){const n=this._actual.domNode;let r=null;const a=s.Ay(n);r=a?a.activeElement:document.activeElement;const l=r===n,d=n.selectionStart,h=n.selectionEnd;if(l&&d===t&&h===i)o.vU&&window.parent!==window&&n.focus();else{if(l)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(o.vU&&window.parent!==window&&n.focus());try{const e=s.vL(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),s._0(n,e)}catch(e){}}}}},11193:(e,t,i)=>{i.d(t,{al:()=>r,ee:()=>l,un:()=>a});var n=i(96024),o=i(24028),s=i(78891);const r=!1;class a{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=o}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(e){return new a(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new a(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){r&&console.log("writeToTextArea "+e+": "+this.toString()),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;for(;-1!==(o=t.indexOf("\n",o+1));)n++;return[e,i*t.length,n]}static selectedText(e){return new a(e,0,e.length,null,null)}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};r&&(console.log("------------------------deduceInput"),console.log("PREVIOUS STATE: "+e.toString()),console.log("CURRENT STATE: "+t.toString()));let o=e.value,s=e.selectionStart,a=e.selectionEnd,l=t.value,d=t.selectionStart,h=t.selectionEnd;const c=o.substring(a),u=l.substring(h),g=n.P1(c,u);l=l.substring(0,l.length-g),o=o.substring(0,o.length-g);const p=o.substring(0,s),m=l.substring(0,d),f=n.Mh(p,m);if(l=l.substring(f),o=o.substring(f),d-=f,s-=f,h-=f,a-=f,r&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+o+">, selectionStart: "+s+", selectionEnd: "+a),console.log("AFTER DIFFING CURRENT STATE: <"+l+">, selectionStart: "+d+", selectionEnd: "+h)),i&&d===h&&o.length>0){let e=null;if(d===l.length?l.startsWith(o)&&(e=l.substring(o.length)):l.endsWith(o)&&(e=l.substring(0,l.length-o.length)),null!==e&&e.length>0&&(/\uFE0F/.test(e)||n.RP(e)))return{text:e,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(d===h){if(o===l&&0===s&&a===o.length&&d===l.length&&-1===l.indexOf("\n")&&n.xe(l))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const e=p.length-f;return r&&console.log("REMOVE PREVIOUS: "+(p.length-f)+" chars"),{text:l,replacePrevCharCnt:e,replaceNextCharCnt:0,positionDelta:0}}return{text:l,replacePrevCharCnt:a-s,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(r&&(console.log("------------------------deduceAndroidCompositionInput"),console.log("PREVIOUS STATE: "+e.toString()),console.log("CURRENT STATE: "+t.toString())),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(n.Mh(e.value,t.value),e.selectionEnd),o=Math.min(n.P1(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-o),a=t.value.substring(i,t.value.length-o),l=e.selectionStart-i,d=e.selectionEnd-i,h=t.selectionStart-i,c=t.selectionEnd-i;return r&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+s+">, selectionStart: "+l+", selectionEnd: "+d),console.log("AFTER DIFFING CURRENT STATE: <"+a+">, selectionStart: "+h+", selectionEnd: "+c)),{text:a,replacePrevCharCnt:d,replaceNextCharCnt:s.length-d,positionDelta:c-a.length}}}a.EMPTY=new a("",0,0,null,null);class l{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,o=i+t;return new s.e(n,1,o+1,1)}static fromEditorSelection(e,t,i,n,r){const d=l._getPageOfLine(i.startLineNumber,n),h=l._getRangeForPage(d,n),c=l._getPageOfLine(i.endLineNumber,n),u=l._getRangeForPage(c,n),g=h.intersectRanges(new s.e(1,1,i.startLineNumber,i.startColumn));let p=t.getValueInRange(g,1);const m=t.getLineCount(),f=t.getLineMaxColumn(m),_=u.intersectRanges(new s.e(i.endLineNumber,i.endColumn,m,f));let v,b=t.getValueInRange(_,1);if(d===c||d+1===c)v=t.getValueInRange(i,1);else{const e=h.intersectRanges(i),n=u.intersectRanges(i);v=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(n,1)}if(r){const e=500;p.length>e&&(p=p.substring(p.length-e,p.length)),b.length>e&&(b=b.substring(0,e)),v.length>2*e&&(v=v.substring(0,e)+String.fromCharCode(8230)+v.substring(v.length-e,v.length))}return new a(p+v+b,p.length,p.length+v.length,new o.L(i.startLineNumber,i.startColumn),new o.L(i.endLineNumber,i.endColumn))}}},45188:(e,t,i)=>{i.d(t,{yy:()=>f,Dl:()=>_,ZF:()=>b,YQ:()=>v});var n=i(96024),o=i(78891),s=i(28245),r=i(48646),a=i(87107),l=i(72396),d=i(87022),h=i(7978),c=i(82415),u=i(85337);const g=(0,h.yh)("IEditorCancelService"),p=new l.uy("cancellableOperation",!1,(0,u.N)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,c.z)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:p.bindTo(e.get(l.i6)),tokens:new d.S}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},!0);class m extends s.A{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.fK)(new class extends a._l{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(e,t){e.get(g).cancel(t)}});class f{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?n.WU("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof f))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new f(e,this.flags))}}class _ extends m{constructor(e,t,i,n){super(e,n),this._listener=new r.SL,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&o.e.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&o.e.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class v extends s.A{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}class b{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(0!==e.getScrollTop()){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-o}}return new b(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}},40658:(e,t,i)=>{i.d(t,{CL:()=>o,Pi:()=>r,QI:()=>s});var n=i(35389);function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.ICodeEditor}function s(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.IDiffEditor}function r(e){return o(e)?e:s(e)?e.getModifiedEditor():null}},87107:(e,t,i)=>{i.d(t,{AJ:()=>b,QG:()=>E,Qr:()=>N,R6:()=>y,Sq:()=>O,Uc:()=>n,_K:()=>I,_l:()=>w,f:()=>x,fK:()=>k,jY:()=>S,kz:()=>A,mY:()=>v,n_:()=>R,rn:()=>D,sb:()=>L});var n,o=i(85337),s=i(51732),r=i(96615),a=i(24028),l=i(35208),d=i(6709),h=i(58236),c=i(34622),u=i(72396),g=i(95272),p=i(95954),m=i(93026),f=i(56718),_=i(71481);class v{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?u.Ao.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};g.W.registerKeybindingRule(i)}}c.P.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){h.BH.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class b extends v{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i){return this._implementations.push({priority:e,name:t,implementation:i}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e].implementation===i)return void this._implementations.splice(e,1)}}}runCommand(e,t){const i=e.get(_.VZ);i.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const n of this._implementations){const o=n.implementation(e,t);if(o){if(i.trace(`Command '${this.id}' was handled by '${n.name}'.`),"boolean"==typeof o)return;return o}}i.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class C extends v{constructor(e,t){super(t),this.command=e}runCommand(e,t){return this.command.runCommand(e,t)}}class w extends v{static bindToContribution(e){return class extends w{constructor(e){super(e),this._callback=e.handler}runEditorCommand(t,i,n){e(i)&&this._callback(e(i),n)}}}runCommand(e,t){const i=e.get(r.$),n=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(n)return n.invokeWithinContext((e=>{if(e.get(u.i6).contextMatchesRules((0,f.f6)(this.precondition)))return this.runEditorCommand(e,n,t)}))}}class y extends w{constructor(e){super(y.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=h.eH.EditorContext),t.title||(t.title=e.label),t.when=u.Ao.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(m.b).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class S extends y{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e][1]===t)return void this._implementations.splice(e,1)}}}run(e,t,i){for(const n of this._implementations){const o=n[1](e,t,i);if(o){if("boolean"==typeof o)return;return o}}}}function L(e,t){c.P.registerCommand(e,(function(e,...i){const[n,o]=i;(0,f.p_)(s.o.isUri(n)),(0,f.p_)(a.L.isIPosition(o));const r=e.get(l.q).getModel(n);if(r){const e=a.L.lift(o);return t(r,e,...i.slice(2))}return e.get(d.S).createModelReference(n).then((e=>new Promise(((n,s)=>{try{n(t(e.object.textEditorModel,a.L.lift(o),i.slice(2)))}catch(e){s(e)}})).finally((()=>{e.dispose()}))))}))}function x(e,t){c.P.registerCommand(e,(function(e,...i){const[n]=i;(0,f.p_)(s.o.isUri(n));const o=e.get(l.q).getModel(n);return o?t(o,...i.slice(1)):e.get(d.S).createModelReference(n).then((e=>new Promise(((n,o)=>{try{n(t(e.object.textEditorModel,i.slice(1)))}catch(e){o(e)}})).finally((()=>{e.dispose()}))))}))}function k(e){return T.INSTANCE.registerEditorCommand(e),e}function N(e){const t=new e;return T.INSTANCE.registerEditorAction(t),t}function D(e){return T.INSTANCE.registerEditorAction(e),e}function E(e){T.INSTANCE.registerEditorAction(e)}function I(e,t){T.INSTANCE.registerEditorContribution(e,t)}!function(e){e.getEditorCommand=function(e){return T.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return T.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return T.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return T.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return T.INSTANCE.getDiffEditorContributions()}}(n||(n={}));class T{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function M(e){return e.register(),e}T.INSTANCE=new T,p.B.add("editor.contributions",T.INSTANCE);const R=M(new b({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"1_do",title:o.N({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:h.eH.CommandPalette,group:"",title:o.N("undo","Undo"),order:1}]}));M(new C(R,{id:"default:undo",precondition:void 0}));const A=M(new b({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"1_do",title:o.N({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:h.eH.CommandPalette,group:"",title:o.N("redo","Redo"),order:1}]}));M(new C(A,{id:"default:redo",precondition:void 0}));const O=M(new b({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:h.eH.MenubarSelectionMenu,group:"1_basic",title:o.N({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:h.eH.CommandPalette,group:"",title:o.N("selectAll","Select All"),order:1}]}))},50994:(e,t,i)=>{i.d(t,{Gl:()=>l,fo:()=>a,vu:()=>r});var n=i(7978),o=i(51732),s=i(56718);const r=(0,n.yh)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(t=e,(0,s.Kn)(t)&&o.o.isUri(t.resource)&&(0,s.Kn)(t.edit))return new l(e.resource,e.edit,e.modelVersionId,e.metadata);var t;if(function(e){return(0,s.Kn)(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new d(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")}))}}class l extends a{constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class d extends a{constructor(e,t,i,n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},96615:(e,t,i)=>{i.d(t,{$:()=>n});const n=(0,i(7978).yh)("codeEditorService")},80197:(e,t,i)=>{i.d(t,{Gm:()=>Go});var n=i(97064),o=i(87107);let s=class{constructor(e,t){}dispose(){}};var r,a;s.ID="editor.contrib.markerDecorations",s=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(r=1,a=n.i,function(e,t){a(e,t,r)})],s),(0,o._K)(s.ID,s);var l=i(93379),d=i.n(l),h=i(7795),c=i.n(h),u=i(90569),g=i.n(u),p=i(3565),m=i.n(p),f=i(19216),_=i.n(f),v=i(44589),b=i.n(v),C=i(4656),w={};w.styleTagTransform=b(),w.setAttributes=m(),w.insert=g().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=_(),d()(C.Z,w),C.Z&&C.Z.locals&&C.Z.locals;var y=i(85337),S=i(48696),L=i(98147),x=i(77538),k=i(48646),N=i(31633),D=i(69836),E=i(96615),I=i(23875),T=i(87178),M=i(82704),R=i(84483),A=i(63030),O=i(76049),P=i(10554),F=i(64573);class B{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new W(this.x-S.DI.scrollX,this.y-S.DI.scrollY)}}class W{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new B(this.clientX+S.DI.scrollX,this.clientY+S.DI.scrollY)}}class V{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}function H(e){const t=S.i(e);return new V(t.left,t.top,t.width,t.height)}class z extends O.n{constructor(e,t){super(e),this._editorMouseEventBrand=void 0,this.pos=new B(this.posx,this.posy),this.editorPos=H(t)}}class K{constructor(e){this._editorViewDomNode=e}_create(e){return new z(e,this._editorViewDomNode)}onContextMenu(e,t){return S.nm(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return S.nm(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return S.nm(e,"mousedown",(e=>{t(this._create(e))}))}onMouseLeave(e,t){return S.j_(e,(e=>{t(this._create(e))}))}onMouseMoveThrottled(e,t,i,n){return S.Y_(e,"mousemove",t,((e,t)=>i(e,this._create(t))),n)}}class U{constructor(e){this._editorViewDomNode=e}_create(e){return new z(e,this._editorViewDomNode)}onPointerUp(e,t){return S.nm(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return S.nm(e,"pointerdown",(e=>{t(this._create(e))}))}onPointerLeave(e,t){return S.RE(e,(e=>{t(this._create(e))}))}onPointerMoveThrottled(e,t,i,n){return S.Y_(e,"pointermove",t,((e,t)=>i(e,this._create(t))),n)}}class j extends k.JT{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new F.Z),this._keydownListener=null}startMonitoring(e,t,i,n,o){this._keydownListener=S.mu(document,"keydown",(e=>{e.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalMouseMoveMonitor.startMonitoring(e,t,((e,t)=>i(e,new z(t,this._editorViewDomNode))),n,(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class $ extends k.JT{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i<n;i++){let n=e[i];switch(n.type){case 0:this.onCompositionStart(n)&&(t=!0);break;case 1:this.onCompositionEnd(n)&&(t=!0);break;case 2:this.onConfigurationChanged(n)&&(t=!0);break;case 3:this.onCursorStateChanged(n)&&(t=!0);break;case 4:this.onDecorationsChanged(n)&&(t=!0);break;case 5:this.onFlushed(n)&&(t=!0);break;case 6:this.onFocusChanged(n)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(n)&&(t=!0);break;case 8:this.onLineMappingChanged(n)&&(t=!0);break;case 9:this.onLinesChanged(n)&&(t=!0);break;case 10:this.onLinesDeleted(n)&&(t=!0);break;case 11:this.onLinesInserted(n)&&(t=!0);break;case 12:this.onRevealRangeRequest(n)&&(t=!0);break;case 13:this.onScrollChanged(n)&&(t=!0);break;case 15:this.onTokensChanged(n)&&(t=!0);break;case 14:this.onThemeChanged(n)&&(t=!0);break;case 16:this.onTokensColorsChanged(n)&&(t=!0);break;case 17:this.onZonesChanged(n)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(n)}}t&&(this._shouldRender=!0)}}class q extends ${constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class Z{static write(e,t){M.Z,e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)}static collect(e,t){let i=[],n=0;for(;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;const o=new Uint8Array(n);for(let e=0;e<n;e++)o[e]=i[n-e-1];return o}}class G{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class Q extends G{constructor(e,t,i){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class Y{constructor(e,t,i){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i}}class J{constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i<n;i++){const n=e[i];t[i]=new J(n.left,n.width)}return t}toString(){return`[${this.left},${this.width}]`}}class X{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class ee{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class te{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class ie{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,o){const s=this._createRange();try{return s.setStart(e,t),s.setEnd(i,n),s.getClientRects()}catch(e){return null}finally{this._detachRange(s,o)}}static _mergeAdjacentRanges(e){if(1===e.length)return e;e.sort(X.compare);let t=[],i=0,n=e[0];for(let o=1,s=e.length;o<s;o++){const s=e[o];n.left+n.width+.9>=s.left?n.width=Math.max(n.width,s.left+s.width-n.left):(t[i++]=n,n=s)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t){if(!e||0===e.length)return null;const i=[];for(let n=0,o=e.length;n<o;n++){const o=e[n];i[n]=new X(Math.max(0,o.left-t),o.width)}return this._mergeAdjacentRanges(i)}static readHorizontalRanges(e,t,i,n,o,s,r){const a=e.children.length-1;if(0>a)return null;if((t=Math.min(a,Math.max(0,t)))===(n=Math.min(a,Math.max(0,n)))&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(i,s)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let l=e.children[t].firstChild,d=e.children[n].firstChild;if(l&&d||(!l&&0===i&&t>0&&(l=e.children[t-1].firstChild,i=1073741824),!d&&0===o&&n>0&&(d=e.children[n-1].firstChild,o=1073741824)),!l||!d)return null;i=Math.min(l.textContent.length,Math.max(0,i)),o=Math.min(d.textContent.length,Math.max(0,o));const h=this._readClientRects(l,i,d,o,r);return this._createHorizontalRangesFromClientRects(h,s)}}var ne=i(10626),oe=i(12954),se=i(36550),re=i(38562);const ae=!!R.tY||!(R.IJ||I.vU||I.G6);let le=!0;class de{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class he{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(43);this.renderWhitespace=i.get(87),this.renderControlCharacters=i.get(82),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(29),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(58),this.stopRenderingLineAfter=i.get(104),this.fontLigatures=i.get(44)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class ce{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,M.X)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return(this._options.themeType===se.e.HIGH_CONTRAST||"selection"===this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=i.getViewLineRenderingData(e),s=this._options,r=ne.Kp.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if(s.themeType===se.e.HIGH_CONTRAST||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumber<e||i.startLineNumber>e)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t<n&&(s.themeType===se.e.HIGH_CONTRAST||"selection"!==this._options.renderWhitespace?r.push(new ne.Kp(t,n,"inline-selected-text",0)):(a||(a=[]),a.push(new oe.zG(t-1,n-1))))}}const l=new oe.IJ(s.useMonospaceOptimizations,s.canUseHalfwidthRightwardsArrow,o.content,o.continuesWithWrappedLine,o.isBasicASCII,o.containsRTL,o.minColumn-1,o.tokens,r,o.tabSize,o.startVisibleColumn,s.spaceWidth,s.middotWidth,s.wsmiddotWidth,s.stopRenderingLineAfter,s.renderWhitespace,s.renderControlCharacters,s.fontLigatures!==re.n0.OFF,a);if(this._renderedViewLine&&this._renderedViewLine.input.equals(l))return!1;n.appendASCIIString('<div style="top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;height:"),n.appendASCIIString(String(this._options.lineHeight)),n.appendASCIIString('px;" class="'),n.appendASCIIString(ce.CLASS_NAME),n.appendASCIIString('">');const d=(0,oe.d1)(l,n);n.appendASCIIString("</div>");let h=null;return le&&ae&&o.isBasicASCII&&s.useMonospaceOptimizations&&0===d.containsForeignElements&&o.content.length<300&&l.lineTokens.getCount()<100&&(h=new ue(this._renderedViewLine?this._renderedViewLine.domNode:null,l,d.characterMapping)),h||(h=me(this._renderedViewLine?this._renderedViewLine.domNode:null,l,d.characterMapping,d.containsRTL,d.containsForeignElements)),this._renderedViewLine=h,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof ue}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof ue?this._renderedViewLine.monospaceAssumptionsAreValid():le}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof ue&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t|=0,i|=0,t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const o=0|this._renderedViewLine.input.stopRenderingLineAfter;let s=!1;-1!==o&&t>o+1&&i>o+1&&(s=!0),-1!==o&&t>o+1&&(t=o+1),-1!==o&&i>o+1&&(i=o+1);const r=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return r&&r.length>0?new te(s,r):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}ce.CLASS_NAME="view-line";class ue{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return le;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),le=!1),le}toSlowRenderedLine(){return me(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const o=this._getCharPosition(t),s=this._getCharPosition(i);return[new X(o,s-o)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffset(e);return this._charWidth*t}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new oe.Nd(o,i),n)}}class ge{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const o=this._readPixelOffset(this.domNode,e,t,n);if(-1===o)return null;const s=this._readPixelOffset(this.domNode,e,i,n);return-1===s?null:[new X(o,s-o)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,o){if(i===n){const n=this._readPixelOffset(e,t,i,o);return-1===n?null:[new X(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,o)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const o=this._pixelOffsetCache[i];if(-1!==o)return o;const s=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=s,s}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=ie.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.endNode);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const o=this._characterMapping.getDomPosition(i),s=ie.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n.clientRectDeltaLeft,n.endNode);if(!s||0===s.length)return-1;const r=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new X(0,this.getWidth())];const o=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(i);return ie.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,n.clientRectDeltaLeft,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new oe.Nd(o,i),n)}}class pe extends ge{_readVisibleRangesForRange(e,t,i,n,o){const s=super._readVisibleRangesForRange(e,t,i,n,o);if(!s||0===s.length||i===n||1===i&&n===this._characterMapping.length)return s;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,o);if(-1!==i){const e=s[s.length-1];e.left<i&&(e.width=i-e.left)}}return s}}const me=I.Pf?function(e,t,i,n,o){return new pe(e,t,i,n,o)}:function(e,t,i,n,o){return new ge(e,t,i,n,o)};var fe,_e=i(24028),ve=i(78891),be=i(80919),Ce=i(11463);class we{constructor(e=null){this.hitTarget=e,this.type=0}}class ye{constructor(e,t,i){this.position=e,this.spanNode=t,this.injectedText=i,this.type=1}}!function(e){e.createFromDOMInfo=function(e,t,i){const n=e.getPositionFromDOMInfo(t,i);return n?new ye(n,t,null):new we(t)}}(fe||(fe={}));class Se{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}}class Le{constructor(e,t,i=0,n=null,o=null,s=null){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,!o&&n&&(o=new ve.e(n.lineNumber,n.column,n.lineNumber,n.column)),this.range=o,this.detail=s}static _typeToString(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail}toString(){return Le.toString(this)}}class xe{static isTextArea(e){return 2===e.length&&3===e[0]&&6===e[1]}static isChildOfViewLines(e){return e.length>=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class ke{constructor(e,t,i){this.model=e.model;const n=e.configuration.options;this.layoutInfo=n.get(129),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(58),this.stickyTabStops=n.get(103),this.typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return ke.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,o=e.model.getLineCount();let s,r=null,a=null;return i.afterLineNumber!==o&&(a=new _e.L(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new _e.L(i.afterLineNumber,e.model.getLineMaxColumn(i.afterLineNumber))),s=null===a?r:null===r?a:t<n?r:a,{viewZoneId:i.id,afterLineNumber:i.afterLineNumber,positionBefore:r,positionAfter:a,position:s}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const e=this._context.model.getLineCount(),t=this._context.model.getLineMaxColumn(e);return{range:new ve.e(e,t,e,t),isAfterLines:!0}}const t=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.model.getLineMaxColumn(t);return{range:new ve.e(t,1,t,i),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,t){return ke._findAttribute(e,t,this._viewHelper.viewDomNode)}static _findAttribute(e,t,i){for(;e&&e!==document.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===i)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}getPositionFromDOMInfo(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class Ne{constructor(e,t,i){this.editorPos=t,this.pos=i,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+i.y-t.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+i.x-t.x-e.layoutInfo.contentLeft,this.isInMarginArea=i.x-t.x<e.layoutInfo.contentLeft&&i.x-t.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Te._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class De extends Ne{constructor(e,t,i,n){super(e,t,i),this._ctx=e,n?(this.target=n,this.targetPath=Z.collect(n,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}fulfill(e,t=null,i=null,n=null){let o=this.mouseColumn;return t&&t.column<this._ctx.model.getLineMaxColumn(t.lineNumber)&&(o=be.io.visibleColumnFromColumn(this._ctx.model.getLineContent(t.lineNumber),t.column,this._ctx.model.getTextModelOptions().tabSize)+1),new Le(this.target,e,o,t,i,n)}withTarget(e){return new De(this._ctx,this.editorPos,this.pos,e)}}const Ee={isAfterLines:!0};function Ie(e){return{isAfterLines:!1,horizontalDistanceToText:e}}class Te{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=Z.collect(t,this._viewHelper.viewDomNode);return!(!xe.isChildOfContentWidgets(i)&&!xe.isChildOfOverflowingContentWidgets(i)&&!xe.isChildOfOverlayWidgets(i))}createMouseTarget(e,t,i,n){const o=new ke(this._context,this._viewHelper,e),s=new De(o,t,i,n);try{return Te._createMouseTarget(o,s,!1)}catch(e){return s.fulfill(0)}}static _createMouseTarget(e,t,i){if(null===t.target){if(i)return t.fulfill(0);const n=Te._doHitTest(e,t);return 1===n.type?Te.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}const n=t;let o=null;return o=o||Te._hitTestContentWidget(e,n),o=o||Te._hitTestOverlayWidget(e,n),o=o||Te._hitTestMinimap(e,n),o=o||Te._hitTestScrollbarSlider(e,n),o=o||Te._hitTestViewZone(e,n),o=o||Te._hitTestMargin(e,n),o=o||Te._hitTestViewCursor(e,n),o=o||Te._hitTestTextArea(e,n),o=o||Te._hitTestViewLines(e,n,i),o=o||Te._hitTestScrollbar(e,n),o||t.fulfill(0)}static _hitTestContentWidget(e,t){if(xe.isChildOfContentWidgets(t.targetPath)||xe.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfill(9,null,null,i):t.fulfill(0)}return null}static _hitTestOverlayWidget(e,t){if(xe.isChildOfOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfill(12,null,null,i):t.fulfill(0)}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const e of i)if(t.target===e.domNode)return t.fulfill(6,e.position,null,{mightBeForeignElement:!1})}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,o=t.mouseVerticalOffset;for(const s of i){if(n<s.contentLeft)continue;if(n>s.contentLeft+s.width)continue;const i=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(i<=o&&o<=i+s.height)return t.fulfill(6,s.position,null,{mightBeForeignElement:!1})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfill(e,i.position,null,i)}return null}static _hitTestTextArea(e,t){return xe.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1}):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.pos.x-t.editorPos.x);const s={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,n,i.range,s):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,n,i.range,s):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,n,i.range,s)))}return null}static _hitTestViewLines(e,t,i){if(!xe.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfill(7,new _e.L(1,1),null,Ee);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return t.fulfill(7,new _e.L(i,n),null,Ee)}if(i){if(xe.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.model.getLineLength(i)){const n=e.getLineWidth(i),o=Ie(t.mouseContentHorizontalOffset-n);return t.fulfill(7,new _e.L(i,1),null,o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=Ie(t.mouseContentHorizontalOffset-n),s=new _e.L(i,e.model.getLineMaxColumn(i));return t.fulfill(7,s,null,o)}}return t.fulfill(0)}const n=Te._doHitTest(e,t);return 1===n.type?Te.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(xe.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new _e.L(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(xe.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new _e.L(i,n))}}return null}static _hitTestScrollbar(e,t){if(xe.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new _e.L(i,n))}return null}getMouseColumn(e,t){const i=this._context.configuration.options,n=i.get(129),o=this._context.viewLayout.getCurrentScrollLeft()+t.x-e.x-n.contentLeft;return Te._getMouseColumn(o,i.get(43).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,o){const s=n.lineNumber,r=n.column,a=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>a){const e=Ie(t.mouseContentHorizontalOffset-a);return t.fulfill(7,n,null,e)}const l=e.visibleRangeForPosition(s,r);if(!l)return t.fulfill(0,n);const d=l.left;if(t.mouseContentHorizontalOffset===d)return t.fulfill(6,n,null,{mightBeForeignElement:!!o});const h=[];if(h.push({offset:l.left,column:r}),r>1){const t=e.visibleRangeForPosition(s,r-1);t&&h.push({offset:t.left,column:r-1})}if(r<e.model.getLineMaxColumn(s)){const t=e.visibleRangeForPosition(s,r+1);t&&h.push({offset:t.left,column:r+1})}h.sort(((e,t)=>e.offset-t.offset));const c=t.pos.toClientCoordinates(),u=i.getBoundingClientRect(),g=u.left<=c.clientX&&c.clientX<=u.right;for(let e=1;e<h.length;e++){const i=h[e-1],r=h[e];if(i.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=r.offset){const e=new ve.e(s,i.column,s,r.column);return t.fulfill(6,n,e,{mightBeForeignElement:!g||!!o})}}return t.fulfill(6,n,null,{mightBeForeignElement:!g||!!o})}static _doHitTestWithCaretRangeFromPoint(e,t){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.getVerticalOffsetForLineNumber(i)+Math.floor(e.lineHeight/2);let o=t.pos.y+(n-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);const s=new B(t.pos.x,o),r=this._actualDoHitTestWithCaretRangeFromPoint(e,s.toClientCoordinates());return 1===r.type?r:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=S.Ay(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild;)o=o.lastChild;const e=o.getBoundingClientRect(),i=window.getComputedStyle(o,null).getPropertyValue("font"),s=o.innerText;let r,a=e.left,l=0;if(t>e.left+e.width)l=s.length;else{const e=Me.getInstance();for(let n=0;n<s.length+1;n++){if(r=e.getCharWidth(s.charAt(n),i)/2,a+=r,t<a){l=n;break}a+=r}}n.setStart(o.firstChild,l),n.setEnd(o.firstChild,l)}return n}(i,t.clientX,t.clientY):i.caretRangeFromPoint(t.clientX,t.clientY):document.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return new we;const o=n.startContainer;if(o.nodeType===o.TEXT_NODE){const t=o.parentNode,i=t?t.parentNode:null,s=i?i.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===ce.CLASS_NAME?fe.createFromDOMInfo(e,t,n.startOffset):new we(o.parentNode)}if(o.nodeType===o.ELEMENT_NODE){const t=o.parentNode,i=t?t.parentNode:null;return(i&&i.nodeType===i.ELEMENT_NODE?i.className:null)===ce.CLASS_NAME?fe.createFromDOMInfo(e,o,o.textContent.length):new we(o)}return new we}static _doHitTestWithCaretPositionFromPoint(e,t){const i=document.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const t=i.offsetNode.parentNode,n=t?t.parentNode:null,o=n?n.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===ce.CLASS_NAME?fe.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new we(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const t=i.offsetNode.parentNode,n=t&&t.nodeType===t.ELEMENT_NODE?t.className:null,o=t?t.parentNode:null,s=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(n===ce.CLASS_NAME){const t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t)return fe.createFromDOMInfo(e,t,0)}else if(s===ce.CLASS_NAME)return fe.createFromDOMInfo(e,i.offsetNode,0)}return new we(i.offsetNode)}static _snapToSoftTabBoundary(e,t){const i=t.getLineContent(e.lineNumber),{tabSize:n}=t.getTextModelOptions(),o=Ce.l.atomicPosition(i,e.column-1,n,2);return-1!==o?new _e.L(e.lineNumber,o+1):e}static _doHitTest(e,t){let i=new we;if("function"==typeof document.caretRangeFromPoint?i=this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates())),1===i.type){const t=e.model.getInjectedTextAt(i.position),n=e.model.normalizePosition(i.position,2);!t&&n.equals(i.position)||(i=new ye(n,i.spanNode,t))}return 1===i.type&&e.stickyTabStops&&(i=new ye(this._snapToSoftTabBoundary(i.position,e.model),i.spanNode,i.injectedText)),i}}class Me{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return Me._INSTANCE||(Me._INSTANCE=new Me),Me._INSTANCE}getCharWidth(e,t){const i=e+t;if(this._cache[i])return this._cache[i];const n=this._canvas.getContext("2d");n.font=t;const o=n.measureText(e).width;return this._cache[i]=o,o}}Me._INSTANCE=null;var Re=i(69731);function Ae(e){return function(t,i){let n=!1;return e&&(n=e.mouseTargetIsWidget(i)),n||i.preventDefault(),i}}class Oe extends ${constructor(e,t,i){super(),this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new Te(this._context,i),this._mouseDownOperation=this._register(new Pe(this._context,this.viewController,this.viewHelper,((e,t)=>this._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(129).height;const n=new K(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),Ae(this.mouseTargetFactory),Oe.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e)))),this._register(S.nm(this.viewHelper.viewDomNode,S.tw.MOUSE_WHEEL,(e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(67))return;const t=new O.q(e);if(R.dz?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey){const e=Re.C.getZoomLevel(),i=t.deltaY>0?1:-1;Re.C.setZoomLevel(e+i),t.preventDefault(),t.stopPropagation()}}),{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(129)){const e=this._context.configuration.options.get(129).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const i=new W(e,t).toPageCoordinates(),n=H(this.viewHelper.viewDomNode);return i.y<n.y||i.y>n.y+n.height||i.x<n.x||i.x>n.x+n.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=S.Ay(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this._mouseDownOperation.isActive()||e.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this.lastMouseLeaveTime=(new Date).getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e){const t=this._createMouseTarget(e,!0),i=6===t.type||7===t.type,n=2===t.type||3===t.type||4===t.type,o=3===t.type,s=this._context.configuration.options.get(97),r=8===t.type||5===t.type,a=9===t.type;let l=e.leftButton||e.middleButton;R.dz&&e.leftButton&&e.ctrlKey&&(l=!1);const d=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(i||o&&s))d(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(r){const i=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId)&&(d(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}Oe.MOUSE_MOVE_MINIMUM_TIME=100;class Pe extends k.JT{constructor(e,t,i,n,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new j(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new P._F),this._mouseState=new Fe,this._currentSelection=new T.Y(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(80)&&n.get(31)&&!n.get(18)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===i.type&&i.position&&this._currentSelection.containsPosition(i.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Ae(null),(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!0);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Ae(null),(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet((()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))}),10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.model,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posy<t.y){const i=Math.max(n.getCurrentScrollTop()-(t.y-e.posy),0),s=ke.getZoneAtCoord(this._context,i);if(s){const e=this._helpPositionJumpOverViewZone(s);if(e)return new Le(null,13,o,e)}const r=n.getLineNumberAtVerticalOffset(i);return new Le(null,13,o,new _e.L(r,1))}if(e.posy>t.y+t.height){const s=n.getCurrentScrollTop()+(e.posy-t.y),r=ke.getZoneAtCoord(this._context,s);if(r){const e=this._helpPositionJumpOverViewZone(r);if(e)return new Le(null,13,o,e)}const a=n.getLineNumberAtVerticalOffset(s);return new Le(null,13,o,new _e.L(a,i.getLineMaxColumn(a)))}const s=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+(e.posy-t.y));return e.posx<t.x?new Le(null,13,o,new _e.L(s,1)):e.posx>t.x+t.width?new Le(null,13,o,new _e.L(s,i.getLineMaxColumn(s))):null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return new Le(n.element,n.type,n.mouseColumn,e,null,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new _e.L(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class Fe{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>Fe.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}Fe.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var Be=i(41459),We=i(43770);class Ve extends Oe{constructor(e,t,i){super(e,t,i),this._register(A.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(S.nm(this.viewHelper.linesContentDomNode,A.t.Tap,(e=>this.onTap(e)))),this._register(S.nm(this.viewHelper.linesContentDomNode,A.t.Change,(e=>this.onChange(e)))),this._register(S.nm(this.viewHelper.linesContentDomNode,A.t.Contextmenu,(e=>this._onContextMenu(new z(e,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(S.nm(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new U(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),Ae(this.mouseTargetFactory),Oe.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new z(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e)}}class He extends Oe{constructor(e,t,i){super(e,t,i),this._register(A.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(S.nm(this.viewHelper.linesContentDomNode,A.t.Tap,(e=>this.onTap(e)))),this._register(S.nm(this.viewHelper.linesContentDomNode,A.t.Change,(e=>this.onChange(e)))),this._register(S.nm(this.viewHelper.linesContentDomNode,A.t.Contextmenu,(e=>this._onContextMenu(new z(e,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new z(e,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(We.pd.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position)}}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class ze extends k.JT{constructor(e,t,i){super(),R.gn&&Be.D.pointerEvents?this.handler=this._register(new Ve(e,t,i)):window.TouchEvent?this.handler=this._register(new He(e,t,i)):this.handler=this._register(new Oe(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Ke=i(54481),Ue={};Ue.styleTagTransform=b(),Ue.setAttributes=m(),Ue.insert=g().bind(null,"head"),Ue.domAPI=c(),Ue.insertStyleElement=_(),d()(Ke.Z,Ue),Ke.Z&&Ke.Z.locals&&Ke.Z.locals;var je=i(96024),$e=i(11193),qe=i(73604),Ze={};Ze.styleTagTransform=b(),Ze.setAttributes=m(),Ze.insert=g().bind(null,"head"),Ze.domAPI=c(),Ze.insertStyleElement=_(),d()(qe.Z,Ze),qe.Z&&qe.Z.locals&&qe.Z.locals;class Ge extends ${}var Qe=i(81312),Ye=i(65700);class Je extends Ge{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new _e.L(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(58);const t=e.get(59);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(83);const i=e.get(129);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new _e.L(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?'<span class="relative-current-line-number">'+i+"</span>":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=R.IJ?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o='<div class="'+Je.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',s=this._context.model.getLineCount(),r=[];for(let e=i;e<=n;e++){const n=e-i;if(!this._renderFinalNewline&&e===s&&0===this._context.model.getLineLength(e)){r[n]="";continue}const a=this._getLineRenderLineNumber(e);a?e===this._activeLineNumber?r[n]='<div class="active-line-number '+Je.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+a+"</div>":r[n]=o+a+"</div>":r[n]=""}this._renderResult=r}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Je.CLASS_NAME="line-numbers",(0,Ye.Ic)(((e,t)=>{const i=e.getColor(Qe.hw);i&&t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=e.getColor(Qe.DD);n&&t.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${n}; }`)}));class Xe extends q{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(129);this._canUseLayerHinting=!t.get(28),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,M.X)(document.createElement("div")),this._domNode.setClassName(Xe.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,M.X)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Xe.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129);return this._canUseLayerHinting=!t.get(28),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}Xe.CLASS_NAME="glyph-margin",Xe.OUTER_CLASS_NAME="margin";var et=i(20904),tt=i(89477);class it{constructor(e,t,i){this._visibleTextAreaBrand=void 0,this.top=e,this.left=t,this.width=i}setWidth(e){return new it(this.top,this.left,e)}}const nt=I.vU;class ot extends q{constructor(e,t,i){super(e),this._primaryCursorPosition=new _e.L(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._viewHelper=i,this._scrollLeft=0,this._scrollTop=0;const n=this._context.configuration.options,o=n.get(129);this._setAccessibilityOptions(n),this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._contentHeight=o.height,this._fontInfo=n.get(43),this._lineHeight=n.get(58),this._emptySelectionClipboard=n.get(32),this._copyWithSyntaxHighlighting=n.get(21),this._visibleTextArea=null,this._selections=[new T.Y(1,1,1,1)],this._modelSelections=[new T.Y(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,M.X)(document.createElement("textarea")),Z.write(this.textArea,6),this.textArea.setClassName(`inputarea ${tt.S}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(n)),this.textArea.setAttribute("tabindex",String(n.get(111))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",y.N("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),n.get(30)&&n.get(80)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=(0,M.X)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const s={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:e=>this._context.model.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.model.getValueInRange(e,t)},r={getDataToCopy:e=>{const t=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,R.ED),i=this._context.model.getEOL(),n=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),o=Array.isArray(t)?t:null,s=Array.isArray(t)?t.join(i):t;let r,a=null;if(e&&(We.RA.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&s.length<65536)){const e=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(r=e.html,a=e.mode)}return{isFromEmptySelection:n,multicursorText:o,text:s,html:r,mode:a}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(R.dz){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new $e.un(i,i.length,i.length,t,t)}}return $e.un.EMPTY}if(I.Dt){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new $e.un(i,n,n,t,t)}return $e.un.EMPTY}return $e.ee.fromEditorSelection(e,s,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.model.deduceModelPositionRelativeToViewPosition(e,t,i)};this._textAreaInput=this._register(new We.Fz(r,this.textArea)),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?($e.al&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):($e.al&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this._selections[0].startLineNumber,i=this._selections[0].startColumn+e.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new ve.e(t,i,t,i),0,1);const n=this._viewHelper.visibleRangeForPositionRelativeToEditor(t,i);n&&(this._visibleTextArea=new it(this._context.viewLayout.getVerticalOffsetForLineNumber(t),n.left,nt?0:1),this._render()),this.textArea.setClassName(`inputarea ${tt.S} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea=this._visibleTextArea.setWidth(function(e,t){const i=document.createElement("canvas").getContext("2d");var n;i.font=("normal",`normal normal ${(n=t).fontWeight} ${n.fontSize}px / ${n.lineHeight}px ${n.fontFamily}`);const o=i.measureText(e);return I.vU?o.width+2:o.width}(e.data,this._fontInfo)),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${tt.S}`),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.model.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.model.setHasFocus(!1)})))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=(0,et.u)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,o=e.column,s=!0,r=e.column,a=0;for(;a<50&&(n||s);){if(n&&o<=1&&(n=!1),n){const e=t.charCodeAt(o-2);0!==i.get(e)?n=!1:o--}if(s&&r>t.length&&(s=!1),s){const e=t.charCodeAt(r-1);0!==i.get(e)?s=!1:r++}a++}return[t.substring(o-1,r-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=(0,et.u)(this._context.configuration.options.get(115));let n=e.column,o=0;for(;n>1;){const s=t.charCodeAt(n-2);if(0!==i.get(s)||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!je.ZG(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){return 1===e.get(2)?y.N("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",R.IJ?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===re.BH.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(43),this._lineHeight=t.get(58),this._emptySelectionClipboard=t.get(32),this._copyWithSyntaxHighlighting=t.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(111))),(e.hasChanged(30)||e.hasChanged(80))&&(t.get(30)&&t.get(80)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){this._primaryCursorPosition=new _e.L(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea)return void this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(e<this._contentLeft||e>this._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():R.dz?this._renderInsideEditor(this._primaryCursorPosition,t,e,nt?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,nt?0:1,nt?0:1)}_renderInsideEditor(e,t,i,n,o){this._lastRenderPosition=e;const s=this.textArea,r=this.textAreaCover;D.V.applyFontInfo(s,this._fontInfo),s.setTop(t),s.setLeft(i),s.setWidth(n),s.setHeight(o),r.setTop(0),r.setLeft(0),r.setWidth(0),r.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(D.V.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),nt)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);const i=this._context.configuration.options;i.get(49)?t.setClassName("monaco-editor-background textAreaCover "+Xe.OUTER_CLASS_NAME):0!==i.get(59).renderType?t.setClassName("monaco-editor-background textAreaCover "+Je.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}var st=i(83345);class rt{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){st.Ox.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new _e.L(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(69)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(69)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const t=this.configuration.options,i=R.IJ&&t.get(95),n=t.get(18);e.middleButton&&!i?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount>=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){st.Ox.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){st.Ox.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),st.Ox.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),st.Ox.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){st.Ox.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){st.Ox.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){st.Ox.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){st.Ox.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){st.Ox.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){st.Ox.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){st.Ox.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){st.Ox.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){st.Ox.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class at{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return at.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){return new lt(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}class lt{constructor(e,t,i,n,o,s){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,this.range=o,this.detail=s}toString(){return Le.toString(this)}}var dt,ht=i(25508);class ct{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(t<i){const i=t-e+1;return this._rendLineNumberStart-=i,null}if(e>n)return null;let o=0,s=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===s?(o=i,s=1):s++)}if(e<i){let n=0;n=t<i?t-e+1:i-e,this._rendLineNumberStart-=n}return this._lines.splice(o,s)}onLinesChanged(e,t){if(0===this.getCount())return!1;const i=this.getStartLineNumber(),n=this.getEndLineNumber();let o=!1;for(let s=e;s<=t;s++)s>=i&&s<=n&&(this._lines[s-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);const s=[];for(let e=0;e<i;e++)s[e]=this._createLine();const r=e-this._rendLineNumberStart,a=this._lines.slice(0,r),l=this._lines.slice(r,this._lines.length-i),d=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=a.concat(s).concat(l),d}onTokensChanged(e){if(0===this.getCount())return!1;const t=this.getStartLineNumber(),i=this.getEndLineNumber();let n=!1;for(let o=0,s=e.length;o<s;o++){const s=e[o];if(s.toLineNumber<t||s.fromLineNumber>i)continue;const r=Math.max(t,s.fromLineNumber),a=Math.min(i,s.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class ut{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new ct((()=>this._host.createVisibleLine()))}_createDomNode(){const e=(0,M.X)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(129)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onLinesInserted(e){const t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){const t=this._linesCollection._get(),i=new gt(this.domNode.domNode,this._host,e),n={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},o=i.render(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(o.rendLineNumberStart,o.lines)}}class gt{constructor(e,t,i){this.domNode=e,this.host=t,this.viewportData=i}render(e,t,i,n){const o={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(o.rendLineNumberStart+o.linesLength-1<t||i<o.rendLineNumberStart){o.rendLineNumberStart=t,o.linesLength=i-t+1,o.lines=[];for(let e=t;e<=i;e++)o.lines[e-t]=this.host.createVisibleLine();return this._finishRendering(o,!0,n),o}if(this._renderUntouchedLines(o,Math.max(t-o.rendLineNumberStart,0),Math.min(i-o.rendLineNumberStart,o.linesLength-1),n,t),o.rendLineNumberStart>t){const e=t,s=Math.min(i,o.rendLineNumberStart-1);e<=s&&(this._insertLinesBefore(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart<t){const e=Math.min(o.linesLength,t-o.rendLineNumberStart);e>0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1<i){const e=o.rendLineNumberStart+o.linesLength,s=i;e<=s&&(this._insertLinesAfter(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart+o.linesLength-1>i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1-e+1;t>0&&(this._removeLinesAfter(o,t),o.linesLength-=t)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const s=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){const t=s+e;r[e].layoutLine(t,n[t-o])}}_insertLinesBefore(e,t,i,n,o){const s=[];let r=0;for(let e=t;e<=i;e++)s[r++]=this.host.createVisibleLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i<t;i++){const t=e.lines[i].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(0,t)}_insertLinesAfter(e,t,i,n,o){const s=[];let r=0;for(let e=t;e<=i;e++)s[r++]=this.host.createVisibleLine();e.lines=e.lines.concat(s)}_removeLinesAfter(e,t){const i=e.linesLength-t;for(let n=0;n<t;n++){const t=e.lines[i+n].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(i,t)}_finishRenderingNewLines(e,t,i,n){gt._ttPolicy&&(i=gt._ttPolicy.createHTML(i));const o=this.domNode.lastChild;t||!o?this.domNode.innerHTML=i:o.insertAdjacentHTML("afterend",i);let s=this.domNode.lastChild;for(let t=e.linesLength-1;t>=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");gt._ttPolicy&&(t=gt._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;t<e.linesLength;t++){const o=e.lines[t];if(i[t]){const e=n.firstChild,t=o.getDomNode();t.parentNode.replaceChild(e,t),o.setDomNode(e)}}}_finishRendering(e,t,i){const n=gt._sb,o=e.linesLength,s=e.lines,r=e.rendLineNumberStart,a=[];{n.reset();let l=!1;for(let e=0;e<o;e++){const t=s[e];a[e]=!1,t.getDomNode()||t.renderLine(e+r,i[e],this.viewportData,n)&&(a[e]=!0,l=!0)}l&&this._finishRenderingNewLines(e,t,n.build(),a)}{n.reset();let t=!1;const l=[];for(let e=0;e<o;e++){const o=s[e];(l[e]=!1,a[e])||o.renderLine(e+r,i[e],this.viewportData,n)&&(l[e]=!0,t=!0)}t&&this._finishRenderingInvalidLines(e,n.build(),l)}}}gt._ttPolicy=null===(dt=window.trustedTypes)||void 0===dt?void 0:dt.createPolicy("editorViewLayer",{createHTML:e=>e}),gt._sb=(0,ht.l$)(1e5);class pt extends q{constructor(e){super(e),this._visibleLines=new ut(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;e<t;e++)if(this._dynamicOverlays[e].shouldRender())return!0;return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++)this._dynamicOverlays[e].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new mt(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onConfigurationChanged(e);return!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){const t=this._dynamicOverlays.filter((e=>e.shouldRender()));for(let i=0,n=t.length;i<n;i++){const n=t[i];n.prepareRender(e),n.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class mt{constructor(e,t){this._configuration=e,this._lineHeight=this._configuration.options.get(58),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=(0,M.X)(e)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(e){this._lineHeight=this._configuration.options.get(58)}renderLine(e,t,i,n){let o="";for(let t=0,n=this._dynamicOverlays.length;t<n;t++)o+=this._dynamicOverlays[t].render(i.startLineNumber,e);return this._renderedContent!==o&&(this._renderedContent=o,n.appendASCIIString('<div style="position:absolute;top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;width:100%;height:"),n.appendASCIIString(String(this._lineHeight)),n.appendASCIIString('px;">'),n.appendASCIIString(o),n.appendASCIIString("</div>"),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class ft extends pt{constructor(e){super(e);const t=this._context.configuration.options.get(129);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(129);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class _t extends pt{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(129);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),D.V.applyFontInfo(this.domNode,t.get(43))}onConfigurationChanged(e){const t=this._context.configuration.options;D.V.applyFontInfo(this.domNode,t.get(43));const i=t.get(129);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class vt{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class bt extends q{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=(0,M.X)(document.createElement("div")),Z.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,M.X)(document.createElement("div")),Z.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new Ct(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i){this._widgets[e.getId()].setPosition(t,i),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class Ct{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=(0,M.X)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,o=n.get(129);this._fixedOverflowWidgets=n.get(36),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=n.get(58),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(58),e.hasChanged(129)){const e=t.get(129);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(e,t,i,n,o){const s=e.top,r=s,a=t.top+this._lineHeight,l=s-n,d=r>=n,h=a,c=o.viewportHeight-a>=n;let u=e.left,g=t.left;return u+i>o.scrollLeft+o.viewportWidth&&(u=o.scrollLeft+o.viewportWidth-i),g+i>o.scrollLeft+o.viewportWidth&&(g=o.scrollLeft+o.viewportWidth-i),u<o.scrollLeft&&(u=o.scrollLeft),g<o.scrollLeft&&(g=o.scrollLeft),{fitsAbove:d,aboveTop:l,aboveLeft:u,fitsBelow:c,belowTop:h,belowLeft:g}}_layoutHorizontalSegmentInPage(e,t,i,n){const o=Math.max(0,t.left-n),s=Math.min(t.left+t.width+n,e.width);let r=t.left+i-S.DI.scrollX;if(r+n>s){const e=r-(s-n);r-=e,i-=e}if(r<o){const e=r-o;r-=e,i-=e}return[i,r]}_layoutBoxInPage(e,t,i,n,o){const s=e.top-n,r=t.top+this._lineHeight,a=S.i(this._viewDomNode.domNode),l=a.top+s-S.DI.scrollY,d=a.top+r-S.DI.scrollY,h=S.D6(document.body),[c,u]=this._layoutHorizontalSegmentInPage(h,a,e.left-o.scrollLeft+this._contentLeft,i),[g,p]=this._layoutHorizontalSegmentInPage(h,a,t.left-o.scrollLeft+this._contentLeft,i),m=l>=22,f=d+n<=h.height-22;return this._fixedOverflowWidgets?{fitsAbove:m,aboveTop:Math.max(l,22),aboveLeft:u,fitsBelow:f,belowTop:d,belowLeft:p}:{fitsAbove:m,aboveTop:s,aboveLeft:c,fitsBelow:f,belowTop:r,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new vt(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let i=t[0],n=t[0];for(const e of t)e.lineNumber<i.lineNumber&&(i=e),e.lineNumber>n.lineNumber&&(n=e);let o=1073741824;for(const e of i.ranges)e.left<o&&(o=e.left);let s=1073741824;for(const e of n.ranges)e.left<s&&(s=e.left);const r=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.scrollTop,a=new vt(r,o),l=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.scrollTop;return[a,new vt(l,s)]}_prepareRenderWidget(e){const[t,i]=this._getTopAndBottomLeft(e);if(!t||!i)return null;if(-1===this._cachedDomNodeClientWidth||-1===this._cachedDomNodeClientHeight){let e=null;if("function"==typeof this._actual.beforeRender&&(e=wt(this._actual.beforeRender,this._actual)),e)this._cachedDomNodeClientWidth=e.width,this._cachedDomNodeClientHeight=e.height;else{const e=this.domNode.domNode;this._cachedDomNodeClientWidth=e.clientWidth,this._cachedDomNodeClientHeight=e.clientHeight}}let n;if(n=this.allowEditorOverflow?this._layoutBoxInPage(t,i,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e):this._layoutBoxInViewport(t,i,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e),this._preference)for(let e=1;e<=2;e++)for(const i of this._preference)if(1===i){if(!n)return null;if(2===e||n.fitsAbove)return{coordinate:new vt(n.aboveTop,n.aboveLeft),position:1}}else{if(2!==i)return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(t),position:0}:{coordinate:t,position:0};if(!n)return null;if(2===e||n.fitsBelow)return{coordinate:new vt(n.belowTop,n.belowLeft),position:2}}return null}onBeforeRender(e){this._viewRange&&this._preference&&(this._viewRange.endLineNumber<e.startLineNumber||this._viewRange.startLineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&wt(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&wt(this._actual.afterRender,this._actual,this._renderData.position)}}function wt(e,t,...i){try{return e.call(t,...i)}catch(e){return null}}var yt=i(4808),St={};St.styleTagTransform=b(),St.setAttributes=m(),St.insert=g().bind(null,"head"),St.domAPI=c(),St.insertStyleElement=_(),d()(yt.Z,St),yt.Z&&yt.Z.locals&&yt.Z.locals;var Lt=i(76345);let xt=!0;class kt extends Ge{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(129);this._lineHeight=t.get(58),this._renderLineHighlight=t.get(84),this._renderLineHighlightOnlyWhenFocus=t.get(85),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new T.Y(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=xt?this._selections.slice(0,1):this._selections,i=t.map((e=>e.positionLineNumber));i.sort(((e,t)=>e-t)),Lt.fS(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=t.every((e=>e.isEmpty()));return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129);return this._lineHeight=t.get(58),this._renderLineHighlight=t.get(84),this._renderLineHighlightOnlyWhenFocus=t.get(85),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let s=0;const r=[];for(let e=i;e<=n;e++){const n=e-i;for(;s<o&&this._cursorLineNumbers[s]<e;)s++;s<o&&this._cursorLineNumbers[s]===e?r[n]=t:r[n]=""}this._renderData=r}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}}class Nt extends kt{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class Dt extends kt{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}(0,Ye.Ic)(((e,t)=>{xt=!1;const i=e.getColor(Qe.Kh);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(Qe.Mm)){const i=e.getColor(Qe.Mm);i&&(xt=!0,t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));var Et=i(89241),It={};It.styleTagTransform=b(),It.setAttributes=m(),It.insert=g().bind(null,"head"),It.domAPI=c(),It.insertStyleElement=_(),d()(Et.Z,It),Et.Z&&Et.Z.locals&&Et.Z.locals;class Tt extends Ge{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e];o.options.className&&(i[n++]=o)}i=i.sort(((e,t)=>{if(e.options.zIndex<t.options.zIndex)return-1;if(e.options.zIndex>t.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return i<n?-1:i>n?1:ve.e.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,r=[];for(let e=o;e<=s;e++)r[e-o]="";this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let e=0,r=t.length;e<r;e++){const r=t[e];if(!r.options.isWholeLine)continue;const a='<div class="cdr '+r.options.className+'" style="left:0;width:100%;height:'+n+'px;"></div>',l=Math.max(r.range.startLineNumber,o),d=Math.min(r.range.endLineNumber,s);for(let e=l;e<=d;e++)i[e-o]+=a}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber;let s=null,r=!1,a=null;for(let l=0,d=t.length;l<d;l++){const d=t[l];if(d.options.isWholeLine)continue;const h=d.options.className,c=Boolean(d.options.showIfCollapsed);let u=d.range;c&&1===u.endColumn&&u.endLineNumber!==u.startLineNumber&&(u=new ve.e(u.startLineNumber,u.startColumn,u.endLineNumber-1,this._context.model.getLineMaxColumn(u.endLineNumber-1))),s===h&&r===c&&ve.e.areIntersectingOrTouching(a,u)?a=ve.e.plusRange(a,u):(null!==s&&this._renderNormalDecoration(e,a,s,r,n,o,i),s=h,r=c,a=u)}null!==s&&this._renderNormalDecoration(e,a,s,r,n,o,i)}_renderNormalDecoration(e,t,i,n,o,s,r){const a=e.linesVisibleRangesForRange(t,"findMatch"===i);if(a)for(let e=0,t=a.length;e<t;e++){const t=a[e];if(t.outsideRenderedLine)continue;const l=t.lineNumber-s;if(n&&1===t.ranges.length){const e=t.ranges[0];0===e.width&&(t.ranges[0]=new J(e.left,this._typicalHalfwidthCharacterWidth))}for(let e=0,n=t.ranges.length;e<n;e++){const n=t.ranges[e],s='<div class="cdr '+i+'" style="left:'+String(n.left)+"px;width:"+String(n.width)+"px;height:"+o+'px;"></div>';r[l]+=s}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}var Mt=i(45019),Rt=i(98962);class At extends q{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,s=o.get(91),r=o.get(66),a=o.get(34),l=o.get(94),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,Ye.m6)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new Mt.$Z(t.domNode,d,this._context.viewLayout.getScrollable())),Z.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,M.X)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.model.setScrollPosition(n,1)};this._register(S.nm(i.domNode,"scroll",(e=>h(i.domNode,!0,!0)))),this._register(S.nm(t.domNode,"scroll",(e=>h(t.domNode,!0,!1)))),this._register(S.nm(n.domNode,"scroll",(e=>h(n.domNode,!0,!1)))),this._register(S.nm(this.scrollbarDomNode.domNode,"scroll",(e=>h(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(129);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(64).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(91)||e.hasChanged(66)||e.hasChanged(34)){const e=this._context.configuration.options,t=e.get(91),i=e.get(66),n=e.get(34),o=e.get(94),s={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(s)}return e.hasChanged(129)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,Ye.m6)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}(0,Ye.Ic)(((e,t)=>{const i=e.getColor(Rt._w);i&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tbox-shadow: ${i} 0 6px 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tbox-shadow: ${i} 6px 0 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\tbox-shadow: ${i} 6px 6px 6px -6px inset;\n\t\t\t}\n\t\t`);const n=e.getColor(Rt.et);n&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\tbackground: ${n};\n\t\t\t}\n\t\t`);const o=e.getColor(Rt.AB);o&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\tbackground: ${o};\n\t\t\t}\n\t\t`);const s=e.getColor(Rt.yn);s&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\tbackground: ${s};\n\t\t\t}\n\t\t`)}));var Ot=i(58466),Pt={};Pt.styleTagTransform=b(),Pt.setAttributes=m(),Pt.insert=g().bind(null,"head"),Pt.domAPI=c(),Pt.insertStyleElement=_(),d()(Ot.Z,Pt),Ot.Z&&Ot.Z.locals&&Ot.Z.locals;class Ft{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class Bt extends Ge{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-e]=[];if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1));let o=null,s=0;for(let r=0,a=i.length;r<a;r++){const a=i[r],l=a.className;let d=Math.max(a.startLineNumber,e)-e;const h=Math.min(a.endLineNumber,t)-e;o===l?(d=Math.max(s+1,d),s=Math.max(s,h)):(o=l,s=h);for(let e=d;e<=s;e++)n[e].push(o)}return n}}class Wt extends Bt{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(129);this._lineHeight=t.get(58),this._glyphMargin=t.get(49),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129);return this._lineHeight=t.get(58),this._glyphMargin=t.get(49),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e],s=o.options.glyphMarginClassName;s&&(i[n++]=new Ft(o.range.startLineNumber,o.range.endLineNumber,s))}return i}prepareRender(e){if(!this._glyphMargin)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o=this._lineHeight.toString(),s='" style="left:'+this._glyphMarginLeft.toString()+"px;width:"+this._glyphMarginWidth.toString()+"px;height:"+o+'px;"></div>',r=[];for(let e=t;e<=i;e++){const i=e-t,o=n[i];0===o.length?r[i]="":r[i]='<div class="cgmr codicon '+o.join(" ")+s}this._renderResult=r}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}var Vt=i(56378),Ht={};Ht.styleTagTransform=b(),Ht.setAttributes=m(),Ht.insert=g().bind(null,"head"),Ht.domAPI=c(),Ht.insertStyleElement=_(),d()(Vt.Z,Ht),Vt.Z&&Vt.Z.locals&&Vt.Z.locals;var zt=i(66054),Kt=i(95098),Ut=i(56718);class jt extends Ge{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(130),n=t.get(43);this._lineHeight=t.get(58),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(130),n=t.get(43);return this._lineHeight=t.get(58),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),!0}onCursorStateChanged(e){var t;const i=e.selections[0].getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(i))&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,i,n,o;if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=e.scrollWidth,l=this._lineHeight,d=this._primaryPosition,h=this.getGuidesByLine(s,r,d),c=[];for(let d=s;d<=r;d++){const r=d-s,u=h[r];let g="";const p=null!==(i=null===(t=e.visibleRangeForPosition(new _e.L(d,1)))||void 0===t?void 0:t.left)&&void 0!==i?i:0;for(const t of u){const i=p+(t.visibleColumn-1)*this._spaceWidth;if(i>a||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const s=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(null!==(o=null===(n=e.visibleRangeForPosition(new _e.L(d,t.horizontalLine.endColumn)))||void 0===n?void 0:n.left)&&void 0!==o?o:i+this._spaceWidth)-i:this._spaceWidth;g+=`<div class="core-guide ${t.className} ${s}" style="left:${i}px;height:${l}px;width:${r}px"></div>`}c[r]=g}this._renderResult=c}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.model.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?zt.s6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?zt.s6.EnabledForActive:zt.s6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,o=this._bracketPairGuideOptions.indentation?this._context.model.getLinesIndentGuides(e,t):null;let s=0,r=0,a=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.model.getActiveIndentGuide(i.lineNumber,e,t);s=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.model.getTextModelOptions(),d=[];for(let i=e;i<=t;i++){const t=new Array;d.push(t);const h=n?n[i-e]:[],c=new Lt.H9(h),u=o?o[i-e]:[];for(let e=1;e<=u;e++){const n=(e-1)*l+1,o=0===h.length&&s<=i&&i<=r&&e===a;t.push(...c.takeWhile((e=>e.visibleColumn<n))||[]);const d=c.peek();d&&d.visibleColumn===n&&!d.horizontalLine||t.push(new zt.UO(n,o?"core-guide-indent-active":"core-guide-indent",null))}t.push(...c.takeWhile((e=>!0))||[])}return d}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function $t(e){if(!e||!e.isTransparent())return e}(0,Ye.Ic)(((e,t)=>{const i=e.getColor(Qe.tR);i&&t.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=e.getColor(Qe.Ym)||i;n&&t.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${n} inset; }`);const o=[{bracketColor:Qe.zJ,guideColor:Qe.oV,guideColorActive:Qe.Qb},{bracketColor:Qe.Vs,guideColor:Qe.m$,guideColorActive:Qe.m3},{bracketColor:Qe.CE,guideColor:Qe.DS,guideColorActive:Qe.To},{bracketColor:Qe.UP,guideColor:Qe.lS,guideColorActive:Qe.L7},{bracketColor:Qe.r0,guideColor:Qe.Jn,guideColorActive:Qe.HV},{bracketColor:Qe.m1,guideColor:Qe.YF,guideColorActive:Qe.f9}],s=new Kt.WE;let r=o.map((t=>{var i,n;const o=e.getColor(t.bracketColor),s=e.getColor(t.guideColor),r=e.getColor(t.guideColorActive),a=$t(null!==(i=$t(s))&&void 0!==i?i:null==o?void 0:o.transparent(.3)),l=$t(null!==(n=$t(r))&&void 0!==n?n:o);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(Ut.$K);if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${s.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${s.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${s.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}}));var qt=i(94966),Zt={};Zt.styleTagTransform=b(),Zt.setAttributes=m(),Zt.insert=g().bind(null,"head"),Zt.domAPI=c(),Zt.insertStyleElement=_(),d()(qt.Z,Zt),qt.Z&&qt.Z.locals&&qt.Z.locals;class Gt{constructor(){this._currentVisibleRange=new ve.e(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Qt{constructor(e,t,i,n,o,s){this.lineNumber=e,this.startColumn=t,this.endColumn=i,this.startScrollTop=n,this.stopScrollTop=o,this.scrollType=s,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}}class Yt{constructor(e,t,i,n){this.selections=e,this.startScrollTop=t,this.stopScrollTop=i,this.scrollType=n,this.type="selections";let o=e[0].startLineNumber,s=e[0].endLineNumber;for(let t=1,i=e.length;t<i;t++){const i=e[t];o=Math.min(o,i.startLineNumber),s=Math.max(s,i.endLineNumber)}this.minLineNumber=o,this.maxLineNumber=s}}class Jt extends q{constructor(e,t){super(e),this._linesContent=t,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new ut(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration,n=this._context.configuration.options,o=n.get(43),s=n.get(130);this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=s.isViewportWrapping,this._revealHorizontalRightPadding=n.get(88),this._cursorSurroundingLines=n.get(25),this._cursorSurroundingLinesStyle=n.get(26),this._canUseLayerHinting=!n.get(28),this._viewLineOptions=new he(i,this._context.theme.type),Z.write(this.domNode,7),this.domNode.setClassName(`view-lines ${tt.S}`),D.V.applyFontInfo(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new P.pY((()=>{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new P.pY((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new Gt,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new ce(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(130)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(43),n=t.get(130);return this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(88),this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),D.V.applyFontInfo(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(129)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new he(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Qt(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Yt(e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<t||e.scrollTop>i)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return new _e.L(n,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(n<o||n>s)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.model.getLineMinColumn(n);return r<a&&(r=a),new _e.L(n,r)}_getViewLineDomNode(e){for(;e&&1===e.nodeType;){if(e.className===ce.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)if(e===this._visibleLines.getVisibleLine(n).getDomNode())return n;return-1}getLineWidth(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();return e<t||e>i?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=ve.e.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let o=[],s=0;const r=new de(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new _e.L(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(e<l||e>d)continue;const h=e===n.startLineNumber?n.startColumn:1,c=e===n.endLineNumber?n.endColumn:this._context.model.getLineMaxColumn(e),u=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,h,c,r);if(u){if(t&&e<i){const t=a;a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new _e.L(e+1,1)).lineNumber,t!==a&&(u.ranges[u.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}o[s++]=new Y(u.outsideRenderedLine,e,J.from(u.ranges))}}return 0===s?null:o}_visibleRangesForLineRange(e,t,i){return this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,new de(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new ee(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,o=!0;for(let s=t;s<=i;s++){const t=this._visibleLines.getVisibleLine(s);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth()):o=!1}return o&&1===t&&i===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth();n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),R.IJ&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,this._context.model.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,i,n,o){const s=e.top,r=e.height,a=s+r;let l,d,h,c;if(n&&n.length>0){let e=n[0].startLineNumber,t=n[0].endLineNumber;for(let i=1,o=n.length;i<o;i++){const o=n[i];e=Math.min(e,o.startLineNumber),t=Math.max(t,o.endLineNumber)}l=!1,d=this._context.viewLayout.getVerticalOffsetForLineNumber(e),h=this._context.viewLayout.getVerticalOffsetForLineNumber(t)+this._lineHeight}else{if(!i)return-1;l=!0,d=this._context.viewLayout.getVerticalOffsetForLineNumber(i.startLineNumber),h=this._context.viewLayout.getVerticalOffsetForLineNumber(i.endLineNumber)+this._lineHeight}if("mouse"!==t||"default"!==this._cursorSurroundingLinesStyle){const e=Math.min(r/this._lineHeight/2,this._cursorSurroundingLines);d-=e*this._lineHeight,h+=Math.max(0,e-1)*this._lineHeight}if(0!==o&&4!==o||(h+=this._lineHeight),h-d>r){if(!l)return-1;c=d}else if(5===o||6===o)if(6===o&&s<=d&&h<=a)c=s;else{const e=d-Math.max(5*this._lineHeight,.2*r),t=h-r;c=Math.max(t,e)}else if(1===o||2===o)if(2===o&&s<=d&&h<=a)c=s;else{const e=(d+h)/2;c=Math.max(0,e-r/2)}else c=this._computeMinimumScrolling(s,a,d,h,3===o,4===o);return c}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let o=1073741824,s=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,Math.round(e.left)),s=Math.max(s,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,Math.round(t.left)),s=Math.max(s,Math.round(t.left+t.width))}return o=Math.max(0,o-Jt.HORIZONTAL_EXTRA_PX),s+=this._revealHorizontalRightPadding,"selections"===e.type&&s-o>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,n,o,s),maxHorizontalOffset:s}}_computeMinimumScrolling(e,t,i,n,o,s){o=!!o,s=!!s;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)<r?o?i:s?Math.max(0,n-r):i<e?i:n>t?Math.max(0,n-r):e:i}}Jt.HORIZONTAL_EXTRA_PX=30;var Xt=i(61072),ei={};ei.styleTagTransform=b(),ei.setAttributes=m(),ei.insert=g().bind(null,"head"),ei.domAPI=c(),ei.insertStyleElement=_(),d()(Xt.Z,ei),Xt.Z&&Xt.Z.locals&&Xt.Z.locals;class ti extends Bt{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(129);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(129);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e],s=o.options.linesDecorationsClassName;s&&(i[n++]=new Ft(o.range.startLineNumber,o.range.endLineNumber,s));const r=o.options.firstLineDecorationClassName;r&&(i[n++]=new Ft(o.range.startLineNumber,o.range.startLineNumber,r))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o='" style="left:'+this._decorationsLeft.toString()+"px;width:"+this._decorationsWidth.toString()+'px;"></div>',s=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i];let a="";for(let e=0,t=r.length;e<t;e++)a+='<div class="cldr '+r[e]+o;s[i]=a}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var ii=i(7583),ni={};ni.styleTagTransform=b(),ni.setAttributes=m(),ni.insert=g().bind(null,"head"),ni.domAPI=c(),ni.insertStyleElement=_(),d()(ii.Z,ni),ii.Z&&ii.Z.locals&&ii.Z.locals;class oi extends Bt{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e],s=o.options.marginClassName;s&&(i[n++]=new Ft(o.range.startLineNumber,o.range.endLineNumber,s))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o=[];for(let e=t;e<=i;e++){const i=e-t,s=n[i];let r="";for(let e=0,t=s.length;e<t;e++)r+='<div class="cmdr '+s[e]+'" style=""></div>';o[i]=r}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var si=i(61175),ri={};ri.styleTagTransform=b(),ri.setAttributes=m(),ri.insert=g().bind(null,"head"),ri.domAPI=c(),ri.insertStyleElement=_(),d()(si.Z,ri),si.Z&&si.Z.locals&&si.Z.locals;class ai{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=ai._clamp(e),this.g=ai._clamp(t),this.b=ai._clamp(i),this.a=ai._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}ai.Empty=new ai(0,0,0,0);var li=i(18339);class di extends k.JT{constructor(){super(),this._onDidChange=new x.Q5,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(li.RW.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,k.dk)(new di)),this._INSTANCE}_updateColorMap(){const e=li.RW.getColorMap();if(!e)return this._colors=[ai.Empty],void(this._backgroundIsLight=!0);this._colors=[ai.Empty];for(let t=1;t<e.length;t++){const i=e[t].rgba;this._colors[t]=new ai(i.r,i.g,i.b,Math.round(255*i.a))}let t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}di._INSTANCE=null;var hi=i(76830);const ci=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var ui=i(21915);class gi{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=gi.soften(e,.8),this.charDataLight=gi.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=(0,ui.K)(e[n]*t);return i}renderChar(e,t,i,n,o,s,r,a,l,d,h){const c=1*this.scale,u=2*this.scale,g=h?1:u;if(t+c>e.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=d?this.charDataLight:this.charDataNormal,m=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),f=4*e.width,_=r.r,v=r.g,b=r.b,C=o.r-_,w=o.g-v,y=o.b-b,S=Math.max(s,a),L=e.data;let x=m*c*u,k=i*f+4*t;for(let e=0;e<g;e++){let e=k;for(let t=0;t<c;t++){const t=p[x++]/255*(s/255);L[e++]=_+C*t,L[e++]=v+w*t,L[e++]=b+y*t,L[e++]=S}k+=f}}blockRenderChar(e,t,i,n,o,s,r,a){const l=1*this.scale,d=2*this.scale,h=a?1:d;if(t+l>e.width||i+h>e.height)return void console.warn("bad render request outside image data");const c=4*e.width,u=o/255*.5,g=s.r,p=s.g,m=s.b,f=g+(n.r-g)*u,_=p+(n.g-p)*u,v=m+(n.b-m)*u,b=Math.max(o,r),C=e.data;let w=i*c+4*t;for(let e=0;e<h;e++){let e=w;for(let t=0;t<l;t++)C[e++]=f,C[e++]=_,C[e++]=v,C[e++]=b;w+=c}}}var pi=i(32683);const mi={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},fi=e=>{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=mi[e[i]]<<4|15&mi[e[i+1]];return t},_i={1:(0,pi.I)((()=>fi("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,pi.I)((()=>fi("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class vi{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=_i[e]?new gi(_i[e](),e):vi.createFromSampleData(vi.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of ci)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");let i=vi._downsample(e,t);return new gi(i,t)}static _downsampleChar(e,t,i,n,o){const s=1*o,r=2*o;let a=n,l=0;for(let n=0;n<r;n++){const o=n/r*16,d=(n+1)/r*16;for(let n=0;n<s;n++){const r=n/s*10,h=(n+1)/s*10;let c=0,u=0;for(let i=o;i<d;i++){const n=t+3840*Math.floor(i),o=1-(i-Math.floor(i));for(let t=r;t<h;t++){const i=1-(t-Math.floor(t)),s=n+4*Math.floor(t),r=i*o;u+=r,c+=e[s]*e[s+3]/255*r}}const g=c/u;l=Math.max(l,g),i[a++]=(0,ui.K)(g)}}return l}static _downsample(e,t){const i=2*t*1*t,n=96*i,o=new Uint8ClampedArray(n);let s=0,r=0,a=0;for(let n=0;n<96;n++)a=Math.max(a,this._downsampleChar(e,r,o,s,t)),s+=i,r+=40;if(a>0){const e=255/a;for(let t=0;t<n;t++)o[t]*=e}return o}}class bi{constructor(e,t,i){const n=e.options,o=n.get(127),s=n.get(129),r=s.minimap,a=n.get(43),l=n.get(64);this.renderMinimap=r.renderMinimap,this.size=l.size,this.minimapHeightIsEditorHeight=r.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(93),this.showSlider=l.showSlider,this.pixelRatio=o,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(58),this.minimapLeft=r.minimapLeft,this.minimapWidth=r.minimapWidth,this.minimapHeight=s.height,this.canvasInnerWidth=r.minimapCanvasInnerWidth,this.canvasInnerHeight=r.minimapCanvasInnerHeight,this.canvasOuterWidth=r.minimapCanvasOuterWidth,this.canvasOuterHeight=r.minimapCanvasOuterHeight,this.isSampling=r.minimapIsSampling,this.editorHeight=s.height,this.fontScale=r.minimapScale,this.minimapLineHeight=r.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,pi.I)((()=>vi.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=bi._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=bi._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(Rt.kV);return i?new ai(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(Rt.It);return t?ai._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class Ci{constructor(e,t,i,n,o,s,r,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=s,this.startLineNumber=r,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,o,s,r,a,l,d,h){const c=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=a*e.lineHeight+(e.scrollBeyondLastLine?o-e.lineHeight:0),i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),s=n/(d-o),h=l*s,c=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new Ci(l,d,c,s,h,i,1,Math.min(r,u))}let m,f;if(s&&i!==r){const e=i-t+1;m=Math.floor(e*u/c)}else{const e=o/p;m=Math.floor(e*u/c)}f=e.scrollBeyondLastLine?(r-1)*u/c:Math.max(0,r*u/c-m),f=Math.min(e.minimapHeight-m,f);const _=f/(d-o),v=l*_;let b=0;if(e.scrollBeyondLastLine&&(b=o/p-1),g>=r+b)return new Ci(l,d,f>0,_,v,m,1,r);{let e=Math.max(1,Math.floor(t-v*c/u));h&&h.scrollHeight===d&&(h.scrollTop>l&&(e=Math.min(e,h.startLineNumber)),h.scrollTop<l&&(e=Math.max(e,h.startLineNumber)));const i=Math.min(r,e+g-1);return new Ci(l,d,!0,_,(t-e+(l-n)/p)*u/c,m,e,i)}}}class wi{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}wi.INVALID=new wi(-1);class yi{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new ct((()=>wi.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e<i;e++)if(-1===t[e].dy)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){const e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class Si{constructor(e,t,i,n){this._backgroundFillData=Si._createBackgroundFillData(t,i,n),this._buffers=[e.createImageData(t,i),e.createImageData(t,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,i){const n=i.r,o=i.g,s=i.b,r=i.a,a=new Uint8ClampedArray(e*t*4);let l=0;for(let i=0;i<t;i++)for(let t=0;t<e;t++)a[l]=n,a[l+1]=o,a[l+2]=s,a[l+3]=r,l+=4;return a}}class Li{constructor(e,t){this.samplingRatio=e,this.minimapLines=t}static compute(e,t,i){if(0===e.renderMinimap||!e.isSampling)return[null,[]];const n=e.pixelRatio,o=e.lineHeight,s=e.scrollBeyondLastLine,{minimapLineCount:r}=re.gk.computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:s,height:e.editorHeight,lineHeight:o,pixelRatio:n}),a=t/r,l=a/2;if(!i||0===i.minimapLines.length){let e=[];if(e[0]=1,r>1){for(let t=0,i=r-1;t<i;t++)e[t]=Math.round(t*a+l);e[r-1]=t}return[new Li(a,e),[]]}const d=i.minimapLines,h=d.length;let c=[],u=0,g=0,p=1,m=[],f=null;for(let e=0;e<r;e++){const i=Math.max(p,Math.round(e*a)),n=Math.max(i,Math.round((e+1)*a));for(;u<h&&d[u]<i;){if(m.length<10){const e=u+1+g;f&&"deleted"===f.type&&f._oldIndex===u-1?f.deleteToLineNumber++:(f={type:"deleted",_oldIndex:u,deleteFromLineNumber:e,deleteToLineNumber:e},m.push(f)),g--}u++}let o;if(u<h&&d[u]<=n)o=d[u],u++;else if(o=0===e?1:e+1===r?t:Math.round(e*a+l),m.length<10){const t=u+1+g;f&&"inserted"===f.type&&f._i===e-1?f.insertToLineNumber++:(f={type:"inserted",_i:e,insertFromLineNumber:t,insertToLineNumber:t},m.push(f)),g++}c[e]=o,p=o}if(m.length<10)for(;u<h;){const e=u+1+g;f&&"deleted"===f.type&&f._oldIndex===u-1?f.deleteToLineNumber++:(f={type:"deleted",_oldIndex:u,deleteFromLineNumber:e,deleteToLineNumber:e},m.push(f)),g--,u++}else m=[{type:"flush"}];return[new Li(a,c),m]}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e)-1;for(;i>0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1<this.minimapLines.length&&this.minimapLines[n+1]<=t;)n++;if(i===n){const n=this.minimapLines[i];if(n<e||n>t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]<e.fromLineNumber);o--)this.minimapLines[o]<=e.toLineNumber?(this.minimapLines[o]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,o),n=Math.max(n,o)):this.minimapLines[o]-=t;return[i,n]}onLinesInserted(e){const t=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]<e.fromLineNumber);i--)this.minimapLines[i]+=t}}class xi extends q{constructor(e){super(e),this.tokensColorTracker=di.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new bi(this._context.configuration,this._context.theme,this.tokensColorTracker);const[t]=Li.compute(this.options,this._context.model.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new ki(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const e=new bi(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(e)&&(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return!!e.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(this._samplingState){const t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.toLineNumber);return!!t&&this._actual.onLinesChanged(t[0],t[1])}return this._actual.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){if(this._samplingState){const[t,i]=this._samplingState.onLinesDeleted(e);return t<=i&&this._actual.onLinesChanged(t+1,i+1),this._shouldCheckSampling=!0,!0}return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber)}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged()}onThemeChanged(e){return this._context.model.invalidateMinimapColorCache(),this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(this._samplingState){let t=[];for(const i of e.ranges){const e=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);e&&t.push({fromLineNumber:e[0],toLineNumber:e[1]})}return!!t.length&&this._actual.onTokensChanged(t)}return this._actual.onTokensChanged(e.ranges)}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),i=this._samplingState.modelLineToMinimapLine(i));const n={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=Li.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.model.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.model.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let o=0,s=t-e+1;o<s;o++)i[o]?n[o]=this._context.model.getViewLineData(this._samplingState.minimapLines[e+o-1]):n[o]=null;return n}return this._context.model.getMinimapLinesRenderingData(e,t,i).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState){this._minimapSelections=[];for(const e of this._selections){const[t,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new T.Y(t,e.startColumn,i,e.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const n=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];i=new ve.e(n,1,o,this._context.model.getLineMaxColumn(o))}else i=new ve.e(e,1,t,this._context.model.getLineMaxColumn(t));const n=this._context.model.getDecorationsInViewport(i);if(this._samplingState){let e=[];for(const t of n){if(!t.options.minimap)continue;const i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),o=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new hi.$l(new ve.e(n,i.startColumn,o,i.endColumn),t.options))}return e}return n}getOptions(){return this._context.model.getTextModelOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.model.revealRange("mouse",!1,new ve.e(e,1,e,1),1,0)}setScrollTop(e){this._context.model.setScrollPosition({scrollTop:e},1)}}class ki extends k.JT{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(Rt.ov),this._domNode=(0,M.X)(document.createElement("div")),Z.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,M.X)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,M.X)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,M.X)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,M.X)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,M.X)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=S.mu(this._domNode.domNode,"mousedown",(e=>{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=S.i(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,i,e.posy,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderMouseMoveMonitor=new F.Z,this._sliderMouseDownListener=S.mu(this._slider.domNode,"mousedown",(e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)})),this._gestureDisposable=A.o.addTarget(this._domNode.domNode),this._sliderTouchStartListener=S.nm(this._domNode.domNode,A.t.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=S.nm(this._domNode.domNode,A.t.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=S.mu(this._domNode.domNode,A.t.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i,n,o){this._slider.toggleClassName("active",!0);const s=(e,n)=>{const s=Math.abs(n-t);if(R.ED&&s>140)return void this._model.setScrollTop(o.scrollTop);const r=e-i;this._model.setScrollTop(o.getDesiredScrollTopFromDelta(r))};n!==i&&s(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,F.e,(e=>s(e.posy,e.posx)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Si(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(Rt.ov),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=Ci.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(ve.e.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,s=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const d=new Ni(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,d,e,s),this._renderDecorationsLineHighlights(l,i,d,e,s);const h=new Ni(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,h,e,s,a,r,n),this._renderDecorationsHighlights(l,i,h,e,s,a,r,n)}}_renderSelectionLineHighlights(e,t,i,n,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,r=0;for(const a of t){const t=Math.max(n.startLineNumber,a.startLineNumber),l=Math.min(n.endLineNumber,a.endLineNumber);if(t>l)continue;for(let e=t;e<=l;e++)i.set(e,!0);const d=(t-n.startLineNumber)*o,h=(l-n.startLineNumber)*o+o;r>=d||(r>s&&e.fillRect(re.y0,s,e.canvas.width,r-s),s=d),r=h}r>s&&e.fillRect(re.y0,s,e.canvas.width,r-s)}_renderDecorationsLineHighlights(e,t,i,n,o){const s=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||l.position!==zt.F5.Inline)continue;const d=Math.max(n.startLineNumber,a.range.startLineNumber),h=Math.min(n.endLineNumber,a.range.endLineNumber);if(d>h)continue;const c=l.getColor(this._theme);if(!c||c.isTransparent())continue;let u=s.get(c.toString());u||(u=c.transparent(.5).toString(),s.set(c.toString(),u)),e.fillStyle=u;for(let t=d;t<=h;t++){if(i.has(t))continue;i.set(t,!0);const s=(d-n.startLineNumber)*o;e.fillRect(re.y0,s,e.canvas.width,o)}}}_renderSelectionsHighlights(e,t,i,n,o,s,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=Math.max(n.startLineNumber,l.startLineNumber),d=Math.min(n.endLineNumber,l.endLineNumber);if(!(t>d))for(let h=t;h<=d;h++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,h,o,o,s,r,a)}}_renderDecorationsHighlights(e,t,i,n,o,s,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const d=Math.max(n.startLineNumber,l.range.startLineNumber),h=Math.min(n.endLineNumber,l.range.endLineNumber);if(d>h)continue;const c=t.getColor(this._theme);if(c&&!c.isTransparent())for(let u=d;u<=h;u++)switch(t.position){case zt.F5.Inline:this.renderDecorationOnLine(e,i,l.range,c,n,u,o,o,s,r,a);continue;case zt.F5.Gutter:const t=(u-n.startLineNumber)*o,d=2;this.renderDecoration(e,c,d,t,2,o);continue}}}renderDecorationOnLine(e,t,i,n,o,s,r,a,l,d,h){const c=(s-o.startLineNumber)*a;if(c+r<0||c>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===s?i.startColumn:1,m=g===s?i.endColumn:this._model.getLineMaxColumn(s),f=this.getXOffsetForPosition(t,s,p,l,d,h),_=this.getXOffsetForPosition(t,s,m,l,d,h);this.renderDecoration(e,n,f,c,_-f,r)}getXOffsetForPosition(e,t,i,n,o,s){if(1===i)return re.y0;if((i-1)*o>=s)return s;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[re.y0];let a=re.y0;for(let e=1;e<i.length+1;e++){const t=i.charCodeAt(e-1),l=a+(9===t?n*o:je.K7(t)?2*o:o);if(l>=s){r[e]=s;break}r[e]=l,a=l}e.set(t,r)}return i-1<r.length?r[i-1]:s}renderDecoration(e,t,i,n,o,s){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,o,s)}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new yi(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;let[s,r,a]=ki._renderUntouchedLines(o,t,i,n,this._lastRenderData);const l=this._model.getMinimapLinesRenderingData(t,i,a),d=this._model.getOptions().tabSize,h=this._model.options.defaultBackgroundColor,c=this._model.options.backgroundColor,u=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),m=this._model.options.renderMinimap,f=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=(1===m?2:3)*_,C=n>b?Math.floor((n-b)/2):0,w=c.a/255,y=new ai(Math.round((c.r-h.r)*w+h.r),Math.round((c.g-h.g)*w+h.g),Math.round((c.b-h.b)*w+h.b),255);let S=0;const L=[];for(let e=0,s=i-t+1;e<s;e++)a[e]&&ki._renderLine(o,y,c.a,p,m,v,g,u,f,S,C,d,l[e],_,n),L[e]=new wi(S),S+=n;const x=-1===s?0:s,k=(-1===r?o.height:r)-x;return this._canvas.domNode.getContext("2d").putImageData(o,0,0,0,x,o.width,k),new yi(e,o,L)}static _renderUntouchedLines(e,t,i,n,o){const s=[];if(!o){for(let e=0,n=i-t+1;e<n;e++)s[e]=!0;return[-1,-1,s]}const r=o._get(),a=r.imageData.data,l=r.rendLineNumberStart,d=r.lines,h=d.length,c=e.width,u=e.data,g=(i-t+1)*n*c*4;let p=-1,m=-1,f=-1,_=-1,v=-1,b=-1,C=0;for(let e=t;e<=i;e++){const i=e-t,o=e-l,r=o>=0&&o<h?d[o].dy:-1;if(-1===r){s[i]=!0,C+=n;continue}const w=r*c*4,y=(r+n)*c*4,S=C*c*4,L=(C+n)*c*4;_===w&&b===S?(_=y,b=L):(-1!==f&&(u.set(a.subarray(f,_),v),-1===p&&0===f&&f===v&&(p=_),-1===m&&_===g&&f===v&&(m=f)),f=w,_=y,v=S,b=L),s[i]=!1,C+=n}return-1!==f&&(u.set(a.subarray(f,_),v),-1===p&&0===f&&f===v&&(p=_),-1===m&&_===g&&f===v&&(m=f)),[-1===p?-1:p/(4*c),-1===m?-1:m/(4*c),s]}static _renderLine(e,t,i,n,o,s,r,a,l,d,h,c,u,g,p){const m=u.content,f=u.tokens,_=e.width-s,v=1===p;let b=re.y0,C=0,w=0;for(let u=0,p=f.getCount();u<p;u++){const p=f.getEndOffset(u),y=f.getForeground(u),S=r.getColor(y);for(;C<p;C++){if(b>_)return;const r=m.charCodeAt(C);if(9===r){const e=c-(C+w)%c;w+=e-1,b+=e*s}else if(32===r)b+=s;else{const c=je.K7(r)?2:1;for(let u=0;u<c;u++)if(2===o?l.blockRenderChar(e,b,d+h,S,a,t,i,v):l.renderChar(e,b,d+h,r,S,a,t,i,g,n,v),b+=s,b>_)return}}}}}class Ni{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;e<t;e++)this._values[e]=i}has(e){return this.get(e)!==this._defaultValue}set(e,t){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}(0,Ye.Ic)(((e,t)=>{const i=e.getColor(Rt.CA);i&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${i}; }`);const n=e.getColor(Rt.Xy);n&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${n}; }`);const o=e.getColor(Rt.br);o&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${o}; }`);const s=e.getColor(Rt._w);s&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)}));var Di=i(17782),Ei={};Ei.styleTagTransform=b(),Ei.setAttributes=m(),Ei.insert=g().bind(null,"head"),Ei.domAPI=c(),Ei.insertStyleElement=_(),d()(Di.Z,Ei),Di.Z&&Di.Z.locals&&Di.Z.locals;class Ii extends q{constructor(e){super(e);const t=this._context.configuration.options.get(129);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=(0,M.X)(document.createElement("div")),Z.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(129);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=(0,M.X)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];this._renderWidget(this._widgets[i])}}}var Ti=i(66051);class Mi{constructor(e,t){const i=e.options;this.lineHeight=i.get(58),this.pixelRatio=i.get(127),this.overviewRulerLanes=i.get(73),this.renderBorder=i.get(72);const n=t.getColor(Qe.zw);this.borderColor=n?n.toString():null,this.hideCursor=i.get(51);const o=t.getColor(Qe.n0);this.cursorColor=o?o.transparent(.7).toString():null,this.themeType=t.type;const s=i.get(64),r=s.enabled,a=s.side,l=r?t.getColor(Qe.e_)||li.RW.getDefaultBackground():null;this.backgroundColor=null===l||"left"===a?null:Ti.Il.Format.CSS.formatHex(l);const d=i.get(129).overviewRuler;this.top=d.top,this.right=d.right,this.domWidth=d.width,this.domHeight=d.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[h,c]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=h,this.w=c}_initLanes(e,t,i){const n=t-e;if(i>=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,s=e+t;return[[0,e,s,e,e+t+o,e,s,e],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class Ri extends q{constructor(e){super(e),this._domNode=(0,M.X)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=li.RW.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Mi(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t<i;t++)this._cursorPositions[t]=e.selections[t].getPosition();return this._cursorPositions.sort(_e.L.compare),!0}onDecorationsChanged(e){return!!e.affectsOverviewRuler}onFlushed(e){return!0}onScrollChanged(e){return e.scrollHeightChanged}onZonesChanged(e){return!0}onThemeChanged(e){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render()}_render(){if(0===this._settings.overviewRulerLanes)return void this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"");const e=this._settings.canvasWidth,t=this._settings.canvasHeight,i=this._settings.lineHeight,n=this._context.viewLayout,o=t/this._context.viewLayout.getScrollHeight(),s=this._context.model.getAllOverviewRulerDecorations(this._context.theme),r=6*this._settings.pixelRatio|0,a=r/2|0,l=this._domNode.domNode.getContext("2d");null===this._settings.backgroundColor?l.clearRect(0,0,e,t):(l.fillStyle=this._settings.backgroundColor,l.fillRect(0,0,e,t));const d=this._settings.x,h=this._settings.w;s.sort(hi.SQ.cmp);for(const e of s){const s=e.color,c=e.data;l.fillStyle=s;let u=0,g=0,p=0;for(let e=0,s=c.length/3;e<s;e++){const s=c[3*e],m=c[3*e+1],f=c[3*e+2];let _=n.getVerticalOffsetForLineNumber(m)*o|0,v=(n.getVerticalOffsetForLineNumber(f)+i)*o|0;if(v-_<r){let e=(_+v)/2|0;e<a?e=a:e+a>t&&(e=t-a),_=e-a,v=e+a}_>p+1||s!==u?(0!==e&&l.fillRect(d[u],g,h[u],p-g),u=s,g=_,p=v):v>p&&(p=v)}l.fillRect(d[u],g,h[u],p-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,i=e/2|0,s=this._settings.x[7],r=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let a=-100,d=-100;for(let h=0,c=this._cursorPositions.length;h<c;h++){const c=this._cursorPositions[h];let u=n.getVerticalOffsetForLineNumber(c.lineNumber)*o|0;u<i?u=i:u+i>t&&(u=t-i);const g=u-i,p=g+e;g>d+1?(0!==h&&l.fillRect(s,a,r,d-a),a=g,d=p):p>d&&(d=p)}l.fillRect(s,a,r,d-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())}}var Ai=i(73979);class Oi extends ${constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,M.X)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Ai.Tj((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(58)),this._zoneManager.setPixelRatio(i.get(127)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(58)&&(this._zoneManager.setLineHeight(t.get(58)),this._render()),e.hasChanged(127)&&(this._zoneManager.setPixelRatio(t.get(127)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,s=0,r=0;for(const a of t){const t=a.colorId,l=a.from,d=a.to;t!==o?(e.fillRect(0,s,n,r-s),o=t,e.fillStyle=i[o],s=l,r=d):r>=l?r=Math.max(r,d):(e.fillRect(0,s,n,r-s),s=l,r=d)}e.fillRect(0,s,n,r-s)}}var Pi=i(33807),Fi={};Fi.styleTagTransform=b(),Fi.setAttributes=m(),Fi.insert=g().bind(null,"head"),Fi.domAPI=c(),Fi.insertStyleElement=_(),d()(Pi.Z,Fi),Pi.Z&&Pi.Z.locals&&Pi.Z.locals;class Bi extends q{constructor(e){super(e),this.domNode=(0,M.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e<t){const{tabSize:i}=this._context.model.getTextModelOptions(),n=i;let o=t-e;for(;o>0;){const e=(0,M.X)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t<i;t++){const i=this._renderedRulers[t],n=this._rulers[t];i.setBoxShadow(n.color?`1px 0 0 0 ${n.color} inset`:""),i.setHeight(Math.min(e.scrollHeight,1e6)),i.setLeft(n.column*this._typicalHalfwidthCharacterWidth)}}}(0,Ye.Ic)(((e,t)=>{const i=e.getColor(Qe.zk);i&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)}));var Wi=i(56334),Vi={};Vi.styleTagTransform=b(),Vi.setAttributes=m(),Vi.insert=g().bind(null,"head"),Vi.domAPI=c(),Vi.insertStyleElement=_(),d()(Wi.Z,Vi),Wi.Z&&Wi.Z.locals&&Wi.Z.locals;class Hi extends q{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(91);this._useShadows=t.useShadows,this._domNode=(0,M.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(129);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(91);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}(0,Ye.Ic)(((e,t)=>{const i=e.getColor(Rt._w);i&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)}));var zi=i(17751),Ki={};Ki.styleTagTransform=b(),Ki.setAttributes=m(),Ki.insert=g().bind(null,"head"),Ki.domAPI=c(),Ki.insertStyleElement=_(),d()(zi.Z,Ki),zi.Z&&zi.Z.locals&&zi.Z.locals;class Ui{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class ji{constructor(e,t){this.lineNumber=e,this.ranges=t}}function $i(e){return new Ui(e)}function qi(e){return new ji(e.lineNumber,e.ranges.map($i))}class Zi extends Ge{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(58),this._roundedSelection=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(58),this._roundedSelection=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t<i;t++)if(e[t].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,s=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e<i.length;e++)i[e].lineNumber===n&&(o=i[e].ranges[0]);const r=t[t.length-1].lineNumber;if(r===e.endLineNumber)for(let e=i.length-1;!s&&e>=0;e--)i[e].lineNumber===r&&(s=i[e].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(let e=0,i=t.length;e<i;e++){const r=t[e].ranges[0],a=r.left,l=r.left+r.width,d={top:0,bottom:0},h={top:0,bottom:0};if(e>0){const i=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;Gi(a-i)<n?d.top=2:a>i&&(d.top=1),Gi(l-o)<n?h.top=2:i<l&&l<o&&(h.top=1)}else o&&(d.top=o.startStyle.top,h.top=o.endStyle.top);if(e+1<i){const i=t[e+1].ranges[0].left,o=t[e+1].ranges[0].left+t[e+1].ranges[0].width;Gi(a-i)<n?d.bottom=2:i<a&&a<o&&(d.bottom=1),Gi(l-o)<n?h.bottom=2:l<o&&(h.bottom=1)}else s&&(d.bottom=s.startStyle.bottom,h.bottom=s.endStyle.bottom);r.startStyle=d,r.endStyle=h}}_getVisibleRangesWithStyle(e,t,i){const n=(t.linesVisibleRangesForRange(e,!0)||[]).map(qi);return!this._visibleRangesHaveGaps(n)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(t.visibleRange,n,i),n}_createSelectionPiece(e,t,i,n,o){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;left:"+n.toString()+"px;width:"+o.toString()+"px;height:"+t+'px;"></div>'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,s=this._lineHeight.toString(),r=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let d=0,h=n.length;d<h;d++){const h=n[d],c=h.lineNumber,u=c-t,g=!i||c!==l&&c!==a?s:r,p=i&&c===a?1:0;let m="",f="";for(let e=0,t=h.ranges.length;e<t;e++){const t=h.ranges[e];if(o){const e=t.startStyle,i=t.endStyle;if(1===e.top||1===e.bottom){m+=this._createSelectionPiece(p,g,Zi.SELECTION_CLASS_NAME,t.left-Zi.ROUNDED_PIECE_WIDTH,Zi.ROUNDED_PIECE_WIDTH);let i=Zi.EDITOR_BACKGROUND_CLASS_NAME;1===e.top&&(i+=" "+Zi.SELECTION_TOP_RIGHT),1===e.bottom&&(i+=" "+Zi.SELECTION_BOTTOM_RIGHT),m+=this._createSelectionPiece(p,g,i,t.left-Zi.ROUNDED_PIECE_WIDTH,Zi.ROUNDED_PIECE_WIDTH)}if(1===i.top||1===i.bottom){m+=this._createSelectionPiece(p,g,Zi.SELECTION_CLASS_NAME,t.left+t.width,Zi.ROUNDED_PIECE_WIDTH);let e=Zi.EDITOR_BACKGROUND_CLASS_NAME;1===i.top&&(e+=" "+Zi.SELECTION_TOP_LEFT),1===i.bottom&&(e+=" "+Zi.SELECTION_BOTTOM_LEFT),m+=this._createSelectionPiece(p,g,e,t.left+t.width,Zi.ROUNDED_PIECE_WIDTH)}}let i=Zi.SELECTION_CLASS_NAME;if(o){const e=t.startStyle,n=t.endStyle;0===e.top&&(i+=" "+Zi.SELECTION_TOP_LEFT),0===e.bottom&&(i+=" "+Zi.SELECTION_BOTTOM_LEFT),0===n.top&&(i+=" "+Zi.SELECTION_TOP_RIGHT),0===n.bottom&&(i+=" "+Zi.SELECTION_BOTTOM_RIGHT)}f+=this._createSelectionPiece(p,g,i,t.left,t.width)}e[u][0]+=m,e[u][1]+=f}}prepareRender(e){const t=[],i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let e=i;e<=n;e++)t[e-i]=["",""];const o=[];for(let n=0,s=this._selections.length;n<s;n++){const s=this._selections[n];if(s.isEmpty()){o[n]=null;continue}const r=this._getVisibleRangesWithStyle(s,e,this._previousFrameVisibleRangesWithStyle[n]);o[n]=r,this._actualRenderOneSelection(t,i,this._selections.length>1,r)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Gi(e){return e<0?-e:e}Zi.SELECTION_CLASS_NAME="selected-text",Zi.SELECTION_TOP_LEFT="top-left-radius",Zi.SELECTION_BOTTOM_LEFT="bottom-left-radius",Zi.SELECTION_TOP_RIGHT="top-right-radius",Zi.SELECTION_BOTTOM_RIGHT="bottom-right-radius",Zi.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",Zi.ROUNDED_PIECE_WIDTH=10,(0,Ye.Ic)(((e,t)=>{const i=e.getColor(Rt.hE);i&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=e.getColor(Rt.ES);n&&t.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const o=e.getColor(Rt.yb);o&&!o.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${o}; }`)}));var Qi=i(46557),Yi={};Yi.styleTagTransform=b(),Yi.setAttributes=m(),Yi.insert=g().bind(null,"head"),Yi.domAPI=c(),Yi.insertStyleElement=_(),d()(Qi.Z,Yi),Qi.Z&&Qi.Z.locals&&Qi.Z.locals;class Ji{constructor(e,t,i,n,o,s){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=o,this.textContentClassName=s}}class Xi{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(43);this._cursorStyle=t.get(24),this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,M.X)(document.createElement("div")),this._domNode.setClassName(`cursor ${tt.S}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),D.V.applyFontInfo(this._domNode,i),this._domNode.setDisplay("none"),this._position=new _e.L(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(43);return this._cursorStyle=t.get(24),this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),D.V.applyFontInfo(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_prepareRender(e){let t="";if(this._cursorStyle===re.d2.Line||this._cursorStyle===re.d2.LineThin){const i=e.visibleRangeForPosition(this._position);if(!i||i.outsideRenderedLine)return null;let n;if(this._cursorStyle===re.d2.Line){if(n=S.Uh(this._lineCursorWidth>0?this._lineCursorWidth:2),n>2){const e=this._context.model.getLineContent(this._position.lineNumber),i=je.vH(e,this._position.column-1);t=e.substr(this._position.column-1,i)}}else n=S.Uh(1);let o=i.left;n>=2&&o>=1&&(o-=1);const s=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new Ji(s,o,n,this._lineHeight,t,"")}const i=this._context.model.getLineContent(this._position.lineNumber),n=je.vH(i,this._position.column-1),o=e.linesVisibleRangesForRange(new ve.e(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+n),!1);if(!o||0===o.length)return null;const s=o[0];if(s.outsideRenderedLine||0===s.ranges.length)return null;const r=s.ranges[0],a=r.width<1?this._typicalHalfwidthCharacterWidth:r.width;let l="";if(this._cursorStyle===re.d2.Block){const e=this._context.model.getViewLineData(this._position.lineNumber);t=i.substr(this._position.column-1,n);const o=e.tokens.findTokenIndexAtOffset(this._position.column-1);l=e.tokens.getClassName(o)}let d=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return this._cursorStyle!==re.d2.Underline&&this._cursorStyle!==re.d2.UnderlineThin||(d+=this._lineHeight-2,h=2),new Ji(d,r.left,a,h,t,l)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${tt.S} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class en extends q{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(80),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Xi(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,M.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new P._F,this._cursorFlatBlinkInterval=new P.zh,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(80),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t){if(this._primaryCursor.onCursorPositionChanged(e),this._updateBlinking(),this._secondaryCursors.length<t.length){const e=t.length-this._secondaryCursors.length;for(let t=0;t<e;t++){const e=new Xi(this._context);this._domNode.domNode.insertBefore(e.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(e)}}else if(this._secondaryCursors.length>t.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t<e;t++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let e=0;e<t.length;e++)this._secondaryCursors[e].onCursorPositionChanged(t[e])}onCursorStateChanged(e){const t=[];for(let i=0,n=e.selections.length;i<n;i++)t[i]=e.selections[i].getPosition();this._onCursorPositionChanged(t[0],t.slice(1));const i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const t=t=>{for(let i=0,n=e.ranges.length;i<n;i++)if(e.ranges[i].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[i].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(const e of this._secondaryCursors)if(t(e.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._isComposingInput?0:this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),t=0===e,i=5===e;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),t||i||(1===e?this._cursorFlatBlinkInterval.cancelAndSet((()=>{this._isVisible?this._hide():this._show()}),en.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),en.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case re.d2.Line:e+=" cursor-line-style";break;case re.d2.Block:e+=" cursor-block-style";break;case re.d2.Underline:e+=" cursor-underline-style";break;case re.d2.LineThin:e+=" cursor-line-thin-style";break;case re.d2.BlockOutline:e+=" cursor-block-outline-style";break;case re.d2.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].prepareRender(e)}render(e){let t=[],i=0;const n=this._primaryCursor.render(e);n&&(t[i++]=n);for(let n=0,o=this._secondaryCursors.length;n<o;n++){const o=this._secondaryCursors[n].render(e);o&&(t[i++]=o)}this._renderData=t}getLastRenderData(){return this._renderData}}en.BLINK_INTERVAL=500,(0,Ye.Ic)(((e,t)=>{const i=e.getColor(Qe.n0);if(i){let n=e.getColor(Qe.fY);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const tn=()=>{throw new Error("Invalid change accessor")};class nn extends q{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(129);this._lineHeight=t.get(58),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,M.X)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,M.X)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.model.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let o=0,s=n.length;o<s;o++){const s=n[o],r=this._zones[s],a=this._computeWhitespaceProps(r.delegate);r.isInHiddenArea=a.isInHiddenArea;const l=t.get(s);!l||l.afterLineNumber===a.afterViewLineNumber&&l.height===a.heightInPx||(e.changeOneWhitespace(s,a.afterViewLineNumber,a.heightInPx),this._safeCallOnComputedHeight(r.delegate,a.heightInPx),i=!0)}})),i}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129);return this._lineHeight=t.get(58),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(58)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return void 0!==e.afterColumn?e.afterColumn:1e4}_computeWhitespaceProps(e){if(0===e.afterLineNumber)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};let t,i;if(void 0!==e.afterColumn)t=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{const i=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new _e.L(i,this._context.model.getModelLineMaxColumn(i))}i=t.column===this._context.model.getModelLineMaxColumn(t.lineNumber)?this._context.model.validateModelPosition({lineNumber:t.lineNumber+1,column:1}):this._context.model.validateModelPosition({lineNumber:t.lineNumber,column:t.column+1});const n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),o=this._context.model.coordinatesConverter.modelPositionIsVisible(i);return{isInHiddenArea:!o,afterViewLineNumber:n.lineNumber,heightInPx:o?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.model.changeWhitespace((i=>{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{return e(t)}catch(e){(0,L.dL)(e)}}(e,n),n.addZone=tn,n.removeZone=tn,n.layoutZone=tn})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,M.X)(t.domNode),marginDomNode:t.marginDomNode?(0,M.X)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,L.dL)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,L.dL)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);const o=Object.keys(this._zones);for(let t=0,n=o.length;t<n;t++){const n=o[t],s=this._zones[n];let r=0,a=0,l="none";i.hasOwnProperty(n)?(r=i[n].verticalOffset-e.bigNumbersDelta,a=i[n].height,l="block",s.isVisible||(s.domNode.setAttribute("monaco-visible-view-zone","true"),s.isVisible=!0),this._safeCallOnDomNodeTop(s.delegate,e.getScrolledTopFromAbsoluteTop(i[n].verticalOffset))):(s.isVisible&&(s.domNode.removeAttribute("monaco-visible-view-zone"),s.isVisible=!1),this._safeCallOnDomNodeTop(s.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),s.domNode.setTop(r),s.domNode.setHeight(a),s.domNode.setDisplay(l),s.marginDomNode&&(s.marginDomNode.setTop(r),s.marginDomNode.setHeight(a),s.marginDomNode.setDisplay(l))}n&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}class on{constructor(e){this._theme=e}get type(){return this._theme.type}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class sn{constructor(e,t,i){this.configuration=e,this.theme=new on(t),this.model=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.model.addViewEventHandler(e)}removeEventHandler(e){this.model.removeViewEventHandler(e)}}class rn{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new ve.e(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class an extends ${constructor(e,t,i,n,o,s){super(),this._selections=[new T.Y(1,1,1,1)],this._renderAnimationFrame=null;const r=new rt(t,n,o,e);this._context=new sn(t,i.getColorTheme(),n),this._configPixelRatio=this._context.configuration.options.get(127),this._context.addEventHandler(this),this._register(i.onDidColorThemeChange((e=>{this._context.theme.update(e),this._context.model.onDidColorThemeChange(),this.render(!0,!1)}))),this._viewParts=[],this._textAreaHandler=new ot(this._context,r,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,M.X)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,M.X)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,M.X)(document.createElement("div")),Z.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new At(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Jt(this._context,this._linesContent),this._viewZones=new nn(this._context),this._viewParts.push(this._viewZones);const a=new Ri(this._context);this._viewParts.push(a);const l=new Hi(this._context);this._viewParts.push(l);const d=new ft(this._context);this._viewParts.push(d),d.addDynamicOverlay(new Nt(this._context)),d.addDynamicOverlay(new Zi(this._context)),d.addDynamicOverlay(new jt(this._context)),d.addDynamicOverlay(new Tt(this._context));const h=new _t(this._context);this._viewParts.push(h),h.addDynamicOverlay(new Dt(this._context)),h.addDynamicOverlay(new Wt(this._context)),h.addDynamicOverlay(new oi(this._context)),h.addDynamicOverlay(new ti(this._context)),h.addDynamicOverlay(new Je(this._context));const c=new Xe(this._context);c.getDomNode().appendChild(this._viewZones.marginDomNode),c.getDomNode().appendChild(h.getDomNode()),this._viewParts.push(c),this._contentWidgets=new bt(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new en(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new Ii(this._context),this._viewParts.push(this._overlayWidgets);const u=new Bi(this._context);this._viewParts.push(u);const g=new xi(this._context);if(this._viewParts.push(g),a){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(a.getDomNode(),e.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(u.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(c.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),s?s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new ze(this._context,r,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new Se(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new _e.L(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new _e.L(e,t)))}}_applyLayout(){const e=this._context.configuration.options.get(129);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(126)+" "+(0,Ye.m6)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this._configPixelRatio=this._context.configuration.options.get(127),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=S.lI(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{return e()}catch(e){(0,L.dL)(e)}}((()=>this._actualRender()))}_getViewPartsToRender(){let e=[],t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!S.Uw(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new rn(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new Q(this._context.viewLayout,i,this._viewLines);for(const t of e)t.prepareRender(n);for(const t of e)t.render(n),t.onDidRender();Math.abs(I.mX()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.model.setScrollPosition({scrollTop:e.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const i=this._context.model.validateModelPosition({lineNumber:e,column:t}),n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new _e.L(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?at.convertViewToModelMouseTarget(i,this._context.model.coordinatesConverter):null}createOverviewRuler(e){return new Oi(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){let t=e.position&&e.position.range||null;if(null===t){const i=e.position?e.position.position:null;null!==i&&(t=new ve.e(i.lineNumber,i.column,i.lineNumber,i.column))}const i=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,i),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}class ln{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new be.rS(new ve.e(1,1,1,1),0,new _e.L(1,1),0),new be.rS(new ve.e(1,1,1,1),0,new _e.L(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new be.Vi(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return 0===this.modelState.selection.getDirection()?new T.Y(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new T.Y(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),o=t.selectionStart.getEndPosition(),s=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,s),a=this._validatePositionWithCache(e,o,n,r);return i.equals(s)&&n.equals(r)&&o.equals(a)?t:new be.rS(ve.e.fromPositions(r,a),t.selectionStartLeftoverVisibleColumns+n.column-r.column,s,t.leftoverVisibleColumns+i.column-s.column)}_setState(e,t,i){if(i&&(i=ln._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),s=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new be.rS(i,n,o,s)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new be.rS(n,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new be.rS(n,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new _e.L(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new _e.L(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new ve.e(n.lineNumber,n.column,o.lineNumber,o.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new be.rS(s,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class dn{constructor(e){this.context=e,this.primaryCursor=new ln(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].startTrackingSelection(this.context)}stopTrackingSelections(){this.primaryCursor.stopTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){this.primaryCursor.ensureValidState(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].ensureValidState(this.context)}readSelectionFromMarkers(){let e=[];e[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].readSelectionFromMarkers(this.context);return e}getAll(){let e=[];e[0]=this.primaryCursor.asCursorState();for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].asCursorState();return e}getViewPositions(){let e=[];e[0]=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].viewState.position;return e}getTopMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++){const i=this.secondaryCursors[t].viewState.position;i.isBefore(e)&&(e=i)}return e}getBottomMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++){const i=this.secondaryCursors[t].viewState.position;e.isBeforeOrEqual(i)&&(e=i)}return e}getSelections(){let e=[];e[0]=this.primaryCursor.modelState.selection;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].modelState.selection;return e}getViewSelections(){let e=[];e[0]=this.primaryCursor.viewState.selection;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].viewState.selection;return e}setSelections(e){this.setStates(be.Vi.fromModelSelections(e))}getPrimaryCursor(){return this.primaryCursor.asCursorState()}setStates(e){null!==e&&(this.primaryCursor.setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.secondaryCursors.length,i=e.length;if(t<i){let e=i-t;for(let t=0;t<e;t++)this._addSecondaryCursor()}else if(t>i){let e=t-i;for(let t=0;t<e;t++)this._removeSecondaryCursor(this.secondaryCursors.length-1)}for(let t=0;t<i;t++)this.secondaryCursors[t].setState(this.context,e[t].modelState,e[t].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.secondaryCursors.push(new ln(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length}getLastAddedCursorIndex(){return 0===this.secondaryCursors.length||0===this.lastAddedCursorIndex?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}_getAll(){let e=[];e[0]=this.primaryCursor;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t];return e}normalize(){if(0===this.secondaryCursors.length)return;let e=this._getAll(),t=[];for(let i=0,n=e.length;i<n;i++)t.push({index:i,selection:e[i].modelState.selection});t.sort(((e,t)=>e.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber));for(let i=0;i<t.length-1;i++){const n=t[i],o=t[i+1],s=n.selection,r=o.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let a;if(a=r.isEmpty()||s.isEmpty()?r.getStartPosition().isBeforeOrEqual(s.getEndPosition()):r.getStartPosition().isBefore(s.getEndPosition()),a){const s=n.index<o.index?i:i+1,r=n.index<o.index?i+1:i,a=t[r].index,l=t[s].index,d=t[r].selection,h=t[s].selection;if(!d.equalsSelection(h)){const i=d.plusRange(h),n=d.selectionStartLineNumber===d.startLineNumber&&d.selectionStartColumn===d.startColumn,o=h.selectionStartLineNumber===h.startLineNumber&&h.selectionStartColumn===h.startColumn;let r,c;a===this.lastAddedCursorIndex?(r=n,this.lastAddedCursorIndex=l):r=o,c=r?new T.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new T.Y(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn),t[s].selection=c;const u=be.Vi.fromModelSelection(c);e[l].setState(this.context,u.modelState,u.viewState)}for(const e of t)e.index>a&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}var hn=i(52303),cn=i(44884),un=i(84993);class gn{constructor(){this.type=0}}class pn{constructor(){this.type=1}}class mn{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class fn{constructor(e,t){this.type=3,this.selections=e,this.modelSelections=t}}class _n{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class vn{constructor(){this.type=5}}class bn{constructor(e){this.type=6,this.isFocused=e}}class Cn{constructor(){this.type=7}}class wn{constructor(){this.type=8}}class yn{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class Sn{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class Ln{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class xn{constructor(e,t,i,n,o,s){this.type=12,this.source=e,this.range=t,this.selections=i,this.verticalType=n,this.revealHorizontal=o,this.scrollType=s}}class kn{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class Nn{constructor(){this.type=14}}class Dn{constructor(e){this.type=15,this.ranges=e}}class En{constructor(){this.type=16}}class In{constructor(){this.type=17}}class Tn extends k.JT{constructor(){super(),this._onEvent=this._register(new x.Q5),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t<i;t++)if(this._outgoingEvents[t].kind===e.kind)return void(this._outgoingEvents[t]=this._outgoingEvents[t].merge(e));this._outgoingEvents.push(e)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t<i;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)}removeViewEventHandler(e){for(let t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}}beginEmitViewEvents(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new Mn),this._collector}endEmitViewEvents(){if(this._collectorCnt--,0===this._collectorCnt){const e=this._collector.outgoingEvents,t=this._collector.viewEvents;this._collector=null;for(const t of e)this._addOutgoingEvent(t);t.length>0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class Mn{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class Rn{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return 0!==e.kind?this:new Rn(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class An{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new An(this.oldHasFocus,e.hasFocus)}}class On{constructor(e,t,i,n,o,s,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=s,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}merge(e){return 2!==e.kind?this:new On(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Pn{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class Fn{constructor(e,t,i,n,o,s,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=s,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(!e[n].equalsSelection(t[n]))return!1;return!0}isNoOp(){return Fn._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(e){return 6!==e.kind?this:new Fn(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class Bn{constructor(){this.kind=5}isNoOp(){return!1}merge(e){return this}}class Wn{constructor(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getCursorStates()}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class Vn{constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){let e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){let t=[];for(let e=0;e<this._autoClosedEnclosingDecorations.length;e++){const i=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[e]);if(i&&(t.push(i),i.startLineNumber!==i.endLineNumber))return!1}t.sort(ve.e.compareRangesUsingStarts),e.sort(ve.e.compareRangesUsingStarts);for(let i=0;i<e.length;i++){if(i>=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class Hn extends k.JT{constructor(e,t,i,n){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new be.zp(this._model,this._viewModel,this._coordinatesConverter,n),this._cursors=new dn(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,k.B9)(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new be.zp(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;t<this._autoClosedActions.length;t++){const i=this._autoClosedActions[t];i.isValid(e)||(i.dispose(),this._autoClosedActions.splice(t,1),t--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,t,i,n){let o=!1;null!==n&&n.length>Hn.MAX_CURSOR_COUNT&&(n=n.slice(0,Hn.MAX_CURSOR_COUNT),o=!0);const s=new Wn(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,s,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n){const o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,i,n);else{const s=o[0],r=new ve.e(s.lineNumber,s.column,s.lineNumber,s.column);this._emitCursorRevealRange(e,t,r,null,0,i,n)}}_revealPrimaryCursor(e,t,i,n,o){const s=this._cursors.getViewPositions();if(s.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),i,n,o);else{const r=s[0],a=new ve.e(r.lineNumber,r.column,r.lineNumber,r.column);this._emitCursorRevealRange(e,t,a,null,i,n,o)}}_emitCursorRevealRange(e,t,i,n,o,s,r){e.emitViewEvent(new xn(t,i,n,o,s,r))}saveState(){let e=[];const t=this._cursors.getSelections();for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push({inSelectionMode:!n.isEmpty(),selectionStart:{lineNumber:n.selectionStartLineNumber,column:n.selectionStartColumn},position:{lineNumber:n.positionLineNumber,column:n.positionColumn}})}return e}restoreState(e,t){let i=[];for(let e=0,n=t.length;e<n;e++){const n=t[e];let o=1,s=1;n.position&&n.position.lineNumber&&(o=n.position.lineNumber),n.position&&n.position.column&&(s=n.position.column);let r=o,a=s;n.selectionStart&&n.selectionStart.lineNumber&&(r=n.selectionStart.lineNumber),n.selectionStart&&n.selectionStart.column&&(a=n.selectionStart.column),i.push({selectionStartLineNumber:r,selectionStartColumn:a,positionLineNumber:o,positionColumn:s})}this.setStates(e,"restoreState",0,be.Vi.fromModelSelections(i)),this.revealPrimary(e,"restoreState",!0,1)}onModelContentChanged(e,t){if(t instanceof un.D8){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(e,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{if(this._knownModelVersionId=t.versionId,this._isHandling)return;const i=t.containsEvent(1);if(this._prevEditOperationType=0,i)this._cursors.dispose(),this._cursors=new dn(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&t.resultingSelection&&t.resultingSelection.length>0){const i=be.Vi.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,i)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,be.Vi.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:be.io.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:be.io.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,be.Vi.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let i=[],n=[];for(let o=0,s=e.length;o<s;o++)i.push({range:e[o],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),n.push({range:t[o],options:{description:"auto-closed-enclosing",stickiness:1}});const o=this._model.deltaDecorations([],i),s=this._model.deltaDecorations([],n);this._autoClosedActions.push(new Vn(this._model,o,s))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const t=zn.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);let i=[],n=[];for(let t=0;t<e.commands.length;t++){const o=e.commands[t];o instanceof cn.g&&o.enclosingRange&&o.closeCharacterRange&&(i.push(o.closeCharacterRange),n.push(o.enclosingRange))}i.length>0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const s=new Wn(this._model,this);if(s.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new fn(a,r)),!n||n.cursorState.length!==s.cursorState.length||s.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new Fn(a,r,l,s.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n.text||n.text.indexOf("\n")>=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const s=o[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(s);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-o[2].length-1,d=n.text.lastIndexOf(a,l-1);if(-1===d)return null;t.push([d,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);let s=[],r=[];const a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(o)for(let t=0,i=o.length;t<i;t++){const[i,n]=o[t],a=e[t],l=a.range.startLineNumber,d=a.range.startColumn-1+i,h=a.range.startColumn-1+n;s.push(new ve.e(l,h+1,l,h+2)),r.push(new ve.e(l,d+1,l,h+2))}const t=n(e);return t&&(this._isHandling=!0),t}));a&&(this._isHandling=!1,this.setSelections(e,t,a,0)),s.length>0&&this._pushAutoClosedAction(s,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=new Wn(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,L.dL)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this._revealPrimaryCursor(t,i,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return Vn.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit((()=>{"keyboard"===t&&(this._executeEditOperation(cn.u.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i<e;){const e=je.vH(t,i),n=t.substr(i,e);this._executeEditOperation(cn.u.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),n)),i+=e}}else this._executeEditOperation(cn.u.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))}),e,i)}compositionType(e,t,i,n,o,s){if(0!==t.length||0!==i||0!==n)this._executeEdit((()=>{this._executeEditOperation(cn.u.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))}),e,s);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new T.Y(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,s,t,0)}}paste(e,t,i,n,o){this._executeEdit((()=>{this._executeEditOperation(cn.u.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(hn.A.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new be.Tp(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new be.Tp(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}Hn.MAX_CURSOR_COUNT=1e4;class zn{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let e=0,t=n.trackedRanges.length;e<t;e++)n.model._setTrackedRange(n.trackedRanges[e],null,0);return o}static _innerExecuteCommands(e,t){if(this._arrayIsEmpty(t))return null;const i=this._getEditOperations(e,t);if(0===i.operations.length)return null;const n=i.operations,o=this._getLoserCursorMap(n);if(o.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;let s=[];for(let e=0,t=n.length;e<t;e++)o.hasOwnProperty(n[e].identifier.major.toString())||s.push(n[e]);i.hadTrackedEditOperation&&s.length>0&&(s[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,s,(i=>{let n=[];for(let t=0;t<e.selectionsBefore.length;t++)n[t]=[];for(const e of i)e.identifier&&n[e.identifier.major].push(e);const o=(e,t)=>e.identifier.minor-t.identifier.minor;let s=[];for(let i=0;i<e.selectionsBefore.length;i++)n[i].length>0?(n[i].sort(o),s[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new T.Y(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new T.Y(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):s[i]=e.selectionsBefore[i];return s}));r||(r=e.selectionsBefore);let a=[];for(let e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)r.splice(e,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t<i;t++)if(e[t])return!1;return!0}static _getEditOperations(e,t){let i=[],n=!1;for(let o=0,s=t.length;o<s;o++){const s=t[o];if(s){const t=this._getEditOperationsFromCommand(e,o,s);i=i.concat(t.operations),n=n||t.hadTrackedEditOperation}}return{operations:i,hadTrackedEditOperation:n}}static _getEditOperationsFromCommand(e,t,i){let n=[],o=0;const s=(e,s,r=!1)=>{ve.e.isEmpty(e)&&""===s||n.push({identifier:{major:t,minor:o++},range:e,text:s,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let r=!1;const a={addEditOperation:s,addTrackedEditOperation:(e,t,i)=>{r=!0,s(e,t,i)},trackSelection:(t,i)=>{const n=T.Y.liftSelection(t);let o;if(n.isEmpty())if("boolean"==typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const s=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,o);return e.trackedRanges[s]=r,e.trackedRangesDirection[s]=n.getDirection(),s.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return(0,L.dL)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-ve.e.compareRangesUsingEnds(e.range,t.range)));let t={};for(let i=1;i<e.length;i++){const n=e[i-1],o=e[i];if(ve.e.getStartPosition(n.range).isBefore(ve.e.getEndPosition(o.range))){let s;s=n.identifier.major>o.identifier.major?n.identifier.major:o.identifier.major,t[s.toString()]=!0;for(let t=0;t<e.length;t++)e[t].identifier.major===s&&(e.splice(t,1),t<i&&i--,t--);i>0&&i--}}return t}}var Kn=i(23385),Un=i(35389),jn=i(51778),$n=i(38821),qn=i(55924);class Zn{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class Gn{constructor(e,t,i,n,o){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=o,this.prefixSum=0}}class Qn{constructor(e,t,i,n){this._instanceId=je.PJ(++Qn.INSTANCE_COUNT),this._pendingChanges=new Zn,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,o=e.length;for(;n<o;){const s=n+o>>>1;t===e[s].afterLineNumber?i<e[s].ordinal?o=s:n=s+1:t<e[s].afterLineNumber?o=s:n=s+1}return n}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,t){this._paddingTop=e,this._paddingBottom=t}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let t=!1;try{e({insertWhitespace:(e,i,n,o)=>{t=!0,e|=0,i|=0,n|=0,o|=0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new Gn(s,e,i,n,o)),s},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const s=e=>{let t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=s(this._arr).concat(s(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=Qn.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;i<n;i++)if(t[i].id===e)return i;return-1}_changeOneWhitespace(e,t,i){const n=this._findWhitespaceIndex(e);if(-1!==n&&(this._arr[n].height!==i&&(this._arr[n].height=i,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)),this._arr[n].afterLineNumber!==t)){const e=this._arr[n];this._removeWhitespace(n),e.afterLineNumber=t,this._insertWhitespace(e)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount-=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const n=this._arr[i].afterLineNumber;e<=n&&n<=t?this._arr[i].afterLineNumber=e-1:n>t&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i<n;i++)e<=this._arr[i].afterLineNumber&&(this._arr[i].afterLineNumber+=t-e+1)}getWhitespacesTotalHeight(){return this._checkPendingChanges(),0===this._arr.length?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e|=0;let t=Math.max(0,this._prefixSumValidIndex+1);0===t&&(this._arr[0].prefixSum=this._arr[0].height,t++);for(let i=t;i<=e;i++)this._arr[i].prefixSum=this._arr[i-1].prefixSum+this._arr[i].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){return this._checkPendingChanges(),this._lineHeight*this._lineCount+this.getWhitespacesTotalHeight()+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e);return-1===t?0:this.getWhitespacesAccumulatedHeight(t)}_findLastWhitespaceBeforeLineNumber(e){e|=0;const t=this._arr;let i=0,n=t.length-1;for(;i<=n;){const o=i+((n-i|0)/2|0)|0;if(t[o].afterLineNumber<e){if(o+1>=t.length||t[o+1].afterLineNumber>=e)return o;i=o+1|0}else n=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t<this._arr.length?t:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e|=0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e){let t;return this._checkPendingChanges(),t=(e|=0)>1?this._lineHeight*(e-1):0,t+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;t<i;t++)e=Math.max(e,this._arr[t].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){return this._checkPendingChanges(),e>this.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e<this._paddingTop)}isInBottomPadding(e){return 0!==this._paddingBottom&&(this._checkPendingChanges(),e>=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;for(;n<o;){const t=(n+o)/2|0,s=0|this.getVerticalOffsetForLineNumber(t);if(e>=s+i)n=t+1;else{if(e>=s)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let s=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,d;-1===r?(r=a,d=s+1,l=0):(d=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let h=o,c=h;const u=5e5;let g=0;o>=u&&(g=Math.floor(o/u)*u,g=Math.floor(g/i)*i,c-=g);const p=[],m=e+(t-e)/2;let f=-1;for(let e=n;e<=s;e++){for(-1===f&&(h<=m&&m<h+i||h>m)&&(f=e),h+=i,p[e-n]=c,c+=i;d===e;)c+=l,h+=l,r++,r>=a?d=s+1:(d=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(h>=t){s=e;break}}-1===f&&(f=s);const _=0|this.getVerticalOffsetForLineNumber(s);let v=n,b=s;return v<b&&o<e&&v++,v<b&&_+i>t&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t<i;){const n=Math.floor((t+i)/2),o=this.getVerticalOffsetForWhitespaceIndex(n);if(e>=o+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];let o=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}Qn.INSTANCE_COUNT=0;class Yn{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class Jn extends k.JT{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new x.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Yn(0,0,0,0),this._scrollable=this._register(new qn.Rm(e,t)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new Rn(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class Xn extends k.JT{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(129),s=n.get(74);this._linesLayout=new Qn(t,n.get(58),s.top,s.bottom),this._scrollable=this._register(new Jn(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Yn(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(102)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(58)&&this._linesLayout.setLineHeight(t.get(58)),e.hasChanged(74)){const e=t.get(74);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(129)){const e=t.get(129),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),s=o.contentWidth;this._scrollable.setScrollDimensions(new Yn(i,o.contentWidth,n,this._getContentHeight(i,n,s)))}else this._updateHeight();e.hasChanged(102)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(91);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(93)?o+=Math.max(0,t-n.get(58)-n.get(74).bottom):o+=this._getHorizontalScrollbarHeight(e,i),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new Yn(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new hi.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new hi.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(130),n=t.get(43);if(i.isViewportWrapping){const i=t.get(129),o=t.get(64);return e>i.contentWidth+n.typicalHalfwidthCharacterWidth&&o.enabled&&"right"===o.side?e+i.verticalScrollbarWidth:e}{const i=t.get(92)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Yn(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition();let t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var eo=i(12062),to=i(91445);class io{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class no{constructor(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._counts.length;e<t;e++){const t=this._counts[e],i=e>0?this._modelToView[e-1]:0;this._modelToView[e]=i+t;for(let n=0;n<t;n++)this._viewToModel[i+n]=e}this._modelToView.length=this._counts.length,this._viewToModel.length=this._modelToView[this._modelToView.length-1],this._isValid=!0,this._validEndIndex=this._counts.length-1}}changeValue(e,t){this._counts[e]!==t&&(this._counts[e]=t,this._invalidate(e))}removeValues(e,t){this._counts.splice(e,t),this._invalidate(e)}insertValues(e,t){this._counts=Lt.Zv(this._counts,e,t),this._invalidate(e)}getTotalValue(){return this._ensureValid(),this._viewToModel.length}getAccumulatedValue(e){return this._ensureValid(),this._modelToView[e]}getIndexOf(e){this._ensureValid();const t=this._viewToModel[e],i=t>0?this._modelToView[t-1]:0;return new to.T(t,e-i)}}class oo{constructor(e,t,i,n,o,s,r,a,l){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=o,this.tabSize=s,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new io(this)}_constructLines(e,t){this.lines=[],e&&(this.hiddenAreasIds=[]);const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),o=i.length,s=this.createLineBreaksComputer(),r=new Lt.H9(un.gk.fromDecorations(n));for(let e=0;e<o;e++){const n=r.takeWhile((t=>t.lineNumber===e+1));s.addRequest(i[e],n,t?t[e]:null)}const a=s.finalize();let l=[],d=this.hiddenAreasIds.map((e=>this.model.getDecorationRange(e))).sort(ve.e.compareRangesUsingStarts),h=1,c=0,u=-1,g=u+1<d.length?c+1:o+2;for(let e=0;e<o;e++){let t=e+1;t===g&&(u++,h=d[u].startLineNumber,c=d[u].endLineNumber,g=u+1<d.length?c+1:o+2);let i=t>=h&&t<=c,n=po(a[e],!i);l[e]=n.getViewLineCount(),this.lines[e]=n}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new no(l)}getHiddenAreas(){return this.hiddenAreasIds.map((e=>this.model.getDecorationRange(e)))}_reduceRanges(e){if(0===e.length)return[];let t=e.map((e=>this.model.validateRange(e))).sort(ve.e.compareRangesUsingStarts),i=[],n=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,s=t.length;e<s;e++){let s=t[e];s.startLineNumber>o+1?(i.push(new ve.e(n,1,o,1)),n=s.startLineNumber,o=s.endLineNumber):s.endLineNumber>o&&(o=s.endLineNumber)}return i.push(new ve.e(n,1,o,1)),i}setHiddenAreas(e){let t=this._reduceRanges(e),i=this.hiddenAreasIds.map((e=>this.model.getDecorationRange(e))).sort(ve.e.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n<t.length;n++)if(!t[n].equalsRange(i[n])){e=!0;break}if(!e)return!1}let n=[];for(const e of t)n.push({range:e,options:Kt.qx.EMPTY});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,n);let o=t,s=1,r=0,a=-1,l=a+1<o.length?r+1:this.lines.length+2,d=!1;for(let e=0;e<this.lines.length;e++){let t=e+1;t===l&&(a++,s=o[a].startLineNumber,r=o[a].endLineNumber,l=a+1<o.length?r+1:this.lines.length+2);let i=!1;if(t>=s&&t<=r?this.lines[e].isVisible()&&(this.lines[e]=this.lines[e].setVisible(!1),i=!0):(d=!0,this.lines[e].isVisible()||(this.lines[e]=this.lines[e].setVisible(!0),i=!0)),i){let t=this.lines[e].getViewLineCount();this.prefixSumComputer.changeValue(e,t)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.lines.length?1:this.lines[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const o=this.fontInfo.equals(e),s=this.wrappingStrategy===t,r=this.wrappingColumn===i,a=this.wrappingIndent===n;if(o&&s&&r&&a)return!1;const l=o&&s&&!r&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let d=null;if(l){d=[];for(let e=0,t=this.lines.length;e<t;e++)d[e]=this.lines[e].getLineBreakData()}return this._constructLines(!1,d),!0}createLineBreaksComputer(){return("advanced"===this.wrappingStrategy?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,i){if(!e||e<=this._validModelVersionId)return null;let n=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,o=this.prefixSumComputer.getAccumulatedValue(i-1);return this.lines.splice(t-1,i-t+1),this.prefixSumComputer.removeValues(t-1,i-t+1),new Sn(n,o)}onModelLinesInserted(e,t,i,n){if(!e||e<=this._validModelVersionId)return null;const o=t>2&&!this.lines[t-2].isVisible();let s=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,r=0,a=[],l=[];for(let e=0,t=n.length;e<t;e++){let t=po(n[e],!o);a.push(t);let i=t.getViewLineCount();r+=i,l[e]=i}return this.lines=this.lines.slice(0,t-1).concat(a).concat(this.lines.slice(t-1)),this.prefixSumComputer.insertValues(t-1,l),new Ln(s,s+r-1)}onModelLineChanged(e,t,i){if(null!==e&&e<=this._validModelVersionId)return[!1,null,null,null];let n=t-1,o=this.lines[n].getViewLineCount(),s=po(i,this.lines[n].isVisible());this.lines[n]=s;let r=this.lines[n].getViewLineCount(),a=!1,l=0,d=-1,h=0,c=-1,u=0,g=-1;return o>r?(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,d=l+r-1,u=d+1,g=u+(o-r)-1,a=!0):o<r?(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,d=l+o-1,h=d+1,c=h+(r-o)-1,a=!0):(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,d=l+r-1),this.prefixSumComputer.changeValue(n,r),[a,l<=d?new yn(l,d):null,h<=c?new Ln(h,c):null,u<=g?new Sn(u,g):null]}acceptVersionId(e){this._validModelVersionId=e,1!==this.lines.length||this.lines[0].isVisible()||this.setHiddenAreas([])}getViewLineCount(){return this.prefixSumComputer.getTotalValue()}_toValidViewLineNumber(e){if(e<1)return 1;const t=this.getViewLineCount();return e>t?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.getActiveIndentGuide(n.lineNumber,o.lineNumber,s.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return new so(i+1,n)}getMinColumnOfViewLine(e){return this.lines[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.lines[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new _e.L(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.lines[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new _e.L(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),o=new Array;let s=this.getModelStartPositionOfViewLine(i),r=new Array;for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){const t=this.lines[e-1];if(t.isVisible()){let o=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,s=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=o;t<s;t++)r.push(new so(e,t))}if(!t.isVisible()&&s){const t=new _e.L(e-1,this.model.getLineMaxColumn(e-1)+1),i=ve.e.fromPositions(s,t);o.push(new ro(i,r)),r=[],s=null}else t.isVisible()&&!s&&(s=new _e.L(e,1))}if(s){const e=ve.e.fromPositions(s,this.getModelEndPositionOfViewLine(n));o.push(new ro(e,r))}return o}getViewLinesBracketGuides(e,t,i,n){const o=i?this.convertViewPositionToModelPosition(i.lineNumber,i.column):null,s=[];for(const i of this.getViewLineInfosGroupedByModelRanges(e,t)){const e=i.modelRange.startLineNumber,t=this.model.getLinesBracketGuides(e,i.modelRange.endLineNumber,o,n);for(const n of i.viewLines)if(n.isWrappedLineContinuation&&1===this.getMinColumnOfViewLine(n))s.push([]);else{let i=t[n.modelLineNumber-e];i=i.map((e=>e.horizontalLine?new zt.UO(e.visibleColumn,e.className,new zt.vW(e.horizontalLine.top,this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn).column)):e)),s.push(i)}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[],s=[],r=[];const a=i.lineNumber-1,l=n.lineNumber-1;let d=null;for(let e=a;e<=l;e++){const t=this.lines[e];if(t.isVisible()){let n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),o=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=o-n+1,h=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(h=0===n?1:2),s.push(l),r.push(h),null===d&&(d=new _e.L(e+1,0))}else null!==d&&(o=o.concat(this.model.getLinesIndentGuides(d.lineNumber,e)),d=null)}null!==d&&(o=o.concat(this.model.getLinesIndentGuides(d.lineNumber,n.lineNumber)),d=null);const h=t-e+1;let c=new Array(h),u=0;for(let e=0,t=o.length;e<t;e++){let t,i=o[e],n=Math.min(h-u,s[e]),a=r[e];t=2===a?0:1===a?1:n;for(let e=0;e<n;e++)e===t&&(i=0),c[u++]=i}return c}getViewLineContent(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineContent(this.model,i+1,n)}getViewLineLength(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineLength(this.model,i+1,n)}getViewLineMinColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineMinColumn(this.model,i+1,n)}getViewLineMaxColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineMaxColumn(this.model,i+1,n)}getViewLineData(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineData(this.model,i+1,n)}getViewLinesData(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let n=this.prefixSumComputer.getIndexOf(e-1),o=e,s=n.index,r=n.remainder,a=[];for(let n=s,l=this.model.getLineCount();n<l;n++){let l=this.lines[n];if(!l.isVisible())continue;let d=n===s?r:0,h=l.getViewLineCount()-d,c=!1;o+h>t&&(c=!0,h=t-o+1);let u=d+h;if(l.getViewLinesData(this.model,n+1,d,u,o-e,i,a),o+=h,c)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);let n=this.prefixSumComputer.getIndexOf(e-1),o=n.index,s=n.remainder,r=this.lines[o],a=r.getViewLineMinColumn(this.model,o+1,s),l=r.getViewLineMaxColumn(this.model,o+1,s);t<a&&(t=a),t>l&&(t=l);let d=r.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new _e.L(o+1,d)).equals(i)?new _e.L(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new ve.e(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){e=this._toValidViewLineNumber(e);let i=this.prefixSumComputer.getIndexOf(e-1),n=i.index,o=i.remainder,s=this.lines[n].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new _e.L(n+1,s))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new ve.e(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2){const n=this.model.validatePosition(new _e.L(e,t)),o=n.lineNumber,s=n.column;let r=o-1,a=!1;for(;r>0&&!this.lines[r].isVisible();)r--,a=!0;if(0===r&&!this.lines[r].isVisible())return new _e.L(1,1);const l=1+(0===r?0:this.prefixSumComputer.getAccumulatedValue(r-1));let d;return d=a?this.lines[r].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(r+1),i):this.lines[o-1].getViewPositionOfModelPosition(l,s,i),d}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return ve.e.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new ve.e(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.lines[i].isVisible()){const e=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.lines[i].isVisible();)i--;if(0===i&&!this.lines[i].isVisible())return 1;const n=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new ve.e(n.lineNumber,1,o.lineNumber,o.column),t,i);let s=[];const r=n.lineNumber-1,a=o.lineNumber-1;let l=null;for(let e=r;e<=a;e++)if(this.lines[e].isVisible())null===l&&(l=new _e.L(e+1,e===r?n.column:1));else if(null!==l){const n=this.model.getLineMaxColumn(e);s=s.concat(this.model.getDecorationsInRange(new ve.e(l.lineNumber,l.column,e,n),t,i)),l=null}null!==l&&(s=s.concat(this.model.getDecorationsInRange(new ve.e(l.lineNumber,l.column,o.lineNumber,o.column),t,i)),l=null),s.sort(((e,t)=>{const i=ve.e.compareRangesUsingStarts(e.range,t.range);return 0===i?e.id<t.id?-1:e.id>t.id?1:0:i}));let d=[],h=0,c=null;for(const e of s){const t=e.id;c!==t&&(c=t,d[h++]=e)}return d}getInjectedTextAt(e){const t=this._toValidViewLineNumber(e.lineNumber),i=this.prefixSumComputer.getIndexOf(t-1),n=i.index,o=i.remainder;return this.lines[n].getInjectedTextAt(o,e.column)}normalizePosition(e,t){const i=this._toValidViewLineNumber(e.lineNumber),n=this.prefixSumComputer.getIndexOf(i-1),o=n.index,s=n.remainder;return this.lines[o].normalizePosition(this.model,o+1,s,e,t)}getLineIndentColumn(e){const t=this._toValidViewLineNumber(e),i=this.prefixSumComputer.getIndexOf(t-1),n=i.index;return 0===i.remainder?this.model.getLineIndentColumn(n+1):0}}class so{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class ro{constructor(e,t){this.modelRange=e,this.viewLines=t}}class ao{constructor(){}isVisible(){return!0}setVisible(e){return e?this:lo.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){let n=e.getLineTokens(t),o=n.getLineContent();return new hi.IP(o,!1,1,o.length+1,0,n.inflate(),null)}getViewLinesData(e,t,i,n,o,s,r){s[o]?r[o]=this.getViewLineData(e,t,0):r[o]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new _e.L(e,t)}getViewLineNumberOfModelPosition(e,t){return e}normalizePosition(e,t,i,n,o){return n}getInjectedTextAt(e,t){return null}}ao.INSTANCE=new ao;class lo{constructor(){}isVisible(){return!1}setVisible(e){return e?ao.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw new Error("Not supported")}getViewLineLength(e,t,i){throw new Error("Not supported")}getViewLineMinColumn(e,t,i){throw new Error("Not supported")}getViewLineMaxColumn(e,t,i){throw new Error("Not supported")}getViewLineData(e,t,i){throw new Error("Not supported")}getViewLinesData(e,t,i,n,o,s,r){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}normalizePosition(e,t,i,n,o){throw new Error("Not supported")}getInjectedTextAt(e,t){throw new Error("Not supported")}}lo.INSTANCE=new lo;class ho{constructor(e,t){this._lineBreakData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(e){return this._lineBreakData.getInputOffsetOfOutputPosition(e,0)}getInputEndOffsetOfOutputLineIndex(e,t,i){return i+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:this._lineBreakData.getInputOffsetOfOutputPosition(i+1,0)}getViewLineContent(e,t,i){if(!this._isVisible)throw new Error("Not supported");const n=i>0?this._lineBreakData.breakOffsets[i-1]:0,o=i<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[i]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1];let s;if(null!==this._lineBreakData.injectionOffsets){const i=this._lineBreakData.injectionOffsets.map(((e,t)=>new un.gk(0,0,e+1,this._lineBreakData.injectionOptions[t],0)));s=un.gk.applyInjectedText(e.getLineContent(t),i).substring(n,o)}else s=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(s=uo(this._lineBreakData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,i){if(!this._isVisible)throw new Error("Not supported");const n=i>0?this._lineBreakData.breakOffsets[i-1]:0;let o=(i<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[i]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1])-n;return i>0&&(o=this._lineBreakData.wrappedTextIndentLength+o),o}getViewLineMinColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this._getViewLineMinColumn(i)}_getViewLineMinColumn(e){return e>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineLength(e,t,i)+1}getViewLineData(e,t,i){if(!this._isVisible)throw new Error("Not supported");const n=this._lineBreakData,o=i>0?n.wrappedTextIndentLength:0,s=n.injectionOffsets,r=n.injectionOptions;let a,l,d;if(s){const h=e.getLineTokens(t).withInserted(s.map(((e,t)=>({offset:e,text:r[t].content,tokenMetadata:eo.A.defaultTokenMetadata})))),c=i>0?n.breakOffsets[i-1]:0,u=n.breakOffsets[i];a=h.getLineContent().substring(c,u),l=h.sliceAndInflate(c,u,o),d=new Array;let g=0;for(let e=0;e<s.length;e++){const t=r[e].content.length,o=s[e]+g,a=s[e]+g+t;if(o>u)break;if(c<a){const t=r[e];if(t.inlineClassName){const e=i>0?n.wrappedTextIndentLength:0,s=e+Math.max(o-c,0),r=e+Math.min(a-c,u);s!==r&&d.push(new hi.Wx(s,r,t.inlineClassName,t.inlineClassNameAffectsLetterSpacing))}}g+=t}}else{const n=this.getInputStartOffsetOfOutputLineIndex(i),s=this.getInputEndOffsetOfOutputLineIndex(e,t,i),r=e.getLineTokens(t);a=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1}),l=r.sliceAndInflate(n,s,o),d=null}i>0&&(a=uo(n.wrappedTextIndentLength)+a);const h=i>0?n.wrappedTextIndentLength+1:1,c=a.length+1,u=i+1<this.getViewLineCount(),g=0===i?0:n.breakOffsetsVisibleColumn[i-1];return new hi.IP(a,u,h,c,g,l,d)}getViewLinesData(e,t,i,n,o,s,r){if(!this._isVisible)throw new Error("Not supported");for(let a=i;a<n;a++){let n=o+a-i;s[n]?r[n]=this.getViewLineData(e,t,a):r[n]=null}}getModelColumnOfViewPosition(e,t){if(!this._isVisible)throw new Error("Not supported");let i=t-1;return e>0&&(i<this._lineBreakData.wrappedTextIndentLength?i=0:i-=this._lineBreakData.wrappedTextIndentLength),this._lineBreakData.getInputOffsetOfOutputPosition(e,i)+1}getViewPositionOfModelPosition(e,t,i=2){if(!this._isVisible)throw new Error("Not supported");let n=this._lineBreakData.getOutputPositionOfInputOffset(t-1,i),o=n.outputLineIndex,s=n.outputOffset+1;return o>0&&(s+=this._lineBreakData.wrappedTextIndentLength),new _e.L(e+o,s)}getViewLineNumberOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");return e+this._lineBreakData.getOutputPositionOfInputOffset(t-1).outputLineIndex}normalizePosition(e,t,i,n,o){if(null!==this._lineBreakData.injectionOffsets){const e=n.lineNumber-i,t=this._lineBreakData.outputPositionToOffsetInUnwrappedLine(i,n.column-1),s=this._lineBreakData.normalizeOffsetAroundInjections(t,o);if(s!==t)return this._lineBreakData.getOutputPositionOfOffsetInUnwrappedLine(s,o).toPosition(e,this._lineBreakData.wrappedTextIndentLength)}if(0===o){if(i>0&&n.column===this._getViewLineMinColumn(i))return new _e.L(n.lineNumber-1,this.getViewLineMaxColumn(e,t,i-1))}else if(1===o&&i<this.getViewLineCount()-1&&n.column===this.getViewLineMaxColumn(e,t,i))return new _e.L(n.lineNumber+1,this._getViewLineMinColumn(i+1));return n}getInjectedTextAt(e,t){return this._lineBreakData.getInjectedText(e,t-1)}}let co=[""];function uo(e){if(e>=co.length)for(let t=1;t<=e;t++)co[t]=go(t);return co[e]}function go(e){return new Array(e+1).join(" ")}function po(e,t){return null===e?t?ao.INSTANCE:lo.INSTANCE:new ho(e,t)}class mo{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class fo{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new mo(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new Sn(t,i)}onModelLinesInserted(e,t,i,n){return new Ln(t,i)}onModelLineChanged(e,t,i){return[!1,new yn(t,t),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1;let n=new Array(i);for(let e=0;e<i;e++)n[e]=0;return n}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){let t=this.model.getLineTokens(e),i=t.getLineContent();return new hi.IP(i,!1,1,i.length+1,0,t.inflate(),null)}getViewLinesData(e,t,i){const n=this.model.getLineCount();e=Math.min(Math.max(1,e),n),t=Math.min(Math.max(1,t),n);let o=[];for(let n=e;n<=t;n++){let t=n-e;i[t]||(o[t]=null),o[t]=this.getViewLineData(n)}return o}getDecorationsInRange(e,t,i){return this.model.getDecorationsInRange(e,t,i)}normalizePosition(e,t){return this.model.normalizePosition(e,t)}getLineIndentColumn(e){return this.model.getLineIndentColumn(e)}getInjectedTextAt(e){return null}}class _o{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,o=e.options;let s;if(o.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new _e.L(n.startLineNumber,1),0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new _e.L(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);s=new ve.e(e.lineNumber,e.column,t.lineNumber,t.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new hi.$l(s,o),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,re.$J)(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber;let o=[],s=0,r=[];for(let e=i;e<=n;e++)r[e-i]=[];for(let e=0,a=t.length;e<a;e++){let a=t[e],l=a.options,d=this._getOrCreateViewModelDecoration(a),h=d.range;if(o[s++]=d,l.inlineClassName){let e=new hi.$t(h,l.inlineClassName,l.inlineClassNameAffectsLetterSpacing?3:0),t=Math.max(i,h.startLineNumber),o=Math.min(n,h.endLineNumber);for(let n=t;n<=o;n++)r[n-i].push(e)}if(l.beforeContentClassName&&i<=h.startLineNumber&&h.startLineNumber<=n){let e=new hi.$t(new ve.e(h.startLineNumber,h.startColumn,h.startLineNumber,h.startColumn),l.beforeContentClassName,1);r[h.startLineNumber-i].push(e)}if(l.afterContentClassName&&i<=h.endLineNumber&&h.endLineNumber<=n){let e=new hi.$t(new ve.e(h.endLineNumber,h.endColumn,h.endLineNumber,h.endColumn),l.afterContentClassName,2);r[h.endLineNumber-i].push(e)}}return{decorations:o,inlineDecorations:r}}}var vo=i(86611);class bo extends k.JT{constructor(e,t,i,n,o,s){if(super(),this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new Tn,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new be.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._tokenizeViewportSoon=this._register(new P.pY((()=>this.tokenizeViewport()),50)),this._updateConfigurationViewLineCount=this._register(new P.pY((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new fo(this.model);else{const e=this._configuration.options,t=e.get(43),i=e.get(123),s=e.get(130),r=e.get(122);this._lines=new oo(this._editorId,this.model,n,o,t,this.model.getOptions().tabSize,i,s.wrappingColumn,r)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Hn(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new Xn(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new kn(e)),this._eventDispatcher.emitOutgoingEvent(new On(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new _o(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(di.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new En)}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=new ve.e(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),i=this._toModelVisibleRanges(t);for(const e of i)this.model.tokenizeViewport(e.startLineNumber,e.endLineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new bn(e)),this._eventDispatcher.emitOutgoingEvent(new An(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new gn)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new pn)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new Nn)}_onConfigurationChanged(e,t){let i=null;if(-1!==this._viewportStartLine){let e=new _e.L(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let n=!1;const o=this._configuration.options,s=o.get(43),r=o.get(123),a=o.get(130),l=o.get(122);if(this._lines.setWrappingSettings(s,r,a.wrappingColumn,l)&&(e.emitViewEvent(new vn),e.emitViewEvent(new wn),e.emitViewEvent(new _n(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(80)&&(this._decorations.reset(),e.emitViewEvent(new _n(null))),e.emitViewEvent(new mn(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const e=this.coordinatesConverter.convertModelPositionToViewPosition(i),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}be.LM.shouldRecreate(t)&&(this.cursorConfig=new be.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e.changes,s=e instanceof un.dQ?e.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(let t=0;t<e.detail.length;t++){const i=e.detail[t];let n=e.injectedTexts[t];n&&(n=n.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize();let l=0;for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new vn),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(s,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=a.slice(l,l+e.detail.length);l+=e.detail.length;const o=this._lines.onModelLinesInserted(s,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=a[l];l++;const[o,r,d,h]=this._lines.onModelLineChanged(s,e.lineNumber,i);n=o,r&&t.emitViewEvent(r),d&&(t.emitViewEvent(d),this.viewLayout.onLinesInserted(d.fromLineNumber,d.toLineNumber)),h&&(t.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber));break}}null!==s&&this._lines.acceptVersionId(s),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new wn),t.emitViewEvent(new _n(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(this.model.onDidChangeTokens((e=>{let t=[];for(let i=0,n=e.ranges.length;i<n;i++){const n=e.ranges[i],o=this.coordinatesConverter.convertModelPositionToViewPosition(new _e.L(n.fromLineNumber,1)).lineNumber,s=this.coordinatesConverter.convertModelPositionToViewPosition(new _e.L(n.toLineNumber,this.model.getLineMaxColumn(n.toLineNumber))).lineNumber;t[i]={fromLineNumber:o,toLineNumber:s}}this._eventDispatcher.emitSingleViewEvent(new Dn(t)),e.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()}))),this._register(this.model.onDidChangeLanguageConfiguration((e=>{this._eventDispatcher.emitSingleViewEvent(new Cn),this.cursorConfig=new be.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new be.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new vn),e.emitViewEvent(new wn),e.emitViewEvent(new _n(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new be.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new _n(e))})))}setHiddenAreas(e){let t=!1;try{const i=this._eventDispatcher.beginEmitViewEvents();t=this._lines.setHiddenAreas(e),t&&(i.emitViewEvent(new vn),i.emitViewEvent(new wn),i.emitViewEvent(new _n(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),t&&this._eventDispatcher.emitOutgoingEvent(new Pn)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(129),t=this._configuration.options.get(58),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),s=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new ve.e(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];let n=[],o=0,s=t.startLineNumber,r=t.startColumn,a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;e<t;e++){const t=i[e].startLineNumber,l=i[e].endLineNumber;l<s||t>a||(s<t&&(n[o++]=new ve.e(s,r,t-1,this.model.getLineMaxColumn(t-1))),s=l+1,r=1)}return(s<a||s===a&&r<l)&&(n[o++]=new ve.e(s,r,a,l)),n}getCompletelyVisibleViewRange(){const e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,i=e.completelyVisibleEndLineNumber;return new ve.e(t,this.getLineMinColumn(t),i,this.getLineMaxColumn(i))}getCompletelyVisibleViewRangeAtScrollTop(e){const t=this.viewLayout.getLinesViewportDataAtScrollTop(e),i=t.completelyVisibleStartLineNumber,n=t.completelyVisibleEndLineNumber;return new ve.e(i,this.getLineMinColumn(i),n,this.getLineMaxColumn(n))}saveState(){const e=this.viewLayout.saveState(),t=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(t),n=this.coordinatesConverter.convertViewPositionToModelPosition(new _e.L(i,this.getLineMinColumn(i))),o=this.viewLayout.getVerticalOffsetForLineNumber(i)-t;return{scrollLeft:e.scrollLeft,firstPosition:n,firstPositionDeltaTop:o}}reduceRestoreState(e){if(void 0===e.firstPosition)return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getTextModelOptions(){return this.model.getOptions()}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStartLine=e;let n=this.coordinatesConverter.convertViewPositionToModelPosition(new _e.L(e,this.getLineMinColumn(e)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new ve.e(n.lineNumber,n.column,n.lineNumber,n.column),1);const o=this.viewLayout.getVerticalOffsetForLineNumber(e),s=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=s-o}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n){return this._lines.getViewLinesBracketGuides(e,t,i,n)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=je.LC(this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=je.ow(this.getLineContent(e));return-1===t?0:t+2}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewLineRenderingData(e,t){let i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),o=this.getTabSize(),s=this._lines.getViewLineData(t),r=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return s.inlineDecorations&&(r=[...r,...s.inlineDecorations.map((e=>e.toInlineDecoration(t)))]),new hi.wA(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,i,n,s.tokens,r,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){let n=this._lines.getViewLinesData(e,t,i);return new hi.ud(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,(0,re.$J)(this._configuration.options)),i=new Co;for(const n of t){const t=n.options,o=t.overviewRuler;if(!o)continue;const s=o.position;if(0===s)continue;const r=o.getColor(e),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,s)}return i.asArray}invalidateOverviewRulerColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;e&&e.invalidateCachedColor()}}invalidateMinimapColorCache(){const e=this.model.getAllDecorations();for(const t of e){const e=t.options.minimap;e&&e.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getModelLineMaxColumn(e){return this.model.getLineMaxColumn(e)}validateModelPosition(e){return this.model.validatePosition(e)}validateModelRange(e){return this.model.validateRange(e)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const o=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(o)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(ve.e.compareRangesUsingStarts);let o=!1,s=!1;for(const t of e)t.isEmpty()?o=!0:s=!0;if(!s){if(!t)return"";const i=e.map((e=>e.startLineNumber));let o="";for(let e=0;e<i.length;e++)e>0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){let t=[],n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}let r=[];for(const t of e)t.isEmpty()||r.push(this.model.getValueInRange(t,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===vo.XT)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new ve.e(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(43),s=this._getColorMap();let r;return/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===re.hL.fontFamily?r=re.hL.fontFamily:(r=o.fontFamily,r=r.replace(/"/g,"'"),/[,']/.test(r)||/[+ ]/.test(r)&&(r=`'${r}'`),r=`${r}, ${re.hL.fontFamily}`),{mode:i,html:`<div style="color: ${s[1]};background-color: ${s[2]};font-family: ${r};font-weight: ${o.fontWeight};font-size: ${o.fontSize}px;line-height: ${o.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,s)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,r=this.getTabSize();let a="";for(let e=i;e<=o;e++){const l=this.model.getLineTokens(e),d=l.getLineContent(),h=e===i?n-1:0,c=e===o?s-1:d.length;a+=""===d?"<br>":(0,$n.F)(d,l.inflate(),t,h,c,r,R.ED)}return a}_getColorMap(){let e=li.RW.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=Ti.Il.Format.CSS.formatHex(e[i]);return t}pushStackElement(){this.model.pushStackElement()}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){this._withViewEventsCollector((n=>this._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new Bn):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,o){this._executeCursorEdit((s=>this._cursor.compositionType(s,e,t,i,n,o)))}paste(e,t,i,n){this._executeCursorEdit((o=>this._cursor.paste(o,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealPrimaryCursor(e,t){this._withViewEventsCollector((i=>this._cursor.revealPrimary(i,e,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new ve.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new xn(e,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new ve.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new xn(e,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((s=>s.emitViewEvent(new xn(e,i,null,n,t,o))))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new In),this._eventDispatcher.emitOutgoingEvent(new Pn))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class Co{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,o){const s=this._asMap[e];if(s){const e=s.data,t=e[e.length-3],r=e[e.length-1];if(t===o&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(o,i,n)}else{const s=new hi.SQ(e,t,[o,i,n]);this._asMap[e]=s,this.asArray.push(s)}}}var wo=i(34622),yo=i(72396),So=i(7978),Lo=i(29427),xo=i(44794),ko=i(12088),No=i(89745);class Do extends No.N{constructor(e,t){super(0);for(let t=0;t<e.length;t++)this.set(e.charCodeAt(t),1);for(let e=0;e<t.length;e++)this.set(t.charCodeAt(e),2)}get(e){return e>=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let Eo=[],Io=[];class To{constructor(e,t){this.classifier=new Do(e,t)}static create(e){return new To(e.get(118),e.get(117))}createLineBreaksComputer(e,t,i,n){t|=0,i=+i;const o=[],s=[],r=[];return{addRequest:(e,t,i)=>{o.push(e),s.push(t),r.push(i)},finalize:()=>{const a=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth;let l=[];for(let e=0,d=o.length;e<d;e++){const d=s[e],h=r[e];!h||h.injectionOptions||d?l[e]=Ro(this.classifier,o[e],d,t,i,a,n):l[e]=Mo(this.classifier,h,o[e],t,i,a,n)}return Eo.length=0,Io.length=0,l}}}}function Mo(e,t,i,n,o,s,r){if(-1===o)return null;const a=i.length;if(a<=1)return null;const l=t.breakOffsets,d=t.breakOffsetsVisibleColumn,h=Fo(i,n,o,s,r),c=o-h;let u=Eo,g=Io,p=0,m=0,f=0,_=o;const v=l.length;let b=0;if(b>=0){let e=Math.abs(d[b]-_);for(;b+1<v;){const t=Math.abs(d[b+1]-_);if(t>=e)break;e=t,b++}}for(;b<v;){let t=b<0?0:l[b],o=b<0?0:d[b];m>t&&(t=m,o=f);let r=0,h=0,C=0,w=0;if(o<=_){let f=o,v=0===t?0:i.charCodeAt(t-1),b=0===t?0:e.get(v),y=!0;for(let o=t;o<a;o++){const t=o,a=i.charCodeAt(o);let l,d;if(je.ZG(a)?(o++,l=0,d=2):(l=e.get(a),d=Ao(a,f,n,s)),t>m&&Po(0,b,a,l)&&(r=t,h=f),f+=d,f>_){t>m?(C=t,w=f-d):(C=o+1,w=f),f-h>c&&(r=0),y=!1;break}v=a,b=l}if(y){p>0&&(u[p]=l[l.length-1],g[p]=d[l.length-1],p++);break}}if(0===r){let a=o,l=i.charCodeAt(t),d=e.get(l),u=!1;for(let n=t-1;n>=m;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){u=!0;break}let g,p;if(je.YK(o)?(n--,g=0,p=2):(g=e.get(o),p=je.K7(o)?s:1),a<=_){if(0===C&&(C=t,w=a),a<=_-c)break;if(Po(0,g,l,d)){r=t,h=a;break}}a-=p,l=o,d=g}if(0!==r){const e=c-(w-h);if(e<=n){const t=i.charCodeAt(C);let o;o=je.ZG(t)?2:Ao(t,w,n,s),e-o<0&&(r=0)}}if(u){b--;continue}}if(0===r&&(r=C,h=w),r<=m){const e=i.charCodeAt(m);je.ZG(e)?(r=m+2,h=f+2):(r=m+1,h=f+Ao(e,f,n,s))}for(m=r,u[p]=r,f=h,g[p]=h,p++,_=h+c;b<0||b<v&&d[b]<h;)b++;let y=Math.abs(d[b]-_);for(;b+1<v;){const e=Math.abs(d[b+1]-_);if(e>=y)break;y=e,b++}}return 0===p?null:(u.length=p,g.length=p,Eo=t.breakOffsets,Io=t.breakOffsetsVisibleColumn,t.breakOffsets=u,t.breakOffsetsVisibleColumn=g,t.wrappedTextIndentLength=h,t)}function Ro(e,t,i,n,o,s,r){const a=un.gk.applyInjectedText(t,i);let l,d;if(i&&i.length>0?(l=i.map((e=>e.options)),d=i.map((e=>e.column-1))):(l=null,d=null),-1===o)return l?new hi.le([a.length],[],0,d,l):null;const h=a.length;if(h<=1)return l?new hi.le([a.length],[],0,d,l):null;const c=Fo(a,n,o,s,r),u=o-c;let g=[],p=[],m=0,f=0,_=0,v=o,b=a.charCodeAt(0),C=e.get(b),w=Ao(b,0,n,s),y=1;je.ZG(b)&&(w+=1,b=a.charCodeAt(1),C=e.get(b),y++);for(let t=y;t<h;t++){const i=t,o=a.charCodeAt(t);let r,l;je.ZG(o)?(t++,r=0,l=2):(r=e.get(o),l=Ao(o,w,n,s)),Po(0,C,o,r)&&(f=i,_=w),w+=l,w>v&&((0===f||w-_>u)&&(f=i,_=w-l),g[m]=f,p[m]=_,m++,v=_+u,f=0),b=o,C=r}return 0!==m||i&&0!==i.length?(g[m]=h,p[m]=w,new hi.le(g,p,c,d,l)):null}function Ao(e,t,i,n){return 9===e?i-t%i:je.K7(e)||e<32?n:1}function Oo(e,t){return t-e%t}function Po(e,t,i,n){return 32!==i&&(2===t||3===t&&2!==n||1===n||3===n&&1!==t)}function Fo(e,t,i,n,o){let s=0;if(0!==o){const r=je.LC(e);if(-1!==r){for(let i=0;i<r;i++)s+=9===e.charCodeAt(i)?Oo(s,t):1;const a=3===o?2:2===o?1:0;for(let e=0;e<a;e++)s+=Oo(s,t);s+n>i&&(s=0)}}return s}var Bo;const Wo=null===(Bo=window.trustedTypes)||void 0===Bo?void 0:Bo.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class Vo{static create(){return new Vo}constructor(){}createLineBreaksComputer(e,t,i,n){t|=0,i=+i;let o=[],s=[];return{addRequest:(e,t,i)=>{o.push(e),s.push(t)},finalize:()=>function(e,t,i,n,o,s){var r;function a(t){const i=s[t];if(i){const n=un.gk.applyInjectedText(e[t],i),o=i.map((e=>e.options)),s=i.map((e=>e.column-1));return new hi.le([n.length],[],0,s,o)}return null}if(-1===n){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=a(i);return t}const l=Math.round(n*t.typicalHalfwidthCharacterWidth),d=3===o?2:2===o?1:0,h=Math.round(i*d),c=Math.ceil(t.spaceWidth*h),u=document.createElement("div");D.V.applyFontInfoSlow(u,t);const g=(0,ht.l$)(1e4),p=[],m=[],f=[],_=[],v=[];for(let n=0;n<e.length;n++){const r=un.gk.applyInjectedText(e[n],s[n]);let a=0,d=0,h=l;if(0!==o)if(a=je.LC(r),-1===a)a=0;else{for(let e=0;e<a;e++)d+=9===r.charCodeAt(e)?i-d%i:1;const e=Math.ceil(t.spaceWidth*d);e+t.typicalFullwidthCharacterWidth>l?(a=0,d=0):h=l-e}const u=r.substr(a),b=Ho(u,d,i,h,g,c);p[n]=a,m[n]=d,f[n]=u,_[n]=b[0],v[n]=b[1]}const b=g.build(),C=null!==(r=null==Wo?void 0:Wo.createHTML(b))&&void 0!==r?r:b;u.innerHTML=C,u.style.position="absolute",u.style.top="10000",u.style.wordWrap="break-word",document.body.appendChild(u);let w=document.createRange();const y=Array.prototype.slice.call(u.children,0);let S=[];for(let t=0;t<e.length;t++){const e=zo(w,y[t],f[t],_[t]);if(null===e){S[t]=a(t);continue}const i=p[t],n=m[t]+h,o=v[t],r=[];for(let t=0,i=e.length;t<i;t++)r[t]=o[e[t]];if(0!==i)for(let t=0,n=e.length;t<n;t++)e[t]+=i;let l,d;const c=s[t];c?(l=c.map((e=>e.options)),d=c.map((e=>e.column-1))):(l=null,d=null),S[t]=new hi.le(e,r,n,d,l)}return document.body.removeChild(u),S}(o,e,t,i,n,s)}}}function Ho(e,t,i,n,o,s){if(0!==s){let e=String(s);o.appendASCIIString('<div style="text-indent: -'),o.appendASCIIString(e),o.appendASCIIString("px; padding-left: "),o.appendASCIIString(e),o.appendASCIIString("px; box-sizing: border-box; width:")}else o.appendASCIIString('<div style="width:');o.appendASCIIString(String(n)),o.appendASCIIString('px;">');const r=e.length;let a=t,l=0,d=[],h=[],c=0<r?e.charCodeAt(0):0;o.appendASCIIString("<span>");for(let t=0;t<r;t++){0!==t&&t%16384==0&&o.appendASCIIString("</span><span>"),d[t]=l,h[t]=a;const n=c;c=t+1<r?e.charCodeAt(t+1):0;let s=1,u=1;switch(n){case 9:s=i-a%i,u=s;for(let e=1;e<=s;e++)e<s?o.write1(160):o.appendASCII(32);break;case 32:32===c?o.write1(160):o.appendASCII(32);break;case 60:o.appendASCIIString("&lt;");break;case 62:o.appendASCIIString("&gt;");break;case 38:o.appendASCIIString("&amp;");break;case 0:o.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:o.write1(65533);break;default:je.K7(n)&&u++,n<32?o.write1(9216+n):o.write1(n)}l+=s,a+=u}return o.appendASCIIString("</span>"),d[e.length]=l,h[e.length]=a,o.appendASCIIString("</div>"),[d,h]}function zo(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),s=[];try{Ko(e,o,n,0,null,i.length-1,null,s)}catch(e){return console.log(e),null}return 0===s.length?null:(s.push(i.length),s)}function Ko(e,t,i,n,o,s,r,a){if(n===s)return;if(o=o||Uo(e,t,i[n],i[n+1]),r=r||Uo(e,t,i[s],i[s+1]),Math.abs(o[0].top-r[0].top)<=.1)return;if(n+1===s)return void a.push(s);const l=n+(s-n)/2|0,d=Uo(e,t,i[l],i[l+1]);Ko(e,t,i,n,o,l,d,a),Ko(e,t,i,l,d,s,r,a)}function Uo(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}var jo=i(91093),$o=function(e,t){return function(i,n){t(i,n,e)}};let qo=0;class Zo{constructor(e,t,i,n,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o}dispose(){(0,k.B9)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Go=class e extends k.JT{constructor(e,t,i,n,s,r,a,l,d,h){super(),this._onDidDispose=this._register(new x.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new x.Q5),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new x.Q5),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new x.Q5),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new x.Q5),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new x.Q5),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new x.Q5),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new x.Q5),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new x.Q5),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new x.Q5),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new x.Q5),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new x.Q5),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Qo),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Qo),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new x.Q5),this.onWillType=this._onWillType.event,this._onDidType=this._register(new x.Q5),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new x.Q5),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new x.Q5),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new x.Q5),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new x.Q5),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new x.Q5),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new x.Q5),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new x.Q5),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new x.Q5),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new x.Q5),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new x.Q5),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new x.Q5),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new x.Q5),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new x.Q5),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new x.Q5),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new x.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new x.Q5),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new x.Q5),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new x.Q5),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event;const c=Object.assign({},t);let u;this._domElement=e,this._overflowWidgetsDomNode=c.overflowWidgetsDomNode,delete c.overflowWidgetsDomNode,this._id=++qo,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=i.isSimpleWidget||!1,this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(c,h)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(129)){const e=t.get(129);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=d,this._codeEditorService=s,this._commandService=r,this._themeService=l,this._register(new Yo(this,this._contextKeyService)),this._register(new Jo(this,this._contextKeyService)),this._instantiationService=n.createChild(new Lo.y([yo.i6,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new Xo(e),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},u=Array.isArray(i.contributions)?i.contributions:o.Uc.getEditorContributions();for(const e of u)if(this._contributions[e.id])(0,L.dL)(new Error(`Cannot have two contributions with the same id ${e.id}`));else try{const t=this._instantiationService.createInstance(e.ctor,this);this._contributions[e.id]=t}catch(e){(0,L.dL)(e)}o.Uc.getEditorActions().forEach((e=>{if(this._actions[e.id])return void(0,L.dL)(new Error(`Cannot have two actions with the same id ${e.id}`));const t=new Kn.p(e.id,e.label,e.alias,(0,Ut.f6)(e.precondition),(()=>this._instantiationService.invokeFunction((t=>Promise.resolve(e.runEditorCommand(t,this,null))))),this._contextKeyService);this._actions[t.id]=t})),this._codeEditorService.addCodeEditor(this)}_createConfiguration(e,t){return new D.V(this.isSimpleWidget,e,this._domElement,t)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Un.g.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;t<i;t++){const i=e[t];this._contributions[i].dispose()}this._contributions={},this._actions={},this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e)}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?jo.w.getWordAtPosition(this._modelData.model,this._configuration.options.get(115),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const o={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(o),this._postDetachModelCleanup(n)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(let i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetForPosition(e,t,i){const n=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber)}getTopForLineNumber(t){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,1):-1}getTopForPosition(t,i){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,i):-1}setHiddenAreas(e){this._modelData&&this._modelData.viewModel.setHiddenAreas(e.map((e=>ve.e.lift(e))))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return be.io.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(this._modelData){if(!_e.L.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!ve.e.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,s,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new ve.e(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!_e.L.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new ve.e(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e){const t=T.Y.isISelection(e),i=ve.e.isIRange(e);if(!t&&!i)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(i){const t={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(t)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new T.Y(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new ve.e(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!ve.e.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(ve.e.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t<i;t++)if(!T.Y.isISelection(e[t]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,e,i)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,t=1){if(this._modelData){if("number"!=typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:e},t)}}setScrollTop(e,t=1){if(this._modelData){if("number"!=typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:e},t)}}setScrollPosition(e,t=1){this._modelData&&this._modelData.viewModel.setScrollPosition(e,t)}saveViewState(){if(!this._modelData)return null;const e={},t=Object.keys(this._contributions);for(const i of t){const t=this._contributions[i];"function"==typeof t.saveViewState&&(e[i]=t.saveViewState())}return{cursorState:this._modelData.viewModel.saveCursorState(),viewState:this._modelData.viewModel.saveState(),contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const t=e;if(t&&t.cursorState&&t.viewState){const e=t.cursorState;Array.isArray(e)?this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]);const i=t.contributionsState||{},n=Object.keys(this._contributions);for(let e=0,t=n.length;e<t;e++){const t=n[e],o=this._contributions[t];"function"==typeof o.restoreViewState&&o.restoreViewState(i[t])}const o=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(o)}}getContribution(e){return this._contributions[e]||null}getActions(){const e=[],t=Object.keys(this._actions);for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push(this._actions[n])}return e}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.isSupported())),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run()).then(void 0,L.dL):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,o){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,o,e)}_paste(e,t,i,n,o){if(!this._modelData||0===t.length)return;const s=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const r=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new ve.e(s.lineNumber,s.column,r.lineNumber,r.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=o.Uc.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,L.dL)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(80)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(80)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(80))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,re.$J)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(129)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeReferenceElement(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(t){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(t),n=this._configuration.options,o=n.get(129);return{top:e._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft(),height:n.get(58)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){D.V.applyFontInfoSlow(e,this._configuration.options.get(43))}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();const i=new bo(this._id,this._configuration,e,Vo.create(),To.create(this._configuration.options),(e=>S.jL(e)));t.push(e.onDidChangeDecorations((e=>this._onDidChangeModelDecorations.fire(e)))),t.push(e.onDidChangeLanguage((t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._onDidChangeModelLanguage.fire(t)}))),t.push(e.onDidChangeLanguageConfiguration((e=>this._onDidChangeModelLanguageConfiguration.fire(e)))),t.push(e.onDidChangeContent((e=>this._onDidChangeModelContent.fire(e)))),t.push(e.onDidChangeOptions((e=>this._onDidChangeModelOptions.fire(e)))),t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(i.onEvent((e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{e.reachedMaxCursorCount&&this._notificationService.warn(y.N("cursors.maximum","The number of cursors has been limited to {0}.",Hn.MAX_CURSOR_COUNT));const t=[];for(let i=0,n=e.selections.length;i<n;i++)t[i]=e.selections[i].getPosition();const i={position:t[0],secondaryPositions:t.slice(1),reason:e.reason,source:e.source};this._onDidChangeCursorPosition.fire(i);const n={selection:e.selections[0],secondarySelections:e.selections.slice(1),modelVersionId:e.modelVersionId,oldSelections:e.oldSelections,oldModelVersionId:e.oldModelVersionId,source:e.source,reason:e.reason};this._onDidChangeCursorSelection.fire(n);break}}})));const[n,o]=this._createView(i);if(o){this._domElement.appendChild(n.domNode.domNode);let t=Object.keys(this._contentWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];n.addContentWidget(this._contentWidgets[i])}t=Object.keys(this._overlayWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];n.addOverlayWidget(this._overlayWidgets[i])}n.render(!1,!0),n.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new Zo(e,i,n,o,t)}_createView(e){let t;t=this.isSimpleWidget?{paste:(e,t,i,n)=>{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",o)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new at(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new an(t,this._configuration,this._themeService,e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};Go=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([$o(3,So.TG),$o(4,E.$),$o(5,wo.H),$o(6,yo.i6),$o(7,Ye.XE),$o(8,xo.lT),$o(9,ko.F)],Go);class Qo extends k.JT{constructor(){super(),this._onDidChangeToTrue=this._register(new x.Q5),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new x.Q5),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class Yo extends k.JT{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=jn.u.editorSimpleInput.bindTo(t),this._editorFocus=jn.u.focus.bindTo(t),this._textInputFocus=jn.u.textInputFocus.bindTo(t),this._editorTextFocus=jn.u.editorTextFocus.bindTo(t),this._editorTabMovesFocus=jn.u.tabMovesFocus.bindTo(t),this._editorReadonly=jn.u.readOnly.bindTo(t),this._inDiffEditor=jn.u.inDiffEditor.bindTo(t),this._editorColumnSelection=jn.u.columnSelection.bindTo(t),this._hasMultipleSelections=jn.u.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=jn.u.hasNonEmptySelection.bindTo(t),this._canUndo=jn.u.canUndo.bindTo(t),this._canRedo=jn.u.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(128)),this._editorReadonly.set(e.get(80)),this._inDiffEditor.set(e.get(53)),this._editorColumnSelection.set(e.get(18))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class Jo extends k.JT{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this._langId=jn.u.languageId.bindTo(t),this._hasCompletionItemProvider=jn.u.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=jn.u.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=jn.u.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=jn.u.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=jn.u.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=jn.u.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=jn.u.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=jn.u.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=jn.u.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=jn.u.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=jn.u.hasReferenceProvider.bindTo(t),this._hasRenameProvider=jn.u.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=jn.u.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=jn.u.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=jn.u.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=jn.u.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=jn.u.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=jn.u.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=jn.u.isInWalkThroughSnippet.bindTo(t);const i=()=>this._update();this._register(e.onDidChangeModel(i)),this._register(e.onDidChangeModelLanguage(i)),this._register(li.KZ.onDidChange(i)),this._register(li.H9.onDidChange(i)),this._register(li.He.onDidChange(i)),this._register(li.Ct.onDidChange(i)),this._register(li.RN.onDidChange(i)),this._register(li.vI.onDidChange(i)),this._register(li.tA.onDidChange(i)),this._register(li.xp.onDidChange(i)),this._register(li.vH.onDidChange(i)),this._register(li.vJ.onDidChange(i)),this._register(li.FL.onDidChange(i)),this._register(li.G0.onDidChange(i)),this._register(li.Az.onDidChange(i)),this._register(li.vN.onDidChange(i)),this._register(li.nD.onDidChange(i)),this._register(li.mX.onDidChange(i)),i()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(li.KZ.has(e)),this._hasCodeActionsProvider.set(li.H9.has(e)),this._hasCodeLensProvider.set(li.He.has(e)),this._hasDefinitionProvider.set(li.Ct.has(e)),this._hasDeclarationProvider.set(li.RN.has(e)),this._hasImplementationProvider.set(li.vI.has(e)),this._hasTypeDefinitionProvider.set(li.tA.has(e)),this._hasHoverProvider.set(li.xp.has(e)),this._hasDocumentHighlightProvider.set(li.vH.has(e)),this._hasDocumentSymbolProvider.set(li.vJ.has(e)),this._hasReferenceProvider.set(li.FL.has(e)),this._hasRenameProvider.set(li.G0.has(e)),this._hasSignatureHelpProvider.set(li.nD.has(e)),this._hasInlayHintsProvider.set(li.mX.has(e)),this._hasDocumentFormattingProvider.set(li.Az.has(e)||li.vN.has(e)),this._hasDocumentSelectionFormattingProvider.set(li.vN.has(e)),this._hasMultipleDocumentFormattingProvider.set(li.Az.all(e).length+li.vN.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(li.vN.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===N.lg.walkThroughSnippet)})):this.reset()}}class Xo extends k.JT{constructor(e){super(),this._onChange=this._register(new x.Q5),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(S.go(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}const es=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),ts=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function is(e){return es+encodeURIComponent(e.toString())+ts}const ns=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),os=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');(0,Ye.Ic)(((e,t)=>{const i=e.getColor(Rt.b6);i&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=e.getColor(Rt.lX);n&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${is(n)}") repeat-x bottom left; }`);const o=e.getColor(Rt.A2);o&&t.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${o}; }`);const s=e.getColor(Rt.pW);s&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${s}; }`);const r=e.getColor(Rt.uo);r&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${is(r)}") repeat-x bottom left; }`);const a=e.getColor(Rt.gp);a&&t.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=e.getColor(Rt.T8);l&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const d=e.getColor(Rt.c6);d&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${is(d)}") repeat-x bottom left; }`);const h=e.getColor(Rt.fe);h&&t.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${h}; }`);const c=e.getColor(Rt.fE);c&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${c}; }`);const u=e.getColor(Rt.Du);u&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return ns+encodeURIComponent(e.toString())+os}(u)}") no-repeat bottom left; }`);const g=e.getColor(Qe.zu);g&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${g.rgba.a}; }`);const p=e.getColor(Qe.kp);p&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${p}; }`);const m=e.getColor(Rt.NO)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${m}}`)}))},88726:(e,t,i)=>{i.d(t,{p:()=>Ee});var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(26568),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=i(85337),v=i(48696),b=i(82704),C=i(86629),w=i(10554),y=i(77538),S=i(48646),L=i(69836),x=i(45188),k=i(96615),N=i(80197),D=i(90138),E={};E.styleTagTransform=p(),E.setAttributes=h(),E.insert=l().bind(null,"head"),E.domAPI=r(),E.insertStyleElement=u(),o()(D.Z,E),D.Z&&D.Z.locals&&D.Z.locals;var I,T=i(7912),M=i(45019),R=i(92981),A=i(87107),O=i(38562),P=i(12062),F=i(24028),B=i(81312),W=i(12954),V=i(76830),H=i(72396),z=i(98962),K=i(65700),U=i(85095),j=i(56459),$=i(34587);class q{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class Z{constructor(e){this.entries=e}}const G=(0,j.q5)("diff-review-insert",U.lA.add,_.N("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),Q=(0,j.q5)("diff-review-remove",U.lA.remove,_.N("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),Y=(0,j.q5)("diff-review-close",U.lA.close,_.N("diffReviewCloseIcon","Icon for 'Close' in diff review."));let J=class e extends S.JT{constructor(e,t){super(),this._modeService=t,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=(0,b.X)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,b.X)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new T.o(this.actionBarContainer.domNode)),this._actionBar.push(new R.aU("diffreview.close",_.N("label.close","Close"),"close-diff-review "+K.kS.asClassName(Y),!0,(()=>{return e=this,t=void 0,n=function*(){return this.hide()},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n})),{label:!1,icon:!0}),this.domNode=(0,b.X)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,b.X)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new M.s$(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff((()=>{this._isVisible&&(this._diffs=this._compute(),this._render())}))),this._register(e.getModifiedEditor().onDidChangeCursorPosition((()=>{this._isVisible&&this._render()}))),this._register(v.mu(this.domNode.domNode,"click",(e=>{e.preventDefault();let t=v.Fx(e.target,"diff-review-row");t&&this._goToRow(t)}))),this._register(v.mu(this.domNode.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())}))),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=this._diffs.length+t-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new F.L(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=t+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new F.L(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let e=-1,t=this._getCurrentFocusedRow();if(t){let i=parseInt(t.getAttribute("data-line"),10);isNaN(i)||(e=i)}this.hide(),-1!==e&&(this._diffEditor.setPosition(new F.L(e,1)),this._diffEditor.revealPosition(new F.L(e,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){let e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()}_getNextRow(){let e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){let e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null}_goToRow(e){let t=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),t&&t!==e&&(t.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(e,t,i){this._width=t,this.shadow.setTop(e-6),this.shadow.setWidth(t),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(t),this.domNode.setHeight(i),this._content.setHeight(i),this._content.setWidth(t),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const t=this._diffEditor.getLineChanges();if(!t||0===t.length)return[];const i=this._diffEditor.getOriginalEditor().getModel(),n=this._diffEditor.getModifiedEditor().getModel();return i&&n?e._mergeAdjacent(t,i.getLineCount(),n.getLineCount()):[]}static _mergeAdjacent(e,t,i){if(!e||0===e.length)return[];let n=[],o=0;for(let s=0,r=e.length;s<r;s++){const a=e[s],l=a.originalStartLineNumber,d=a.originalEndLineNumber,h=a.modifiedStartLineNumber,c=a.modifiedEndLineNumber;let u=[],g=0;{const t=0===d?l:l-1,i=0===c?h:h-1;let n=1,o=1;if(s>0){const t=e[s-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let r=t-3+1,a=i-3+1;if(r<n){const e=n-r;r+=e,a+=e}if(a<o){const e=o-a;r+=e,a+=e}u[g++]=new q(r,t,a,i)}0!==d&&(u[g++]=new q(l,d,0,0)),0!==c&&(u[g++]=new q(0,0,h,c));{const n=0===d?l+1:d+1,o=0===c?h+1:c+1;let a=t,p=i;if(s+1<r){const t=e[s+1];a=0===t.originalEndLineNumber?t.originalStartLineNumber:t.originalStartLineNumber-1,p=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber:t.modifiedStartLineNumber-1}let m=n+3-1,f=o+3-1;if(m>a){const e=a-m;m+=e,f+=e}if(f>p){const e=p-f;m+=e,f+=e}u[g++]=new q(n,m,o,f)}n[o++]=new Z(u)}let s=n[0].entries,r=[],a=0;for(let e=1,t=n.length;e<t;e++){const t=n[e].entries,i=s[s.length-1],o=t[0];0===i.getType()&&0===o.getType()&&o.originalLineStart<=i.originalLineEnd?(s[s.length-1]=new q(i.originalLineStart,o.originalLineEnd,i.modifiedLineStart,o.modifiedLineEnd),s=s.concat(t.slice(1))):(r[a++]=new Z(s),s=t)}return r[a++]=new Z(s),r}_findDiffIndex(e){const t=e.lineNumber;for(let e=0,i=this._diffs.length;e<i;e++){const i=this._diffs[e].entries;if(t<=i[i.length-1].modifiedLineEnd)return e}return 0}_render(){const t=this._diffEditor.getOriginalEditor().getOptions(),i=this._diffEditor.getModifiedEditor().getOptions(),n=this._diffEditor.getOriginalEditor().getModel(),o=this._diffEditor.getModifiedEditor().getModel(),s=n.getOptions(),r=o.getOptions();if(!this._isVisible||!n||!o)return v.PO(this._content.domNode),this._currentDiff=null,void this.scrollbar.scanDomNode();this._diffEditor.updateOptions({readOnly:!0});const a=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[a]===this._currentDiff)return;this._currentDiff=this._diffs[a];const l=this._diffs[a].entries;let d=document.createElement("div");d.className="diff-review-table",d.setAttribute("role","list"),d.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),L.V.applyFontInfoSlow(d,i.get(43));let h=0,c=0,u=0,g=0;for(let e=0,t=l.length;e<t;e++){const t=l[e],i=t.originalLineStart,n=t.originalLineEnd,o=t.modifiedLineStart,s=t.modifiedLineEnd;0!==i&&(0===h||i<h)&&(h=i),0!==n&&(0===c||n>c)&&(c=n),0!==o&&(0===u||o<u)&&(u=o),0!==s&&(0===g||s>g)&&(g=s)}let p=document.createElement("div");p.className="diff-review-row";let m=document.createElement("div");m.className="diff-review-cell diff-review-summary";const f=c-h+1,b=g-u+1;m.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${h},${f} +${u},${b} @@`)),p.setAttribute("data-line",String(u));const C=e=>0===e?_.N("no_lines_changed","no lines changed"):1===e?_.N("one_line_changed","1 line changed"):_.N("more_lines_changed","{0} lines changed",e),w=C(f),y=C(b);p.setAttribute("aria-label",_.N({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",a+1,this._diffs.length,h,w,u,y)),p.appendChild(m),p.setAttribute("role","listitem"),d.appendChild(p);const S=i.get(58);let x=u;for(let a=0,h=l.length;a<h;a++){const h=l[a];e._renderSection(d,h,x,S,this._width,t,n,s,i,o,r,this._modeService.languageIdCodec),0!==h.modifiedLineStart&&(x=h.modifiedLineEnd)}v.PO(this._content.domNode),this._content.domNode.appendChild(d),this.scrollbar.scanDomNode()}static _renderSection(t,i,n,o,s,r,a,l,d,h,c,u){const g=i.getType();let p="diff-review-row",m="",f=null;switch(g){case 1:p="diff-review-row line-insert",m=" char-insert",f=G;break;case 2:p="diff-review-row line-delete",m=" char-delete",f=Q}const v=i.originalLineStart,b=i.originalLineEnd,C=i.modifiedLineStart,w=i.modifiedLineEnd,y=Math.max(w-C,b-v),S=r.get(129),L=S.glyphMarginWidth+S.lineNumbersWidth,x=d.get(129),k=10+x.glyphMarginWidth+x.lineNumbersWidth;for(let i=0;i<=y;i++){const b=0===v?0:v+i,w=0===C?0:C+i,y=document.createElement("div");y.style.minWidth=s+"px",y.className=p,y.setAttribute("role","listitem"),0!==w&&(n=w),y.setAttribute("data-line",String(n));let S=document.createElement("div");S.className="diff-review-cell",S.style.height=`${o}px`,y.appendChild(S);const x=document.createElement("span");x.style.width=L+"px",x.style.minWidth=L+"px",x.className="diff-review-line-number"+m,0!==b?x.appendChild(document.createTextNode(String(b))):x.innerText=" ",S.appendChild(x);const N=document.createElement("span");N.style.width=k+"px",N.style.minWidth=k+"px",N.style.paddingRight="10px",N.className="diff-review-line-number"+m,0!==w?N.appendChild(document.createTextNode(String(w))):N.innerText=" ",S.appendChild(N);const D=document.createElement("span");if(D.className="diff-review-spacer",f){const e=document.createElement("span");e.className=K.kS.asClassName(f),e.innerText="  ",D.appendChild(e)}else D.innerText="  ";let E;if(S.appendChild(D),0!==w){let t=this._renderLine(h,d,c.tabSize,w,u);e._ttPolicy&&(t=e._ttPolicy.createHTML(t)),S.insertAdjacentHTML("beforeend",t),E=h.getLineContent(w)}else{let t=this._renderLine(a,r,l.tabSize,b,u);e._ttPolicy&&(t=e._ttPolicy.createHTML(t)),S.insertAdjacentHTML("beforeend",t),E=a.getLineContent(b)}0===E.length&&(E=_.N("blankLine","blank"));let I="";switch(g){case 0:I=b===w?_.N({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",E,b):_.N("equalLine","{0} original line {1} modified line {2}",E,b,w);break;case 1:I=_.N("insertLine","+ {0} modified line {1}",E,w);break;case 2:I=_.N("deleteLine","- {0} original line {1}",E,b)}y.setAttribute("aria-label",I),t.appendChild(y)}}static _renderLine(e,t,i,n,o){const s=e.getLineContent(n),r=t.get(43),a=P.A.createEmpty(s,o),l=V.wA.isBasicASCII(s,e.mightContainNonBasicASCII()),d=V.wA.containsRTL(s,l,e.mightContainRTL());return(0,W.tF)(new W.IJ(r.isMonospace&&!t.get(29),r.canUseHalfwidthRightwardsArrow,s,!1,l,d,0,a,[],i,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(104),t.get(87),t.get(82),t.get(44)!==O.n0.OFF,null)).html}};var X,ee;J._ttPolicy=null===(I=window.trustedTypes)||void 0===I?void 0:I.createPolicy("diffReview",{createHTML:e=>e}),J=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(X=1,ee=$.h,function(e,t){ee(e,t,X)})],J),(0,K.Ic)(((e,t)=>{const i=e.getColor(B.hw);i&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=e.getColor(z._w);n&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)}));class te extends A.R6{constructor(){super({id:"editor.action.diffReview.next",label:_.N("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:H.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=ne(e);i&&i.diffReviewNext()}}class ie extends A.R6{constructor(){super({id:"editor.action.diffReview.prev",label:_.N("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:H.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=ne(e);i&&i.diffReviewPrev()}}function ne(e){const t=e.get(k.$),i=t.listDiffEditors(),n=t.getActiveCodeEditor();if(!n)return null;for(let e=0,t=i.length;e<t;e++){const t=i[e];if(t.getModifiedEditor().getId()===n.getId()||t.getOriginalEditor().getId()===n.getId())return t}return null}(0,A.Qr)(te),(0,A.Qr)(ie);var oe=i(78891),se=i(25508),re=i(35389),ae=i(95098),le=i(33930),de=i(73979),he=i(10626),ce=i(7978),ue=i(29427),ge=i(44794),pe=i(40094),me=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class fe extends S.JT{constructor(e,t,i,n,o,s){super(),this._viewZoneId=e,this._marginDomNode=t,this.editor=i,this.diff=n,this._contextMenuService=o,this._clipboardService=s,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=U.lA.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const r=i.getOption(58),a=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${r}px`,this._diffActions.style.lineHeight=`${r}px`,this._marginDomNode.appendChild(this._diffActions);const l=[],d=0===n.modifiedEndLineNumber;l.push(new R.aU("diff.clipboard.copyDeletedContent",d?n.originalEndLineNumber>n.modifiedStartLineNumber?_.N("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):_.N("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):n.originalEndLineNumber>n.modifiedStartLineNumber?_.N("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):_.N("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,(()=>me(this,void 0,void 0,(function*(){const e=new oe.e(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),t=n.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)})))));let h,c=0;n.originalEndLineNumber>n.modifiedStartLineNumber&&(h=new R.aU("diff.clipboard.copyDeletedLineContent",d?_.N("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber):_.N("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber),void 0,!0,(()=>me(this,void 0,void 0,(function*(){const e=n.originalModel.getLineContent(n.originalStartLineNumber+c);if(""===e){const e=n.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(0===e?"\n":"\r\n")}else yield this._clipboardService.writeText(e)})))),l.push(h)),i.getOption(80)||l.push(new R.aU("diff.inline.revertChange",_.N("diff.inline.revertChange.label","Revert this change"),void 0,!0,(()=>me(this,void 0,void 0,(function*(){const e=new oe.e(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),t=n.originalModel.getValueInRange(e);if(0===n.modifiedEndLineNumber){const e=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new oe.e(n.modifiedStartLineNumber,e,n.modifiedStartLineNumber,e),text:a+t}])}else{const e=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new oe.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,e),text:t}])}})))));const u=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(h&&(h.label=d?_.N("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+c):_.N("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber+c)),l),autoSelectFirstItem:!0})};this._register(v.mu(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=v.i(this._diffActions);let n=Math.floor(r/3);e.preventDefault(),u(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{(8===e.target.type||5===e.target.type)&&e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,c=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r)):this.visibility=!1}))),this._register(i.onMouseDown((e=>{!e.event.rightButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),c=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r),u(e.event.posx,e.event.posy+r))})))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=v.i(e),o=t-n,s=Math.floor(o/i),r=s*i;if(this._diffActions.style.top=`${r}px`,this.diff.viewLineCounts){let e=0;for(let t=0;t<this.diff.viewLineCounts.length;t++)if(e+=this.diff.viewLineCounts[t],s<e)return t}return s}}var _e,ve=i(88915),be=i(98147),Ce=i(61112),we=i(76052),ye=i(89477),Se=function(e,t){return function(i,n){t(i,n,e)}};class Le{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter((e=>!this._zonesMap[String(e.id)]))}clean(e){this._zones.length>0&&e.changeViewZones((e=>{for(const t of this._zones)e.removeZone(t)})),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,i,n){const o=n?x.ZF.capture(e):null;e.changeViewZones((t=>{var n;for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let o=0,s=i.zones.length;o<s;o++){const s=i.zones[o];s.suppressMouseDown=!0;const r=t.addZone(s);this._zones.push(r),this._zonesMap[String(r)]=!0,i.zones[o].diff&&s.marginDomNode&&(s.suppressMouseDown=!1,0!==(null===(n=i.zones[o].diff)||void 0===n?void 0:n.originalModel.getValueLength())&&this._inlineDiffMargins.push(new fe(r,s.marginDomNode,e,i.zones[o].diff,this._contextMenuService,this._clipboardService)))}})),o&&o.restore(e),this._decorations=e.deltaDecorations(this._decorations,i.decorations),t&&t.setZones(i.overviewZones)}}let xe=0;const ke=(0,j.q5)("diff-insert",U.lA.add,_.N("diffInsertIcon","Line decoration for inserts in the diff editor.")),Ne=(0,j.q5)("diff-remove",U.lA.remove,_.N("diffRemoveIcon","Line decoration for removals in the diff editor.")),De=null===(_e=window.trustedTypes)||void 0===_e?void 0:_e.createPolicy("diffEditorWidget",{createHTML:e=>e});let Ee=class e extends S.JT{constructor(t,i,n,o,s,r,a,l,d,h,c,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new y.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new y.Q5),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new y.Q5),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=s,this._codeEditorService=l,this._contextKeyService=this._register(r.createScoped(t)),this._instantiationService=a.createChild(new ue.y([H.i6,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=d,this._notificationService=h,this._id=++xe,this._state=0,this._updatingDiffProgress=null,this._domElement=t,i=i||{},this._options=Ke(i,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),void 0!==i.isInEmbeddedEditor?this._contextKeyService.createKey("isInEmbeddedDiffEditor",i.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new w.pY((()=>this._updateDecorations()),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,b.X)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(v.mu(this._overviewDomElement,"mousedown",(e=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(e)}))),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new Le(c,o),this._modifiedEditorState=new Le(c,o),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new we.I(this._containerDomElement,i.dimension,(()=>this._onDidContainerSizeChanged()))),i.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(i,n.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(i,n.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=a.createInstance(J,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new Oe(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Fe(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(d.onDidColorThemeChange((t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)})));const g=A.Uc.getDiffEditorContributions();for(const e of g)try{this._register(a.createInstance(e.ctor,this))}catch(e){(0,be.dL)(e)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=(0,K.m6)(e.type),i}_recreateOverviewRulers(){this._options.renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(43)&&this._updateDecorationsRunner.schedule(),e.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})));const o=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createRightHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(43)&&this._updateDecorationsRunner.schedule(),e.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}))),this._register(n.onDidChangeModelOptions((e=>{e.tabSize&&this._updateDecorationsRunner.schedule()})));const o=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createInnerEditor(e,t,i,n){return e.createInstance(N.Gm,t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return re.g.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(t){const i=Ke(t,this._options),n=(s=i,{enableSplitViewResizing:(o=this._options).enableSplitViewResizing!==s.enableSplitViewResizing,renderSideBySide:o.renderSideBySide!==s.renderSideBySide,maxComputationTime:o.maxComputationTime!==s.maxComputationTime,maxFileSize:o.maxFileSize!==s.maxFileSize,ignoreTrimWhitespace:o.ignoreTrimWhitespace!==s.ignoreTrimWhitespace,renderIndicators:o.renderIndicators!==s.renderIndicators,originalEditable:o.originalEditable!==s.originalEditable,diffCodeLens:o.diffCodeLens!==s.diffCodeLens,renderOverviewRuler:o.renderOverviewRuler!==s.renderOverviewRuler,diffWordWrap:o.diffWordWrap!==s.diffWordWrap});var o,s;this._options=i;const r=n.ignoreTrimWhitespace||n.renderIndicators,a=this._isVisible&&(n.maxComputationTime||n.maxFileSize);r?this._beginUpdateDecorations():a&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),n.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new Oe(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Fe(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),n.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e){this._modifiedEditor.setPosition(e)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e){this._modifiedEditor.setSelection(e)}setSelections(e){this._modifiedEditor.setSelections(e)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:n+e.ONE_OVERVIEW_WIDTH,height:t-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((()=>this._beginUpdateDecorations()),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this._originalEditor.getModel(),i=this._modifiedEditor.getModel();if(!t||!i)return;this._diffComputationToken++;const n=this._diffComputationToken,o=1024*this._options.maxFileSize*1024,s=e=>{const t=e.getValueLength();return 0===o||t<=o};s(t)&&s(i)?(this._setState(1),this._editorWorkerService.computeDiff(t.uri,i.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then((e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())}),(e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())}))):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(i.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=i.uri,this._notificationService.warn(_.N("diff.tooLarge","Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:t.wordWrapOverride1="off",e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._options.originalEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.wordWrapOverride1=this._options.diffWordWrap,i.revealHorizontalRightPadding=O.BH.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},i),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-o+"px",this._modifiedDomNode.style.left=o+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:o,height:i-n}),this._modifiedEditor.layout({width:t-o-(this._options.renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,t,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),o=Math.max(0,n-0),s=i>0?o/i:0;return{height:Math.max(0,Math.floor(e.height*s)),top:Math.floor(t*s)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===i.length||e<t(i[0]))return null;let n=0,o=i.length-1;for(;n<o;){const s=Math.floor((n+o)/2),r=t(i[s]),a=s+1<=o?t(i[s+1]):1073741824;e<r?o=s-1:e>=a?n=s+1:(n=s,o=s)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.originalStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-i;return r<=o?n+Math.min(r,s):n+s-o+r}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.modifiedStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-n;return r<=s?i+Math.min(r,o):i+o-s+r}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};Ee.ONE_OVERVIEW_WIDTH=15,Ee.ENTIRE_DIFF_OVERVIEW_WIDTH=30,Ee.UPDATE_DIFF_DECORATIONS_DELAY=200,Ee=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Se(3,ve.p),Se(4,le.p),Se(5,H.i6),Se(6,ce.TG),Se(7,k.$),Se(8,K.XE),Se(9,ge.lT),Se(10,pe.i),Se(11,Ce.e)],Ee);class Ie extends S.JT{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=(e.getColor(z.yp)||z.Cz).transparent(2),i=(e.getColor(z.P4)||z.ke).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,o){o=o.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber)),n=n.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber));const s=this._getViewZones(e,n,o,i),r=this._getOriginalEditorDecorations(e,t,i),a=this._getModifiedEditorDecorations(e,t,i);return{original:{decorations:r.decorations,overviewZones:r.overviewZones,zones:s.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:s.modified}}}}class Te{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class Me{constructor(e,t,i,n,o){this._lineChanges=e,this._originalForeignVZ=t,this._modifiedForeignVZ=i,this._originalEditor=n,this._modifiedEditor=o}static _getViewLineCount(e,t,i){const n=e.getModel(),o=e._getViewModel();if(n&&o){const e=ze(n,o,t,i);return e.endLineNumber-e.startLineNumber+1}return i-t+1}getViewZones(){const e=this._originalEditor.getOption(58),t=this._modifiedEditor.getOption(58),i=-1!==this._originalEditor.getOption(130).wrappingColumn,n=-1!==this._modifiedEditor.getOption(130).wrappingColumn,o=i||n,s=this._originalEditor.getModel(),r=this._originalEditor._getViewModel().coordinatesConverter,a=this._modifiedEditor._getViewModel().coordinatesConverter,l=[],d=[];let h=0,c=0,u=0,g=0,p=0,m=0;const f=(e,t)=>e.afterLineNumber-t.afterLineNumber,_=(e,t)=>{if(null===t.domNode&&e.length>0){const i=e[e.length-1];if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},v=new Te(this._modifiedForeignVZ),b=new Te(this._originalForeignVZ);let C=1,w=1;for(let i=0,n=this._lineChanges.length;i<=n;i++){const y=i<n?this._lineChanges[i]:null;null!==y?(u=y.originalStartLineNumber+(y.originalEndLineNumber>0?-1:0),g=y.modifiedStartLineNumber+(y.modifiedEndLineNumber>0?-1:0),c=y.originalEndLineNumber>0?Me._getViewLineCount(this._originalEditor,y.originalStartLineNumber,y.originalEndLineNumber):0,h=y.modifiedEndLineNumber>0?Me._getViewLineCount(this._modifiedEditor,y.modifiedStartLineNumber,y.modifiedEndLineNumber):0,p=Math.max(y.originalStartLineNumber,y.originalEndLineNumber),m=Math.max(y.modifiedStartLineNumber,y.modifiedEndLineNumber)):(u+=1e7+c,g+=1e7+h,p=u,m=g);let S=[],L=[];if(o){let e;e=y?y.originalEndLineNumber>0?y.originalStartLineNumber-C:y.modifiedStartLineNumber-w:s.getLineCount()-C;for(let t=0;t<e;t++){const e=C+t,i=w+t,n=r.getModelLineViewLineCount(e),o=a.getModelLineViewLineCount(i);n<o?S.push({afterLineNumber:e,heightInLines:o-n,domNode:null,marginDomNode:null}):n>o&&L.push({afterLineNumber:i,heightInLines:n-o,domNode:null,marginDomNode:null})}y&&(C=(y.originalEndLineNumber>0?y.originalEndLineNumber:y.originalStartLineNumber)+1,w=(y.modifiedEndLineNumber>0?y.modifiedEndLineNumber:y.modifiedStartLineNumber)+1)}for(;v.current&&v.current.afterLineNumber<=m;){let e;e=v.current.afterLineNumber<=g?u-g+v.current.afterLineNumber:p;let i=null;y&&y.modifiedStartLineNumber<=v.current.afterLineNumber&&v.current.afterLineNumber<=y.modifiedEndLineNumber&&(i=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),S.push({afterLineNumber:e,heightInLines:v.current.height/t,domNode:null,marginDomNode:i}),v.advance()}for(;b.current&&b.current.afterLineNumber<=p;){let t;t=b.current.afterLineNumber<=u?g-u+b.current.afterLineNumber:m,L.push({afterLineNumber:t,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(null!==y&&We(y)){const e=this._produceOriginalFromDiff(y,c,h);e&&S.push(e)}if(null!==y&&Ve(y)){const e=this._produceModifiedFromDiff(y,c,h);e&&L.push(e)}let x=0,k=0;for(S=S.sort(f),L=L.sort(f);x<S.length&&k<L.length;){const e=S[x],t=L[k],i=e.afterLineNumber-u,n=t.afterLineNumber-g;i<n?(_(l,e),x++):n<i?(_(d,t),k++):e.shouldNotShrink?(_(l,e),x++):t.shouldNotShrink?(_(d,t),k++):e.heightInLines>=t.heightInLines?(e.heightInLines-=t.heightInLines,k++):(t.heightInLines-=e.heightInLines,x++)}for(;x<S.length;)_(l,S[x]),x++;for(;k<L.length;)_(d,L[k]),k++}return{original:Me._ensureDomNodes(l),modified:Me._ensureDomNodes(d)}}static _ensureDomNodes(e){return e.map((e=>(e.domNode||(e.domNode=He()),e)))}}function Re(e,t,i,n,o){return{range:new oe.e(e,t,i,n),options:o}}const Ae={charDelete:ae.qx.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:ae.qx.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:ae.qx.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:ae.qx.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:ae.qx.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:ae.qx.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+K.kS.asClassName(ke),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:ae.qx.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:ae.qx.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+K.kS.asClassName(Ne),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:ae.qx.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class Oe extends Ie{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new C.g(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart((()=>this._onSashDragStart())),this._sash.onDidChange((e=>this._onSashDrag(e))),this._sash.onDidEnd((()=>this._onSashDragEnd())),this._sash.onDidReset((()=>this._onSashReset()))}setEnableSplitViewResizing(e){const t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Ee.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let i=Math.floor((e||.5)*t);const n=Math.floor(.5*t);return i=this._disableSash?n:i||n,t>2*Oe.MINIMUM_EDITOR_WIDTH?(i<Oe.MINIMUM_EDITOR_WIDTH&&(i=Oe.MINIMUM_EDITOR_WIDTH),i>t-Oe.MINIMUM_EDITOR_WIDTH&&(i=t-Oe.MINIMUM_EDITOR_WIDTH)):i=n,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Ee.ENTIRE_DIFF_OVERVIEW_WIDTH:0),i=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=i/t,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new Pe(e,t,i,n,o).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=this._dataSource.getOriginalEditor(),o=String(this._removeColor),s={decorations:[],overviewZones:[]},r=n.getModel(),a=n._getViewModel();for(const n of e)if(Ve(n)){s.decorations.push({range:new oe.e(n.originalStartLineNumber,1,n.originalEndLineNumber,1073741824),options:i?Ae.lineDeleteWithSign:Ae.lineDelete}),We(n)&&n.charChanges||s.decorations.push(Re(n.originalStartLineNumber,1,n.originalEndLineNumber,1073741824,Ae.charDeleteWholeLine));const e=ze(r,a,n.originalStartLineNumber,n.originalEndLineNumber);if(s.overviewZones.push(new de.EY(e.startLineNumber,e.endLineNumber,o)),n.charChanges)for(const e of n.charChanges)if(Ve(e))if(t)for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++){let i,n;i=t===e.originalStartLineNumber?e.originalStartColumn:r.getLineFirstNonWhitespaceColumn(t),n=t===e.originalEndLineNumber?e.originalEndColumn:r.getLineLastNonWhitespaceColumn(t),s.decorations.push(Re(t,i,t,n,Ae.charDelete))}else s.decorations.push(Re(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn,Ae.charDelete))}return s}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),o=String(this._insertColor),s={decorations:[],overviewZones:[]},r=n.getModel(),a=n._getViewModel();for(const n of e)if(We(n)){s.decorations.push({range:new oe.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824),options:i?Ae.lineInsertWithSign:Ae.lineInsert}),Ve(n)&&n.charChanges||s.decorations.push(Re(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824,Ae.charInsertWholeLine));const e=ze(r,a,n.modifiedStartLineNumber,n.modifiedEndLineNumber);if(s.overviewZones.push(new de.EY(e.startLineNumber,e.endLineNumber,o)),n.charChanges)for(const e of n.charChanges)if(We(e))if(t)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let i,n;i=t===e.modifiedStartLineNumber?e.modifiedStartColumn:r.getLineFirstNonWhitespaceColumn(t),n=t===e.modifiedEndLineNumber?e.modifiedEndColumn:r.getLineLastNonWhitespaceColumn(t),s.decorations.push(Re(t,i,t,n,Ae.charInsert))}else s.decorations.push(Re(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,Ae.charInsert))}return s}}Oe.MINIMUM_EDITOR_WIDTH=100;class Pe extends Me{constructor(e,t,i,n,o){super(e,t,i,n,o)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class Fe extends Ie{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange((t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())})))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const o=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor();return new Be(e,t,i,o,s,n).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=String(this._removeColor),o={decorations:[],overviewZones:[]},s=this._dataSource.getOriginalEditor(),r=s.getModel(),a=s._getViewModel();for(const t of e)if(Ve(t)){o.decorations.push({range:new oe.e(t.originalStartLineNumber,1,t.originalEndLineNumber,1073741824),options:Ae.lineDeleteMargin});const e=ze(r,a,t.originalStartLineNumber,t.originalEndLineNumber);o.overviewZones.push(new de.EY(e.startLineNumber,e.endLineNumber,n))}return o}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),o=String(this._insertColor),s={decorations:[],overviewZones:[]},r=n.getModel(),a=n._getViewModel();for(const n of e)if(We(n)){s.decorations.push({range:new oe.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824),options:i?Ae.lineInsertWithSign:Ae.lineInsert});const e=ze(r,a,n.modifiedStartLineNumber,n.modifiedEndLineNumber);if(s.overviewZones.push(new de.EY(e.startLineNumber,e.endLineNumber,o)),n.charChanges){for(const e of n.charChanges)if(We(e))if(t)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let i,n;i=t===e.modifiedStartLineNumber?e.modifiedStartColumn:r.getLineFirstNonWhitespaceColumn(t),n=t===e.modifiedEndLineNumber?e.modifiedEndColumn:r.getLineLastNonWhitespaceColumn(t),s.decorations.push(Re(t,i,t,n,Ae.charInsert))}else s.decorations.push(Re(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,Ae.charInsert))}else s.decorations.push(Re(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824,Ae.charInsertWholeLine))}return s}layout(){return Math.max(5,this._decorationsLeft)}}class Be extends Me{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._originalModel=n.getModel(),this._renderIndicators=s,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,i){const n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(e,t,i){const n=document.createElement("div");n.className=`view-lines line-delete ${ye.S}`;const o=document.createElement("div");o.className="inline-deleted-margin-view-zone";const s={shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:n,marginDomNode:o,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(t),null,null);return this._pendingLineChange.push(e),this._pendingViewZones.push(s),s}_finalize(e){const t=this._modifiedEditor.getOptions(),i=this._modifiedEditor.getModel().getOptions().tabSize,n=t.get(43),o=t.get(29),s=n.typicalHalfwidthCharacterWidth,r=t.get(92),a=this._originalModel.mightContainNonBasicASCII(),l=this._originalModel.mightContainRTL(),d=t.get(58),h=t.get(129).decorationsWidth,c=t.get(104),u=t.get(87),g=t.get(82),p=t.get(44),m=this._lineBreaksComputer.finalize();let f=0;for(let t=0;t<this._pendingLineChange.length;t++){const _=this._pendingLineChange[t],v=this._pendingViewZones[t],b=v.domNode;L.V.applyFontInfoSlow(b,n);const C=v.marginDomNode;L.V.applyFontInfoSlow(C,n);const w=[];if(_.charChanges)for(const e of _.charChanges)Ve(e)&&w.push(new V.$t(new oe.e(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),"char-delete",0));const y=w.length>0,S=(0,se.l$)(1e4);let x=0,k=0,N=null;for(let t=_.originalStartLineNumber;t<=_.originalEndLineNumber;t++){const s=t-_.originalStartLineNumber,r=this._originalModel.getLineTokens(t),b=r.getLineContent(),L=m[f++],D=he.Kp.filter(w,t,1,b.length+1);if(L){let m=0;for(const e of L.breakOffsets){const t=r.sliceAndInflate(m,e,0),s=b.substring(m,e);x=Math.max(x,this._renderOriginalLine(k++,s,t,he.Kp.extractWrapped(D,m,e),y,a,l,n,o,d,h,c,u,g,p,i,S,C)),m=e}for(N||(N=[]);N.length<s;)N[N.length]=1;N[s]=L.breakOffsets.length,v.heightInLines+=L.breakOffsets.length-1;const f=document.createElement("div");f.className="line-delete",e.original.push({afterLineNumber:t,afterColumn:0,heightInLines:L.breakOffsets.length-1,domNode:He(),marginDomNode:f})}else x=Math.max(x,this._renderOriginalLine(k++,b,r,D,y,a,l,n,o,d,h,c,u,g,p,i,S,C))}x+=r;const D=S.build(),E=De?De.createHTML(D):D;if(b.innerHTML=E,v.minWidthInPx=x*s,N){const e=_.originalEndLineNumber-_.originalStartLineNumber;for(;N.length<=e;)N[N.length]=1}v.diff.viewLineCounts=N}e.original.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber))}_renderOriginalLine(e,t,i,n,o,s,r,a,l,d,h,c,u,g,p,m,f,_){f.appendASCIIString('<div class="view-line'),o||f.appendASCIIString(" char-delete"),f.appendASCIIString('" style="top:'),f.appendASCIIString(String(e*d)),f.appendASCIIString('px;width:1000000px;">');const v=V.wA.isBasicASCII(t,s),b=V.wA.containsRTL(t,v,r),C=(0,W.d1)(new W.IJ(a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,t,!1,v,b,0,i,n,m,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,c,u,g,p!==O.n0.OFF,null),f);if(f.appendASCIIString("</div>"),this._renderIndicators){const t=document.createElement("div");t.className=`delete-sign ${K.kS.asClassName(Ne)}`,t.setAttribute("style",`position:absolute;top:${e*d}px;width:${h}px;height:${d}px;right:0;`),_.appendChild(t)}return C.characterMapping.getAbsoluteOffset(C.characterMapping.length)}}function We(e){return e.modifiedEndLineNumber>0}function Ve(e){return e.originalEndLineNumber>0}function He(){const e=document.createElement("div");return e.className="diagonal-fill",e}function ze(e,t,i,n){const o=e.getLineCount();return i=Math.min(o,Math.max(1,i)),n=Math.min(o,Math.max(1,n)),t.coordinatesConverter.convertModelRangeToViewRange(new oe.e(i,e.getLineMinColumn(i),n,e.getLineMaxColumn(n)))}function Ke(e,t){return{enableSplitViewResizing:(0,O.O7)(e.enableSplitViewResizing,t.enableSplitViewResizing),renderSideBySide:(0,O.O7)(e.renderSideBySide,t.renderSideBySide),maxComputationTime:(0,O.Zc)(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:(0,O.Zc)(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,O.O7)(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:(0,O.O7)(e.renderIndicators,t.renderIndicators),originalEditable:(0,O.O7)(e.originalEditable,t.originalEditable),diffCodeLens:(0,O.O7)(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:(0,O.O7)(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(i=e.diffWordWrap,n=t.diffWordWrap,(0,O.NY)(i,n,["off","on","inherit"]))};var i,n}(0,K.Ic)(((e,t)=>{const i=e.getColor(z.yp);i&&(t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${i}; }`));const n=e.getColor(z.P4);n&&(t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${n}; }`));const o=e.getColor(z.XL);o&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${o}; }`);const s=e.getColor(z.mH);s&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; }`);const r=e.getColor(z._w);r&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${r}; }`);const a=e.getColor(z.LL);a&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=e.getColor(z.et);l&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${l};\n\t\t\t}\n\t\t`);const d=e.getColor(z.AB);d&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${d};\n\t\t\t}\n\t\t`);const h=e.getColor(z.yn);h&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${h};\n\t\t\t}\n\t\t`);const c=e.getColor(z.L_);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${c} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${c} 50%, ${c} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)}))},90143:(e,t,i)=>{i.d(t,{F:()=>d});var n=i(86963),o=i(77538),s=i(48646),r=i(20620),a=i(78891);const l={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class d extends s.JT{constructor(e,t={}){super(),this._onDidUpdate=this._register(new o.Q5),this._editor=e,this._options=r.jB(t,l,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose((()=>this.dispose()))),this._register(this._editor.onDidUpdateDiff((()=>this._onDiffUpdated()))),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e=>{this.ignoreSelectionChange||(this.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel((e=>{this.revealFirst=!0}))),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach((e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((e=>{this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):0===e.modifiedEndLineNumber?this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber+1,1)})})),this.ranges.sort(((e,t)=>a.e.compareRangesUsingStarts(e.range,t.range))),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,i=this._editor.getPosition();if(i){for(let n=0,o=this.ranges.length;n<o&&!t;n++){let o=this.ranges[n].range;i.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=n+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}else this.nextIdx=0}_move(e,t){if(n.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;-1===this.nextIdx?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealRangeInCenter(i.range,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}},63703:(e,t,i)=>{i.d(t,{OY:()=>s,Sj:()=>r,T4:()=>o,Uo:()=>a,hP:()=>l});var n=i(87178);class o{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return new n.Y(i.endLineNumber,i.endColumn,i.endLineNumber,i.endColumn)}}class s{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return new n.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)}}class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return new n.Y(i.startLineNumber,i.startColumn,i.startLineNumber,i.startColumn)}}class a{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return new n.Y(i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset,i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset)}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},33048:(e,t,i)=>{i.d(t,{U:()=>h});var n=i(96024),o=i(80919),s=i(78891),r=i(87178),a=i(16742);const l=Object.create(null);function d(e,t){if(t<=0)return"";l[e]||(l[e]=["",e]);const i=l[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}class h{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,s){const r=o.io.visibleColumnFromColumn(e,t,i);if(s){const e=d(" ",n);return d(e,o.io.prevIndentTabStop(r,n)/n)}return d("\t",o.io.prevRenderTabStop(r,i)/i)}static shiftIndent(e,t,i,n,s){const r=o.io.visibleColumnFromColumn(e,t,i);if(s){const e=d(" ",n);return d(e,o.io.nextIndentTabStop(r,n)/n)}return d("\t",o.io.nextRenderTabStop(r,i)/i)}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let r=this._selection.endLineNumber;1===this._selection.endColumn&&i!==r&&(r-=1);const{tabSize:l,indentSize:c,insertSpaces:u}=this._opts,g=i===r;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let d=0,p=0;for(let m=i;m<=r;m++,d=p){p=0;let r,f=e.getLineContent(m),_=n.LC(f);if((!this._opts.isUnshift||0!==f.length&&0!==_)&&(g||this._opts.isUnshift||0!==f.length)){if(-1===_&&(_=f.length),m>1&&o.io.visibleColumnFromColumn(f,_+1,l)%c!=0&&e.isCheapToTokenize(m-1)){let t=a.zu.getEnterAction(this._opts.autoIndent,e,new s.e(m-1,e.getLineMaxColumn(m-1),m-1,e.getLineMaxColumn(m-1)));if(t){if(p=d,t.appendText)for(let e=0,i=t.appendText.length;e<i&&p<c&&32===t.appendText.charCodeAt(e);e++)p++;t.removeText&&(p=Math.max(0,p-t.removeText));for(let e=0;e<p&&0!==_&&32===f.charCodeAt(_-1);e++)_--}}this._opts.isUnshift&&0===_||(r=this._opts.isUnshift?h.unshiftIndent(f,_+1,l,c,u):h.shiftIndent(f,_+1,l,c,u),this._addEditOperation(t,new s.e(m,1,m,_+1),r),m!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=this._selection.startColumn<=_+1))}}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&0===e.getLineLength(i)&&(this._useLastEditRangeForCursorEndPosition=!0);const o=u?d(" ",c):"\t";for(let a=i;a<=r;a++){const r=e.getLineContent(a);let l=n.LC(r);if((!this._opts.isUnshift||0!==r.length&&0!==l)&&(g||this._opts.isUnshift||0!==r.length)&&(-1===l&&(l=r.length),!this._opts.isUnshift||0!==l))if(this._opts.isUnshift){l=Math.min(l,c);for(let e=0;e<l;e++)if(9===r.charCodeAt(e)){l=e+1;break}this._addEditOperation(t,new s.e(a,1,a,l+1),"")}else this._addEditOperation(t,new s.e(a,1,a,1),o),a!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=1===this._selection.startColumn)}}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){if(this._useLastEditRangeForCursorEndPosition){let e=t.getInverseEditOperations()[0];return new r.Y(e.range.endLineNumber,e.range.endColumn,e.range.endLineNumber,e.range.endColumn)}const i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let e=this._selection.startColumn;return i.startColumn<=e?i:0===i.getDirection()?new r.Y(i.startLineNumber,e,i.endLineNumber,i.endColumn):new r.Y(i.endLineNumber,i.endColumn,i.startLineNumber,e)}return i}}},38701:(e,t,i)=>{i.d(t,{Pe:()=>D,ei:()=>N,fv:()=>C,nG:()=>p});var n=i(85337),o=i(77538),s=i(48646),r=i(20620),a=i(76345),l=i(38562),d=i(69731),h=i(18146),c=i(69868),u=i(95954),g=i(59642);const p=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new o.Q5,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},m=Object.hasOwnProperty;class f{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class _{constructor(){this._values=[]}_read(e){return this._values[e]}_write(e,t){this._values[e]=t}}class v{static readOptions(e){const t=e,i=new _;for(const e of l.Bc){const n="_never_"===e.name?void 0:t[e.name];i._write(e.id,n)}return i}static validateOptions(e){const t=new l.hu;for(const i of l.Bc)t._write(i.id,i.validate(e._read(i.id)));return t}static computeOptions(e,t){const i=new f;for(const n of l.Bc)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&a.fS(e,t);for(let i in e)if(!v._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of l.Bc){const s=!v._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=s,s&&(n=!0)}return n?new l.Bb(i):null}}function b(e){const t=r.I8(e);return function(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const i=e.lineNumbers;!0===i?e.lineNumbers="on":!1===i&&(e.lineNumbers="off"),!1===e.autoClosingBrackets&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never"),"visible"===e.cursorBlinking&&(e.cursorBlinking="solid");const n=e.renderWhitespace;!0===n?e.renderWhitespace="boundary":!1===n&&(e.renderWhitespace="none");const o=e.renderLineHighlight;!0===o?e.renderLineHighlight="line":!1===o&&(e.renderLineHighlight="none");const s=e.acceptSuggestionOnEnter;!0===s?e.acceptSuggestionOnEnter="on":!1===s&&(e.acceptSuggestionOnEnter="off");const r=e.tabCompletion;!1===r?e.tabCompletion="off":!0===r&&(e.tabCompletion="onlySnippets");const a=e.suggest;if(a&&"object"==typeof a.filteredTypes&&a.filteredTypes){const e={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};(0,g.E)(e,(e=>{const t=a.filteredTypes[e.key];!1===t&&(a[e.value]=t)}))}const l=e.hover;!0===l?e.hover={enabled:!0}:!1===l&&(e.hover={enabled:!1});const d=e.parameterHints;!0===d?e.parameterHints={enabled:!0}:!1===d&&(e.parameterHints={enabled:!1});const h=e.autoIndent;!0===h?e.autoIndent="full":!1===h&&(e.autoIndent="advanced");const c=e.matchBrackets;!0===c?e.matchBrackets="always":!1===c&&(e.matchBrackets="never");const{renderIndentGuides:u,highlightActiveIndentGuide:p}=e;e.guides||(e.guides={}),void 0!==u&&(e.guides.indentation=!!u),void 0!==p&&(e.guides.highlightActiveIndentation=!!p)}(t),t}class C extends s.JT{constructor(e,t){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new o.Q5),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=e,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new l.LJ,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=b(t),this._readOptions=v.readOptions(this._rawOptions),this._validatedOptions=v.validateOptions(this._readOptions),this._register(d.C.onDidChangeZoomLevel((e=>this._recomputeOptions()))),this._register(p.onDidChangeTabFocus((e=>this._recomputeOptions())))}observeReferenceElement(e){}updatePixelRatio(){}_recomputeOptions(){const e=this.options,t=this._computeInternalOptions();if(e){const i=v.checkEquals(e,t);if(null===i)return;this.options=t,this._onDidChangeFast.fire(i),this._onDidChange.fire(i)}else this.options=t}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const e=this._getEnvConfiguration(),t=h.E4.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,e.pixelRatio,this.isSimpleWidget),i={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(t),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:p.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return v.computeOptions(this._validatedOptions,i)}static _subsetEquals(e,t){for(const i in t)if(m.call(t,i)){const n=t[i],o=e[i];if(o===n)continue;if(Array.isArray(o)&&Array.isArray(n)){if(!a.fS(o,n))return!1;continue}if(o&&"object"==typeof o&&n&&"object"==typeof n){if(!this._subsetEquals(o,n))return!1;continue}return!1}return!0}updateOptions(e){if(void 0===e)return;const t=b(e);C._subsetEquals(this._rawOptions,t)||(this._rawOptions=r.jB(this._rawOptions,t||{}),this._readOptions=v.readOptions(this._rawOptions),this._validatedOptions=v.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(e){this._isDominatedByLongLines=e,this._recomputeOptions()}setMaxLineNumber(e){const t=C._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}static _digitCount(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}}const w=Object.freeze({id:"editor",order:5,type:"object",title:n.N("editorConfigurationTitle","Editor"),scope:5}),y=u.B.as(c.IP.Configuration),S=Object.assign(Object.assign({},w),{properties:{"editor.tabSize":{type:"number",default:l.DB.tabSize,minimum:1,markdownDescription:n.N("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:l.DB.insertSpaces,markdownDescription:n.N("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:l.DB.detectIndentation,markdownDescription:n.N("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:l.DB.trimAutoWhitespace,description:n.N("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:l.DB.largeFileOptimizations,description:n.N("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:n.N("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[n.N("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),n.N("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),n.N("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:n.N("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[n.N("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),n.N("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),n.N("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:n.N("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:n.N("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:n.N("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:"array",default:!1,description:n.N("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:n.N("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:n.N("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:n.N("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:n.N("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:n.N("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:n.N("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:n.N("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:n.N("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:n.N("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:n.N("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:n.N("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[n.N("wordWrap.off","Lines will never wrap."),n.N("wordWrap.on","Lines will wrap at the viewport width."),n.N("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});for(const e of l.Bc){const t=e.schema;if(void 0!==t)if(void 0!==(L=t).type||void 0!==L.anyOf)S.properties[`editor.${e.name}`]=t;else for(let e in t)m.call(t,e)&&(S.properties[e]=t[e])}var L;let x=null;function k(){return null===x&&(x=Object.create(null),Object.keys(S.properties).forEach((e=>{x[e]=!0}))),x}function N(e){return k()[`editor.${e}`]||!1}function D(e){return k()[`diffEditor.${e}`]||!1}y.registerConfiguration(S)},38562:(e,t,i)=>{i.d(t,{$J:()=>k,BH:()=>R,Bb:()=>a,Bc:()=>T,DB:()=>I,LJ:()=>d,NY:()=>b,O7:()=>g,Zc:()=>m,d2:()=>y,gk:()=>x,hL:()=>E,hu:()=>l,n0:()=>S,y0:()=>r});var n=i(85337),o=i(84483),s=i(42584);const r=8;class a{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class l{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class d{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class h{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class c{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class u{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function g(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class p extends u{constructor(e,t,i,n=void 0){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return g(e,this.defaultValue)}}function m(e,t,i,n){if(void 0===e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),0|o)}class f extends u{constructor(e,t,i,n,o,s=void 0){void 0!==s&&(s.type="integer",s.default=i,s.minimum=n,s.maximum=o),super(e,t,i,s),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){return m(e,t,i,n)}validate(e){return f.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class _ extends u{constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(_.float(e,this.defaultValue))}}class v extends u{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n=void 0){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return v.string(e,this.defaultValue)}}function b(e,t,i){return"string"!=typeof e||-1===i.indexOf(e)?t:e}class C extends u{constructor(e,t,i,n,o=void 0){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return b(e,this.defaultValue,this._allowedValues)}}class w extends h{constructor(e,t,i,n,o,s,r=void 0){void 0!==r&&(r.type="string",r.enum=o,r.default=n),super(e,t,i,r),this._allowedValues=o,this._convert=s}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var y;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(y||(y={}));class S extends h{constructor(){super(44,"fontLigatures",S.OFF,{anyOf:[{type:"boolean",description:n.N("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:n.N("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:n.N("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?S.OFF:"true"===e?S.ON:e:Boolean(e)?S.ON:S.OFF}}S.OFF='"liga" off, "calt" off',S.ON='"liga" on, "calt" on';class L extends h{constructor(){super(46,"fontWeight",E.fontWeight,{anyOf:[{type:"number",minimum:L.MINIMUM_VALUE,maximum:L.MAXIMUM_VALUE,errorMessage:n.N("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:L.SUGGESTION_VALUES}],default:E.fontWeight,description:n.N("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(f.clampedInt(e,E.fontWeight,L.MINIMUM_VALUE,L.MAXIMUM_VALUE))}}L.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],L.MINIMUM_VALUE=1,L.MAXIMUM_VALUE=1e3;class x extends c{constructor(){super(129,[49,57,37,64,91,59,60,93,116,119,120,121,2])}compute(e,t,i){return x.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:Math.floor(e.viewLineCount/n)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const s=t.stableMinimapLayoutInput,a=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,c=e.minimap.renderCharacters;let u=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,f=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,C=c?2:3;let w=Math.floor(o*n);const y=w/o;let S=!1,L=!1,k=C*u,N=u/o,D=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:i,extraLinesBeyondLastLine:s,desiredRatio:r,minimapLineCount:d}=x.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:h,height:n,lineHeight:l,pixelRatio:o});if(_/d>1)S=!0,L=!0,u=1,k=1,N=u/o;else{let n=!1,d=u+1;if("fit"===p){const e=Math.ceil((_+s)*k);b&&a&&v<=t.stableFitRemainingWidth?(n=!0,d=t.stableFitMaxMinimapScale):n=e>w}if("fill"===p||n){S=!0;const n=u;k=Math.min(l*o,Math.max(1,Math.floor(1/r))),b&&a&&v<=t.stableFitRemainingWidth&&(d=t.stableFitMaxMinimapScale),u=Math.min(d,Math.max(1,Math.floor(k/C))),u>n&&(D=Math.min(2,u/n)),N=u/o/D,w=Math.ceil(Math.max(i,_+s)*k),b?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const E=Math.floor(g*N),I=Math.min(E,Math.max(0,Math.floor((v-f-2)*N/(d+N)))+r);let T=Math.floor(o*I);const M=T/o;return T=Math.floor(T*D),{renderMinimap:c?1:2,minimapLeft:"left"===m?0:i-I-f,minimapWidth:I,minimapHeightIsEditorHeight:S,minimapIsSampling:L,minimapScale:u,minimapLineHeight:k,minimapCanvasInnerWidth:T,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:y}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,s=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,h=t.viewLineCount,c=e.get(121),u="inherit"===c?e.get(120):c,g="inherit"===u?e.get(116):u,p=e.get(119),m=e.get(2),_=t.isDominatedByLongLines,v=e.get(49),b=0!==e.get(59).renderType,C=e.get(60),w=e.get(93),y=e.get(64),S=e.get(91),L=S.verticalScrollbarSize,k=S.verticalHasArrows,N=S.arrowSize,D=S.horizontalScrollbarSize,E=e.get(57),I=e.get(37);let T;if("string"==typeof E&&/^\d+(\.\d+)?ch$/.test(E)){const e=parseFloat(E.substr(0,E.length-2));T=f.clampedInt(e*r,0,0,1e3)}else T=f.clampedInt(E,0,0,1e3);I&&(T+=16);let M=0;if(b){const e=Math.max(s,C);M=Math.round(e*a)}let R=0;v&&(R=o);let A=0,O=A+R,P=O+M,F=P+T;const B=i-R-M-T;let W=!1,V=!1,H=-1;2!==m&&("inherit"===u&&_?(W=!0,V=!0):"on"===g||"bounded"===g?V=!0:"wordWrapColumn"===g&&(H=p));const z=x._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:w,minimap:y,verticalScrollbarWidth:L,viewLineCount:h,remainingWidth:B,isViewportWrapping:V},t.memory||new d);0!==z.renderMinimap&&0===z.minimapLeft&&(A+=z.minimapWidth,O+=z.minimapWidth,P+=z.minimapWidth,F+=z.minimapWidth);const K=B-z.minimapWidth,U=Math.max(1,Math.floor((K-L-2)/r)),j=k?N:0;return V&&(H=Math.max(1,U),"bounded"===g&&(H=Math.min(H,p))),{width:i,height:n,glyphMarginLeft:A,glyphMarginWidth:R,lineNumbersLeft:O,lineNumbersWidth:M,decorationsLeft:P,decorationsWidth:T,contentLeft:F,contentWidth:K,minimap:z,viewportColumn:U,isWordWrapMinified:W,isViewportWrapping:V,wrappingColumn:H,verticalScrollbarWidth:L,horizontalScrollbarHeight:D,overviewRuler:{top:j,width:L,height:n-2*j,right:0}}}}function k(e){const t=e.get(86);return"editable"===t?e.get(80):"on"!==t}function N(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}function D(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const E={fontFamily:o.dz?"Menlo, Monaco, 'Courier New', monospace":o.IJ?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:o.dz?12:14,lineHeight:0,letterSpacing:0},I={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}},T=[];function M(e){return T[e.id]=e,e}const R={acceptSuggestionOnCommitCharacter:M(new p(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:n.N("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:M(new C(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",n.N("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:n.N("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:M(new class extends h{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[n.N("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),n.N("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),n.N("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:n.N("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:M(new f(3,"accessibilityPageSize",10,1,1073741824,{description:n.N("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:M(new v(4,"ariaLabel",n.N("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:M(new C(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n.N("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),n.N("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:n.N("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:M(new C(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",n.N("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:n.N("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:M(new C(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",n.N("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:n.N("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:M(new C(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n.N("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),n.N("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:n.N("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:M(new w(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[n.N("editor.autoIndent.none","The editor will not insert indentation automatically."),n.N("editor.autoIndent.keep","The editor will keep the current line's indentation."),n.N("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),n.N("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),n.N("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:n.N("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:M(new p(10,"automaticLayout",!1)),autoSurround:M(new C(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[n.N("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),n.N("editor.autoSurround.quotes","Surround with quotes but not brackets."),n.N("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:n.N("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:M(new class extends h{constructor(){const e={enabled:I.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,description:n.N("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(e){return e&&"object"==typeof e?{enabled:g(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),bracketPairGuides:M(new class extends h{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[n.N("editor.guides.bracketPairs.true","Enables bracket pair guides."),n.N("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),n.N("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:n.N("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[n.N("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),n.N("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),n.N("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:n.N("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:n.N("editor.guides.highlightActiveBracketPair","Controls whether bracket pair guides are enabled or not.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:n.N("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:e.highlightActiveIndentation,description:n.N("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{bracketPairs:D(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:D(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:g(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:g(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:g(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}),stickyTabStops:M(new p(103,"stickyTabStops",!1,{description:n.N("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:M(new p(14,"codeLens",!0,{description:n.N("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:M(new v(15,"codeLensFontFamily","",{description:n.N("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:M(new f(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:n.N("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:M(new p(17,"colorDecorators",!0,{description:n.N("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:M(new p(18,"columnSelection",!1,{description:n.N("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:M(new class extends h{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:n.N("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:n.N("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:g(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:g(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:M(new p(20,"contextmenu",!0)),copyWithSyntaxHighlighting:M(new p(21,"copyWithSyntaxHighlighting",!0,{description:n.N("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:M(new w(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:n.N("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:M(new p(23,"cursorSmoothCaretAnimation",!1,{description:n.N("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:M(new w(24,"cursorStyle",y.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return y.Line;case"block":return y.Block;case"underline":return y.Underline;case"line-thin":return y.LineThin;case"block-outline":return y.BlockOutline;case"underline-thin":return y.UnderlineThin}}),{description:n.N("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:M(new f(25,"cursorSurroundingLines",0,0,1073741824,{description:n.N("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:M(new C(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[n.N("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),n.N("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:n.N("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:M(new f(27,"cursorWidth",0,0,1073741824,{markdownDescription:n.N("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:M(new p(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:M(new p(29,"disableMonospaceOptimizations",!1)),domReadOnly:M(new p(30,"domReadOnly",!1)),dragAndDrop:M(new p(31,"dragAndDrop",!0,{description:n.N("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:M(new class extends p{constructor(){super(32,"emptySelectionClipboard",!0,{description:n.N("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),extraEditorClassName:M(new v(33,"extraEditorClassName","")),fastScrollSensitivity:M(new _(34,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:n.N("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:M(new class extends h{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:n.N("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[n.N("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),n.N("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),n.N("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:n.N("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[n.N("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),n.N("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),n.N("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:n.N("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:n.N("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:o.dz},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:n.N("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:n.N("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:g(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":b(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":b(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:g(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:g(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:g(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:M(new p(36,"fixedOverflowWidgets",!1)),folding:M(new p(37,"folding",!0,{description:n.N("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:M(new C(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[n.N("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),n.N("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:n.N("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:M(new p(39,"foldingHighlight",!0,{description:n.N("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:M(new p(40,"foldingImportsByDefault",!1,{description:n.N("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),unfoldOnClickAfterEndOfLine:M(new p(41,"unfoldOnClickAfterEndOfLine",!1,{description:n.N("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:M(new v(42,"fontFamily",E.fontFamily,{description:n.N("fontFamily","Controls the font family.")})),fontInfo:M(new class extends c{constructor(){super(43)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:M(new S),fontSize:M(new class extends u{constructor(){super(45,"fontSize",E.fontSize,{type:"number",minimum:6,maximum:100,default:E.fontSize,description:n.N("fontSize","Controls the font size in pixels.")})}validate(e){let t=_.float(e,this.defaultValue);return 0===t?E.fontSize:_.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:M(new L),formatOnPaste:M(new p(47,"formatOnPaste",!1,{description:n.N("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:M(new p(48,"formatOnType",!1,{description:n.N("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:M(new p(49,"glyphMargin",!0,{description:n.N("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:M(new class extends h{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[n.N("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),n.N("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),n.N("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(50,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:n.N("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:n.N("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:n.N("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:n.N("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:n.N("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:n.N("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:n.N("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:n.N("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:n.N("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:n.N("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:n.N("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,s;if(!e||"object"!=typeof e)return this.defaultValue;const r=e;return{multiple:b(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:b(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:b(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:b(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=r.multipleImplementations)&&void 0!==o?o:b(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(s=r.multipleReferences)&&void 0!==s?s:b(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:v.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:v.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:v.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:v.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:v.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:M(new p(51,"hideCursorInOverviewRuler",!1,{description:n.N("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:M(new class extends h{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(52,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:n.N("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:n.N("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:n.N("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:n.N("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),delay:f.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:g(t.sticky,this.defaultValue.sticky),above:g(t.above,this.defaultValue.above)}}}),inDiffEditor:M(new p(53,"inDiffEditor",!1)),letterSpacing:M(new _(55,"letterSpacing",E.letterSpacing,(e=>_.clamp(e,-5,20)),{description:n.N("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:M(new class extends h{constructor(){const e={enabled:!0};super(56,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:n.N("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:g(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),lineDecorationsWidth:M(new u(57,"lineDecorationsWidth",10)),lineHeight:M(new class extends _{constructor(){super(58,"lineHeight",E.lineHeight,(e=>_.clamp(e,0,150)),{markdownDescription:n.N("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:M(new class extends h{constructor(){super(59,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[n.N("lineNumbers.off","Line numbers are not rendered."),n.N("lineNumbers.on","Line numbers are rendered as absolute number."),n.N("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),n.N("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:n.N("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:M(new f(60,"lineNumbersMinChars",5,1,300)),linkedEditing:M(new p(61,"linkedEditing",!1,{description:n.N("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:M(new p(62,"links",!0,{description:n.N("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:M(new C(63,"matchBrackets","always",["always","near","never"],{description:n.N("matchBrackets","Highlight matching brackets.")})),minimap:M(new class extends h{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(64,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:n.N("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[n.N("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),n.N("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),n.N("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:n.N("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:n.N("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:n.N("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:n.N("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:n.N("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:n.N("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),size:b(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:b(t.side,this.defaultValue.side,["right","left"]),showSlider:b(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:g(t.renderCharacters,this.defaultValue.renderCharacters),scale:f.clampedInt(t.scale,1,1,3),maxColumn:f.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:M(new C(65,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:M(new _(66,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:n.N("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:M(new p(67,"mouseWheelZoom",!1,{markdownDescription:n.N("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:M(new p(68,"multiCursorMergeOverlapping",!0,{description:n.N("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:M(new w(69,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?o.dz?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[n.N("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),n.N("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:n.N({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:M(new C(70,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[n.N("multiCursorPaste.spread","Each cursor pastes a single line of the text."),n.N("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:n.N("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:M(new p(71,"occurrencesHighlight",!0,{description:n.N("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:M(new p(72,"overviewRulerBorder",!0,{description:n.N("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:M(new f(73,"overviewRulerLanes",3,0,3)),padding:M(new class extends h{constructor(){super(74,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:n.N("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:n.N("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:f.clampedInt(t.top,0,0,1e3),bottom:f.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:M(new class extends h{constructor(){const e={enabled:!0,cycle:!1};super(75,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:n.N("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:n.N("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),cycle:g(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:M(new C(76,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[n.N("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),n.N("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:n.N("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:M(new p(77,"definitionLinkOpensInPeek",!1,{description:n.N("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:M(new class extends h{constructor(){const e={other:!0,comments:!1,strings:!1};super(78,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:n.N("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:n.N("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:n.N("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:n.N("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){const t=e,i={other:g(t.other,this.defaultValue.other),comments:g(t.comments,this.defaultValue.comments),strings:g(t.strings,this.defaultValue.strings)};return!!(i.other&&i.comments&&i.strings)||!!(i.other||i.comments||i.strings)&&i}return this.defaultValue}}),quickSuggestionsDelay:M(new f(79,"quickSuggestionsDelay",10,0,1073741824,{description:n.N("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:M(new p(80,"readOnly",!1)),renameOnType:M(new p(81,"renameOnType",!1,{description:n.N("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:n.N("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:M(new p(82,"renderControlCharacters",!0,{description:n.N("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:M(new p(83,"renderFinalNewline",!0,{description:n.N("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:M(new C(84,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",n.N("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:n.N("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:M(new p(85,"renderLineHighlightOnlyWhenFocus",!1,{description:n.N("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:M(new C(86,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:M(new C(87,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",n.N("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),n.N("renderWhitespace.selection","Render whitespace characters only on selected text."),n.N("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:n.N("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:M(new f(88,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:M(new p(89,"roundedSelection",!0,{description:n.N("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:M(new class extends h{constructor(){const e=[],t={type:"number",description:n.N("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(90,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:n.N("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:n.N("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let i of e)if("number"==typeof i)t.push({column:f.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:f.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:M(new class extends h{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(91,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[n.N("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),n.N("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),n.N("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:n.N("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[n.N("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),n.N("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),n.N("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:n.N("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:n.N("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:n.N("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:n.N("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=f.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=f.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:f.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:N(t.vertical,this.defaultValue.vertical),horizontal:N(t.horizontal,this.defaultValue.horizontal),useShadows:g(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:g(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:g(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:g(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:g(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:f.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:f.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:g(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:M(new f(92,"scrollBeyondLastColumn",5,0,1073741824,{description:n.N("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:M(new p(93,"scrollBeyondLastLine",!0,{description:n.N("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:M(new p(94,"scrollPredominantAxis",!0,{description:n.N("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:M(new p(95,"selectionClipboard",!0,{description:n.N("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:o.IJ})),selectionHighlight:M(new p(96,"selectionHighlight",!0,{description:n.N("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:M(new p(97,"selectOnLineNumbers",!0)),showFoldingControls:M(new C(98,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[n.N("showFoldingControls.always","Always show the folding controls."),n.N("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:n.N("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:M(new p(99,"showUnused",!0,{description:n.N("showUnused","Controls fading out of unused code.")})),showDeprecated:M(new p(124,"showDeprecated",!0,{description:n.N("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:M(new class extends h{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:n.N("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:n.N("inlayHints.fontSize","Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:n.N("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),fontSize:f.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:v.string(t.fontFamily,this.defaultValue.fontFamily)}}}),snippetSuggestions:M(new C(100,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[n.N("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),n.N("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),n.N("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),n.N("snippetSuggestions.none","Do not show snippet suggestions.")],description:n.N("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:M(new class extends h{constructor(){super(101,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:n.N("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:g(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:M(new p(102,"smoothScrolling",!1,{description:n.N("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:M(new f(104,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:M(new class extends h{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(105,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[n.N("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),n.N("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:n.N("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:n.N("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:n.N("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:n.N("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:n.N("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:n.N("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:n.N("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:n.N("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:n.N("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:n.N("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:n.N("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:b(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:g(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:g(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:g(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:g(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:g(t.showIcons,this.defaultValue.showIcons),showStatusBar:g(t.showStatusBar,this.defaultValue.showStatusBar),preview:g(t.preview,this.defaultValue.preview),previewMode:b(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:g(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:g(t.showMethods,this.defaultValue.showMethods),showFunctions:g(t.showFunctions,this.defaultValue.showFunctions),showConstructors:g(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:g(t.showDeprecated,this.defaultValue.showDeprecated),showFields:g(t.showFields,this.defaultValue.showFields),showVariables:g(t.showVariables,this.defaultValue.showVariables),showClasses:g(t.showClasses,this.defaultValue.showClasses),showStructs:g(t.showStructs,this.defaultValue.showStructs),showInterfaces:g(t.showInterfaces,this.defaultValue.showInterfaces),showModules:g(t.showModules,this.defaultValue.showModules),showProperties:g(t.showProperties,this.defaultValue.showProperties),showEvents:g(t.showEvents,this.defaultValue.showEvents),showOperators:g(t.showOperators,this.defaultValue.showOperators),showUnits:g(t.showUnits,this.defaultValue.showUnits),showValues:g(t.showValues,this.defaultValue.showValues),showConstants:g(t.showConstants,this.defaultValue.showConstants),showEnums:g(t.showEnums,this.defaultValue.showEnums),showEnumMembers:g(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:g(t.showKeywords,this.defaultValue.showKeywords),showWords:g(t.showWords,this.defaultValue.showWords),showColors:g(t.showColors,this.defaultValue.showColors),showFiles:g(t.showFiles,this.defaultValue.showFiles),showReferences:g(t.showReferences,this.defaultValue.showReferences),showFolders:g(t.showFolders,this.defaultValue.showFolders),showTypeParameters:g(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:g(t.showSnippets,this.defaultValue.showSnippets),showUsers:g(t.showUsers,this.defaultValue.showUsers),showIssues:g(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:M(new class extends h{constructor(){const e={enabled:!0,mode:"subwordSmart"};super(54,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:n.N("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),mode:b(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}),suggestFontSize:M(new f(106,"suggestFontSize",0,0,1e3,{markdownDescription:n.N("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:M(new f(107,"suggestLineHeight",0,0,1e3,{markdownDescription:n.N("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:M(new p(108,"suggestOnTriggerCharacters",!0,{description:n.N("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:M(new C(109,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[n.N("suggestSelection.first","Always select the first suggestion."),n.N("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),n.N("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:n.N("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:M(new C(110,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[n.N("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),n.N("tabCompletion.off","Disable tab completions."),n.N("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:n.N("tabCompletion","Enables tab completions.")})),tabIndex:M(new f(111,"tabIndex",0,-1,1073741824)),unusualLineTerminators:M(new C(112,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[n.N("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),n.N("unusualLineTerminators.off","Unusual line terminators are ignored."),n.N("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:n.N("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:M(new p(113,"useShadowDOM",!0)),useTabStops:M(new p(114,"useTabStops",!0,{description:n.N("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:M(new v(115,"wordSeparators",s.vu,{description:n.N("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:M(new C(116,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[n.N("wordWrap.off","Lines will never wrap."),n.N("wordWrap.on","Lines will wrap at the viewport width."),n.N({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),n.N({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:n.N({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:M(new v(117,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:M(new v(118,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥+")),wordWrapColumn:M(new f(119,"wordWrapColumn",80,1,1073741824,{markdownDescription:n.N({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:M(new C(120,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:M(new C(121,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:M(new w(122,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],(function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}),{enumDescriptions:[n.N("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),n.N("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),n.N("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),n.N("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:n.N("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:M(new C(123,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[n.N("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),n.N("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:n.N("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:M(new class extends c{constructor(){super(126,[65,33])}compute(e,t,i){const n=["monaco-editor"];return t.get(33)&&n.push(t.get(33)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(65)?n.push("mouse-default"):"copy"===t.get(65)&&n.push("mouse-copy"),t.get(99)&&n.push("showUnused"),t.get(124)&&n.push("showDeprecated"),n.join(" ")}}),pixelRatio:M(new class extends c{constructor(){super(127)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:M(new class extends c{constructor(){super(128,[80])}compute(e,t,i){return!!t.get(80)||e.tabFocusMode}}),layoutInfo:M(new x),wrappingInfo:M(new class extends c{constructor(){super(130,[129])}compute(e,t,i){const n=t.get(129);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}})}},69731:(e,t,i)=>{i.d(t,{C:()=>o});var n=i(77538);const o=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},18146:(e,t,i)=>{i.d(t,{E4:()=>r,pR:()=>a});var n=i(84483),o=i(69731);const s=n.dz?1.5:1.35;class r{constructor(e){this._bareFontInfoBrand=void 0,this.zoomLevel=e.zoomLevel,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i,n){const o=e.get(42),s=e.get(46),a=e.get(45),l=e.get(44),d=e.get(58),h=e.get(55);return r._create(o,s,a,l,d,h,t,i,n)}static _create(e,t,i,n,a,l,d,h,c){0===a?a=s*i:a<8&&(a*=i),(a=Math.round(a))<8&&(a=8);const u=1+(c?0:.1*o.C.getZoomLevel());return new r({zoomLevel:d,pixelRatio:h,fontFamily:e,fontWeight:t,fontSize:i*=u,fontFeatureSettings:n,lineHeight:a*=u,letterSpacing:l})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(e){const t=r._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}class a extends r{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=1,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},11463:(e,t,i)=>{i.d(t,{l:()=>o});var n=i(80919);class o{static whitespaceVisibleColumn(e,t,i){const o=e.length;let s=0,r=-1,a=-1;for(let l=0;l<o;l++){if(l===t)return[r,a,s];switch(s%i==0&&(r=l,a=s),e.charCodeAt(l)){case 32:s+=1;break;case 9:s=n.io.nextRenderTabStop(s,i);break;default:return[-1,-1,-1]}}return t===o?[r,a,s]:[-1,-1,-1]}static atomicPosition(e,t,i,s){const r=e.length,[a,l,d]=o.whitespaceVisibleColumn(e,t,i);if(-1===d)return-1;let h;switch(s){case 0:h=!0;break;case 1:h=!1;break;case 2:if(d%i==0)return t;h=d%i<=i/2}if(h){if(-1===a)return-1;let t=l;for(let o=a;o<r;++o){if(t===l+i)return a;switch(e.charCodeAt(o)){case 32:t+=1;break;case 9:t=n.io.nextRenderTabStop(t,i);break;default:return-1}}return t===l+i?a:-1}const c=n.io.nextRenderTabStop(d,i);let u=d;for(let o=t;o<r;o++){if(u===c)return o;switch(e.charCodeAt(o)){case 32:u+=1;break;case 9:u=n.io.nextRenderTabStop(u,i);break;default:return-1}}return u===c?r:-1}}},1512:(e,t,i)=>{i.d(t,{i:()=>o});var n=i(96024);class o{static visibleColumnFromColumn(e,t,i){const s=e.length,r=t-1<s?t-1:s;let a=0,l=0;for(;l<r;){const t=n.ZH(e,r,l);if(l+=t>=65536?2:1,9===t)a=o.nextRenderTabStop(a,i);else{let i=n.S6(t);for(;l<r;){const t=n.ZH(e,r,l),o=n.S6(t);if(n.fi(i,o))break;l+=t>=65536?2:1,i=o}n.K7(t)||n.C8(t)?a+=2:a+=1}}return a}static visibleColumnsByColumns(e,t){const i=e.length;let s=new Array;s.push(-1);let r=0,a=0;for(;a<i;){const l=n.ZH(e,i,a);if(a+=l>=65536?2:1,s.push(r),l>=65536&&s.push(r),9===l)r=o.nextRenderTabStop(r,t);else{let t=n.S6(l);for(;a<i;){const o=n.ZH(e,i,a),d=n.S6(o);if(n.fi(t,d))break;a+=o>=65536?2:1,s.push(r),l>=65536&&s.push(r),t=d}n.K7(l)||n.C8(l)?r+=2:r+=1}}return s.push(r),s}static visibleColumnFromColumn2(e,t,i){return this.visibleColumnFromColumn(t.getLineContent(i.lineNumber),i.column,e.tabSize)}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const s=e.length;let r=0,a=1,l=0;for(;l<s;){const d=n.ZH(e,s,l);let h;if(l+=d>=65536?2:1,9===d)h=o.nextRenderTabStop(r,i);else{let t=n.S6(d);for(;l<s;){const i=n.ZH(e,s,l),o=n.S6(i);if(n.fi(t,o))break;l+=i>=65536?2:1,t=o}h=n.K7(d)||n.C8(d)?r+2:r+1}const c=l+1;if(h>=t)return h-t<t-r?c:a;r=h,a=c}return s+1}static columnFromVisibleColumn2(e,t,i,n){let o=this.columnFromVisibleColumn(t.getLineContent(i),n,e.tabSize),s=t.getLineMinColumn(i);if(o<s)return s;let r=t.getLineMaxColumn(i);return o>r?r:o}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}static prevIndentTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}}},80919:(e,t,i)=>{i.d(t,{LM:()=>g,LN:()=>C,Tp:()=>b,Vi:()=>v,io:()=>d.i,rS:()=>p,zp:()=>m});var n=i(98147),o=i(24028),s=i(78891),r=i(87178),a=i(95098),l=i(16742),d=i(1512);const h=()=>!0,c=()=>!1,u=e=>" "===e||"\t"===e;class g{constructor(e,t,i){this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const n=i.options,o=n.get(129);this.readOnly=n.get(80),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=n.get(103),this.lineHeight=n.get(58),this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=n.get(114),this.wordSeparators=n.get(115),this.emptySelectionClipboard=n.get(32),this.copyWithSyntaxHighlighting=n.get(21),this.multiCursorMergeOverlapping=n.get(68),this.multiCursorPaste=n.get(70),this.autoClosingBrackets=n.get(5),this.autoClosingQuotes=n.get(8),this.autoClosingDelete=n.get(6),this.autoClosingOvertype=n.get(7),this.autoSurround=n.get(11),this.autoIndent=n.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:g._getShouldAutoClose(e,this.autoClosingQuotes),bracket:g._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=l.zu.getAutoClosingPairs(e);let s=g._getSurroundingPairs(e);if(s)for(const e of s)this.surroundingPairs[e.open]=e.close}static shouldRecreate(e){return e.hasChanged(129)||e.hasChanged(115)||e.hasChanged(32)||e.hasChanged(68)||e.hasChanged(70)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(114)||e.hasChanged(58)||e.hasChanged(80)}get electricChars(){if(!this._electricChars){this._electricChars={};let e=g._getElectricCharacters(this._languageId);if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}normalizeIndentation(e){return a.yO.normalizeIndentation(e,this.indentSize,this.insertSpaces)}static _getElectricCharacters(e){try{return l.zu.getElectricCharacters(e)}catch(e){return(0,n.dL)(e),null}}static _getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return u;case"languageDefined":return g._getLanguageDefinedShouldAutoClose(e);case"always":return h;case"never":return c}}static _getLanguageDefinedShouldAutoClose(e){try{const t=l.zu.getAutoCloseBeforeSet(e);return e=>-1!==t.indexOf(e)}catch(e){return(0,n.dL)(e),c}}static _getSurroundingPairs(e){try{return l.zu.getSurroundingPairs(e)}catch(e){return(0,n.dL)(e),null}}}class p{constructor(e,t,i,n){this._singleCursorStateBrand=void 0,this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=i,this.leftoverVisibleColumns=n,this.selection=p._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,i,n){return e?new p(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new o.L(t,i),n):new p(new s.e(t,i,t,i),n,new o.L(t,i),n)}static _computeSelection(e,t){let i,n,o,s;return e.isEmpty()?(i=e.startLineNumber,n=e.startColumn,o=t.lineNumber,s=t.column):t.isBeforeOrEqual(e.getStartPosition())?(i=e.endLineNumber,n=e.endColumn,o=t.lineNumber,s=t.column):(i=e.startLineNumber,n=e.startColumn,o=t.lineNumber,s=t.column),new r.Y(i,n,o,s)}}class m{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class f{constructor(e){this.modelState=e,this.viewState=null}}class _{constructor(e){this.modelState=null,this.viewState=e}}class v{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new f(e)}static fromViewState(e){return new _(e)}static fromModelSelection(e){const t=e.selectionStartLineNumber,i=e.selectionStartColumn,n=e.positionLineNumber,r=e.positionColumn,a=new p(new s.e(t,i,t,i),0,new o.L(n,r),0);return v.fromModelState(a)}static fromModelSelections(e){let t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this.fromModelSelection(e[i]);return t}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}}class b{constructor(e,t,i){this._editOperationResultBrand=void 0,this.type=e,this.commands=t,this.shouldPushStackElementBefore=i.shouldPushStackElementBefore,this.shouldPushStackElementAfter=i.shouldPushStackElementAfter}}function C(e){return"'"===e||'"'===e||"`"===e}},52303:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(96024),o=i(63703),s=i(80919),r=i(12495),a=i(78891),l=i(24028);class d{static deleteRight(e,t,i,n){let s=[],l=3!==e;for(let e=0,d=n.length;e<d;e++){const d=n[e];let h=d;if(h.isEmpty()){let e=d.getPosition(),n=r.o.right(t,i,e);h=new a.e(n.lineNumber,n.column,e.lineNumber,e.column)}h.isEmpty()?s[e]=null:(h.startLineNumber!==h.endLineNumber&&(l=!0),s[e]=new o.T4(h,""))}return[l,s]}static isAutoClosingPairDelete(e,t,i,n,o,r,a){if("never"===t&&"never"===i)return!1;if("never"===e)return!1;for(let l=0,d=r.length;l<d;l++){const d=r[l],h=d.getPosition();if(!d.isEmpty())return!1;const c=o.getLineContent(h.lineNumber);if(h.column<2||h.column>=c.length+1)return!1;const u=c.charAt(h.column-2),g=n.get(u);if(!g)return!1;if((0,s.LN)(u)){if("never"===i)return!1}else if("never"===t)return!1;const p=c.charAt(h.column-1);let m=!1;for(const e of g)e.open===u&&e.close===p&&(m=!0);if(!m)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t<i;t++){const i=a[t];if(h.lineNumber===i.startLineNumber&&h.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingPairDelete(e,t,i){let n=[];for(let e=0,t=i.length;e<t;e++){const t=i[e].getPosition(),s=new a.e(t.lineNumber,t.column-1,t.lineNumber,t.column+1);n[e]=new o.T4(s,"")}return[!0,n]}static deleteLeft(e,t,i,n,s){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,n,s))return this._runAutoClosingPairDelete(t,i,n);const r=[];let a=2!==e;for(let e=0,s=n.length;e<s;e++){let s=d.getDeleteRange(n[e],i,t);s.isEmpty()?r[e]=null:(s.startLineNumber!==s.endLineNumber&&(a=!0),r[e]=new o.T4(s,""))}return[a,r]}static getDeleteRange(e,t,i){if(!e.isEmpty())return e;const o=e.getPosition();if(i.useTabStops&&o.column>1){const e=t.getLineContent(o.lineNumber),r=n.LC(e),l=-1===r?e.length+1:r+1;if(o.column<=l){const e=s.io.visibleColumnFromColumn2(i,t,o),n=s.io.prevIndentTabStop(e,i.indentSize),r=s.io.columnFromVisibleColumn2(i,t,o.lineNumber,n);return new a.e(o.lineNumber,r,o.lineNumber,o.column)}}return a.e.fromPositions(d.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=n.oH(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new l.L(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){let n=[],r=null;i.sort(((e,t)=>l.L.compare(e.getStartPosition(),t.getEndPosition())));for(let s=0,l=i.length;s<l;s++){const l=i[s];if(l.isEmpty())if(e.emptySelectionClipboard){let e,i,d,h,c=l.getPosition();c.lineNumber<t.getLineCount()?(e=c.lineNumber,i=1,d=c.lineNumber+1,h=1):c.lineNumber>1&&(null==r?void 0:r.endLineNumber)!==c.lineNumber?(e=c.lineNumber-1,i=t.getLineMaxColumn(c.lineNumber-1),d=c.lineNumber,h=t.getLineMaxColumn(c.lineNumber)):(e=c.lineNumber,i=1,d=c.lineNumber,h=t.getLineMaxColumn(c.lineNumber));let u=new a.e(e,i,d,h);r=u,u.isEmpty()?n[s]=null:n[s]=new o.T4(u,"")}else n[s]=null;else n[s]=new o.T4(l,"")}return new s.Tp(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},11090:(e,t,i)=>{i.d(t,{N:()=>n,P:()=>h});var n,o=i(56718),s=i(80919),r=i(12495),a=i(91093),l=i(24028),d=i(78891);class h{static addCursorDown(e,t,i){let n=[],o=0;for(let a=0,l=t.length;a<l;a++){const l=t[a];n[o++]=new s.Vi(l.modelState,l.viewState),n[o++]=i?s.Vi.fromModelState(r.o.translateDown(e.cursorConfig,e.model,l.modelState)):s.Vi.fromViewState(r.o.translateDown(e.cursorConfig,e,l.viewState))}return n}static addCursorUp(e,t,i){let n=[],o=0;for(let a=0,l=t.length;a<l;a++){const l=t[a];n[o++]=new s.Vi(l.modelState,l.viewState),n[o++]=i?s.Vi.fromModelState(r.o.translateUp(e.cursorConfig,e.model,l.modelState)):s.Vi.fromViewState(r.o.translateUp(e.cursorConfig,e,l.viewState))}return n}static moveToBeginningOfLine(e,t,i){let n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o];n[o]=this._moveToLineStart(e,s,i)}return n}static _moveToLineStart(e,t,i){const n=t.viewState.position.column,o=n===t.modelState.position.column,s=t.viewState.position.lineNumber,r=e.getLineFirstNonWhitespaceColumn(s);return o||n===r?this._moveToLineStartByModel(e,t,i):this._moveToLineStartByView(e,t,i)}static _moveToLineStartByView(e,t,i){return s.Vi.fromViewState(r.o.moveToBeginningOfLine(e.cursorConfig,e,t.viewState,i))}static _moveToLineStartByModel(e,t,i){return s.Vi.fromModelState(r.o.moveToBeginningOfLine(e.cursorConfig,e.model,t.modelState,i))}static moveToEndOfLine(e,t,i,n){let o=[];for(let s=0,r=t.length;s<r;s++){const r=t[s];o[s]=this._moveToLineEnd(e,r,i,n)}return o}static _moveToLineEnd(e,t,i,n){const o=t.viewState.position,s=e.getLineMaxColumn(o.lineNumber),r=o.column===s,a=t.modelState.position,l=e.model.getLineMaxColumn(a.lineNumber),d=s-o.column==l-a.column;return r||d?this._moveToLineEndByModel(e,t,i,n):this._moveToLineEndByView(e,t,i,n)}static _moveToLineEndByView(e,t,i,n){return s.Vi.fromViewState(r.o.moveToEndOfLine(e.cursorConfig,e,t.viewState,i,n))}static _moveToLineEndByModel(e,t,i,n){return s.Vi.fromModelState(r.o.moveToEndOfLine(e.cursorConfig,e.model,t.modelState,i,n))}static expandLineSelection(e,t){let i=[];for(let n=0,o=t.length;n<o;n++){const o=t[n],r=o.modelState.selection.startLineNumber,a=e.model.getLineCount();let h,c=o.modelState.selection.endLineNumber;c===a?h=e.model.getLineMaxColumn(a):(c++,h=1),i[n]=s.Vi.fromModelState(new s.rS(new d.e(r,1,r,1),0,new l.L(c,h),0))}return i}static moveToBeginningOfBuffer(e,t,i){let n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o];n[o]=s.Vi.fromModelState(r.o.moveToBeginningOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return n}static moveToEndOfBuffer(e,t,i){let n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o];n[o]=s.Vi.fromModelState(r.o.moveToEndOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return n}static selectAll(e,t){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return s.Vi.fromModelState(new s.rS(new d.e(1,1,1,1),0,new l.L(i,n),0))}static line(e,t,i,n,o){const r=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);if(!i||!t.modelState.hasSelection()){const t=e.model.getLineCount();let i=r.lineNumber+1,n=1;return i>t&&(i=t,n=e.model.getLineMaxColumn(i)),s.Vi.fromModelState(new s.rS(new d.e(r.lineNumber,1,i,n),0,new l.L(i,n),0))}const h=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<h)return s.Vi.fromViewState(t.viewState.move(t.modelState.hasSelection(),a.lineNumber,1,0));if(r.lineNumber>h){const i=e.getLineCount();let n=a.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),s.Vi.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return s.Vi.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return s.Vi.fromModelState(a.w.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new s.Vi(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return s.Vi.fromViewState(new s.rS(new d.e(i,n,i,n),0,new l.L(i,n),0))}static moveTo(e,t,i,n,o){const r=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return s.Vi.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,o,a){switch(i){case 0:return 4===a?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===a?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===a?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===a?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===a?t.map((t=>s.Vi.fromViewState(r.o.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.Vi.fromModelState(r.o.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===a?t.map((t=>s.Vi.fromViewState(r.o.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.Vi.fromModelState(r.o.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const s=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{let i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];i[o]=this.findPositionInViewportIfOutside(e,r,s,n)}return i}default:return null}}static findPositionInViewportIfOutside(e,t,i,n){let o=t.viewState.position.lineNumber;if(i.startLineNumber<=o&&o<=i.endLineNumber-1)return new s.Vi(t.modelState,t.viewState);{let a;a=o>i.endLineNumber-1?i.endLineNumber-1:o<i.startLineNumber?i.startLineNumber:o;const l=r.o.vertical(e.cursorConfig,e,o,t.viewState.position.column,t.viewState.leftoverVisibleColumns,a,!1);return s.Vi.fromViewState(t.viewState.move(n,l.lineNumber,l.column,l.leftoverVisibleColumns))}}static _firstLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.min(t.endLineNumber,n+i-1)}static _lastLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.max(n,t.endLineNumber-i+1)}static _moveLeft(e,t,i,n){return t.map((t=>s.Vi.fromViewState(r.o.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){let n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o],l=a.viewState.position.lineNumber,d=Math.round(e.getLineContent(l).length/2);n[o]=s.Vi.fromViewState(r.o.moveLeft(e.cursorConfig,e,a.viewState,i,d))}return n}static _moveRight(e,t,i,n){return t.map((t=>s.Vi.fromViewState(r.o.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){let n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o],l=a.viewState.position.lineNumber,d=Math.round(e.getLineContent(l).length/2);n[o]=s.Vi.fromViewState(r.o.moveRight(e.cursorConfig,e,a.viewState,i,d))}return n}static _moveDownByViewLines(e,t,i,n){let o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromViewState(r.o.moveDown(e.cursorConfig,e,l.viewState,i,n))}return o}static _moveDownByModelLines(e,t,i,n){let o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromModelState(r.o.moveDown(e.cursorConfig,e.model,l.modelState,i,n))}return o}static _moveUpByViewLines(e,t,i,n){let o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromViewState(r.o.moveUp(e.cursorConfig,e,l.viewState,i,n))}return o}static _moveUpByModelLines(e,t,i,n){let o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromModelState(r.o.moveUp(e.cursorConfig,e.model,l.modelState,i,n))}return o}static _moveToViewPosition(e,t,i,n,o){return s.Vi.fromViewState(t.viewState.move(i,n,o,0))}static _moveToModelPosition(e,t,i,n,o){return s.Vi.fromModelState(t.modelState.move(i,n,o,0))}static _moveToViewMinColumn(e,t,i){let n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineMinColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewFirstNonWhitespaceColumn(e,t,i){let n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineFirstNonWhitespaceColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewCenterColumn(e,t,i){let n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=Math.round((e.getLineMaxColumn(r)+e.getLineMinColumn(r))/2);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewMaxColumn(e,t,i){let n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineMaxColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewLastNonWhitespaceColumn(e,t,i){let n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineLastNonWhitespaceColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}}!function(e){e.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:function(e){if(!o.Kn(e))return!1;let t=e;return!(!o.HD(t.to)||!o.o8(t.select)&&!o.jn(t.select)||!o.o8(t.by)&&!o.HD(t.by)||!o.o8(t.value)&&!o.hj(t.value))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},e.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},e.parse=function(t){if(!t.to)return null;let i;switch(t.to){case e.RawDirection.Left:i=0;break;case e.RawDirection.Right:i=1;break;case e.RawDirection.Up:i=2;break;case e.RawDirection.Down:i=3;break;case e.RawDirection.PrevBlankLine:i=4;break;case e.RawDirection.NextBlankLine:i=5;break;case e.RawDirection.WrappedLineStart:i=6;break;case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:i=7;break;case e.RawDirection.WrappedLineColumnCenter:i=8;break;case e.RawDirection.WrappedLineEnd:i=9;break;case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:i=10;break;case e.RawDirection.ViewPortTop:i=11;break;case e.RawDirection.ViewPortBottom:i=13;break;case e.RawDirection.ViewPortCenter:i=12;break;case e.RawDirection.ViewPortIfOutside:i=14;break;default:return null}let n=0;switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Character:n=3;break;case e.RawUnit.HalfLine:n=4}return{direction:i,unit:n,select:!!t.select,value:t.value||1}}}(n||(n={}))},12495:(e,t,i)=>{i.d(t,{o:()=>d});var n=i(80919),o=i(24028),s=i(78891),r=i(96024),a=i(11463);class l{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class d{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-r.HO(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new o.L(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),s=e.getLineContent(t.lineNumber),r=a.l.atomicPosition(s,t.column-1,i,0);if(-1!==r&&r+1>=n)return new o.L(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?d.leftPositionAtomicSoftTabs(t,i,e.tabSize):d.leftPosition(t,i);return new l(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(d.clipPositionColumn(n,t),0),l=d.left(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static clipPositionColumn(e,t){return new o.L(e.lineNumber,d.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return e<t?t:e>i?i:e}static rightPosition(e,t,i){return i<e.getLineMaxColumn(t)?i+=r.vH(e.getLineContent(t),i-1):t<e.getLineCount()&&(t+=1,i=e.getLineMinColumn(t)),new o.L(t,i)}static rightPositionAtomicSoftTabs(e,t,i,n,s){if(i<e.getLineIndentColumn(t)){const s=e.getLineContent(t),r=a.l.atomicPosition(s,i-1,n,1);if(-1!==r)return new o.L(t,r+1)}return this.rightPosition(e,t,i)}static right(e,t,i){const n=e.stickyTabStops?d.rightPositionAtomicSoftTabs(t,i.lineNumber,i.column,e.tabSize,e.indentSize):d.rightPosition(t,i.lineNumber,i.column);return new l(n.lineNumber,n.column,0)}static moveRight(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.endLineNumber,r=i.selection.endColumn;else{const n=i.position.delta(void 0,o-1),a=t.normalizePosition(d.clipPositionColumn(n,t),1),l=d.right(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static vertical(e,t,i,o,s,r,a){const d=n.io.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize)+s,h=t.getLineCount(),c=1===i&&1===o,u=i===h&&o===t.getLineMaxColumn(i),g=r<i?c:u;return(i=r)<1?(i=1,o=a?t.getLineMinColumn(i):Math.min(t.getLineMaxColumn(i),o)):i>h?(i=h,o=a?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),o)):o=n.io.columnFromVisibleColumn2(e,t,i,d),s=g?0:d-n.io.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new l(i,o,s)}static down(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i+s,r)}static moveDown(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.endLineNumber,r=i.selection.endColumn):(s=i.position.lineNumber,r=i.position.column);let a=d.down(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){let r=i.selection,a=d.down(e,t,r.selectionStartLineNumber,r.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=d.down(e,t,r.positionLineNumber,r.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new s.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new o.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static up(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i-s,r)}static moveUp(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.startLineNumber,r=i.selection.startColumn):(s=i.position.lineNumber,r=i.position.column);let a=d.up(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){let r=i.selection,a=d.up(e,t,r.selectionStartLineNumber,r.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=d.up(e,t,r.positionLineNumber,r.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new s.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new o.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let o=i.position.lineNumber;for(;o>1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){const o=t.getLineCount();let s=i.position.lineNumber;for(;s<o&&this._isBlankLine(t,s);)s++;for(;s<o&&!this._isBlankLine(t,s);)s++;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToBeginningOfLine(e,t,i,n){let o,s=i.position.lineNumber,r=t.getLineMinColumn(s),a=t.getLineFirstNonWhitespaceColumn(s)||r;return o=i.position.column===a?r:a,i.move(n,s,o,0)}static moveToEndOfLine(e,t,i,n,o){let s=i.position.lineNumber,r=t.getLineMaxColumn(s);return i.move(n,s,r,o?1073741824-r:0)}static moveToBeginningOfBuffer(e,t,i,n){return i.move(n,1,1,0)}static moveToEndOfBuffer(e,t,i,n){let o=t.getLineCount(),s=t.getLineMaxColumn(o);return i.move(n,o,s,0)}}},44884:(e,t,i)=>{i.d(t,{u:()=>p,g:()=>m});var n=i(98147),o=i(96024),s=i(63703),r=i(33048),a=i(78891),l=i(87178);class d{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new a.e(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new a.e(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new l.Y(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}var h=i(80919),c=i(20904),u=i(1189),g=i(16742);class p{static indent(e,t,i){if(null===t||null===i)return[];let n=[];for(let t=0,o=i.length;t<o;t++)n[t]=new r.U(i[t],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static outdent(e,t,i){let n=[];for(let t=0,o=i.length;t<o;t++)n[t]=new r.U(i[t],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static shiftIndent(e,t,i){return i=i||1,r.U.shiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static unshiftIndent(e,t,i){return i=i||1,r.U.unshiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static _distributedPaste(e,t,i,n){let o=[];for(let e=0,t=i.length;e<t;e++)o[e]=new s.T4(i[e],n[e]);return new h.Tp(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,o){let r=[];for(let e=0,t=i.length;e<t;e++){const t=i[e];let l=t.getPosition();if(o&&!t.isEmpty()&&(o=!1),o&&n.indexOf("\n")!==n.length-1&&(o=!1),o){let i=new a.e(l.lineNumber,1,l.lineNumber,1);r[e]=new s.hP(i,n,t,!0)}else r[e]=new s.T4(t,n)}return new h.Tp(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,i,n,s){if(n)return null;if(1===t.length)return null;if(s&&s.length===t.length)return s;if("spread"===e.multiCursorPaste){10===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1)),13===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1));let e=o.uq(i);if(e.length===t.length)return e}return null}static paste(e,t,i,n,o,s){const r=this._distributePasteToCursors(e,i,n,o,s);return r?(i=i.sort(a.e.compareRangesUsingStarts),this._distributedPaste(e,t,i,r)):this._simplePaste(e,t,i,n,o)}static _goodIndentForLine(e,t,i){let n=null,s="";const r=g.zu.getInheritIndentForLine(e.autoIndent,t,i,!1);if(r)n=r.action,s=r.indentation;else if(i>1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n);if(o.ow(e)>=0)break}if(n<1)return null;const r=t.getLineMaxColumn(n),l=g.zu.getEnterAction(e.autoIndent,t,new a.e(n,r,n,r));l&&(s=l.indentation+l.appendText)}return n&&(n===u.wU.Indent&&(s=p.shiftIndent(e,s)),n===u.wU.Outdent&&(s=p.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let o="",r=i.getStartPosition();if(e.insertSpaces){let i=h.io.visibleColumnFromColumn2(e,t,r),n=e.indentSize,s=n-i%n;for(let e=0;e<s;e++)o+=" "}else o="\t";return new s.T4(i,o,n)}static tab(e,t,i){let n=[];for(let o=0,l=i.length;o<l;o++){const l=i[o];if(l.isEmpty()){let i=t.getLineContent(l.startLineNumber);if(/^\s*$/.test(i)&&t.isCheapToTokenize(l.startLineNumber)){let r=this._goodIndentForLine(e,t,l.startLineNumber);r=r||"\t";let d=e.normalizeIndentation(r);if(!i.startsWith(d)){n[o]=new s.T4(new a.e(l.startLineNumber,1,l.startLineNumber,i.length+1),d,!0);continue}}n[o]=this._replaceJumpToNextIndent(e,t,l,!0)}else{if(l.startLineNumber===l.endLineNumber){let i=t.getLineMaxColumn(l.startLineNumber);if(1!==l.startColumn||l.endColumn!==i){n[o]=this._replaceJumpToNextIndent(e,t,l,!1);continue}}n[o]=new r.U(l,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent})}}return n}static compositionType(e,t,i,n,o,s,r,a){const l=n.map((e=>this._compositionType(i,e,o,s,r,a)));return new h.Tp(4,l,{shouldPushStackElementBefore:_(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,r){if(!t.isEmpty())return null;const l=t.getPosition(),d=Math.max(1,l.column-n),h=Math.min(e.getLineMaxColumn(l.lineNumber),l.column+o),c=new a.e(l.lineNumber,d,l.lineNumber,h);return e.getValueInRange(c)===i&&0===r?null:new s.Uo(c,i,0,r)}static _typeCommand(e,t,i){return i?new s.Sj(e,t,!0):new s.T4(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return p._typeCommand(n,"\n",i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){let s=t.getLineContent(n.startLineNumber),r=o.V8(s).substring(0,n.startColumn-1);return p._typeCommand(n,"\n"+e.normalizeIndentation(r),i)}const r=g.zu.getEnterAction(e.autoIndent,t,n);if(r){if(r.indentAction===u.wU.None)return p._typeCommand(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);if(r.indentAction===u.wU.Indent)return p._typeCommand(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);if(r.indentAction===u.wU.IndentOutdent){const t=e.normalizeIndentation(r.indentation),o=e.normalizeIndentation(r.indentation+r.appendText),a="\n"+o+"\n"+t;return i?new s.Sj(n,a,!0):new s.Uo(n,a,-1,o.length-t.length,!0)}if(r.indentAction===u.wU.Outdent){const t=p.unshiftIndent(e,r.indentation);return p._typeCommand(n,"\n"+e.normalizeIndentation(t+r.appendText),i)}}const a=t.getLineContent(n.startLineNumber),l=o.V8(a).substring(0,n.startColumn-1);if(e.autoIndent>=4){const r=g.zu.getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:t=>p.unshiftIndent(e,t),shiftIndent:t=>p.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(r){let a=h.io.visibleColumnFromColumn2(e,t,n.getEndPosition());const l=n.endColumn,d=t.getLineContent(n.endLineNumber),c=o.LC(d);if(n=c>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,c+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new s.Sj(n,"\n"+e.normalizeIndentation(r.afterEnter),!0);{let t=0;return l<=c+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(r.afterEnter).length-1,0)),new s.Uo(n,"\n"+e.normalizeIndentation(r.afterEnter),0,t,!0)}}}return p._typeCommand(n,"\n"+e.normalizeIndentation(l),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;e<n;e++)if(!t.isCheapToTokenize(i[e].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,i,n){const o=g.zu.getIndentationAtPosition(t,i.startLineNumber,i.startColumn),s=g.zu.getIndentActionForType(e.autoIndent,t,i,n,{shiftIndent:t=>p.shiftIndent(e,t),unshiftIndent:t=>p.unshiftIndent(e,t)});if(null===s)return null;if(s!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?p._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+n,!1):p._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let s=0,r=i.length;s<r;s++){const r=i[s];if(!r.isEmpty())return!1;const a=r.getPosition(),l=t.getLineContent(a.lineNumber);if(l.charAt(a.column-1)!==o)return!1;const d=(0,h.LN)(o);if(92===(a.column>2?l.charCodeAt(a.column-2):0)&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t<i;t++){const i=n[t];if(a.lineNumber===i.startLineNumber&&a.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingOvertype(e,t,i,n,o){let r=[];for(let e=0,t=n.length;e<t;e++){const t=n[e].getPosition(),i=new a.e(t.lineNumber,t.column,t.lineNumber,t.column+1);r[e]=new s.T4(i,o)}return new h.Tp(4,r,{shouldPushStackElementBefore:_(e,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],o=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],s=n.some((e=>t.startsWith(e.open))),r=o.some((e=>t.startsWith(e.close)));return!s&&r}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let s=null;for(const e of o)if(null===s||e.open.length>s.open.length){let o=!0;for(const s of i)if(t.getValueInRange(new a.e(s.lineNumber,s.column-e.open.length+1,s.lineNumber,s.column))+n!==e.open){o=!1;break}o&&(s=e)}return s}static _findSubAutoClosingPairClose(e,t){if(t.open.length<=1)return"";const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o?o.close:""}static _getAutoClosingPairClose(e,t,i,o,s){const r=(0,h.LN)(o),a=r?e.autoClosingQuotes:e.autoClosingBrackets;if("never"===a)return null;const l=this._findAutoClosingPairOpen(e,t,i.map((e=>e.getPosition())),o);if(!l)return null;const d=this._findSubAutoClosingPairClose(e,l);let u=!0;const m=r?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;for(let r=0,h=i.length;r<h;r++){const h=i[r];if(!h.isEmpty())return null;const f=h.getPosition(),_=t.getLineContent(f.lineNumber),v=_.substring(f.column-1);if(v.startsWith(d)||(u=!1),_.length>f.column-1){const t=_.charAt(f.column-1);if(!p._isBeforeClosingBrace(e,v)&&!m(t))return null}if(!t.isCheapToTokenize(f.lineNumber))return null;if(1===l.open.length&&("'"===o||'"'===o)&&"always"!==a){const t=(0,c.u)(e.wordSeparators);if(s&&f.column>1&&0===t.get(_.charCodeAt(f.column-2)))return null;if(!s&&f.column>2&&0===t.get(_.charCodeAt(f.column-3)))return null}t.forceTokenization(f.lineNumber);const b=t.getLineTokens(f.lineNumber);let C=!1;try{C=g.zu.shouldAutoClosePair(l,b,s?f.column:f.column-1)}catch(e){(0,n.dL)(e)}if(!C)return null}return u?l.close.substring(0,l.close.length-d.length):l.close}static _runAutoClosingOpenCharType(e,t,i,n,o,s,r){let a=[];for(let e=0,t=n.length;e<t;e++){const t=n[e];a[e]=new m(t,o,s,r)}return new h.Tp(4,a,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,t){return(0,h.LN)(t)?"quotes"===e.autoSurround||"languageDefined"===e.autoSurround:"brackets"===e.autoSurround||"languageDefined"===e.autoSurround}static _isSurroundSelectionType(e,t,i,n){if(!p._shouldSurroundChar(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;const o=(0,h.LN)(n);for(let e=0,n=i.length;e<n;e++){const n=i[e];if(n.isEmpty())return!1;let s=!0;for(let e=n.startLineNumber;e<=n.endLineNumber;e++){const i=t.getLineContent(e),o=e===n.startLineNumber?n.startColumn-1:0,r=e===n.endLineNumber?n.endColumn-1:i.length,a=i.substring(o,r);if(/[^ \t]/.test(a)){s=!1;break}}if(s)return!1;if(o&&n.startLineNumber===n.endLineNumber&&n.startColumn+1===n.endColumn){const e=t.getValueInRange(n);if((0,h.LN)(e))return!1}}return!0}static _runSurroundSelectionType(e,t,i,n,o){let s=[];for(let e=0,i=n.length;e<i;e++){const i=n[e],r=t.surroundingPairs[o];s[e]=new d(i,o,r)}return new h.Tp(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(e,t,i){return!(1!==i.length||!t.isCheapToTokenize(i[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,t,i,r,l){if(!t.electricChars.hasOwnProperty(l)||!r.isEmpty())return null;let d=r.getPosition();i.forceTokenization(d.lineNumber);let c,u=i.getLineTokens(d.lineNumber);try{c=g.zu.onElectricCharacter(l,u,d.column)}catch(e){return(0,n.dL)(e),null}if(!c)return null;if(c.matchOpenBracket){let n=(u.getLineContent()+l).lastIndexOf(c.matchOpenBracket)+1,r=i.findMatchingBracketUp(c.matchOpenBracket,{lineNumber:d.lineNumber,column:n});if(r){if(r.startLineNumber===d.lineNumber)return null;let n=i.getLineContent(r.startLineNumber),c=o.V8(n),u=t.normalizeIndentation(c),g=i.getLineContent(d.lineNumber),p=i.getLineFirstNonWhitespaceColumn(d.lineNumber)||d.column,m=u+g.substring(p-1,d.column-1)+l,_=new a.e(d.lineNumber,1,d.lineNumber,d.column);const v=new s.T4(_,m);return new h.Tp(f(m,e),[v],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(e,t,i,n,o,r){if(!n||l.Y.selectionsArrEqual(n,o))return null;let d=null;for(const e of o){if(!e.isEmpty())return null;const t=e.getPosition(),n=i.getValueInRange(new a.e(t.lineNumber,t.column-1,t.lineNumber,t.column));if(null===d)d=n;else if(d!==n)return null}if(!d)return null;if(this._isAutoClosingOvertype(t,i,o,r,d)){const e=o.map((e=>new s.T4(new a.e(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new h.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const c=this._getAutoClosingPairClose(t,i,o,d,!1);return null!==c?this._runAutoClosingOpenCharType(e,t,i,o,d,!1,c):null}static typeWithInterceptors(e,t,i,n,o,r,a){if(!e&&"\n"===a){let e=[];for(let t=0,s=o.length;t<s;t++)e[t]=p._enter(i,n,!1,o[t]);return new h.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(i,n,o)){let e=[],t=!1;for(let s=0,r=o.length;s<r;s++)if(e[s]=this._runAutoIndentType(i,n,o[s],a),!e[s]){t=!0;break}if(!t)return new h.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoClosingOvertype(i,n,o,r,a))return this._runAutoClosingOvertype(t,i,n,o,a);if(!e){const e=this._getAutoClosingPairClose(i,n,o,a,!0);if(e)return this._runAutoClosingOpenCharType(t,i,n,o,a,!0,e)}if(this._isSurroundSelectionType(i,n,o,a))return this._runSurroundSelectionType(t,i,n,o,a);if(!e&&this._isTypeInterceptorElectricChar(i,n,o)){const e=this._typeInterceptorElectricChar(t,i,n,o[0],a);if(e)return e}let l=[];for(let e=0,t=o.length;e<t;e++)l[e]=new s.T4(o[e],a);const d=f(a,t);return new h.Tp(d,l,{shouldPushStackElementBefore:_(t,d),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,i,n,o){let r=[];for(let e=0,t=n.length;e<t;e++)r[e]=new s.T4(n[e],o);const a=f(o,e);return new h.Tp(a,r,{shouldPushStackElementBefore:_(e,a),shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];let n=[];for(let o=0,r=i.length;o<r;o++){let r=i[o].positionLineNumber;if(1===r)n[o]=new s.Sj(new a.e(1,1,1,1),"\n");else{r--;let i=t.getLineMaxColumn(r);n[o]=this._enter(e,t,!1,new a.e(r,i,r,i))}}return n}static lineInsertAfter(e,t,i){if(null===t||null===i)return[];let n=[];for(let o=0,s=i.length;o<s;o++){const s=i[o].positionLineNumber;let r=t.getLineMaxColumn(s);n[o]=this._enter(e,t,!1,new a.e(s,r,s,r))}return n}static lineBreakInsert(e,t,i){let n=[];for(let o=0,s=i.length;o<s;o++)n[o]=this._enter(e,t,!0,i[o]);return n}}class m extends s.Uo{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length),this._openCharacter=t,this._closeCharacter=n,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return this.closeCharacterRange=new a.e(i.startLineNumber,i.endColumn-this._closeCharacter.length,i.endLineNumber,i.endColumn),this.enclosingRange=new a.e(i.startLineNumber,i.endColumn-this._openCharacter.length-this._closeCharacter.length,i.endLineNumber,i.endColumn),super.computeCursorState(e,t)}}function f(e,t){return" "===e?5===t||6===t?6:5:4}function _(e,t){return!(!b(e)||b(t))||5!==e&&v(e)!==v(t)}function v(e){return 6===e||5===e?"space":e}function b(e){return 4===e||5===e||6===e}},91093:(e,t,i)=>{i.d(t,{L:()=>h,w:()=>d});var n=i(96024),o=i(80919),s=i(52303),r=i(20904),a=i(24028),l=i(78891);class d{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){let n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let o=i.column-2;o>=0;o--){let i=e.charCodeAt(o),s=t.get(i);if(0===s){if(2===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===s){if(1===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===s&&0!==n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){let o=e.length;for(let s=n;s<o;s++){let n=e.charCodeAt(s),o=t.get(n);if(1===o)return s;if(1===i&&2===o)return s;if(2===i&&0===o)return s}return o}static _findNextWordOnLine(e,t,i){let n=t.getLineContent(i.lineNumber);return this._doFindNextWordOnLine(n,e,i)}static _doFindNextWordOnLine(e,t,i){let n=0,o=e.length;for(let s=i.column-1;s<o;s++){let i=e.charCodeAt(s),o=t.get(i);if(0===o){if(2===n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,s-1),s);n=1}else if(2===o){if(1===n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,s-1),s);n=2}else if(1===o&&0!==n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,s-1),s)}return 0!==n?this._createWord(e,n,1,this._findStartOfWord(e,t,n,o-1),o):null}static _findStartOfWord(e,t,i,n){for(let o=n;o>=0;o--){let n=e.charCodeAt(o),s=t.get(n);if(1===s)return o+1;if(1===i&&2===s)return o+1;if(2===i&&0===s)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,s=i.column;1===s&&o>1&&(o-=1,s=t.getLineMaxColumn(o));let r=d._findPreviousWordOnLine(e,t,new a.L(o,s));if(0===n)return new a.L(o,r?r.start+1:1);if(1===n)return r&&2===r.wordType&&r.end-r.start==1&&0===r.nextCharClass&&(r=d._findPreviousWordOnLine(e,t,new a.L(o,r.start+1))),new a.L(o,r?r.start+1:1);if(3===n){for(;r&&2===r.wordType;)r=d._findPreviousWordOnLine(e,t,new a.L(o,r.start+1));return new a.L(o,r?r.start+1:1)}return r&&s<=r.end+1&&(r=d._findPreviousWordOnLine(e,t,new a.L(o,r.start+1))),new a.L(o,r?r.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.L(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=s.charCodeAt(e-2),r=s.charCodeAt(e-1);if(95===t&&95!==r)return new a.L(i,e);if(n.mK(t)&&n.df(r))return new a.L(i,e);if(n.df(t)&&n.df(r)&&e+1<o){const t=s.charCodeAt(e);if(n.mK(t))return new a.L(i,e)}}return new a.L(i,1)}static moveWordRight(e,t,i,n){let o=i.lineNumber,s=i.column,r=!1;s===t.getLineMaxColumn(o)&&o<t.getLineCount()&&(r=!0,o+=1,s=1);let l=d._findNextWordOnLine(e,t,new a.L(o,s));if(2===n)l&&2===l.wordType&&l.end-l.start==1&&0===l.nextCharClass&&(l=d._findNextWordOnLine(e,t,new a.L(o,l.end+1))),s=l?l.end+1:t.getLineMaxColumn(o);else if(3===n){for(r&&(s=0);l&&(2===l.wordType||l.start+1<=s);)l=d._findNextWordOnLine(e,t,new a.L(o,l.end+1));s=l?l.start+1:t.getLineMaxColumn(o)}else l&&!r&&s>=l.start+1&&(l=d._findNextWordOnLine(e,t,new a.L(o,l.end+1))),s=l?l.start+1:t.getLineMaxColumn(o);return new a.L(o,s)}static _moveWordPartRight(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(t.column===o)return i<e.getLineCount()?new a.L(i+1,1):t;const s=e.getLineContent(i);for(let e=t.column+1;e<o;e++){const t=s.charCodeAt(e-2),r=s.charCodeAt(e-1);if(95!==t&&95===r)return new a.L(i,e);if(n.mK(t)&&n.df(r))return new a.L(i,e);if(n.df(t)&&n.df(r)&&e+1<o){const t=s.charCodeAt(e);if(n.mK(t))return new a.L(i,e)}}return new a.L(i,o)}static _deleteWordLeftWhitespace(e,t){const i=e.getLineContent(t.lineNumber),o=t.column-2,s=n.ow(i,o);return s+1<o?new l.e(t.lineNumber,s+2,t.lineNumber,t.column):null}static deleteWordLeft(e,t){const i=e.wordSeparators,n=e.model,o=e.selection,r=e.whitespaceHeuristics;if(!o.isEmpty())return o;if(s.A.isAutoClosingPairDelete(e.autoClosingDelete,e.autoClosingBrackets,e.autoClosingQuotes,e.autoClosingPairs.autoClosingPairsOpenByEnd,e.model,[e.selection],e.autoClosedCharacters)){const t=e.selection.getPosition();return new l.e(t.lineNumber,t.column-1,t.lineNumber,t.column+1)}const h=new a.L(o.positionLineNumber,o.positionColumn);let c=h.lineNumber,u=h.column;if(1===c&&1===u)return null;if(r){let e=this._deleteWordLeftWhitespace(n,h);if(e)return e}let g=d._findPreviousWordOnLine(i,n,h);return 0===t?g?u=g.start+1:u>1?u=1:(c--,u=n.getLineMaxColumn(c)):(g&&u<=g.end+1&&(g=d._findPreviousWordOnLine(i,n,new a.L(c,g.start+1))),g?u=g.end+1:u>1?u=1:(c--,u=n.getLineMaxColumn(c))),new l.e(c,u,h.lineNumber,h.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new a.L(i.positionLineNumber,i.positionColumn);return this._deleteInsideWordWhitespace(t,n)||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let s=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,s))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;s+1<n&&this._charAtIsWhitespace(i,s+1);)s++;return new l.e(t.lineNumber,o+1,t.lineNumber,s+2)}static _deleteInsideWordDetermineDeleteRange(e,t,i){const n=t.getLineContent(i.lineNumber),o=n.length;if(0===o)return i.lineNumber>1?new l.e(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumber<t.getLineCount()?new l.e(i.lineNumber,1,i.lineNumber+1,1):new l.e(i.lineNumber,1,i.lineNumber,1);const s=e=>e.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.e(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,s=!1;for(;i-1<o&&this._charAtIsWhitespace(n,i-1);)s=!0,i++;if(!s)for(;t>1&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},h=d._findPreviousWordOnLine(e,t,i);if(h&&s(h))return a(h);const c=d._findNextWordOnLine(e,t,i);return c&&s(c)?a(c):h&&c?r(h.end+1,c.start+1):h?r(h.start+1,h.end+1):c?r(c.start+1,c.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=d._moveWordPartLeft(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){let i=e.length;for(let n=t;n<i;n++){let t=e.charAt(n);if(" "!==t&&"\t"!==t)return n}return i}static _deleteWordRightWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-1,o=this._findFirstNonWhitespaceChar(i,n);return n+1<o?new l.e(t.lineNumber,t.column,t.lineNumber,o+1):null}static deleteWordRight(e,t){const i=e.wordSeparators,n=e.model,o=e.selection,s=e.whitespaceHeuristics;if(!o.isEmpty())return o;const r=new a.L(o.positionLineNumber,o.positionColumn);let h=r.lineNumber,c=r.column;const u=n.getLineCount(),g=n.getLineMaxColumn(h);if(h===u&&c===g)return null;if(s){let e=this._deleteWordRightWhitespace(n,r);if(e)return e}let p=d._findNextWordOnLine(i,n,r);return 2===t?p?c=p.end+1:c<g||h===u?c=g:(h++,p=d._findNextWordOnLine(i,n,new a.L(h,1)),c=p?p.start+1:n.getLineMaxColumn(h)):(p&&c>=p.start+1&&(p=d._findNextWordOnLine(i,n,new a.L(h,p.end+1))),p?c=p.start+1:c<g||h===u?c=g:(h++,p=d._findNextWordOnLine(i,n,new a.L(h,1)),c=p?p.start+1:n.getLineMaxColumn(h))),new l.e(h,c,r.lineNumber,r.column)}static _deleteWordPartRight(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=d._moveWordPartRight(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _createWordAtPosition(e,t,i){const n=new l.e(t,i.start+1,t,i.end+1);return{word:e.getValueInRange(n),startColumn:n.startColumn,endColumn:n.endColumn}}static getWordAtPosition(e,t,i){const n=(0,r.u)(t),o=d._findPreviousWordOnLine(n,e,i);if(o&&1===o.wordType&&o.start<=i.column-1&&i.column-1<=o.end)return d._createWordAtPosition(e,i.lineNumber,o);const s=d._findNextWordOnLine(n,e,i);return s&&1===s.wordType&&s.start<=i.column-1&&i.column-1<=s.end?d._createWordAtPosition(e,i.lineNumber,s):null}static word(e,t,i,n,s){const h=(0,r.u)(e.wordSeparators);let c,u,g=d._findPreviousWordOnLine(h,t,s),p=d._findNextWordOnLine(h,t,s);if(!n){let e,i;return g&&1===g.wordType&&g.start<=s.column-1&&s.column-1<=g.end?(e=g.start+1,i=g.end+1):p&&1===p.wordType&&p.start<=s.column-1&&s.column-1<=p.end?(e=p.start+1,i=p.end+1):(e=g?g.end+1:1,i=p?p.start+1:t.getLineMaxColumn(s.lineNumber)),new o.rS(new l.e(s.lineNumber,e,s.lineNumber,i),0,new a.L(s.lineNumber,i),0)}g&&1===g.wordType&&g.start<s.column-1&&s.column-1<g.end?(c=g.start+1,u=g.end+1):p&&1===p.wordType&&p.start<s.column-1&&s.column-1<p.end?(c=p.start+1,u=p.end+1):(c=s.column,u=s.column);let m,f=s.lineNumber;if(i.selectionStart.containsPosition(s))m=i.selectionStart.endColumn;else if(s.isBeforeOrEqual(i.selectionStart.getStartPosition())){m=c;let e=new a.L(f,m);i.selectionStart.containsPosition(e)&&(m=i.selectionStart.endColumn)}else{m=u;let e=new a.L(f,m);i.selectionStart.containsPosition(e)&&(m=i.selectionStart.startColumn)}return i.move(!0,f,m,0)}}class h extends d{static deleteWordPartLeft(e){const t=c([d.deleteWordLeft(e,0),d.deleteWordLeft(e,2),d._deleteWordPartLeft(e.model,e.selection)]);return t.sort(l.e.compareRangesUsingEnds),t[2]}static deleteWordPartRight(e){const t=c([d.deleteWordRight(e,0),d.deleteWordRight(e,2),d._deleteWordPartRight(e.model,e.selection)]);return t.sort(l.e.compareRangesUsingStarts),t[0]}static moveWordPartLeft(e,t,i){const n=c([d.moveWordLeft(e,t,i,0),d.moveWordLeft(e,t,i,2),d._moveWordPartLeft(t,i)]);return n.sort(a.L.compare),n[2]}static moveWordPartRight(e,t,i){const n=c([d.moveWordRight(e,t,i,0),d.moveWordRight(e,t,i,2),d._moveWordPartRight(t,i)]);return n.sort(a.L.compare),n[0]}}function c(e){return e.filter((e=>Boolean(e)))}},20904:(e,t,i)=>{i.d(t,{u:()=>s});var n=i(89745);class o extends n.N{constructor(e){super(0);for(let t=0,i=e.length;t<i;t++)this.set(e.charCodeAt(t),2);this.set(32,1),this.set(9,1)}}const s=function(e){let t={};return e=>(t.hasOwnProperty(e)||(t[e]=(e=>new o(e))(e)),t[e])}()},89745:(e,t,i)=>{i.d(t,{N:()=>o,q:()=>s});var n=i(21915);class o{constructor(e){let t=(0,n.K)(e);this._defaultValue=t,this._asciiMap=o._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){let i=(0,n.K)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class s{constructor(){this._actual=new o(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}},14250:(e,t,i)=>{i.d(t,{h:()=>o});var n=i(78891);class o{static insert(e,t){return{range:new n.e(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},12062:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(18339);class o{constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}static createEmpty(e,t){const i=o.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new o(n,e,t)}equals(e){return e instanceof o&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let t=n;t<o;t++)if(this._tokens[t]!==e._tokens[t])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=n.NX.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n.NX.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n.NX.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n.NX.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n.NX.getInlineStyleFromMetadata(i,t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return o.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new s(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t<i;t++)e[t<<1]=e[t+1<<1];e[i<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let i=0,n=(e.length>>>1)-1;for(;i<n;){const o=i+Math.floor((n-i)/2),s=e[o<<1];if(s===t)return o+1;s<t?i=o+1:s>t&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const s=new Array;let r=0;for(;;){let o=t<this._tokensCount?this._tokens[t<<1]:-1,a=i<e.length?e[i]:null;if(-1!==o&&(null===a||o<=a.offset)){n+=this._text.substring(r,o);const e=this._tokens[1+(t<<1)];s.push(n.length,e),t++,r=o}else{if(!a)break;if(a.offset>r){n+=this._text.substring(r,a.offset);const e=this._tokens[1+(t<<1)];s.push(n.length,e),r=a.offset}n+=a.text,s.push(n.length,a.tokenMetadata),i++}}return new o(new Uint32Array(s),n,this._languageIdCodec)}}o.defaultTokenMetadata=16793600;class s{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t<n&&!(e.getStartOffset(t)>=i);t++)this._tokensCount++}equals(e){return e instanceof s&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},24028:(e,t,i)=>{i.d(t,{L:()=>n});class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column}isBeforeOrEqual(e){return n.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column}static compare(e,t){let i=0|e.lineNumber,n=0|t.lineNumber;return i===n?(0|e.column)-(0|t.column):i-n}clone(){return new n(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new n(e.lineNumber,e.column)}static isIPosition(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}}},78891:(e,t,i)=>{i.d(t,{e:()=>o});var n=i(24028);class o{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return o.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return o.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<e.startColumn||t.lineNumber===e.endLineNumber&&t.column>e.endColumn)}containsRange(e){return o.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)}strictContainsRange(e){return o.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return o.plusRange(this,e)}static plusRange(e,t){let i,n,s,r;return t.startLineNumber<e.startLineNumber?(i=t.startLineNumber,n=t.startColumn):t.startLineNumber===e.startLineNumber?(i=t.startLineNumber,n=Math.min(t.startColumn,e.startColumn)):(i=e.startLineNumber,n=e.startColumn),t.endLineNumber>e.endLineNumber?(s=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,r=e.endColumn),new o(i,n,s,r)}intersectRanges(e){return o.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn,a=t.startLineNumber,l=t.startColumn,d=t.endLineNumber,h=t.endColumn;return i<a?(i=a,n=l):i===a&&(n=Math.max(n,l)),s>d?(s=d,r=h):s===d&&(r=Math.min(r,h)),i>s||i===s&&n>r?null:new o(i,n,s,r)}equalsRange(e){return o.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return o.getEndPosition(this)}static getEndPosition(e){return new n.L(e.endLineNumber,e.endColumn)}getStartPosition(){return o.getStartPosition(this)}static getStartPosition(e){return new n.L(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new o(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new o(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return o.collapseToStart(this)}static collapseToStart(e){return new o(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,t){if(e&&t){const i=0|e.startLineNumber,n=0|t.startLineNumber;if(i===n){const i=0|e.startColumn,n=0|t.startColumn;if(i===n){const i=0|e.endLineNumber,n=0|t.endLineNumber;return i===n?(0|e.endColumn)-(0|t.endColumn):i-n}return i-n}return i-n}return(e?1:0)-(t?1:0)}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}}},87178:(e,t,i)=>{i.d(t,{Y:()=>s});var n=i(24028),o=i(78891);class s extends o.e{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.L(this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i<n;i++)if(!this.selectionsEqual(e[i],t[i]))return!1;return!0}static isISelection(e){return e&&"number"==typeof e.selectionStartLineNumber&&"number"==typeof e.selectionStartColumn&&"number"==typeof e.positionLineNumber&&"number"==typeof e.positionColumn}static createWithDirection(e,t,i,n,o){return 0===o?new s(e,t,i,n):new s(i,n,e,t)}}},25508:(e,t,i)=>{i.d(t,{kH:()=>g,l$:()=>u,lZ:()=>c,oe:()=>h});var n=i(96024),o=i(84483),s=i(3355);let r,a,l;function d(){return r||(r=new TextDecoder("UTF-16LE")),r}function h(){return l||(l=o.r()?d():(a||(a=new TextDecoder("UTF-16BE")),a)),l}const c="undefined"!=typeof TextDecoder;let u,g;function p(e,t,i){let n=[],o=0;for(let r=0;r<i;r++){const i=s.mP(e,t);t+=2,n[o++]=String.fromCharCode(i)}return n.join("")}c?(u=e=>new m(e),g=function(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?p(e,t,i):d().decode(n)}):(u=e=>new f,g=p);class m{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return h().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||n.ZG(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}class f{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCII(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCIIString(e){this._pieces[this._piecesLen++]=e}}},20365:(e,t,i)=>{i.d(t,{Hi:()=>s,WU:()=>n,hG:()=>o});class n{constructor(e,t,i){this._tokenBrand=void 0,this.offset=0|e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class o{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class s{constructor(e,t){this._tokenizationResult2Brand=void 0,this.tokens=e,this.endState=t}}},23385:(e,t,i)=>{i.d(t,{p:()=>n});class n{constructor(e,t,i,n,o,s){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=o,this._contextKeyService=s}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},35389:(e,t,i)=>{function n(e){return e&&"string"==typeof e.id}i.d(t,{I:()=>n,g:()=>o});const o={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},51778:(e,t,i)=>{i.d(t,{u:()=>n});var n,o=i(85337),s=i(72396);!function(e){e.editorSimpleInput=new s.uy("editorSimpleInput",!1,!0),e.editorTextFocus=new s.uy("editorTextFocus",!1,o.N("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new s.uy("editorFocus",!1,o.N("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new s.uy("textInputFocus",!1,o.N("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new s.uy("editorReadonly",!1,o.N("editorReadonly","Whether the editor is read only")),e.inDiffEditor=new s.uy("inDiffEditor",!1,o.N("inDiffEditor","Whether the context is a diff editor")),e.columnSelection=new s.uy("editorColumnSelection",!1,o.N("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new s.uy("editorHasSelection",!1,o.N("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new s.uy("editorHasMultipleSelections",!1,o.N("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new s.uy("editorTabMovesFocus",!1,o.N("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new s.uy("isInEmbeddedEditor",!1,!0),e.canUndo=new s.uy("canUndo",!1,!0),e.canRedo=new s.uy("canRedo",!1,!0),e.hoverVisible=new s.uy("editorHoverVisible",!1,o.N("editorHoverVisible","Whether the editor hover is visible")),e.inCompositeEditor=new s.uy("inCompositeEditor",void 0,o.N("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new s.uy("editorLangId","",o.N("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new s.uy("editorHasCompletionItemProvider",!1,o.N("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new s.uy("editorHasCodeActionsProvider",!1,o.N("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new s.uy("editorHasCodeLensProvider",!1,o.N("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new s.uy("editorHasDefinitionProvider",!1,o.N("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new s.uy("editorHasDeclarationProvider",!1,o.N("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new s.uy("editorHasImplementationProvider",!1,o.N("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new s.uy("editorHasTypeDefinitionProvider",!1,o.N("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new s.uy("editorHasHoverProvider",!1,o.N("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new s.uy("editorHasDocumentHighlightProvider",!1,o.N("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new s.uy("editorHasDocumentSymbolProvider",!1,o.N("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new s.uy("editorHasReferenceProvider",!1,o.N("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new s.uy("editorHasRenameProvider",!1,o.N("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new s.uy("editorHasSignatureHelpProvider",!1,o.N("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new s.uy("editorHasInlayHintsProvider",!1,o.N("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new s.uy("editorHasDocumentFormattingProvider",!1,o.N("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new s.uy("editorHasDocumentSelectionFormattingProvider",!1,o.N("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new s.uy("editorHasMultipleDocumentFormattingProvider",!1,o.N("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new s.uy("editorHasMultipleDocumentSelectionFormattingProvider",!1,o.N("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))}(n||(n={}))},66054:(e,t,i)=>{i.d(t,{F5:()=>o,Qi:()=>c,UO:()=>d,dJ:()=>a,je:()=>u,s6:()=>s,sh:()=>n,tk:()=>l,vW:()=>h});var n,o,s,r=i(20620);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(n||(n={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(o||(o={}));class a{constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,r.fS)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}!function(e){e[e.Disabled=0]="Disabled",e[e.EnabledForActive=1]="EnabledForActive",e[e.Enabled=2]="Enabled"}(s||(s={}));class d{constructor(e,t,i){this.visibleColumn=e,this.className=t,this.horizontalLine=i}}class h{constructor(e,t){this.top=e,this.endColumn=t}}class c{constructor(e,t,i,n,o,s){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=s}}class u{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}},98363:(e,t,i)=>{i.d(t,{NL:()=>f,e9:()=>m});var n=i(85337),o=i(98147),s=i(87178),r=i(51732),a=i(75950),l=i(3355),d=i(82219);function h(e){return e.toString()}class c{constructor(e,t,i,n,o,s,r){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=o,this.afterCursorState=s,this.changes=r}static create(e,t){const i=e.getAlternativeVersionId(),n=p(e);return new c(i,i,n,n,t,t,[])}append(e,t,i,n,o){t.length>0&&(this.changes=(0,a.b)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.T4(e,t?t.length:0,i),i+=4,t)for(const n of t)l.T4(e,n.selectionStartLineNumber,i),i+=4,l.T4(e,n.selectionStartColumn,i),i+=4,l.T4(e,n.positionLineNumber,i),i+=4,l.T4(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.Ag(e,t);t+=4;for(let o=0;o<n;o++){const n=l.Ag(e,t);t+=4;const o=l.Ag(e,t);t+=4;const r=l.Ag(e,t);t+=4;const a=l.Ag(e,t);t+=4,i.push(new s.Y(n,o,r,a))}return t}serialize(){let e=10+c._writeSelectionsSize(this.beforeCursorState)+c._writeSelectionsSize(this.afterCursorState)+4;for(const t of this.changes)e+=t.writeSize();const t=new Uint8Array(e);let i=0;l.T4(t,this.beforeVersionId,i),i+=4,l.T4(t,this.afterVersionId,i),i+=4,l.Cg(t,this.beforeEOL,i),i+=1,l.Cg(t,this.afterEOL,i),i+=1,i=c._writeSelections(t,this.beforeCursorState,i),i=c._writeSelections(t,this.afterCursorState,i),l.T4(t,this.changes.length,i),i+=4;for(const e of this.changes)i=e.write(t,i);return t.buffer}static deserialize(e){const t=new Uint8Array(e);let i=0;const n=l.Ag(t,i);i+=4;const o=l.Ag(t,i);i+=4;const s=l.Q$(t,i);i+=1;const r=l.Q$(t,i);i+=1;const d=[];i=c._readSelections(t,i,d);const h=[];i=c._readSelections(t,i,h);const u=l.Ag(t,i);i+=4;const g=[];for(let e=0;e<u;e++)i=a.q.read(t,i,g);return new c(n,o,s,r,d,h,g)}}class u{constructor(e,t){this.model=e,this._data=c.create(e,t)}get type(){return 0}get resource(){return r.o.isUri(this.model)?this.model:this.model.uri}get label(){return n.N("edit","Typing")}toString(){return(this._data instanceof c?this._data:c.deserialize(this._data)).changes.map((e=>e.toString())).join(", ")}matchesResource(e){return(r.o.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof c}append(e,t,i,n,o){this._data instanceof c&&this._data.append(e,t,i,n,o)}close(){this._data instanceof c&&(this._data=this._data.serialize())}open(){this._data instanceof c||(this._data=c.deserialize(this._data))}undo(){if(r.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof c&&(this._data=this._data.serialize());const e=c.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(r.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof c&&(this._data=this._data.serialize());const e=c.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof c&&(this._data=this._data.serialize()),this._data.byteLength+168}}class g{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=h(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}get resources(){return this._editStackElementsArr.map((e=>e.resource))}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=h(e);return this._editStackElementsMap.has(t)}setModel(e){const t=h(r.o.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=h(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,o){const s=h(e.uri);this._editStackElementsMap.get(s).append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=h(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${(0,d.EZ)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function p(e){return"\n"===e.getEOL()?0:1}function m(e){return!!e&&(e instanceof u||e instanceof g)}class f{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(m(t)&&t.canAppend(this._model))return t;const i=new u(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],p(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),s=f._computeCursorState(i,o),r=o.map(((e,t)=>({index:t,textChange:e.textChange})));return r.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),n.append(this._model,r.map((e=>e.textChange)),p(this._model),this._model.getAlternativeVersionId(),s),s}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,o.dL)(e),null}}}},75950:(e,t,i)=>{i.d(t,{b:()=>a,q:()=>r});var n=i(3355),o=i(25508);function s(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class r{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${s(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${s(this.oldText)}")`:`(replace@${this.oldPosition} "${s(this.oldText)}" with "${s(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const o=t.length;n.T4(e,o,i),i+=4;for(let s=0;s<o;s++)n.oq(e,t.charCodeAt(s),i),i+=2;return i}static _readString(e,t){const i=n.Ag(e,t);return t+=4,(0,o.kH)(e,t,i)}writeSize(){return 8+r._writeStringSize(this.oldText)+r._writeStringSize(this.newText)}write(e,t){return n.T4(e,this.oldPosition,t),t+=4,n.T4(e,this.newPosition,t),t+=4,t=r._writeString(e,this.oldText,t),r._writeString(e,this.newText,t)}static read(e,t,i){const o=n.Ag(e,t);t+=4;const s=n.Ag(e,t);t+=4;const a=r._readString(e,t);t+=r._writeStringSize(a);const l=r._readString(e,t);return t+=r._writeStringSize(l),i.push(new r(o,a,s,l)),t}}function a(e,t){return null===e||0===e.length?t:new l(e,t).compress()}class l{constructor(e,t){this._prevEdits=e,this._currEdits=t,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,t=0,i=this._getPrev(e),n=this._getCurr(t);for(;e<this._prevLen||t<this._currLen;){if(null===i){this._acceptCurr(n),n=this._getCurr(++t);continue}if(null===n){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldEnd<=i.newPosition){this._acceptCurr(n),n=this._getCurr(++t);continue}if(i.newEnd<=n.oldPosition){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldPosition<i.newPosition){const[e,t]=l._splitCurr(n,i.newPosition-n.oldPosition);this._acceptCurr(e),n=t;continue}if(i.newPosition<n.oldPosition){const[e,t]=l._splitPrev(i,n.oldPosition-i.newPosition);this._acceptPrev(e),i=t;continue}let o,s;if(n.oldEnd===i.newEnd)o=i,s=n,i=this._getPrev(++e),n=this._getCurr(++t);else if(n.oldEnd<i.newEnd){const[e,r]=l._splitPrev(i,n.oldLength);o=e,s=n,i=r,n=this._getCurr(++t)}else{const[t,r]=l._splitCurr(n,i.newLength);o=i,s=t,i=this._getPrev(++e),n=r}this._result[this._resultLen++]=new r(o.oldPosition,o.oldText,s.newPosition,s.newText),this._prevDeltaOffset+=o.newLength-o.oldLength,this._currDeltaOffset+=s.newLength-s.oldLength}const o=l._merge(this._result);return l._removeNoOps(o)}_acceptCurr(e){this._result[this._resultLen++]=l._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=l._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,t){return new r(t.oldPosition-e,t.oldText,t.newPosition,t.newText)}static _rebasePrev(e,t){return new r(t.oldPosition,t.oldText,t.newPosition+e,t.newText)}static _splitPrev(e,t){const i=e.newText.substr(0,t),n=e.newText.substr(t);return[new r(e.oldPosition,e.oldText,e.newPosition,i),new r(e.oldEnd,"",e.newPosition+t,n)]}static _splitCurr(e,t){const i=e.oldText.substr(0,t),n=e.oldText.substr(t);return[new r(e.oldPosition,i,e.newPosition,e.newText),new r(e.oldPosition+t,n,e.newEnd,"")]}static _merge(e){if(0===e.length)return e;let t=[],i=0,n=e[0];for(let o=1;o<e.length;o++){const s=e[o];n.oldEnd===s.oldPosition?n=new r(n.oldPosition,n.oldText+s.oldText,n.newPosition,n.newText+s.newText):(t[i++]=n,n=s)}return t[i++]=n,t}static _removeNoOps(e){if(0===e.length)return e;let t=[],i=0;for(let n=0;n<e.length;n++){const o=e[n];o.oldText!==o.newText&&(t[i++]=o)}return t}}},95098:(e,t,i)=>{i.d(t,{WE:()=>Wt,qx:()=>Zt,yO:()=>Bt});var n=i(98147),o=i(77538),s=i(48646),r=i(96024),a=i(51732),l=i(38562),d=i(24028),h=i(78891),c=i(87178),u=i(66054),g=i(98363);class p{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function m(e,t,i,n,o){let s;for(o.spacesDiff=0,o.looksLikeAlignment=!1,s=0;s<t&&s<n&&e.charCodeAt(s)===i.charCodeAt(s);s++);let r=0,a=0;for(let i=s;i<t;i++)32===e.charCodeAt(i)?r++:a++;let l=0,d=0;for(let e=s;e<n;e++)32===i.charCodeAt(e)?l++:d++;if(r>0&&a>0)return;if(l>0&&d>0)return;let h=Math.abs(a-d),c=Math.abs(r-l);if(0===h)return o.spacesDiff=c,void(c>0&&0<=l-1&&l-1<e.length&&l<i.length&&32!==i.charCodeAt(l)&&32===e.charCodeAt(l-1)&&44===e.charCodeAt(e.length-1)&&(o.looksLikeAlignment=!0));c%h!=0||(o.spacesDiff=c/h)}function f(e,t,i){const n=Math.min(e.getLineCount(),1e4);let o=0,s=0,r="",a=0;const l=[2,4,6,8,3,5,7];let d=[0,0,0,0,0,0,0,0,0],h=new p;for(let l=1;l<=n;l++){let n=e.getLineLength(l),c=e.getLineContent(l);const u=n<=65536;let g=!1,p=0,f=0,_=0;for(let t=0,i=n;t<i;t++){let i=u?c.charCodeAt(t):e.getLineCharCode(l,t);if(9===i)_++;else{if(32!==i){g=!0,p=t;break}f++}}if(!g)continue;if(_>0?o++:f>1&&s++,m(r,a,c,p,h),h.looksLikeAlignment&&(!i||t!==h.spacesDiff))continue;let v=h.spacesDiff;v<=8&&d[v]++,r=c,a=p}let c=i;o!==s&&(c=o<s);let u=t;if(c){let e=c?0:.1*n;l.forEach((t=>{let i=d[t];i>e&&(e=i,u=t)})),4===u&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(u=2)}return{insertSpaces:c,tabSize:u}}function _(e){return(1&e.metadata)>>>0}function v(e,t){e.metadata=254&e.metadata|t<<0}function b(e){return(2&e.metadata)>>>1==1}function C(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function w(e){return(4&e.metadata)>>>2==1}function y(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function S(e,t){e.metadata=231&e.metadata|t<<3}function L(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class x{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,v(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,y(this,!1),S(this,1),L(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,C(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;let t=this.options.className;y(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),S(this,this.options.stickiness),L(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const k=new x(null,0,0);k.parent=k,k.left=k,k.right=k,v(k,0);class N{constructor(){this.root=k,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===k?[]:function(e,t,i,n,o,s){let r=e.root,a=0,l=0,d=0,h=0,c=[],u=0;for(;r!==k;)if(b(r))C(r.left,!1),C(r.right,!1),r===r.parent.right&&(a-=r.parent.delta),r=r.parent;else{if(!b(r.left)){if(l=a+r.maxEnd,l<t){C(r,!0);continue}if(r.left!==k){r=r.left;continue}}if(d=a+r.start,d>i)C(r,!0);else{if(h=a+r.end,h>=t){r.setCachedOffsets(d,h,s);let e=!0;n&&r.ownerId&&r.ownerId!==n&&(e=!1),o&&w(r)&&(e=!1),e&&(c[u++]=r)}C(r,!0),r.right===k||b(r.right)||(a+=r.delta,r=r.right)}}return C(e.root,!1),c}(this,e,t,i,n,o)}search(e,t,i){return this.root===k?[]:function(e,t,i,n){let o=e.root,s=0,r=0,a=0,l=[],d=0;for(;o!==k;){if(b(o)){C(o.left,!1),C(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),o=o.parent;continue}if(o.left!==k&&!b(o.left)){o=o.left;continue}r=s+o.start,a=s+o.end,o.setCachedOffsets(r,a,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&w(o)&&(e=!1),e&&(l[d++]=o),C(o,!0),o.right===k||b(o.right)||(s+=o.delta,o=o.right)}return C(e.root,!1),l}(this,e,t,i)}collectNodesFromOwner(e){return function(e,t){let i=e.root,n=[],o=0;for(;i!==k;)b(i)?(C(i.left,!1),C(i.right,!1),i=i.parent):i.left===k||b(i.left)?(i.ownerId===t&&(n[o++]=i),C(i,!0),i.right===k||b(i.right)||(i=i.right)):i=i.left;return C(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root,i=[],n=0;for(;t!==k;)b(t)?(C(t.left,!1),C(t.right,!1),t=t.parent):t.left===k||b(t.left)?t.right===k||b(t.right)?(i[n++]=t,C(t,!0)):t=t.right:t=t.left;return C(e.root,!1),i}(this)}insert(e){I(this,e),this._normalizeDeltaIfNecessary()}delete(e){T(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,s=i.end+n;i.setCachedOffsets(o,s,t)}acceptReplace(e,t,i,n){const o=function(e,t,i){let n=e.root,o=0,s=0,r=0,a=0,l=[],d=0;for(;n!==k;)if(b(n))C(n.left,!1),C(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!b(n.left)){if(s=o+n.maxEnd,s<t){C(n,!0);continue}if(n.left!==k){n=n.left;continue}}r=o+n.start,r>i?C(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[d++]=n),C(n,!0),n.right===k||b(n.right)||(o+=n.delta,n=n.right))}return C(e.root,!1),l}(this,e,e+t);for(let e=0,t=o.length;e<t;e++)T(this,o[e]);this._normalizeDeltaIfNecessary(),function(e,t,i,n){let o=e.root,s=0,r=0,a=0;const l=n-(i-t);for(;o!==k;)if(b(o))C(o.left,!1),C(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),P(o),o=o.parent;else{if(!b(o.left)){if(r=s+o.maxEnd,r<t){C(o,!0);continue}if(o.left!==k){o=o.left;continue}}a=s+o.start,a>i?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),C(o,!0)):(C(o,!0),o.right===k||b(o.right)||(s+=o.delta,o=o.right))}C(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let s=0,r=o.length;s<r;s++){const r=o[s];r.start=r.cachedAbsoluteStart,r.end=r.cachedAbsoluteEnd,E(r,e,e+t,i,n),r.maxEnd=r.end,I(this,r)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,function(e){let t=e.root,i=0;for(;t!==k;)t.left===k||b(t.left)?t.right===k||b(t.right)?(t.start=i+t.start,t.end=i+t.end,t.delta=0,P(t),C(t,!0),C(t.left,!1),C(t.right,!1),t===t.parent.right&&(i-=t.parent.delta),t=t.parent):(i+=t.delta,t=t.right):t=t.left;C(e.root,!1)}(this))}}function D(e,t,i,n){return e<i||!(e>i)&&1!==n&&(2===n||t)}function E(e,t,i,n,o){const s=function(e){return(24&e.metadata)>>>3}(e),r=0===s||2===s,a=1===s||2===s,l=i-t,d=n,h=Math.min(l,d),c=e.start;let u=!1;const g=e.end;let p=!1;t<=c&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=o?1:l>0?2:0;!u&&D(c,r,t,e)&&(u=!0),!p&&D(g,a,t,e)&&(p=!0)}if(h>0&&!o){const e=l>d?2:0;!u&&D(c,r,t+h,e)&&(u=!0),!p&&D(g,a,t+h,e)&&(p=!0)}{const n=o?1:0;!u&&D(c,r,i,n)&&(e.start=t+d,u=!0),!p&&D(g,a,i,n)&&(e.end=t+d,p=!0)}const m=d-l;u||(e.start=Math.max(0,c+m)),p||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function I(e,t){if(e.root===k)return t.parent=k,t.left=k,t.right=k,v(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const o=t.start,s=t.end;for(;;)if(r=o,a=s,l=n.start+i,d=n.end+i,(r===l?a-d:r-l)<0){if(n.left===k){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===k){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}var r,a,l,d;t.parent=n,t.left=k,t.right=k,v(t,1)}(e,t),F(t.parent);let i=t;for(;i!==e.root&&1===_(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===_(t)?(v(i.parent,0),v(t,0),v(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,R(e,i)),v(i.parent,0),v(i.parent.parent,1),A(e,i.parent.parent))}else{const t=i.parent.parent.left;1===_(t)?(v(i.parent,0),v(t,0),v(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,A(e,i)),v(i.parent,0),v(i.parent.parent,1),R(e,i.parent.parent))}return v(e.root,0),t}function T(e,t){let i,n;if(t.left===k?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===k?(i=t.left,n=t):(n=function(e){for(;e.left!==k;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,v(i,0),t.detach(),M(),P(i),void(e.root.parent=k);let o,s=1===_(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,v(n,_(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==k&&(n.left.parent=n),n.right!==k&&(n.right.parent=n)),t.detach(),s)return F(i.parent),n!==t&&(F(n),F(n.parent)),void M();for(F(i),F(i.parent),n!==t&&(F(n),F(n.parent));i!==e.root&&0===_(i);)i===i.parent.left?(o=i.parent.right,1===_(o)&&(v(o,0),v(i.parent,1),R(e,i.parent),o=i.parent.right),0===_(o.left)&&0===_(o.right)?(v(o,1),i=i.parent):(0===_(o.right)&&(v(o.left,0),v(o,1),A(e,o),o=i.parent.right),v(o,_(i.parent)),v(i.parent,0),v(o.right,0),R(e,i.parent),i=e.root)):(o=i.parent.left,1===_(o)&&(v(o,0),v(i.parent,1),A(e,i.parent),o=i.parent.left),0===_(o.left)&&0===_(o.right)?(v(o,1),i=i.parent):(0===_(o.left)&&(v(o.right,0),v(o,1),R(e,o),o=i.parent.left),v(o,_(i.parent)),v(i.parent,0),v(o.left,0),A(e,i.parent),i=e.root));v(i,0),M()}function M(){k.parent=k,k.delta=0,k.start=0,k.end=0}function R(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==k&&(i.left.parent=t),i.parent=t.parent,t.parent===k?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,P(t),P(i)}function A(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==k&&(i.right.parent=t),i.parent=t.parent,t.parent===k?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,P(t),P(i)}function O(e){let t=e.end;if(e.left!==k){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==k){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function P(e){e.maxEnd=O(e)}function F(e){for(;e!==k;){const t=O(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class B{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==W)return V(this.right);let e=this;for(;e.parent!==W&&e.parent.left!==e;)e=e.parent;return e.parent===W?W:e.parent}prev(){if(this.left!==W)return H(this.left);let e=this;for(;e.parent!==W&&e.parent.right!==e;)e=e.parent;return e.parent===W?W:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const W=new B(null,0);function V(e){for(;e.left!==W;)e=e.left;return e}function H(e){for(;e.right!==W;)e=e.right;return e}function z(e){return e===W?0:e.size_left+e.piece.length+z(e.right)}function K(e){return e===W?0:e.lf_left+e.piece.lineFeedCnt+K(e.right)}function U(){W.parent=W}function j(e,t){let i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==W&&(i.left.parent=t),i.parent=t.parent,t.parent===W?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function $(e,t){let i=t.left;t.left=i.right,i.right!==W&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===W?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function q(e,t){let i,n;if(t.left===W?(n=t,i=n.right):t.right===W?(n=t,i=n.left):(n=V(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),U(),void(e.root.parent=W);let o,s=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Q(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Q(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==W&&(n.left.parent=n),n.right!==W&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Q(e,n)),t.detach(),i.parent.left===i){let t=z(i),n=K(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){let o=t-i.parent.size_left,s=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,G(e,i.parent,o,s)}}if(Q(e,i.parent),s)U();else{for(;i!==e.root&&0===i.color;)i===i.parent.left?(o=i.parent.right,1===o.color&&(o.color=0,i.parent.color=1,j(e,i.parent),o=i.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.right.color&&(o.left.color=0,o.color=1,$(e,o),o=i.parent.right),o.color=i.parent.color,i.parent.color=0,o.right.color=0,j(e,i.parent),i=e.root)):(o=i.parent.left,1===o.color&&(o.color=0,i.parent.color=1,$(e,i.parent),o=i.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.left.color&&(o.right.color=0,o.color=1,j(e,o),o=i.parent.left),o.color=i.parent.color,i.parent.color=0,o.left.color=0,$(e,i.parent),i=e.root));i.color=0,U()}}function Z(e,t){for(Q(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&j(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,$(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&$(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,j(e,t.parent.parent))}e.root.color=0}function G(e,t,i,n){for(;t!==e.root&&t!==W;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Q(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=z((t=t.parent).left)-t.size_left,n=K(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}W.parent=W,W.left=W,W.right=W,W.color=0;var Y=i(44993);const J=65535;function X(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class ee{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function te(e,t=!0){let i=[0],n=1;for(let t=0,o=e.length;t<o;t++){const s=e.charCodeAt(t);13===s?t+1<o&&10===e.charCodeAt(t+1)?(i[n++]=t+2,t++):i[n++]=t+1:10===s&&(i[n++]=t+1)}return t?X(i):i}class ie{constructor(e,t,i,n,o){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=o}}class ne{constructor(e,t){this.buffer=e,this.lineStarts=t}}class oe{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==W&&e.iterate(e.root,(e=>(e!==W&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class se{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<e&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,i=this._cache;for(let n=0;n<i.length;n++){let o=i[n];(null===o.node.parent||o.nodeStartOffset>=e)&&(i[n]=null,t=!0)}if(t){let e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class re{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new ne("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=W,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t<i;t++)if(e[t].buffer.length>0){e[t].lineStarts||(e[t].lineStarts=te(e[t].buffer));let i=new ie(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new se(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=65535-Math.floor(21845),i=2*t,n="",o=0,s=[];if(this.iterate(this.root,(r=>{let a=this.getNodeContent(r),l=a.length;if(o<=t||o+l<i)return n+=a,o+=l,!0;let d=n.replace(/\r\n|\r|\n/g,e);return s.push(new ne(d,te(d))),n=a,o=l,!0})),o>0){let t=n.replace(/\r\n|\r|\n/g,e);s.push(new ne(t,te(t)))}this.create(s,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new oe(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==W;)if(n.left!==W&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0,n=e;for(;t!==W;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){let o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){let e=n-this.getOffsetAt(i+1,1);return new d.L(i+1,e+1)}return new d.L(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===W){let t=n-e-this.getOffsetAt(i+1,1);return new d.L(i+1,t+1)}t=t.right}return new d.L(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),s=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==W;){let e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){s+=e.substring(n,n+t.remainder);break}s+=e.substr(n,i.piece.length),i=i.next()}return s}getLinesContent(){let e=[],t=0,i="",n=!1;return this.iterate(this.root,(o=>{if(o===W)return!0;const s=o.piece;let r=s.length;if(0===r)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,d=s.start.line,h=s.end.line;let c=l[d]+s.start.column;if(n&&(10===a.charCodeAt(c)&&(c++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(d===h)return this._EOLNormalized||13!==a.charCodeAt(c+r-1)?i+=a.substr(c,r):(n=!0,i+=a.substr(c,r-1)),!0;i+=this._EOLNormalized?a.substring(c,Math.max(c,l[d+1]-this._EOLLength)):a.substring(c,l[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=d+1;n<h;n++)i=this._EOLNormalized?a.substring(l[n],l[n+1]-this._EOLLength):a.substring(l[n],l[n+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;return this._EOLNormalized||13!==a.charCodeAt(l[h]+s.end.column-1)?i=a.substr(l[h],s.end.column):(n=!0,0===s.end.column?t--:i=a.substr(l[h],s.end.column-1)),!0})),n&&(e[t++]=i,i=""),e[t++]=i,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e||(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,"")),this._lastVisitedLine.value}_getCharCode(e){if(e.remainder===e.node.piece.length){let t=e.node.next();if(!t)return 0;let i=this._buffers[t.piece.bufferIndex],n=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return i.buffer.charCodeAt(n)}{let t=this._buffers[e.node.piece.bufferIndex],i=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start)+e.remainder;return t.buffer.charCodeAt(i)}}getLineCharCode(e,t){let i=this.nodeAt2(e,t+1);return this._getCharCode(i)}getLineLength(e){if(e===this.getLineCount()){let t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,t,i,n,o,s,r,a,l,d,c){let u,g,p,m=this._buffers[e.piece.bufferIndex],f=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),_=this.offsetInBuffer(e.piece.bufferIndex,o),v=this.offsetInBuffer(e.piece.bufferIndex,s),b={line:0,column:0};t._wordSeparators?(g=m.buffer.substring(_,v),p=e=>e+_,t.reset(0)):(g=m.buffer,p=e=>e,t.reset(_));do{if(u=t.next(g),u){if(p(u.index)>=v)return d;this.positionInBuffer(e,p(u.index)-f,b);let t=this.getLineFeedCnt(e.piece.bufferIndex,o,b),s=b.line===o.line?b.column-o.column+n:b.column+1,r=s+u[0].length;if(c[d++]=(0,Y.iE)(new h.e(i+t,s,i+t,r),u,a),p(u.index)+u[0].length>=v)return d;if(d>=l)return d}}while(u);return d}findMatchesLineByLine(e,t,i,n){const o=[];let s=0;const r=new Y.sz(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];let l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let d=this.positionInBuffer(a.node,a.remainder),h=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,d,h,t,i,n,s,o),o;let c=e.startLineNumber,u=a.node;for(;u!==l.node;){let l=this.getLineFeedCnt(u.piece.bufferIndex,d,u.piece.end);if(l>=1){let a=this._buffers[u.piece.bufferIndex].lineStarts,h=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[d.line+l],p=c===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(u,r,c,p,d,this.positionInBuffer(u,g-h),t,i,n,s,o),s>=n)return o;c+=l}let h=c===e.startLineNumber?e.startColumn-1:0;if(c===e.endLineNumber){const a=this.getLineContent(c).substring(h,e.endColumn-1);return s=this._findMatchesInLine(t,r,a,e.endLineNumber,h,s,o,i,n),o}if(s=this._findMatchesInLine(t,r,this.getLineContent(c).substr(h),c,h,s,o,i,n),s>=n)return o;c++,a=this.nodeAt2(c,1),u=a.node,d=this.positionInBuffer(a.node,a.remainder)}if(c===e.endLineNumber){let a=c===e.startLineNumber?e.startColumn-1:0;const l=this.getLineContent(c).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,r,l,e.endLineNumber,a,s,o,i,n),o}let g=c===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,r,c,g,d,h,t,i,n,s,o),o}_findMatchesInLine(e,t,i,n,o,s,r,a,l){const d=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,c=i.length;let g=-a;for(;-1!==(g=i.indexOf(t,g+a));)if((!d||(0,Y.cM)(d,i,c,g,a))&&(r[s++]=new u.tk(new h.e(n,g+1+o,n,g+1+a+o),null),s>=l))return s;return s}let c;t.reset(0);do{if(c=t.next(i),c&&(r[s++]=(0,Y.iE)(new h.e(n,c.index+1+o,n,c.index+1+c[0].length+o),c,a),s>=l))return s}while(c);return s}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==W){let{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),s=i.piece,r=s.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&o+s.length===e&&t.length<J)return this.appendToNode(i,t),void this.computeBufferMetadata();if(o===e)this.insertContentToNodeLeft(t,i),this._searchCache.validate(e);else if(o+i.piece.length>e){let e=[],o=new ie(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(r,s.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(i,n)){let e={line:o.start.line+1,column:0};o=new ie(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,n-1)){let o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a);else this.deleteNodeTail(i,a);let l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let d=i;for(let e=0;e<l.length;e++)d=this.rbInsertRight(d,l[e]);this.deleteNodes(e)}else this.insertContentToNodeRight(t,i)}else{let e=this.createNewPieces(t),i=this.rbInsertLeft(null,e[0]);for(let t=1;t<e.length;t++)i=this.rbInsertRight(i,e[t])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===W)return;let i=this.nodeAt(e),n=this.nodeAt(e+t),o=i.node,s=n.node;if(o===s){let s=this.positionInBuffer(o,i.remainder),r=this.positionInBuffer(o,n.remainder);if(i.nodeStartOffset===e){if(t===o.piece.length){let e=o.next();return q(this,o),this.validateCRLFWithPrevNode(e),void this.computeBufferMetadata()}return this.deleteNodeHead(o,r),this._searchCache.validate(e),this.validateCRLFWithPrevNode(o),void this.computeBufferMetadata()}return i.nodeStartOffset+o.piece.length===e+t?(this.deleteNodeTail(o,s),this.validateCRLFWithNextNode(o),void this.computeBufferMetadata()):(this.shrinkNode(o,s,r),void this.computeBufferMetadata())}let r=[],a=this.positionInBuffer(o,i.remainder);this.deleteNodeTail(o,a),this._searchCache.validate(e),0===o.piece.length&&r.push(o);let l=this.positionInBuffer(s,n.remainder);this.deleteNodeHead(s,l),0===s.piece.length&&r.push(s);for(let e=o.next();e!==W&&e!==s;e=e.next())r.push(e);let d=0===o.piece.length?o.prev():o;this.deleteNodes(r),this.validateCRLFWithNextNode(d),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){let i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){let n=t.piece,o={line:n.start.line+1,column:0},s=new ie(n.bufferIndex,o,n.end,this.getLineFeedCnt(n.bufferIndex,o,n.end),n.length-1);t.piece=s,e+="\n",G(this,t,-1,-1),0===t.piece.length&&i.push(t)}let n=this.createNewPieces(e),o=this.rbInsertLeft(t,n[n.length-1]);for(let e=n.length-2;e>=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");let i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),o=n;for(let e=1;e<i.length;e++)o=this.rbInsertRight(o,i[e]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){let n=e.piece,o=e.piece.bufferIndex,s=this._buffers[o].lineStarts,r=s[n.start.line]+n.start.column+t,a=n.start.line,l=n.end.line,d=0,h=0,c=0;for(;a<=l&&(d=a+(l-a)/2|0,c=s[d],d!==l);)if(h=s[d+1],r<c)l=d-1;else{if(!(r>=h))break;a=d+1}return i?(i.line=d,i.column=r-c,null):{line:d,column:r-c}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;let n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;let o=n[i.line+1],s=n[i.line]+i.column;if(o>s+1)return i.line-t.line;let r=s-1;return 13===this._buffers[e].buffer.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)q(this,e[t])}createNewPieces(e){if(e.length>J){let t=[];for(;e.length>J;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,J),e=e.substring(J));let o=te(n);t.push(new ie(this._buffers.length,{line:0,column:0},{line:o.length-1,column:n.length-o[o.length-1]},o.length-1,n.length)),this._buffers.push(new ne(n,o))}let i=te(e);return t.push(new ie(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new ne(e,i)),t}let t=this._buffers[0].buffer.length;const i=te(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e<i.length;e++)i[e]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(0!==t)for(let e=0;e<i.length;e++)i[e]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const o=this._buffers[0].buffer.length;let s=this._buffers[0].lineStarts.length-1,r={line:s,column:o-this._buffers[0].lineStarts[s]},a=new ie(0,n,r,this.getLineFeedCnt(0,n,r),o-t);return this._lastChangeBufferPos=r,[a]}getLineRawContent(e,t=0){let i=this.root,n="",o=this._searchCache.get2(e);if(o){i=o.node;let s=this.getAccumulatedValue(i,e-o.nodeStartLineNumber-1),r=this._buffers[i.piece.bufferIndex].buffer,a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(o.nodeStartLineNumber+i.piece.lineFeedCnt!==e){let n=this.getAccumulatedValue(i,e-o.nodeStartLineNumber);return r.substring(a+s,a+n-t)}n=r.substring(a+s,a+i.piece.length)}else{let o=0;const s=e;for(;i!==W;)if(i.left!==W&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:s-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){let t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(s+t,s+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==W;){let e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let o=this.getAccumulatedValue(i,0),s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(s,s+o-t),n}{let t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==W;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){let i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){let t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;let i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),s=t,r=this.offsetInBuffer(i.bufferIndex,s),a=this.getLineFeedCnt(i.bufferIndex,i.start,s),l=a-n,d=r-o,h=i.length+d;e.piece=new ie(i.bufferIndex,i.start,s,a,h),G(this,e,d,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),s=t,r=this.getLineFeedCnt(i.bufferIndex,s,i.end),a=r-n,l=o-this.offsetInBuffer(i.bufferIndex,s),d=i.length+l;e.piece=new ie(i.bufferIndex,s,i.end,r,d),G(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,o=n.start,s=n.end,r=n.length,a=n.lineFeedCnt,l=t,d=this.getLineFeedCnt(n.bufferIndex,n.start,l),h=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new ie(n.bufferIndex,n.start,l,d,h),G(this,e,h-r,d-a);let c=new ie(n.bufferIndex,i,s,this.getLineFeedCnt(n.bufferIndex,i,s),this.offsetInBuffer(n.bufferIndex,s)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,c);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=te(t,!1);for(let e=0;e<o.length;e++)o[e]+=n;if(i){let e=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-e}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));const s=this._buffers[0].lineStarts.length-1,r={line:s,column:this._buffers[0].buffer.length-this._buffers[0].lineStarts[s]},a=e.piece.length+t.length,l=e.piece.lineFeedCnt,d=this.getLineFeedCnt(0,e.piece.start,r),h=d-l;e.piece=new ie(e.piece.bufferIndex,e.piece.start,r,d,a),this._lastChangeBufferPos=r,G(this,e,t.length,h)}nodeAt(e){let t=this.root,i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;for(;t!==W;)if(t.size_left>e)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;let i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==W;)if(i.left!==W&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,s),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==W;){if(i.piece.lineFeedCnt>0){let e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1)return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)};t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===W||0===e.piece.lineFeedCnt)return!1;let t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;return n!==i.length-1&&!(i[n+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==W&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let i,n=[],o=this._buffers[e.piece.bufferIndex].lineStarts;i=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new ie(e.piece.bufferIndex,e.piece.start,i,r,s),G(this,e,-1,-1),0===e.piece.length&&n.push(e);let a={line:t.piece.start.line+1,column:0};const l=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new ie(t.piece.bufferIndex,a,t.piece.end,d,l),G(this,t,-1,-1),0===t.piece.length&&n.push(t);let h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(let e=0;e<n.length;e++)q(this,n[e])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let i=t.next();if(this.startWithLF(i)){if(e+="\n",1===i.piece.length)q(this,i);else{const e=i.piece,t={line:e.start.line+1,column:0},n=e.length-1,o=this.getLineFeedCnt(e.bufferIndex,t,e.end);i.piece=new ie(e.bufferIndex,t,e.end,o,n),G(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===W)return t(W);let i=this.iterate(e.left,t);return i?t(e)&&this.iterate(e.right,t):i}getNodeContent(e){if(e===W)return"";let t,i=this._buffers[e.piece.bufferIndex],n=e.piece,o=this.offsetInBuffer(n.bufferIndex,n.start),s=this.offsetInBuffer(n.bufferIndex,n.end);return t=i.buffer.substring(o,s),t}getPieceContent(e){let t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(i,n)}rbInsertRight(e,t){let i=new B(t,1);if(i.left=W,i.right=W,i.parent=W,i.size_left=0,i.lf_left=0,this.root===W)this.root=i,i.color=0;else if(e.right===W)e.right=i,i.parent=e;else{let t=V(e.right);t.left=i,i.parent=t}return Z(this,i),i}rbInsertLeft(e,t){let i=new B(t,1);if(i.left=W,i.right=W,i.parent=W,i.size_left=0,i.lf_left=0,this.root===W)this.root=i,i.color=0;else if(e.left===W)e.left=i,i.parent=e;else{let t=H(e.left);t.right=i,i.parent=t}return Z(this,i),i}}var ae=i(8167),le=i(75950);class de extends s.JT{constructor(e,t,i,n,s,r,a){super(),this._onDidChangeContent=this._register(new o.Q5),this._BOM=t,this._mightContainNonBasicASCII=!r,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._pieceTree=new re(e,i,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){let i=e+t;const n=this.getPositionAt(e),o=this.getPositionAt(i);return new h.e(n.lineNumber,n.column,o.lineNumber,o.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let i=this.getOffsetAt(e.startLineNumber,e.startColumn);return this.getOffsetAt(e.endLineNumber,e.endColumn)-i}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,o=e.endLineNumber;for(let t=n;t<=o;t++){const s=this.getLineContent(t),a=t===n?e.startColumn-1:0,l=t===o?e.endColumn-1:s.length;for(let e=a;e<l;e++)r.ZG(s.charCodeAt(e))?(i+=1,e+=1):i+=1}return i+=this._getEndOfLine(t).length*(o-n),i}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=r.LC(this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=r.ow(this.getLineContent(e));return-1===t?0:t+2}_getEndOfLine(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,o=this._mightContainUnusualLineTerminators,s=this._mightContainNonBasicASCII,a=!0,l=[];for(let t=0;t<e.length;t++){let i=e[t];a&&i._isTracked&&(a=!1);let d=i.range;if(i.text){let e=!0;s||(e=!r.$i(i.text),s=e),!n&&e&&(n=r.Ut(i.text)),!o&&e&&(o=r.ab(i.text))}let h="",c=0,u=0,g=0;if(i.text){let e;[c,u,g,e]=(0,ae.QZ)(i.text);const t=this.getEOL();h=0===e||e===("\r\n"===t?2:1)?i.text:i.text.replace(/\r\n|\r|\n/g,t)}l[t]={sortIndex:t,identifier:i.identifier||null,range:d,rangeOffset:this.getOffsetAt(d.startLineNumber,d.startColumn),rangeLength:this.getValueLengthInRange(d),text:h,eolCount:c,firstLineLength:u,lastLineLength:g,forceMoveMarkers:Boolean(i.forceMoveMarkers),isAutoWhitespaceEdit:i.isAutoWhitespaceEdit||!1}}l.sort(de._sortOpsAscending);let d=!1;for(let e=0,t=l.length-1;e<t;e++){let t=l[e].range.getEndPosition(),i=l[e+1].range.getStartPosition();if(i.isBeforeOrEqual(t)){if(i.isBefore(t))throw new Error("Overlapping ranges are not allowed!");d=!0}}a&&(l=this._reduceOperations(l));let h=i||t?de._getInverseEditRanges(l):[],c=[];if(t)for(let e=0;e<l.length;e++){let t=l[e],i=h[e];if(t.isAutoWhitespaceEdit&&t.range.isEmpty())for(let e=i.startLineNumber;e<=i.endLineNumber;e++){let n="";e===i.startLineNumber&&(n=this.getLineContent(t.range.startLineNumber),-1!==r.LC(n))||c.push({lineNumber:e,oldContent:n})}}let g=null;if(i){let e=0;g=[];for(let t=0;t<l.length;t++){const i=l[t],n=h[t],o=this.getValueInRange(i.range),s=i.rangeOffset+e;e+=i.text.length-o.length,g[t]={sortIndex:i.sortIndex,identifier:i.identifier,range:n,text:o,textChange:new le.q(i.rangeOffset,o,s,i.text)}}d||g.sort(((e,t)=>e.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=s;const p=this._doApplyEdits(l);let m=null;if(t&&c.length>0){c.sort(((e,t)=>t.lineNumber-e.lineNumber)),m=[];for(let e=0,t=c.length;e<t;e++){let t=c[e].lineNumber;if(e>0&&c[e-1].lineNumber===t)continue;let i=c[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===r.LC(n)&&m.push(t)}}return this._onDidChangeContent.fire(),new u.je(g,p,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,o=new h.e(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let s=i.startLineNumber,r=i.startColumn;const a=[];for(let i=0,n=e.length;i<n;i++){const n=e[i],o=n.range;t=t||n.forceMoveMarkers,a.push(this.getValueInRange(new h.e(s,r,o.startLineNumber,o.startColumn))),n.text.length>0&&a.push(n.text),s=o.endLineNumber,r=o.endColumn}const l=a.join(""),[d,c,u]=(0,ae.QZ)(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:d,firstLineLength:c,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(de._sortOpsDescending);let t=[];for(let i=0;i<e.length;i++){let n=e[i];const o=n.range.startLineNumber,s=n.range.startColumn,r=n.range.endLineNumber,a=n.range.endColumn;if(o===r&&s===a&&0===n.text.length)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const l=new h.e(o,s,r,a);t.push({range:l,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){let t=[],i=0,n=0,o=null;for(let s=0,r=e.length;s<r;s++){let r,a,l,d=e[s];if(o?o.range.endLineNumber===d.range.startLineNumber?(r=i,a=n+(d.range.startColumn-o.range.endColumn)):(r=i+(d.range.startLineNumber-o.range.endLineNumber),a=d.range.startColumn):(r=d.range.startLineNumber,a=d.range.startColumn),d.text.length>0){const e=d.eolCount+1;l=1===e?new h.e(r,a,r,a+d.firstLineLength):new h.e(r,a,r+e-1,d.lastLineLength+1)}else l=new h.e(r,a,r,a);i=l.endLineNumber,n=l.endColumn,t.push(l),o=d}return t}static _sortOpsAscending(e,t){let i=h.e.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){let i=h.e.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class he{constructor(e,t,i,n,o,s,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e);let i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e<n;e++){let n=i[e].buffer.replace(/\r\n|\r|\n/g,t),o=te(n);i[e]=new ne(n,o)}const n=new de(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class ce{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(0===e.length)return;0===this.chunks.length&&r.uS(e)&&(this.BOM=r.c1,e=e.substr(1));const t=e.charCodeAt(e.length-1);13===t||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,s=0,r=!0;for(let a=0,l=t.length;a<l;a++){const d=t.charCodeAt(a);13===d?a+1<l&&10===t.charCodeAt(a+1)?(s++,e[i++]=a+2,a++):(n++,e[i++]=a+1):10===d?(o++,e[i++]=a+1):r&&9!==d&&(d<32||d>126)&&(r=!1)}const a=new ee(X(e),n,o,s,r);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new ne(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=r.Ut(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=r.ab(e))}finish(e=!0){return this._finish(),new he(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=te(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var ue=i(84993),ge=i(76345),pe=i(12062),me=i(18339),fe=i(63866),_e=i(42267),ve=i(84483);class be{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(e){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,e&&this._setBeginState(0,e)}flush(e){this._reset(e)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(e){e<this._len&&(this._valid[e]=!1),e<this._invalidLineStartIndex&&(this._invalidLineStartIndex=e)}_isValid(e){return e<this._len&&this._valid[e]}getBeginState(e){return e<this._len?this._beginState[e]:null}_ensureLine(e){for(;e>=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[],n=[];for(let e=0;e<t;e++)i[e]=null,n[e]=!1;this._beginState=ge.Zv(this._beginState,e,i),this._valid=ge.Zv(this._valid,e,n),this._len+=t}_setValid(e,t){this._ensureLine(e),this._valid[e]=t}_setBeginState(e,t){this._ensureLine(e),this._beginState[e]=t}setEndState(e,t,i){if(this._setValid(t,!0),this._invalidLineStartIndex=t+1,t===e-1)return;const n=this.getBeginState(t+1);if(null===n||!i.equals(n))return this._setBeginState(t+1,i),void this._invalidateLine(t+1);let o=t+1;for(;o<e&&this._isValid(o);)o++;this._invalidLineStartIndex=o}setFakeTokens(e){this._setValid(e,!1)}applyEdits(e,t){const i=e.endLineNumber-e.startLineNumber,n=t;for(let t=Math.min(i,n);t>=0;t--)this._invalidateLine(e.startLineNumber+t-1);this._acceptDeleteRange(e),this._acceptInsertText(new d.L(e.startLineNumber,e.startColumn),t)}_acceptDeleteRange(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)}}class Ce extends s.JT{constructor(e,t){super(),this._textModel=e,this._languageIdCodec=t,this._isDisposed=!1,this._tokenizationStateStore=new be,this._tokenizationSupport=null,this._register(me.RW.onDidChange((e=>{const t=this._textModel.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&(this._resetTokenizationState(),this._textModel.clearTokens())}))),this._register(this._textModel.onDidChangeContentFast((e=>{if(e.isFlush)this._resetTokenizationState();else{for(let t=0,i=e.changes.length;t<i;t++){const i=e.changes[t],[n]=(0,ae.QZ)(i.text);this._tokenizationStateStore.applyEdits(i.range,n)}this._beginBackgroundTokenization()}}))),this._register(this._textModel.onDidChangeAttached((()=>{this._beginBackgroundTokenization()}))),this._register(this._textModel.onDidChangeLanguage((()=>{this._resetTokenizationState(),this._textModel.clearTokens()}))),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=function(e){const t=e.getLanguageId();let i=e.isTooLargeForTokenization()?null:me.RW.get(t),o=null;if(i)try{o=i.getInitialState()}catch(e){(0,n.dL)(e),i=null}return[i,o]}(this._textModel);this._tokenizationSupport=e,this._tokenizationStateStore.flush(t),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&ve.xS((()=>{this._isDisposed||this._revalidateTokensNow()}))}_revalidateTokensNow(){const e=this._textModel.getLineCount(),t=new ae.DA,i=_e.G.create(!1);let n=-1;for(;this._hasLinesToTokenize()&&!(i.elapsed()>1)&&(n=this._tokenizeOneInvalidLine(t),!(n>=e)););this._beginBackgroundTokenization(),this._textModel.setTokens(t.tokens,!this._hasLinesToTokenize())}tokenizeViewport(e,t){const i=new ae.DA;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.tokens,!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new ae.DA;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens,!this._hasLinesToTokenize())}isCheapToTokenize(e){if(!this._tokenizationSupport)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e<t||this._textModel.getLineLength(e)<2048)}_hasLinesToTokenize(){return!!this._tokenizationSupport&&this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount()}_tokenizeOneInvalidLine(e){if(!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationSupport)return;const i=this._textModel.getLanguageId(),n=this._textModel.getLineCount(),o=t-1;for(let t=this._tokenizationStateStore.invalidLineStartIndex;t<=o;t++){const o=this._textModel.getLineContent(t+1),s=this._tokenizationStateStore.getBeginState(t),r=we(this._languageIdCodec,i,this._tokenizationSupport,o,!0,s);e.add(t+1,r.tokens),this._tokenizationStateStore.setEndState(n,t,r.endState),t=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,i){if(!this._tokenizationSupport)return;if(i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex)return void this._updateTokensUntilLine(e,i);let n=this._textModel.getLineFirstNonWhitespaceColumn(t);const o=[];let s=null;for(let e=t-1;n>1&&e>=1;e--){const t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t<n){if(s=this._tokenizationStateStore.getBeginState(e-1),s)break;o.push(this._textModel.getLineContent(e)),n=t}}s||(s=this._tokenizationSupport.getInitialState());const r=this._textModel.getLanguageId();let a=s;for(let e=o.length-1;e>=0;e--)a=we(this._languageIdCodec,r,this._tokenizationSupport,o[e],!1,a).endState;for(let n=t;n<=i;n++){const t=this._textModel.getLineContent(n),i=we(this._languageIdCodec,r,this._tokenizationSupport,t,!0,a);e.add(n,i.tokens),this._tokenizationStateStore.setFakeTokens(n-1),a=i.endState}}}function we(e,t,i,o,s,r){let a=null;if(i)try{a=i.tokenize2(o,s,r.clone(),0)}catch(e){(0,n.dL)(e)}return a||(a=(0,fe.mh)(e.encodeLanguageId(t),o,r,0)),pe.A.convertToEndOffset(a.tokens,o.length),a}var ye=i(42584),Se=i(16742),Le=i(56921),xe=i(72852),ke=i(66051),Ne=i(56834);class De{constructor(e,t,i){this.range=e,this.nestingLevel=t,this.isInvalid=i}}class Ee{constructor(e,t,i,n){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n}}class Ie extends Ee{constructor(e,t,i,n,o){super(e,t,i,n),this.minVisibleColumnIndentation=o}}class Te{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}const Me=Math.pow(2,26);function Re(e,t){return e*Me+t}function Ae(e){const t=e,i=Math.floor(t/Me);return new Te(i,t-i*Me)}function Oe(e,t){return t<Me?e+t:e-e%Me+t}function Pe(e,t){return e<t}function Fe(e,t){return e<=t}function Be(e,t){return e>=t}function We(e){return Re(e.lineNumber-1,e.column-1)}function Ve(e,t){const i=e,n=Math.floor(i/Me),o=i-n*Me,s=t,r=Math.floor(s/Me),a=s-r*Me;return new h.e(n+1,o+1,r+1,a+1)}class He{constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}}class ze{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>Ke.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx];return function(e,t){const i=e,n=t;if(n-i<=0)return 0;const o=Math.floor(i/Me),s=Math.floor(n/Me),r=n-s*Me;return o===s?Re(0,r-(i-o*Me)):Re(s-o,r)}(e,t?this.translateOldToCur(t.offsetObj):this.documentLength)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?Re(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):Re(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Ae(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Re(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):Re(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx<this.edits.length;){const t=this.edits[this.nextEditIdx],i=this.translateOldToCur(t.endOffsetAfterObj);if(!Fe(i,e))break;{this.nextEditIdx++;const e=Ae(i),n=Ae(this.translateOldToCur(t.endOffsetBeforeObj)),o=e.lineCount-n.lineCount;this.deltaOldToNewLineCount+=o;const s=this.deltaLineIdxInOld===t.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,r=e.columnCount-n.columnCount;this.deltaOldToNewColumnCount=s+r,this.deltaLineIdxInOld=t.endOffsetBeforeObj.lineCount}}}}class Ke{constructor(e,t,i){this.endOffsetBeforeObj=Ae(t),this.endOffsetAfterObj=Ae(Oe(e,i)),this.offsetObj=Ae(e)}static from(e){return new Ke(e.startOffset,e.endOffset,e.newLength)}}var Ue=i(1512);const je=new Array;class $e{constructor(e,t){this.items=e,this.additionalItems=t}static create(e,t){if(e<=128&&0===t.length){let i=$e.cache[e];return i||(i=new $e(e,t),$e.cache[e]=i),i}return new $e(e,t)}static getEmpty(){return this.empty}add(e,t){const i=t.getKey(e);let n=i>>5;if(0===n){const e=1<<i|this.items;return e===this.items?this:$e.create(e,this.additionalItems)}n--;const o=this.additionalItems.slice(0);for(;o.length<n;)o.push(0);return o[n]|=1<<(31&i),$e.create(this.items,o)}merge(e){const t=this.items|e.items;if(this.additionalItems===je&&e.additionalItems===je)return t===this.items?this:t===e.items?e:$e.create(t,je);const i=new Array;for(let t=0;t<Math.max(this.additionalItems.length,e.additionalItems.length);t++){const n=this.additionalItems[t]||0,o=e.additionalItems[t]||0;i.push(n|o)}return $e.create(t,i)}intersects(e){if(0!=(this.items&e.items))return!0;for(let t=0;t<Math.min(this.additionalItems.length,e.additionalItems.length);t++)if(0!=(this.additionalItems[t]&e.additionalItems[t]))return!0;return!1}}$e.cache=new Array(129),$e.empty=$e.create(0,je);const qe={getKey:e=>e};class Ze{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}class Ge{constructor(e){this._length=e}get length(){return this._length}}class Qe extends Ge{constructor(e,t,i,n,o){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=o}static create(e,t,i){let n=e.length;return t&&(n=Oe(n,t.length)),i&&(n=Oe(n,i.length)),new Qe(n,e,t,i,t?t.missingOpeningBracketIds:$e.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=new Array;return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new Qe(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation(Oe(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class Ye extends Ge{constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}static create23(e,t,i,n=!1){let o=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=Oe(o,t.length),s=s.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=Oe(o,i.length),s=s.merge(i.missingOpeningBracketIds)}return n?new Xe(o,e.listHeight+1,e,t,i,s):new Je(o,e.listHeight+1,e,t,i,s)}static getEmpty(){return new tt(0,0,[],$e.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;let t,i=this;for(;4===i.kind&&(t=i.childrenLength)>0;)i=i.getChild(t-1);return i.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n<e;n++){const e=this.getChild(n);t=Oe(t,e.length),i=i.merge(e.missingOpeningBracketIds)}this._length=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}computeMinIndentation(e,t){if(-1!==this.cachedMinIndentation)return this.cachedMinIndentation;let i=Number.MAX_SAFE_INTEGER,n=e;for(let e=0;e<this.childrenLength;e++){const o=this.getChild(e);o&&(i=Math.min(i,o.computeMinIndentation(n,t)),n=Oe(n,o.length))}return this.cachedMinIndentation=i,i}}class Je extends Ye{constructor(e,t,i,n,o,s){super(e,t,s),this._item1=i,this._item2=n,this._item3=o}get childrenLength(){return null!==this._item3?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(e,t){switch(e){case 0:return void(this._item1=t);case 1:return void(this._item2=t);case 2:return void(this._item3=t)}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}deepClone(){return new Je(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class Xe extends Je{toMutable(){return new Je(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class et extends Ye{constructor(e,t,i,n){super(e,t,n),this._children=i}get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,t){this._children[e]=t}get children(){return this._children}deepClone(){const e=new Array(this._children.length);for(let t=0;t<this._children.length;t++)e[t]=this._children[t].deepClone();return new et(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class tt extends et{toMutable(){return new et(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const it=[];class nt extends Ge{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return it}deepClone(){return this}}class ot extends nt{get kind(){return 0}get missingOpeningBracketIds(){return $e.getEmpty()}canBeReused(e){return!0}computeMinIndentation(e,t){const i=Ae(e),n=(0===i.columnCount?i.lineCount:i.lineCount+1)+1,o=(s=Oe(e,this.length),Math.floor(s/Me)+1);var s;let r=Number.MAX_SAFE_INTEGER;for(let e=n;e<=o;e++){const i=t.getLineFirstNonWhitespaceColumn(e),n=t.getLineContent(e);if(0===i)continue;const o=Ue.i.visibleColumnFromColumn(n,i,t.getOptions().tabSize);r=Math.min(r,o)}return r}}class st extends nt{constructor(e){super(e)}static create(e){const t=e,i=st.cacheByLength.get(t);if(i)return i;const n=new st(e);return st.cacheByLength.set(t,n),n}get kind(){return 1}get missingOpeningBracketIds(){return $e.getEmpty()}canBeReused(e){return!1}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}st.cacheByLength=new Map;class rt extends nt{constructor(e,t){super(t),this.missingOpeningBracketIds=e}get kind(){return 3}canBeReused(e){return!e.intersects(this.missingOpeningBracketIds)}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}class at{constructor(e,t,i,n,o){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=o}}class lt{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new dt(this.textModel,this.bracketTokens),this._offset=0,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return Re(this.textBufferLineCount,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=Oe(this._offset,e);const t=Ae(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=Oe(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class dt{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=e.length,e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const n=this.lineTokens,o=n.getCount();let s=null;if(this.lineTokenOffset<o){const r=n.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<o&&r===n.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const a=0===me.NX.getTokenType(r),l=n.getEndOffset(this.lineTokenOffset);if(a&&l!==this.lineCharOffset){const e=n.getLanguageId(this.lineTokenOffset),t=this.line.substring(this.lineCharOffset,l),i=this.bracketTokens.getSingleLanguageBracketTokens(e),o=i.regExpGlobal;if(o){o.lastIndex=0;const e=o.exec(t);e&&(s=i.getToken(e[0]),s&&(this.lineCharOffset+=e.index))}}if(i+=l-this.lineCharOffset,s){if(e!==this.lineIdx||t!==this.lineCharOffset){this.peekedToken=s;break}return this.lineCharOffset+=s.length,s}this.lineTokenOffset++,this.lineCharOffset=l}else{if(this.lineIdx===this.textBufferLineCount-1)break;if(this.lineIdx++,this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,i+=33,i>1e3)break}if(i>1500)break}const n=(o=e,s=t,r=this.lineIdx,a=this.lineCharOffset,o!==r?Re(r-o,a):Re(0,a-s));var o,s,r,a;return new at(n,0,-1,$e.getEmpty(),new ot(n))}}class ht{constructor(e,t){this.text=e,this._offset=0,this.idx=0;const i=t.getRegExpStr()?new RegExp(t.getRegExpStr()+"|\n","g"):null,n=[];let o,s=0,r=0,a=0,l=0;const d=new Array;for(let e=0;e<60;e++)d.push(new at(Re(0,e),0,-1,$e.getEmpty(),new ot(Re(0,e))));const h=new Array;for(let e=0;e<60;e++)h.push(new at(Re(1,e),0,-1,$e.getEmpty(),new ot(Re(1,e))));if(i)for(i.lastIndex=0;null!==(o=i.exec(e));){const e=o.index,i=o[0];if("\n"===i)s++,r=e+1;else{if(a!==e){let t;if(l===s){const i=e-a;if(i<d.length)t=d[i];else{const e=Re(0,i);t=new at(e,0,-1,$e.getEmpty(),new ot(e))}}else{const i=s-l,n=e-r;if(1===i&&n<h.length)t=h[n];else{const e=Re(i,n);t=new at(e,0,-1,$e.getEmpty(),new ot(e))}}n.push(t)}n.push(t.getToken(i)),a=e+i.length,l=s}}const c=e.length;if(a!==c){const e=l===s?Re(0,c-a):Re(s-l,c-r);n.push(new at(e,0,-1,$e.getEmpty(),new ot(e)))}this.length=Re(s,c-r),this.tokens=n}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new n.B8}}class ct{constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(e,t){function i(e,i){return t.getKey(`${e}:::${i}`)}const n=e.characterPair.getColorizedBrackets(),o=new Map,s=new Set;for(const[t,r]of n){s.add(t);let n=o.get(r);const a=i(e.languageId,t);n||(n={openingBrackets:$e.getEmpty(),first:a},o.set(r,n)),n.openingBrackets=n.openingBrackets.add(a,qe)}const r=new Map;for(const[e,t]of o){const i=Re(0,e.length);r.set(e,new at(i,2,t.first,t.openingBrackets,st.create(i)))}for(const t of s){const n=Re(0,t.length),o=i(e.languageId,t);r.set(t,new at(n,1,o,$e.getEmpty().add(o,qe),st.create(n)))}return new ct(r)}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map((e=>function(e){const t=(0,r.ec)(e);return/^[\w ]+$/.test(e)?`\\b${t}\\b`:t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e)}get isEmpty(){return 0===this.map.size}}class ut{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){const t=this.languageIdToBracketTokens.get(e);if(!t)return!1;const i=ct.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider).getRegExpStr();return t.getRegExpStr()!==i}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=ct.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function gt(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const n=i>>1;for(let o=0;o<n;o++){const n=o<<1;e[o]=Ye.create23(e[n],e[n+1],n+3===i?e[n+2]:null,t)}i=n}return Ye.create23(e[0],e[1],i>=3?e[2]:null,t)}function pt(e,t){return Math.abs(e.listHeight-t.listHeight)}function mt(e,t){return e.listHeight===t.listHeight?Ye.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const n=new Array;let o;for(;;){if(t.listHeight===i.listHeight){o=t;break}if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeLastElementMutable()}for(let e=n.length-1;e>=0;e--){const t=n[e];o?t.childrenLength>=3?o=Ye.create23(t.unappendChild(),o,null,!1):(t.appendChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?Ye.create23(e,o,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const n=new Array;for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeFirstElementMutable()}let o=t;for(let e=n.length-1;e>=0;e--){const t=n[e];o?t.childrenLength>=3?o=Ye.create23(o,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?Ye.create23(o,e,null,!1):e}(t,e)}class ft{constructor(e){this.lastOffset=0,this.nextNodes=[e],this.offsets=[0],this.idxs=[]}readLongestNodeAt(e,t){if(Pe(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=vt(this.nextNodes);if(!i)return;const n=vt(this.offsets);if(Pe(e,n))return;if(Pe(n,e))if(Oe(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=_t(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=_t(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=vt(this.offsets),t=vt(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=vt(this.nextNodes),n=_t(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push(Oe(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function _t(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function vt(e){return e.length>0?e[e.length-1]:void 0}function bt(e,t,i,n){return new Ct(e,t,i,n).parseDocument()}class Ct{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new ft(i):void 0,this.positionMapper=new ze(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList($e.getEmpty());return e||(e=Ye.getEmpty()),e}parseList(e){const t=new Array;for(;;){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;const n=this.parseChild(e);4===n.kind&&0===n.childrenLength||t.push(n)}const i=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;for(t++;t<e.length&&e[t].listHeight===n;)t++;return t-i>=2?gt(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let e=i();e;e=i())pt(n,o)<=pt(o,e)?(n=mt(n,o),o=e):o=mt(o,e);return mt(n,o)}(t):gt(t,this.createImmutableLists);return i}parseChild(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(0!==t){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>!!Pe(i.length,t)&&i.canBeReused(e)));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new rt(t.bracketIds,t.length);case 0:return t.astNode;case 1:const i=e.merge(t.bracketIds),n=this.parseList(i),o=this.tokenizer.peek();return o&&2===o.kind&&(o.bracketId===t.bracketId||o.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),Qe.create(t.astNode,n,o.astNode)):Qe.create(t.astNode,n,null);default:throw new Error("unexpected")}}}class wt extends s.JT{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.cache=this._register(new s.XK),this.onDidChangeEmitter=new o.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(e.onDidChangeOptions((e=>{this.cache.clear(),this.updateCache()}))),this._register(e.onDidChangeLanguage((e=>{this.cache.clear(),this.updateCache()}))),this._register(this.languageConfigurationService.onDidChange((e=>{var t;e.languageId&&!(null===(t=this.cache.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageId))||(this.cache.clear(),this.updateCache())})))}get isDocumentSupported(){return this.textModel.getValueLength()<=5e6}updateCache(){if(this.bracketsRequested&&this.isDocumentSupported){if(!this.cache.value){const i=new s.SL;this.cache.value=(e=i.add(new yt(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>null==t?void 0:t.dispose()}),i.add(this.cache.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.cache.clear(),this.onDidChangeEmitter.fire();var e,t}handleContentChanged(e){var t;null===(t=this.cache.value)||void 0===t||t.object.handleContentChanged(e)}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateCache(),(null===(t=this.cache.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||[]}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateCache(),(null===(t=this.cache.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||[]}getBracketsInRange(e){var t;return this.bracketsRequested=!0,this.updateCache(),(null===(t=this.cache.value)||void 0===t?void 0:t.object.getBracketsInRange(e))||[]}}class yt extends s.JT{constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new o.Q5,this.denseKeyProvider=new Ze,this.brackets=new ut(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this._register(e.onBackgroundTokenizationStateChanged((()=>{if(2===e.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}))),this._register(e.onDidChangeTokens((({ranges:e})=>{const t=e.map((e=>new He(Re(e.fromLineNumber-1,0),Re(e.toLineNumber,0),Re(e.toLineNumber-e.fromLineNumber+1,0))));this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}))),0===e.backgroundTokenizationState){const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new ht(this.textModel.getValue(),e);this.initialAstWithoutTokens=bt(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else 2===e.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):1===e.backgroundTokenizationState&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(e){return this.brackets.didLanguageChange(e)}handleContentChanged(e){const t=e.changes.map((e=>{const t=h.e.lift(e.range);return new He(We(t.getStartPosition()),We(t.getEndPosition()),function(e){const t=(0,r.uq)(e);return Re(t.length-1,t[t.length-1].length)}(e.text))})).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,i){const n=t;return bt(new lt(this.textModel,this.brackets),e,n,i)}getBracketsInRange(e){const t=Re(e.startLineNumber-1,e.startColumn-1),i=Re(e.endLineNumber-1,e.endColumn-1),n=new Array,o=this.initialAstWithoutTokens||this.astWithTokens;return St(o,0,o.length,t,i,n),n}getBracketPairsInRange(e,t){const i=new Array,n=We(e.getStartPosition()),o=We(e.getEndPosition()),s=this.initialAstWithoutTokens||this.astWithTokens,r=new Lt(i,t,this.textModel);return xt(s,0,s.length,n,o,r),i}}function St(e,t,i,n,o,s,r=0){if(1===e.kind){const e=Ve(t,i);s.push(new De(e,r-1,!1))}else if(3===e.kind){const e=Ve(t,i);s.push(new De(e,r-1,!0))}else if(4===e.kind)for(const a of e.children)i=Oe(t,a.length),Fe(t,o)&&Be(i,n)&&St(a,t,i,n,o,s,r),t=i;else if(2===e.kind){r++;{const a=e.openingBracket;i=Oe(t,a.length),Fe(t,o)&&Be(i,n)&&St(a,t,i,n,o,s,r),t=i}if(e.child){const a=e.child;i=Oe(t,a.length),Fe(t,o)&&Be(i,n)&&St(a,t,i,n,o,s,r),t=i}if(e.closingBracket){const a=e.closingBracket;i=Oe(t,a.length),Fe(t,o)&&Be(i,n)&&St(a,t,i,n,o,s,r),t=i}}}class Lt{constructor(e,t,i){this.result=e,this.includeMinIndentation=t,this.textModel=i}}function xt(e,t,i,n,o,s,r=0){var a;if(2===e.kind){const n=Oe(t,e.openingBracket.length);let o=-1;s.includeMinIndentation&&(o=e.computeMinIndentation(t,s.textModel)),s.result.push(new Ie(Ve(t,i),Ve(t,n),e.closingBracket?Ve(Oe(n,(null===(a=e.child)||void 0===a?void 0:a.length)||0),i):void 0,r,o)),r++}let l=t;for(const t of e.children){const e=l;l=Oe(l,t.length),Fe(e,o)&&Fe(n,l)&&xt(t,e,l,n,o,s,r)}}var kt=i(81312),Nt=i(65700);class Dt extends s.JT{constructor(e){super(),this.textModel=e,this.colorProvider=new Et,this.onDidChangeEmitter=new o.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.onDidChangeOptions((t=>{this.colorizationOptions=e.getOptions().bracketPairColorizationOptions}))),this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}getDecorationsInRange(e,t,i){if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];const n=new Array,o=this.textModel.bracketPairs.getBracketsInRange(e);for(const e of o)n.push({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e)},ownerId:0,range:e.range});return n}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new h.e(1,1,this.textModel.getLineCount(),1),e,t):[]}}class Et{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,Nt.Ic)(((e,t)=>{const i=[kt.zJ,kt.Vs,kt.CE,kt.UP,kt.r0,kt.m1],n=new Et;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(kt.ts)}; }`);let o=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}}));var It=i(34587),Tt=function(e,t){return function(i,n){t(i,n,e)}};function Mt(e,t){return("string"==typeof e?function(e){const t=new ce;return t.acceptChunk(e),t.finish()}(e):e).create(t)}let Rt=0;class At{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,i=0;for(;;){let n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const Ot=()=>{throw new Error("Invalid change accessor")};class Pt{constructor(){this._searchCanceledBrand=void 0}}function Ft(e){return e instanceof Pt?null:e}Pt.INSTANCE=new Pt;let Bt=class e extends s.JT{constructor(t,i,n,s=null,l,d,c){super(),this._undoRedoService=l,this._modeService=d,this._languageConfigurationService=c,this._onWillDispose=this._register(new o.Q5),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Yt((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new o.Q5),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new o.Q5),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new o.Q5),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new o.Q5),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new o.Q5),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeContentOrInjectedText=this._register(new o.Q5),this.onDidChangeContentOrInjectedText=this._onDidChangeContentOrInjectedText.event,this._eventEmitter=this._register(new Jt),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new o.Q5),this.onBackgroundTokenizationStateChanged=this._onBackgroundTokenizationStateChanged.event,this._register(this._eventEmitter.fastEvent((e=>{this._onDidChangeContentOrInjectedText.fire(e.rawContentChangedEvent)}))),Rt++,this.id="$model"+Rt,this.isForSimpleWidget=i.isForSimpleWidget,this._associatedResource=null==s?a.o.parse("inmemory://model/"+Rt):s,this._attachedEditorCount=0;const{textBuffer:u,disposable:p}=Mt(t,i.defaultEOL);this._buffer=u,this._bufferDisposable=p,this._options=e.resolveOptions(this._buffer,i);const m=this._buffer.getLineCount(),f=this._buffer.getValueLengthInRange(new h.e(1,1,m,this._buffer.getLineLength(m)+1),0);i.largeFileOptimizations?this._isTooLargeForTokenization=f>e.LARGE_FILE_SIZE_THRESHOLD||m>e.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=f>e.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=n||fe.TG,this._languageRegistryListener=this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._instanceId=r.PJ(Rt),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new zt,this._commandManager=new g.NL(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new ae.Rl(this._modeService.languageIdCodec),this._tokens2=new ae.cx(this._modeService.languageIdCodec),this._tokenization=new Ce(this,this._modeService.languageIdCodec),this._bracketPairColorizer=this._register(new wt(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Dt(this)),this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})))}static resolveOptions(e,t){if(t.detectIndentation){const i=f(e,t.tabSize,t.insertSpaces);return new u.dJ({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new u.dJ({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}onDidChangeContentFast(e){return this._eventEmitter.fastEvent((t=>e(t.contentChangedEvent)))}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}get bracketPairs(){return this._bracketPairColorizer}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(2===this._backgroundTokenizationState)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new de([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._bracketPairColorizer.handleContentChanged(t),this._isDisposing||this._eventEmitter.fire(new ue.fV(e,t))}setValue(e){if(this._assertNotDisposed(),null===e)return;const{textBuffer:t,disposable:i}=Mt(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,s,r){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:s,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new zt,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new ue.dQ([new ue.Jx],this._versionId,!1,!1),this._createContentChanged2(new h.e(1,1,o,s),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new ue.dQ([new ue.CZ],this._versionId,!1,!1),this._createContentChanged2(new h.e(1,1,o,s),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i<n;i++){const n=t[i],o=n.range,s=n.cachedAbsoluteStart-n.start,r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),a=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);n.cachedAbsoluteStart=r,n.cachedAbsoluteEnd=a,n.cachedVersionId=e,n.start=r-s,n.end=a-s,P(n)}}onBeforeAttached(){this._attachedEditorCount++,1===this._attachedEditorCount&&this._onDidChangeAttached.fire(void 0)}onBeforeDetached(){this._attachedEditorCount--,0===this._attachedEditorCount&&this._onDidChangeAttached.fire(void 0)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.indentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new u.dJ({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:s});if(this._options.equals(r))return;let a=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();let i=f(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}static _normalizeIndentationFromWhitespace(e,t,i){let n=0;for(let i=0;i<e.length;i++)"\t"===e.charAt(i)?n+=t:n++;let o="";if(!i){let e=Math.floor(n/t);n%=t;for(let t=0;t<e;t++)o+="\t"}for(let e=0;e<n;e++)o+=" ";return o}static normalizeIndentation(t,i,n){let o=r.LC(t);return-1===o&&(o=t.length),e._normalizeIndentationFromWhitespace(t.substring(0,o),i,n)+t.substring(o)}normalizeIndentation(t){return this._assertNotDisposed(),e.normalizeIndentation(t,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(r.Qe.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new At(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o=Math.floor("number"!=typeof i||isNaN(i)?1:i),s=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(o<1)o=1,s=1;else if(o>t)o=t,s=this.getLineMaxColumn(o);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(o);s>=e&&(s=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof r||isNaN(r)?1:r),d=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,d=1;else if(l>t)l=t,d=this.getLineMaxColumn(l);else if(d<=1)d=1;else{const e=this.getLineMaxColumn(l);d>=e&&(d=e)}return i===o&&n===s&&r===l&&a===d&&e instanceof h.e&&!(e instanceof c.Y)?e:new h.e(o,s,l,d)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(r.ZG(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(n<1)return new d.L(1,1);if(n>s)return new d.L(s,this.getLineMaxColumn(s));if(o<=1)return new d.L(n,1);const a=this.getLineMaxColumn(n);if(o>=a)return new d.L(n,a);if(1===i){const e=this._buffer.getLineCharCode(n,o-2);if(r.ZG(e))return new d.L(n,o-1)}return new d.L(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof d.L&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,s,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,a=r.ZG(e),l=r.ZG(t);return!a&&!l}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof h.e&&!(e instanceof c.Y)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,s=i.lineNumber,a=i.column;{const e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=a>1&&a<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,a-2):0,i=r.ZG(e),l=r.ZG(t);return i||l?n===s&&o===a?new h.e(n,o-1,s,a-1):i&&l?new h.e(n,o-1,s,a+1):i?new h.e(n,o-1,s,a):new h.e(n,o,s,a+1):new h.e(n,o,s,a)}}modifyPosition(e,t){this._assertNotDisposed();let i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new h.e(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,s,r=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>h.e.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let d;if(l.push(a.reduce(((e,t)=>h.e.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new Y.bc(e,i,n,o).parseSearchRequest();if(!t)return[];d=e=>this.findMatchesLineByLine(e,t,s,r)}else d=t=>Y.pM.findMatches(this,new Y.bc(e,i,n,o),t,s,r);return l.map(d).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new Y.bc(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new h.e(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),d=this.findMatchesLineByLine(l,t,s,1);return Y.pM.findNextMatch(this,new Y.bc(e,i,n,o),r,s),d.length>0?d[0]:(l=new h.e(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),d=this.findMatchesLineByLine(l,t,s,1),d.length>0?d[0]:null)}return Y.pM.findNextMatch(this,new Y.bc(e,i,n,o),r,s)}findPreviousMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);return Y.pM.findPreviousMatch(this,new Y.bc(e,i,n,o),r,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof u.Qi?e:new u.Qi(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this._validateEditOperation(e[i]);return t}pushEditOperations(e,t,i){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){let i=t.map((e=>({range:this.validateRange(e.range),text:e.text}))),n=!0;if(e)for(let t=0,o=e.length;t<o;t++){let o=e[t],s=!1;for(let e=0,t=i.length;e<t;e++){let t=i[e].range,n=t.startLineNumber>o.endLineNumber,r=o.startLineNumber>t.endLineNumber;if(!n&&!r){s=!0;break}}if(!s){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;e<n;e++){let n=this._trimAutoWhitespaceLines[e],o=this.getLineMaxColumn(n),s=!0;for(let e=0,t=i.length;e<t;e++){let t=i[e].range,r=i[e].text;if(!(n<t.startLineNumber||n>t.endLineNumber||n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1))){s=!1;break}}if(s){const e=new h.e(n,1,n,o);t.push(new u.Qi(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new h.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new h.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),s=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==s.length){for(let e=0,t=s.length;e<t;e++){const t=s[e],[i,n,o]=(0,ae.QZ)(t.text);this._tokens.acceptEdit(t.range,i,n),this._tokens2.acceptEdit(t.range,i,n,o,t.text.length>0?t.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(t.rangeOffset,t.rangeLength,t.text.length,t.forceMoveMarkers)}let e=[];this._increaseVersionId();let t=i;for(let i=0,n=s.length;i<n;i++){const n=s[i],[r]=(0,ae.QZ)(n.text);this._onDidChangeDecorations.fire();const a=n.range.startLineNumber,l=n.range.endLineNumber,h=l-a,c=r,u=Math.min(h,c),g=c-h,p=o-t-g+a,m=p,f=p+c,_=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new d.L(m,1)),this.getOffsetAt(new d.L(f,this.getLineMaxColumn(f))),0),v=ue.gk.fromDecorations(_),b=new ge.H9(v);for(let t=u;t>=0;t--){const i=a+t,n=p+t;b.takeFromEndWhile((e=>e.lineNumber>n));const o=b.takeFromEndWhile((e=>e.lineNumber===n));e.push(new ue.rU(i,this.getLineContent(n),o))}if(u<h){const t=a+u;e.push(new ue.lN(t+1,l))}if(u<c){const i=new ge.H9(v),n=a+u,s=c-u,r=o-t-s+n+1;let l=[],d=[];for(let e=0;e<s;e++){let t=r+e;d[e]=this.getLineContent(t),i.takeWhile((e=>e.lineNumber<t)),l[e]=i.takeWhile((e=>e.lineNumber===t))}e.push(new ue.Tx(n+1,a+c,d,l))}t+=g}this._emitContentChangedEvent(new ue.dQ(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===n.reverseEdits?void 0:n.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=[...e].map((e=>new ue.rU(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeContentOrInjectedText.fire(new ue.D8(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Qt(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)},o=null;try{o=t(i)}catch(e){(0,n.dL)(e)}return i.addDecoration=Ot,i.changeDecoration=Ot,i.changeDecorationOptions=Ot,i.removeDecoration=Ot,i.deltaDecorations=Ot,o}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Gt[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),r=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),s,r,o),n.setOptions(Gt[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;e<i;e++){const i=t[e];this._decorationsTree.delete(i),delete this._decorations[i.id]}}getDecorationOptions(e){const t=this._decorations[e];return t?t.options:null}getDecorationRange(e){const t=this._decorations[e];return t?this._decorationsTree.getNodeRange(this,t):null}getLineDecorations(e,t=0,i=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){let o=this.getLineCount(),s=Math.min(o,Math.max(1,e)),r=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(r);const l=new h.e(s,1,r,a),d=this._getDecorationsInRange(l,i,n);return d.push(...this._decorationProvider.getDecorationsInRange(l,i,n)),d}getDecorationsInRange(e,t=0,i=!1){let n=this.validateRange(e);const o=this._getDecorationsInRange(n,t,i);return o.push(...this._decorationProvider.getDecorationsInRange(n,t,i)),o}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return ue.gk.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,o,t,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),s=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,s,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}n!==o?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),o=t.length;let s=0;const r=i.length;let a=0,l=new Array(r);for(;s<o||a<r;){let d=null;if(s<o){do{d=this._decorations[t[s++]]}while(!d&&s<o);if(d){if(d.options.after){const e=this._decorationsTree.getNodeRange(this,d);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(d.options.before){const e=this._decorationsTree.getNodeRange(this,d);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}this._decorationsTree.delete(d),this._onDidChangeDecorations.checkAffectedAndFire(d.options)}}if(a<r){if(!d){const e=++this._lastDecorationId,t=`${this._instanceId};${e}`;d=new x(t,0,0),this._decorations[t]=d}const t=i[a],o=this._validateRangeRelaxedNoAllocations(t.range),s=Qt(t.options),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),h=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);d.ownerId=e,d.reset(n,r,h,o),d.setOptions(s),d.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber),d.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(s),this._decorationsTree.insert(d),l[a]=d.id,a++}else d&&delete this._decorations[d.id]}return l}setTokens(e,t=!1){if(0!==e.length){let t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];let o=0,s=0,r=!1;for(let e=0,t=n.tokens.length;e<t;e++){const t=n.startLineNumber+e;r?(this._tokens.setTokens(this._languageId,t-1,this._buffer.getLineLength(t),n.tokens[e],!1),s=t):this._tokens.setTokens(this._languageId,t-1,this._buffer.getLineLength(t),n.tokens[e],!0)&&(r=!0,o=t,s=t)}r&&t.push({fromLineNumber:o,toLineNumber:s})}t.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageId,e-1,t);return this._tokens2.addSemanticTokens(e,i)}getLanguageId(){return this._languageId}setMode(e){if(this._languageId===e)return;let t={oldLanguage:this._languageId,newLanguage:e};this._languageId=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new d.L(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(t){this._assertNotDisposed();const i=this.validatePosition(t),n=this.getLineContent(i.lineNumber),o=this._getLineTokens(i.lineNumber),s=o.findTokenIndexAtOffset(i.column-1),[r,a]=e._findLanguageBoundaries(o,s),l=(0,ye.t2)(i.column,this.getLanguageConfiguration(o.getLanguageId(s)).getWordDefinition(),n.substring(r,a),r);if(l&&l.startColumn<=t.column&&t.column<=l.endColumn)return l;if(s>0&&r===i.column-1){const[r,a]=e._findLanguageBoundaries(o,s-1),l=(0,ye.t2)(i.column,this.getLanguageConfiguration(o.getLanguageId(s-1)).getWordDefinition(),n.substring(r,a),r);if(l&&l.startColumn<=t.column&&t.column<=l.endColumn)return l}return null}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,s=e.getCount();n<s&&e.getLanguageId(n)===i;n++)o=e.getEndOffset(n);return[n,o]}getWordUntilPosition(e){const t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}findMatchingBracketUp(e,t){let i=e.toLowerCase(),n=this.validatePosition(t),o=this._getLineTokens(n.lineNumber),s=o.getLanguageId(o.findTokenIndexAtOffset(n.column-1)),r=this.getLanguageConfiguration(s).brackets;if(!r)return null;let a=r.textIsBracket[i];return a?Ft(this._findMatchingBracketUp(a,n,null)):null}matchBracket(e){return this._matchBracket(this.validatePosition(e))}_establishBracketSearchOffsets(e,t,i,n){const o=t.getCount(),s=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){const i=t.getEndOffset(e);if(i<=r)break;if((0,Le.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){r=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e<o;e++){const i=t.getStartOffset(e);if(i>=a)break;if((0,Le.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){a=i;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e){const t=e.lineNumber,i=this._getLineTokens(t),n=this._buffer.getLineContent(t),o=i.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const s=this.getLanguageConfiguration(i.getLanguageId(o)).brackets;if(s&&!(0,Le.Bu)(i.getStandardTokenType(o))){let{searchStartOffset:r,searchEndOffset:a}=this._establishBracketSearchOffsets(e,i,s,o),l=null;for(;;){const i=xe.Vr.findNextBracketInRange(s.forwardRegex,t,n,r,a);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=n.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),t=this._matchFoundBracket(i,s.textIsBracket[e],s.textIsOpenBracket[e],null);if(t){if(t instanceof Pt)return null;l=t}}r=i.endColumn-1}if(l)return l}if(o>0&&i.getStartOffset(o)===e.column-1){const s=o-1,r=this.getLanguageConfiguration(i.getLanguageId(s)).brackets;if(r&&!(0,Le.Bu)(i.getStandardTokenType(s))){let{searchStartOffset:o,searchEndOffset:a}=this._establishBracketSearchOffsets(e,i,r,s);const l=xe.Vr.findPrevBracketInRange(r.reversedRegex,t,n,o,a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn){const e=n.substring(l.startColumn-1,l.endColumn-1).toLowerCase(),t=this._matchFoundBracket(l,r.textIsBracket[e],r.textIsOpenBracket[e],null);if(t)return t instanceof Pt?null:t}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof Pt?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,o=e.reversedRegex;let s=-1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return Pt.INSTANCE;const d=xe.Vr.findPrevBracketInRange(o,t,n,a,l);if(!d)break;const h=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return d;l=d.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this._getLineTokens(e),o=i.getCount(),s=this._buffer.getLineContent(e);let r=o-1,l=s.length,d=s.length;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1);let h=!0;for(;r>=0;r--){const t=i.getLanguageId(r)===n&&!(0,Le.Bu)(i.getStandardTokenType(r));if(t)h?l=i.getStartOffset(r):(l=i.getStartOffset(r),d=i.getEndOffset(r));else if(h&&l!==d){const t=a(e,s,l,d);if(t)return t}h=t}if(h&&l!==d){const t=a(e,s,l,d);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,o=e.forwardRegex;let s=1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return Pt.INSTANCE;const d=xe.Vr.findNextBracketInRange(o,t,n,a,l);if(!d)break;const h=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return d;a=d.endColumn-1}return null},l=this.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this._getLineTokens(e),o=i.getCount(),s=this._buffer.getLineContent(e);let r=0,l=0,d=0;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1);let h=!0;for(;r<o;r++){const t=i.getLanguageId(r)===n&&!(0,Le.Bu)(i.getStandardTokenType(r));if(t)h||(l=i.getStartOffset(r)),d=i.getEndOffset(r);else if(h&&l!==d){const t=a(e,s,l,d);if(t)return t}h=t}if(h&&l!==d){const t=a(e,s,l,d);if(t)return t}}return null}findPrevBracket(e){const t=this.validatePosition(e);let i=null,n=null;for(let e=t.lineNumber;e>=1;e--){const o=this._getLineTokens(e),s=o.getCount(),r=this._buffer.getLineContent(e);let a=s-1,l=r.length,d=r.length;if(e===t.lineNumber){a=o.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1;const e=o.getLanguageId(a);i!==e&&(i=e,n=this.getLanguageConfiguration(i).brackets)}let h=!0;for(;a>=0;a--){const t=o.getLanguageId(a);if(i!==t){if(n&&h&&l!==d){const t=xe.Vr.findPrevBracketInRange(n.reversedRegex,e,r,l,d);if(t)return this._toFoundBracket(n,t);h=!1}i=t,n=this.getLanguageConfiguration(i).brackets}const s=!!n&&!(0,Le.Bu)(o.getStandardTokenType(a));if(s)h?l=o.getStartOffset(a):(l=o.getStartOffset(a),d=o.getEndOffset(a));else if(n&&h&&l!==d){const t=xe.Vr.findPrevBracketInRange(n.reversedRegex,e,r,l,d);if(t)return this._toFoundBracket(n,t)}h=s}if(n&&h&&l!==d){const t=xe.Vr.findPrevBracketInRange(n.reversedRegex,e,r,l,d);if(t)return this._toFoundBracket(n,t)}}return null}findNextBracket(e){const t=this.validatePosition(e),i=this.getLineCount();let n=null,o=null;for(let e=t.lineNumber;e<=i;e++){const i=this._getLineTokens(e),s=i.getCount(),r=this._buffer.getLineContent(e);let a=0,l=0,d=0;if(e===t.lineNumber){a=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1;const e=i.getLanguageId(a);n!==e&&(n=e,o=this.getLanguageConfiguration(n).brackets)}let h=!0;for(;a<s;a++){const t=i.getLanguageId(a);if(n!==t){if(o&&h&&l!==d){const t=xe.Vr.findNextBracketInRange(o.forwardRegex,e,r,l,d);if(t)return this._toFoundBracket(o,t);h=!1}n=t,o=this.getLanguageConfiguration(n).brackets}const s=!!o&&!(0,Le.Bu)(i.getStandardTokenType(a));if(s)h||(l=i.getStartOffset(a)),d=i.getEndOffset(a);else if(o&&h&&l!==d){const t=xe.Vr.findNextBracketInRange(o.forwardRegex,e,r,l,d);if(t)return this._toFoundBracket(o,t)}h=s}if(o&&h&&l!==d){const t=xe.Vr.findNextBracketInRange(o.forwardRegex,e,r,l,d);if(t)return this._toFoundBracket(o,t)}}return null}findEnclosingBrackets(e,t){let i;if(void 0===t)i=null;else{const e=Date.now();i=()=>Date.now()-e<=t}const n=this.validatePosition(e),o=this.getLineCount(),s=new Map;let r=[];const a=(e,t)=>{if(!s.has(e)){let i=[];for(let e=0,n=t?t.brackets.length:0;e<n;e++)i[e]=0;s.set(e,i)}r=s.get(e)};let l=0;const d=(e,t,n,o,s)=>{for(;;){if(i&&++l%100==0&&!i())return Pt.INSTANCE;const a=xe.Vr.findNextBracketInRange(e.forwardRegex,t,n,o,s);if(!a)break;const d=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),h=e.textIsBracket[d];if(h&&(h.isOpen(d)?r[h.index]++:h.isClose(d)&&r[h.index]--,-1===r[h.index]))return this._matchFoundBracket(a,h,!1,i);o=a.endColumn-1}return null};let h=null,c=null;for(let e=n.lineNumber;e<=o;e++){const t=this._getLineTokens(e),i=t.getCount(),o=this._buffer.getLineContent(e);let s=0,r=0,l=0;if(e===n.lineNumber){s=t.findTokenIndexAtOffset(n.column-1),r=n.column-1,l=n.column-1;const e=t.getLanguageId(s);h!==e&&(h=e,c=this.getLanguageConfiguration(h).brackets,a(h,c))}let u=!0;for(;s<i;s++){const i=t.getLanguageId(s);if(h!==i){if(c&&u&&r!==l){const t=d(c,e,o,r,l);if(t)return Ft(t);u=!1}h=i,c=this.getLanguageConfiguration(h).brackets,a(h,c)}const n=!!c&&!(0,Le.Bu)(t.getStandardTokenType(s));if(n)u||(r=t.getStartOffset(s)),l=t.getEndOffset(s);else if(c&&u&&r!==l){const t=d(c,e,o,r,l);if(t)return Ft(t)}u=n}if(c&&u&&r!==l){const t=d(c,e,o,r,l);if(t)return Ft(t)}}return null}_toFoundBracket(e,t){if(!t)return null;let i=this.getValueInRange(t);i=i.toLowerCase();let n=e.textIsBracket[i];return n?{range:t,open:n.open,close:n.close,isOpen:e.textIsOpenBracket[i]}:null}static computeIndentLevel(e,t){let i=0,n=0,o=e.length;for(;n<o;){let o=e.charCodeAt(n);if(32===o)i++;else{if(9!==o)break;i=i-i%t+t}n++}return n===o?-1:i}_computeIndentLevel(t){return e.computeIndentLevel(this._buffer.getLineContent(t+1),this._options.tabSize)}getActiveIndentGuide(e,t,i){this._assertNotDisposed();const n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this._languageId).foldingRules,s=Boolean(o&&o.offSide);let r=-2,a=-1,l=-2,d=-1;const h=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,d=-1;for(let t=e;t<n;t++){let e=this._computeIndentLevel(t);if(e>=0){l=t,d=e;break}}}};let c=-2,u=-1,g=-2,p=-1;const m=e=>{if(-2===c){c=-1,u=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){c=t,u=e;break}}}if(-1!==g&&(-2===g||g<e-1)){g=-1,p=-1;for(let t=e;t<n;t++){let e=this._computeIndentLevel(t);if(e>=0){g=t,p=e;break}}}};let f=0,_=!0,v=0,b=!0,C=0,w=0;for(let o=0;_||b;o++){const r=e-o,g=e+o;o>1&&(r<1||r<t)&&(_=!1),o>1&&(g>n||g>i)&&(b=!1),o>5e4&&(_=!1,b=!1);let y=-1;if(_){const e=this._computeIndentLevel(r-1);e>=0?(l=r-1,d=e,y=Math.ceil(e/this._options.indentSize)):(h(r),y=this._getIndentLevelForWhitespaceLine(s,a,d))}let S=-1;if(b){const e=this._computeIndentLevel(g-1);e>=0?(c=g-1,u=e,S=Math.ceil(e/this._options.indentSize)):(m(g),S=this._getIndentLevelForWhitespaceLine(s,u,p))}if(0!==o){if(1===o){if(g<=n&&S>=0&&w+1===S){_=!1,f=g,v=g,C=S;continue}if(r>=1&&y>=0&&y-1===w){b=!1,f=r,v=r,C=y;continue}if(f=e,v=e,C=w,0===C)return{startLineNumber:f,endLineNumber:v,indent:C}}_&&(y>=C?f=r:_=!1),b&&(S>=C?v=g:b=!1)}else w=y}return{startLineNumber:f,endLineNumber:v,indent:C}}getLinesBracketGuides(e,t,i,n){var o,s,a,l,d;const c=[],g=this._bracketPairColorizer.getBracketPairsInRangeWithMinIndentation(new h.e(e,1,t,this.getLineMaxColumn(t)));let p;if(i&&g.length>0){const n=e<=i.lineNumber&&i.lineNumber<=t?g.filter((e=>e.range.containsPosition(i))):this._bracketPairColorizer.getBracketPairsInRange(h.e.fromPositions(i));p=null===(o=(0,ge.dF)(n,(e=>e.range.startLineNumber!==e.range.endLineNumber)))||void 0===o?void 0:o.range}const m=new ge.H9(g),f=new Array,_=new Array,v=new Wt;for(let i=e;i<=t;i++){let e=new Array;_.length>0&&(e=e.concat(_),_.length=0),c.push(e);for(const e of m.takeWhile((e=>e.openingBracketRange.startLineNumber<=i))||[]){if(e.range.startLineNumber===e.range.endLineNumber)continue;const t=Math.min(this.getVisibleColumnFromPosition(e.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition(null!==(a=null===(s=e.closingBracketRange)||void 0===s?void 0:s.getStartPosition())&&void 0!==a?a:e.range.getEndPosition()),e.minVisibleColumnIndentation+1);let i=!1;e.closingBracketRange&&r.LC(this.getLineContent(e.closingBracketRange.startLineNumber))<e.closingBracketRange.startColumn-1&&(i=!0);const n=e.openingBracketRange.getStartPosition(),o=null!==(d=null===(l=e.closingBracketRange)||void 0===l?void 0:l.getStartPosition())&&void 0!==d?d:e.range.getEndPosition();void 0===e.closingBracketRange?f[e.nestingLevel]=null:f[e.nestingLevel]={nestingLevel:e.nestingLevel,guideVisibleColumn:t,start:n,visibleStartColumn:this.getVisibleColumnFromPosition(n),end:o,visibleEndColumn:this.getVisibleColumnFromPosition(o),bracketPair:e,renderHorizontalEndLineAtTheBottom:i}}for(const t of f){if(!t)continue;const o=p&&t.bracketPair.range.equalsRange(p),s=v.getInlineClassNameOfLevel(t.nestingLevel)+(n.highlightActive&&o?" "+v.activeClassName:"");(o&&n.horizontalGuides!==u.s6.Disabled||n.includeInactive&&n.horizontalGuides===u.s6.Enabled)&&(t.start.lineNumber===i&&t.guideVisibleColumn<t.visibleStartColumn&&e.push(new u.UO(t.guideVisibleColumn,s,new u.vW(!1,t.start.column))),t.end.lineNumber===i+1&&t.guideVisibleColumn<t.visibleEndColumn&&_.push(new u.UO(t.guideVisibleColumn,s,new u.vW(!t.renderHorizontalEndLineAtTheBottom,t.end.column))))}let t=Number.MAX_SAFE_INTEGER;for(let o=f.length-1;o>=0;o--){const s=f[o];if(!s)continue;const r=n.highlightActive&&p&&s.bracketPair.range.equalsRange(p),a=v.getInlineClassNameOfLevel(s.nestingLevel)+(r?" "+v.activeClassName:"");(r||n.includeInactive)&&s.renderHorizontalEndLineAtTheBottom&&s.end.lineNumber===i+1&&_.push(new u.UO(s.guideVisibleColumn,a,null)),s.end.lineNumber<=i||s.start.lineNumber>=i||s.guideVisibleColumn>=t&&!r||(t=s.guideVisibleColumn,(r||n.includeInactive)&&e.push(new u.UO(s.guideVisibleColumn,a,null)))}e.sort(((e,t)=>e.visibleColumn-t.visibleColumn))}return c}getVisibleColumnFromPosition(e){return Ue.i.visibleColumnFromColumn(this.getLineContent(e.lineNumber),e.column,this._options.tabSize)+1}getLinesIndentGuides(e,t){this._assertNotDisposed();const i=this.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.getLanguageConfiguration(this._languageId).foldingRules,o=Boolean(n&&n.offSide);let s=new Array(t-e+1),r=-2,a=-1,l=-2,d=-1;for(let n=e;n<=t;n++){let t=n-e;const h=this._computeIndentLevel(n-1);if(h>=0)r=n-1,a=h,s[t]=Math.ceil(h/this._options.indentSize);else{if(-2===r){r=-1,a=-1;for(let e=n-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){r=e,a=t;break}}}if(-1!==l&&(-2===l||l<n-1)){l=-1,d=-1;for(let e=n;e<i;e++){let t=this._computeIndentLevel(e);if(t>=0){l=e,d=t;break}}}s[t]=this._getIndentLevelForWhitespaceLine(o,a,d)}}return s}_getIndentLevelForWhitespaceLine(e,t,i){return-1===t||-1===i?0:t<i?1+Math.floor(t/this._options.indentSize):t===i||e?Math.ceil(i/this._options.indentSize):1+Math.floor(i/this._options.indentSize)}normalizePosition(e,t){return e}getLineIndentColumn(e){return function(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}(this.getLineContent(e))+1}};Bt.MODEL_SYNC_LIMIT=52428800,Bt.LARGE_FILE_SIZE_THRESHOLD=20971520,Bt.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,Bt.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:l.DB.tabSize,indentSize:l.DB.indentSize,insertSpaces:l.DB.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:l.DB.trimAutoWhitespace,largeFileOptimizations:l.DB.largeFileOptimizations,bracketPairColorizationOptions:l.DB.bracketPairColorizationOptions},Bt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Tt(4,Ne.tJ),Tt(5,It.h),Tt(6,Se.c_)],Bt);class Wt{constructor(){this.activeClassName="indent-active"}getInlineClassNameOfLevel(e){return"bracket-indent-guide lvl-"+e%30}}function Vt(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Ht(e){return!!e.options.after||!!e.options.before}class zt{constructor(){this._decorationsTree0=new N,this._decorationsTree1=new N,this._injectedTextDecorationsTree=new N}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,o){const s=e.getVersionId(),r=this._intervalSearch(t,i,n,o,s);return this._ensureNodesHaveRanges(e,r)}_intervalSearch(e,t,i,n,o){const s=this._decorationsTree0.intervalSearch(e,t,i,n,o),r=this._decorationsTree1.intervalSearch(e,t,i,n,o),a=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,o);return s.concat(r).concat(a)}getInjectedTextInInterval(e,t,i,n){const o=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,o);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n){const o=e.getVersionId(),s=this._search(t,i,n,o);return this._ensureNodesHaveRanges(e,s)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const i=this._decorationsTree0.search(e,t,n),o=this._decorationsTree1.search(e,t,n),s=this._injectedTextDecorationsTree.search(e,t,n);return i.concat(o).concat(s)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){Ht(e)?this._injectedTextDecorationsTree.insert(e):Vt(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Ht(e)?this._injectedTextDecorationsTree.delete(e):Vt(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Ht(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Vt(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function Kt(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class Ut{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class jt extends Ut{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:u.sh.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;let i=e?t.getColor(e.id):null;return i?i.toString():""}}class $t extends Ut{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?ke.Il.fromHex(e):t.getColor(e.id)}}class qt{constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1}static from(e){return e instanceof qt?e:new qt(e)}}class Zt{constructor(e){this.description=e.description,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Kt(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new jt(e.overviewRuler):null,this.minimap=e.minimap?new $t(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?Kt(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Kt(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Kt(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Kt(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Kt(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Kt(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Kt(e.afterContentClassName):null,this.after=e.after?qt.from(e.after):null,this.before=e.before?qt.from(e.before):null}static register(e){return new Zt(e)}static createDynamic(e){return new Zt(e)}}Zt.EMPTY=Zt.register({description:"empty"});const Gt=[Zt.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Zt.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Zt.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Zt.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Qt(e){return e instanceof Zt?e:Zt.createDynamic(e)}class Yt extends s.JT{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new o.Q5),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,0===this._deferredCnt){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class Jt extends s.JT{constructor(){super(),this._fastEmitter=this._register(new o.Q5),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new o.Q5),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},84993:(e,t,i)=>{i.d(t,{CZ:()=>l,D8:()=>h,Jx:()=>n,Tx:()=>a,dQ:()=>d,fV:()=>c,gk:()=>o,lN:()=>r,rU:()=>s});class n{constructor(){this.changeType=1}}class o{constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=o}static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const o of t)i+=e.substring(n,o.column-1),n=o.column-1,i+=o.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new o(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new o(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}}class s{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class r{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class l{constructor(){this.changeType=5}}class d{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t<i;t++)if(this.changes[t].changeType===e)return!0;return!1}static merge(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.versionId,o=e.isUndoing||t.isUndoing,s=e.isRedoing||t.isRedoing;return new d(i,n,o,s)}}class h{constructor(e){this.changes=e}}class c{constructor(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}merge(e){const t=d.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),i=c._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new c(t,i)}static _mergeChangeEvents(e,t){return{changes:[].concat(e.changes).concat(t.changes),eol:t.eol,versionId:t.versionId,isUndoing:e.isUndoing||t.isUndoing,isRedoing:e.isRedoing||t.isRedoing,isFlush:e.isFlush||t.isFlush}}}},44993:(e,t,i)=>{i.d(t,{bc:()=>l,cM:()=>g,iE:()=>h,pM:()=>u,sz:()=>p});var n=i(96024),o=i(20904),s=i(24028),r=i(78891),a=i(66054);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t<i;t++)if(92===e.charCodeAt(t)){if(t++,t>=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.GF(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new d(t,this.wordSeparators?(0,o.u)(this.wordSeparators):null,i?this.searchString:null)}}class d{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}function h(e,t,i){if(!i)return new a.tk(e,null);let n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e];return new a.tk(e,n)}class c{constructor(e){let t=[],i=0;for(let n=0,o=e.length;n<o;n++)10===e.charCodeAt(n)&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let i=0,n=t.length-1;if(-1===n)return 0;if(e<=t[0])return 0;for(;i<n;){const o=i+((n-i)/2>>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class u{static findMatches(e,t,i,n,o){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,i,new p(s.wordSeparators,s.regex),n,o):this._doFindMatchesLineByLine(e,i,s,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,s){let a,l,d=0;if(n?(d=n.findLineFeedCountBeforeOffset(o),a=t+o+d):a=t+o,n){let e=n.findLineFeedCountBeforeOffset(o+s.length)-d;l=a+s.length+e}else l=a+s.length;const h=e.getPositionAt(a),c=e.getPositionAt(l);return new r.e(h.lineNumber,h.column,c.lineNumber,c.column)}static _doFindMatchesMultiline(e,t,i,n,o){const s=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new c(r):null,l=[];let d,u=0;for(i.reset(0);d=i.next(r);)if(l[u++]=h(this._getMultilineMatchRange(e,s,r,a,d.index,d[0]),d,n),u>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const s=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o);for(let a=t.startLineNumber+1;a<t.endLineNumber&&r<o;a++)r=this._findMatchesInLine(i,e.getLineContent(a),a,0,r,s,n,o);if(r<o){const a=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);r=this._findMatchesInLine(i,a,t.endLineNumber,0,r,s,n,o)}return s}static _findMatchesInLine(e,t,i,n,o,s,l,d){const c=e.wordSeparators;if(!l&&e.simpleSearch){const l=e.simpleSearch,h=l.length,u=t.length;let p=-h;for(;-1!==(p=t.indexOf(l,p+h));)if((!c||g(c,t,u,p,h))&&(s[o++]=new a.tk(new r.e(i,p+1+n,i,p+1+h+n),null),o>=d))return o;return o}const u=new p(e.wordSeparators,e.regex);let m;u.reset(0);do{if(m=u.next(t),m&&(s[o++]=h(new r.e(i,m.index+1+n,i,m.index+1+m[0].length+n),m,l),o>=d))return o}while(m);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new p(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,s,n):this._doFindNextMatchLineByLine(e,i,s,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new s.L(t.lineNumber,1),a=e.getOffsetAt(o),l=e.getLineCount(),d=e.getValueInRange(new r.e(o.lineNumber,o.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new c(d):null;i.reset(t.column-1);let g=i.next(d);return g?h(this._getMultilineMatchRange(e,a,d,u,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new s.L(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s),a=this._findFirstMatchInLine(i,r,s,t.column,n);if(a)return a;for(let t=1;t<=o;t++){const r=(s+t-1)%o,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const s=e.next(t);return s?h(new r.e(i,s.index+1,i,s.index+1+s[0].length),s,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new p(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,s,n):this._doFindPreviousMatchLineByLine(e,i,s,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new r.e(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new s.L(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,s,n);if(a)return a;for(let t=1;t<=o;t++){const r=(o+s-t-1)%o,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,s=null;for(e.reset(0);o=e.next(t);)s=h(new r.e(i,o.index+1,i,o.index+1+o[0].length),o,n);return s}}function g(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;const s=t.charCodeAt(n-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;const s=t.charCodeAt(n+o);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}class p{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const o=i.index,s=i[0].length;if(o===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){n.ZH(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=s,!this._wordSeparators||g(this._wordSeparators,e,t,o,s))return i}while(i);return null}}},8167:(e,t,i)=>{i.d(t,{DA:()=>c,OU:()=>u,QZ:()=>l,Rl:()=>v,Wz:()=>p,cx:()=>_});var n=i(76345),o=i(12062),s=i(24028),r=i(78891),a=i(18339);function l(e){let t=0,i=0,n=0,o=0;for(let s=0,r=e.length;s<r;s++){const a=e.charCodeAt(s);13===a?(0===t&&(i=s),t++,s+1<r&&10===e.charCodeAt(s+1)?(o|=2,s++):o|=3,n=s+1):10===a&&(o|=1,0===t&&(i=s),t++,n=s+1)}return 0===t&&(i=e.length),[t,i,e.length-n,o]}function d(e){return(16384|e<<0|2<<23)>>>0}const h=new Uint32Array(0).buffer;class c{constructor(){this.tokens=[]}add(e,t){if(this.tokens.length>0){const i=this.tokens[this.tokens.length-1];if(i.startLineNumber+i.tokens.length-1+1===e)return void i.tokens.push(t)}this.tokens.push(new m(e,[t]))}}class u{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let i=0;i<this._tokenCount;i++)t.push(`(${this._getDeltaLine(i)+e},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})`);return`[${t.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return 0===e?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(0===e)return null;const t=this._getStartCharacter(0),i=this._getDeltaLine(e-1),n=this._getEndCharacter(e-1);return new r.e(0,t+1,i,n+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return 0===this._getTokenCount()}getLineTokens(e){let t=0,i=this._getTokenCount()-1;for(;t<i;){const n=t+Math.floor((i-t)/2),o=this._getDeltaLine(n);if(o<e)t=n+1;else{if(!(o>e)){let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let s=n;for(;s<i&&this._getDeltaLine(s+1)===e;)s++;return new g(this._tokens.subarray(4*o,4*s+4))}i=n-1}}return this._getDeltaLine(t)===e?new g(this._tokens.subarray(4*t,4*t+4)):null}clear(){this._tokenCount=0}removeTokens(e,t,i,n){const o=this._tokens,s=this._tokenCount;let r=0,a=!1,l=0;for(let d=0;d<s;d++){const s=4*d,h=o[s],c=o[s+1],u=o[s+2],g=o[s+3];if((h>e||h===e&&u>=t)&&(h<i||h===i&&c<=n))a=!0;else{if(0===r&&(l=h),a){const e=4*r;o[e]=h-l,o[e+1]=c,o[e+2]=u,o[e+3]=g}r++}}return this._tokenCount=r,l}split(e,t,i,n){const o=this._tokens,s=this._tokenCount;let r=[],a=[],l=r,d=0,h=0;for(let r=0;r<s;r++){const s=4*r,c=o[s],u=o[s+1],g=o[s+2],p=o[s+3];if(c>e||c===e&&g>=t){if(c<i||c===i&&u<=n)continue;l!==a&&(l=a,d=0,h=c)}l[d++]=c-h,l[d++]=u,l[d++]=g,l[d++]=p}return[new u(new Uint32Array(r)),new u(new Uint32Array(a)),h]}acceptDeleteRange(e,t,i,n,o){const s=this._tokens,r=this._tokenCount,a=n-t;let l=0,d=!1;for(let h=0;h<r;h++){const c=4*h;let u=s[c],g=s[c+1],p=s[c+2];const m=s[c+3];if(u<t||u===t&&p<=i){l++;continue}if(u===t&&g<i)u===n&&p>o?p-=o-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>o)){d=!0;continue}p-=o-i}else if(u<n||u===n&&g<o){if(!(u===n&&p>o)){d=!0;continue}u===t?(g=i,p=g+(p-o)):(g=0,p=g+(p-o))}else if(u>n){if(0===a&&!d){l=r;break}u-=a}else{if(!(u===n&&g>=o))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=o-i,p-=o-i}const f=4*l;s[f]=u,s[f+1]=g,s[f+2]=p,s[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,s){const r=0===i&&1===n&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s<l;s++){const l=4*s;let d=a[l],h=a[l+1],c=a[l+2];if(!(d<e||d===e&&c<t)){if(d===e&&c===t){if(!r)continue;c+=1}else if(d===e&&h<t&&t<c)0===i?c+=n:c=t;else{if(d===e&&h===t&&r)continue;if(d===e)if(d+=i,0===i)h+=n,c+=n;else{const e=c-h;h=o+(h-t),c=h+e}else d+=i}a[l]=d,a[l+1]=h,a[l+2]=c}}}}class g{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}class p{constructor(e,t){this.startLineNumber=e,this.tokens=t,this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}toString(){return this.tokens.toString(this.startLineNumber)}_updateEndLineNumber(){this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}isEmpty(){return this.tokens.isEmpty()}getLineTokens(e){return this.startLineNumber<=e&&e<=this.endLineNumber?this.tokens.getLineTokens(e-this.startLineNumber):null}getRange(){const e=this.tokens.getRange();return e?new r.e(this.startLineNumber+e.startLineNumber,e.startColumn,this.startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber;this.startLineNumber+=this.tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber,[n,o,s]=this.tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new p(this.startLineNumber,n),new p(this.startLineNumber+s,o)]}applyEdit(e,t){const[i,n,o]=l(t);this.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new s.L(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber;if(i<0){const e=i-t;return void(this.startLineNumber-=e)}const n=this.tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this.startLineNumber=0,void this.tokens.clear();if(t<0){const n=-t;this.startLineNumber-=n,this.tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this.tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;const s=e.lineNumber-this.startLineNumber;s<0?this.startLineNumber+=t:s>=this.tokens.getMaxDeltaLine()+1||this.tokens.acceptInsertText(s,e.column-1,t,i,n,o)}}class m{constructor(e,t){this.startLineNumber=e,this.tokens=t}}function f(e){return e instanceof Uint32Array?e:new Uint32Array(e)}class _{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let o=null;for(let e=0,t=this._pieces.length;e<t;e++){const n=this._pieces[e];if(n.endLineNumber<i.startLineNumber)continue;if(n.startLineNumber>i.endLineNumber){o=o||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumber<i.startLineNumber)continue;if(n.startLineNumber>i.endLineNumber){o=o||{index:e};continue}const[s,r]=n.split(i);s.isEmpty()?o=o||{index:e}:r.isEmpty()||(this._pieces.splice(e,1,s,r),e++,t++,o=o||{index:e})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=n.Zv(this._pieces,o.index,t)),i}isComplete(){return this._isComplete}addSemanticTokens(e,t){const i=this._pieces;if(0===i.length)return t;const n=i[_._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const s=t.getCount(),r=n.getCount();let a=0,l=[],d=0,h=0;const c=(e,t)=>{e!==h&&(h=e,l[d++]=e,l[d++]=t)};for(let e=0;e<r;e++){const i=n.getStartCharacter(e),o=n.getEndCharacter(e),r=n.getMetadata(e),l=((1&r?2048:0)|(2&r?4096:0)|(4&r?8192:0)|(8&r?8372224:0)|(16&r?4286578688:0))>>>0,d=~l>>>0;for(;a<s&&t.getEndOffset(a)<=i;)c(t.getEndOffset(a),t.getMetadata(a)),a++;for(a<s&&t.getStartOffset(a)<i&&c(i,t.getMetadata(a));a<s&&t.getEndOffset(a)<o;)c(t.getEndOffset(a),t.getMetadata(a)&d|r&l),a++;if(a<s)c(o,t.getMetadata(a)&d|r&l),t.getEndOffset(a)===o&&a++;else{const e=Math.min(Math.max(0,a-1),s-1);c(o,t.getMetadata(e)&d|r&l)}}for(;a<s;)c(t.getEndOffset(a),t.getMetadata(a)),a++;return new o.A(new Uint32Array(l),t.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(e,t){let i=0,n=e.length-1;for(;i<n;){let o=i+Math.floor((n-i)/2);if(e[o].endLineNumber<t)i=o+1;else{if(!(e[o].startLineNumber>t)){for(;o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const s of this._pieces)s.acceptEdit(e,t,i,n,o)}}class v{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,i){let n=null;if(t<this._len&&(n=this._lineTokens[t]),null!==n&&n!==h)return new o.A(f(n),i,this._languageIdCodec);const s=new Uint32Array(2);return s[0]=i.length,s[1]=d(this._languageIdCodec.encodeLanguageId(e)),new o.A(s,i,this._languageIdCodec)}static _massageTokens(e,t,i){const n=i?f(i):null;if(0===t){let t=!1;if(n&&n.length>1&&(t=a.NX.getLanguageId(n[1])!==e),!t)return h}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=d(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let i=[];for(let e=0;e<t;e++)i[e]=null;this._lineTokens=n.Zv(this._lineTokens,e,i),this._len+=t}setTokens(e,t,i,n,o){const s=v._massageTokens(this._languageIdCodec.encodeLanguageId(e),i,n);this._ensureLine(t);const r=this._lineTokens[t];return this._lineTokens[t]=s,!!o&&!v._equals(r,s)}static _equals(e,t){if(!e||!t)return!e&&!t;const i=f(e),n=f(t);if(i.length!==n.length)return!1;for(let e=0,t=i.length;e<t;e++)if(i[e]!==n[e])return!1;return!0}acceptEdit(e,t,i){this._acceptDeleteRange(e),this._acceptInsertText(new s.L(e.startLineNumber,e.startColumn),t,i)}_acceptDeleteRange(e){const t=e.startLineNumber-1;if(t>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=v._delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=v._deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i<this._len&&(n=v._deleteBeginning(this._lineTokens[i],e.endColumn-1)),this._lineTokens[t]=v._append(this._lineTokens[t],n),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t,i){if(0===t&&0===i)return;const n=e.lineNumber-1;n>=this._len||(0!==t?(this._lineTokens[n]=v._deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=v._insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=v._insert(this._lineTokens[n],e.column-1,i))}static _deleteBeginning(e,t){return null===e||e===h?e:v._delete(e,0,t)}static _deleteEnding(e,t){if(null===e||e===h)return e;const i=f(e),n=i[i.length-2];return v._delete(e,t,n)}static _delete(e,t,i){if(null===e||e===h||t===i)return e;const n=f(e),s=n.length>>>1;if(0===t&&n[n.length-2]===i)return h;const r=o.A.findIndexInTokensArray(n,t),a=r>0?n[r-1<<1]:0;if(i<n[r<<1]){const o=i-t;for(let e=r;e<s;e++)n[e<<1]-=o;return e}let l,d;a!==t?(n[r<<1]=t,l=r+1<<1,d=t):(l=r<<1,d=a);const c=i-t;for(let e=r+1;e<s;e++){const t=n[e<<1]-c;t>d&&(n[l++]=t,n[l++]=n[1+(e<<1)],d=t)}if(l===n.length)return e;let u=new Uint32Array(l);return u.set(n.subarray(0,l),0),u.buffer}static _append(e,t){if(t===h)return e;if(e===h)return t;if(null===e)return e;if(null===t)return null;const i=f(e),n=f(t),o=n.length>>>1;let s=new Uint32Array(i.length+n.length);s.set(i,0);let r=i.length;const a=i[i.length-2];for(let e=0;e<o;e++)s[r++]=n[e<<1]+a,s[r++]=n[1+(e<<1)];return s.buffer}static _insert(e,t,i){if(null===e||e===h)return e;const n=f(e),s=n.length>>>1;let r=o.A.findIndexInTokensArray(n,t);r>0&&n[r-1<<1]===t&&r--;for(let e=r;e<s;e++)n[e<<1]+=i;return e}}},42584:(e,t,i)=>{i.d(t,{Af:()=>o,eq:()=>s,t2:()=>a,vu:()=>n});const n="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",o=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of n)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function s(e){let t=o;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const r={maxLen:1e3,windowSize:15,timeBudget:150};function a(e,t,i,n,o=r){if(i.length>o.maxLen){let s=e-o.maxLen/2;return s<0?s=0:n+=s,a(e,t,i=i.substring(s,e+o.maxLen/2),n,o)}const s=Date.now(),d=e-1-n;let h=-1,c=null;for(let e=1;!(Date.now()-s>=o.timeBudget);e++){const n=d-o.windowSize*e;t.lastIndex=Math.max(0,n);const s=l(t,i,d,h);if(!s&&c)break;if(c=s,n<=0)break;h=n}if(c){let e={word:c[0],startColumn:n+1+c.index,endColumn:n+1+c.index+c[0].length};return t.lastIndex=0,e}return null}function l(e,t,i,n){let o;for(;o=e.exec(t);){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}},18339:(e,t,i)=>{i.d(t,{H9:()=>A,He:()=>M,OH:()=>W,KZ:()=>w,RN:()=>E,Ct:()=>D,Az:()=>O,MY:()=>p,vH:()=>k,vN:()=>P,K7:()=>K,wT:()=>z,vJ:()=>x,AD:()=>v,aC:()=>H,xp:()=>L,vI:()=>I,gl:()=>f,mX:()=>R,bw:()=>u,zu:()=>y,pM:()=>B,id:()=>N,ln:()=>F,FL:()=>b,G0:()=>C,AC:()=>V,nD:()=>S,WW:()=>g,uZ:()=>m,NX:()=>d,RW:()=>U,tA:()=>T,jr:()=>c,Sy:()=>h,vx:()=>_});var n=i(51732),o=i(78891),s=i(33830),r=i(77538),a=i(48646),l=i(85095);class d{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(1792&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e),i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;return 1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;"),4&n&&(o+="text-decoration: underline;"),o}}const h=function(){let e=Object.create(null);return e[0]="symbol-method",e[1]="symbol-function",e[2]="symbol-constructor",e[3]="symbol-field",e[4]="symbol-variable",e[5]="symbol-class",e[6]="symbol-struct",e[7]="symbol-interface",e[8]="symbol-module",e[9]="symbol-property",e[10]="symbol-event",e[11]="symbol-operator",e[12]="symbol-unit",e[13]="symbol-value",e[14]="symbol-constant",e[15]="symbol-enum",e[16]="symbol-enum-member",e[17]="symbol-keyword",e[27]="symbol-snippet",e[18]="symbol-text",e[19]="symbol-color",e[20]="symbol-file",e[21]="symbol-reference",e[22]="symbol-customcolor",e[23]="symbol-folder",e[24]="symbol-type-parameter",e[25]="account",e[26]="issues",function(t){const i=e[t];let n=i&&l.fK.get(i);return n||(console.info("No codicon found for CompletionItemKind "+t),n=l.lA.symbolProperty),n.classNames}}();let c=function(){let e=Object.create(null);return e.method=0,e.function=1,e.constructor=2,e.field=3,e.variable=4,e.class=5,e.struct=6,e.interface=7,e.module=8,e.property=9,e.event=10,e.operator=11,e.unit=12,e.value=13,e.constant=14,e.enum=15,e["enum-member"]=16,e.enumMember=16,e.keyword=17,e.snippet=27,e.text=18,e.color=19,e.file=20,e.reference=21,e.customcolor=22,e.folder=23,e["type-parameter"]=24,e.typeParameter=24,e.account=25,e.issue=26,function(t,i){let n=e[t];return void 0!==n||i||(n=9),n}}();var u,g,p,m,f;function _(e){return e&&n.o.isUri(e.uri)&&o.e.isIRange(e.range)&&(o.e.isIRange(e.originSelectionRange)||o.e.isIRange(e.targetSelectionRange))}!function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(u||(u={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(g||(g={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(p||(p={})),function(e){const t=new Map;t.set("file",0),t.set("module",1),t.set("namespace",2),t.set("package",3),t.set("class",4),t.set("method",5),t.set("property",6),t.set("field",7),t.set("constructor",8),t.set("enum",9),t.set("interface",10),t.set("function",11),t.set("variable",12),t.set("constant",13),t.set("string",14),t.set("number",15),t.set("boolean",16),t.set("array",17),t.set("object",18),t.set("key",19),t.set("null",20),t.set("enum-member",21),t.set("struct",22),t.set("event",23),t.set("operator",24),t.set("type-parameter",25);const i=new Map;i.set(0,"file"),i.set(1,"module"),i.set(2,"namespace"),i.set(3,"package"),i.set(4,"class"),i.set(5,"method"),i.set(6,"property"),i.set(7,"field"),i.set(8,"constructor"),i.set(9,"enum"),i.set(10,"interface"),i.set(11,"function"),i.set(12,"variable"),i.set(13,"constant"),i.set(14,"string"),i.set(15,"number"),i.set(16,"boolean"),i.set(17,"array"),i.set(18,"object"),i.set(19,"key"),i.set(20,"null"),i.set(21,"enum-member"),i.set(22,"struct"),i.set(23,"event"),i.set(24,"operator"),i.set(25,"type-parameter"),e.fromString=function(e){return t.get(e)},e.toString=function(e){return i.get(e)},e.toCssClassName=function(e,t){const n=i.get(e);let o=n&&l.fK.get("symbol-"+n);return o||(console.info("No codicon found for SymbolKind "+e),o=l.lA.symbolProperty),`${t?"inline":"block"} ${o.classNames}`}}(m||(m={}));class v{constructor(e){this.value=e}}v.Comment=new v("comment"),v.Imports=new v("imports"),v.Region=new v("region"),function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(f||(f={}));const b=new s.c,C=new s.c,w=new s.c,y=new s.c,S=new s.c,L=new s.c,x=new s.c,k=new s.c,N=new s.c,D=new s.c,E=new s.c,I=new s.c,T=new s.c,M=new s.c,R=new s.c,A=new s.c,O=new s.c,P=new s.c,F=new s.c,B=new s.c,W=new s.c,V=new s.c,H=new s.c,z=new s.c,K=new s.c,U=new class{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new r.Q5,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),(0,a.OF)((()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))}))}registerPromise(e,t){let i=null,n=!1;return this._promises.set(e,t.then((t=>{this._promises.delete(e),!n&&t&&(i=this.register(e,t))}))),(0,a.OF)((()=>{n=!0,i&&i.dispose()}))}getPromise(e){const t=this.get(e);if(t)return Promise.resolve(t);const i=this._promises.get(e);return i?i.then((t=>this.get(e))):null}get(e){return this._map.get(e)||null}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}},1189:(e,t,i)=>{var n;i.d(t,{V6:()=>o,c$:()=>s,wU:()=>n}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(n||(n={}));class o{constructor(e){if(this._standardAutoClosingPairConditionalBrand=void 0,this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t<i;t++)switch(e.notIn[t]){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4}}isOK(e){return 0==(this._standardTokenMask&e)}}class s{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const t of e)r(this.autoClosingPairsOpenByStart,t.open.charAt(0),t),r(this.autoClosingPairsOpenByEnd,t.open.charAt(t.open.length-1),t),r(this.autoClosingPairsCloseByStart,t.close.charAt(0),t),r(this.autoClosingPairsCloseByEnd,t.close.charAt(t.close.length-1),t),1===t.close.length&&1===t.open.length&&r(this.autoClosingPairsCloseSingleChar,t.close,t)}}function r(e,t,i){e.has(t)?e.get(t).push(i):e.set(t,[i])}},16742:(e,t,i)=>{i.d(t,{c_:()=>S,zu:()=>D,UU:()=>L});var n=i(77538),o=i(48646),s=i(96024),r=i(42584),a=i(1189),l=i(56921);class d{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.V6(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.V6({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.colorizedBracketPairs?this._colorizedBracketPairs=h(e.colorizedBracketPairs.map((e=>[e[0],e[1]]))):e.brackets?this._colorizedBracketPairs=h(e.brackets.map((e=>[e[0],e[1]])).filter((e=>!("<"===e[0]&&">"===e[1])))):this._colorizedBracketPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.V6({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(e,t,i){if(0===t.getTokenCount())return!0;const n=t.findTokenIndexAtOffset(i-2),o=t.getStandardTokenType(n);return e.isOK(o)}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}function h(e){return e.filter((([e,t])=>""!==e&&""!==t))}d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";var c=i(72852);class u{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return e=e.filter(((e,t,i)=>i.indexOf(e)===t)),e}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if((0,l.Bu)(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,i-1)+e,r=c.Vr.findPrevBracketInRange(o,1,s,0,s.length);if(!r)return null;const a=s.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const d=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var m=i(98147);class f{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=f._createOpenBracketRegExp(e[0]),i=f._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e<o;e++){let o=this._regExpRules[e];if([{reg:o.beforeText,text:i},{reg:o.afterText,text:n},{reg:o.previousLineText,text:t}].every((e=>!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e<t;e++){let t=this._brackets[e];if(t.openRegExp.test(i)&&t.closeRegExp.test(n))return{indentAction:a.wU.IndentOutdent}}if(e>=2&&i.length>0)for(let e=0,t=this._brackets.length;e<t;e++)if(this._brackets[e].openRegExp.test(i))return{indentAction:a.wU.Indent};return null}static _createOpenBracketRegExp(e){let t=s.ec(e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",f._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=s.ec(e);return/\B/.test(t.charAt(t.length-1))||(t+="\\b"),t="^\\s*"+t,f._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(e){return(0,m.dL)(e),null}}}var _=i(7978),v=i(1826),b=i(34587),C=i(82415),w=function(e,t){return function(i,n){t(i,n,e)}};class y{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const S=(0,_.yh)("languageConfigurationService");let L=class extends o.JT{constructor(e,t){super(),this.configurationService=e,this.modeService=t,this.onDidChangeEmitter=this._register(new n.Q5),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(x));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>this.modeService.validateLanguageId(e)));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new y(void 0));else for(const e of n)e&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new y(e)))}))),this._register(D.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new y(e.languageId))})))}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i){let n=D.getLanguageConfiguration(e);if(!n){const t=i.validateLanguageId(e);if(!t)throw new Error("Unexpected languageId");n=new M(t,{})}const o=function(e,t){const i=t.getValue(x.brackets,{overrideIdentifier:e}),n=t.getValue(x.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:k(i),colorizedBracketPairs:k(n)}}(n.languageId,t),s=I([n.underlyingConfig,o]);return new M(n.languageId,s)}(e,this.configurationService,this.modeService),this.configurations.set(e,t)),t}};L=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([w(0,v.Ui),w(1,b.h)],L);const x={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function k(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}class N{constructor(e){this.languageId=e}}const D=new class{constructor(){this._entries=new Map,this._onDidChange=new n.Q5,this.onDidChange=this._onDidChange.event}register(e,t,i=0){let n=this._entries.get(e);n||(n=new E(e),this._entries.set(e,n));const s=n.register(t,i);return this._onDidChange.fire(new N(e)),(0,o.OF)((()=>{s.dispose(),this._onDidChange.fire(new N(e))}))}getLanguageConfiguration(e){let t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}getIndentationRules(e){const t=this.getLanguageConfiguration(e);return t&&t.indentationRules||null}_getElectricCharacterSupport(e){let t=this.getLanguageConfiguration(e);return t&&t.electricCharacter||null}getElectricCharacters(e){let t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]}onElectricCharacter(e,t,i){let n=(0,l.wH)(t,i-1),o=this._getElectricCharacterSupport(n.languageId);return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}getComments(e){let t=this.getLanguageConfiguration(e);return t&&t.comments||null}_getCharacterPairSupport(e){let t=this.getLanguageConfiguration(e);return t&&t.characterPair||null}getAutoClosingPairs(e){const t=this._getCharacterPairSupport(e);return new a.c$(t?t.getAutoClosingPairs():[])}getAutoCloseBeforeSet(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]}shouldAutoClosePair(e,t,i){const n=(0,l.wH)(t,i-1);return d.shouldAutoClosePair(e,n,i-n.firstCharOffset)}getWordDefinition(e){let t=this.getLanguageConfiguration(e);return t?(0,r.eq)(t.wordDefinition||null):(0,r.eq)(null)}getFoldingRules(e){let t=this.getLanguageConfiguration(e);return t?t.foldingRules:{}}getIndentRulesSupport(e){let t=this.getLanguageConfiguration(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){let n=e.getLanguageIdAtPosition(t,0);if(t>1){let o,s=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==n)return s;let t=e.getLineContent(o);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;s=o}}return-1}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const o=this.getIndentRulesSupport(t.getLanguageId());if(!o)return null;if(i<=1)return{indentation:"",action:null};const r=this.getPrecedingValidLine(t,i,o);if(r<0)return null;if(r<1)return{indentation:"",action:null};const l=t.getLineContent(r);if(o.shouldIncrease(l)||o.shouldIndentNextLine(l))return{indentation:s.V8(l),action:a.wU.Indent,line:r};if(o.shouldDecrease(l))return{indentation:s.V8(l),action:null,line:r};{if(1===r)return{indentation:s.V8(t.getLineContent(r)),action:null,line:r};const e=r-1,i=o.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:s.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:s.V8(t.getLineContent(r)),action:null,line:r};for(let e=r;e>0;e--){const i=t.getLineContent(e);if(o.shouldIncrease(i))return{indentation:s.V8(i),action:a.wU.Indent,line:e};if(o.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:s.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(o.shouldDecrease(i))return{indentation:s.V8(i),action:null,line:e}}return{indentation:s.V8(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,o){if(e<4)return null;const r=this.getLanguageConfiguration(i);if(!r)return null;const l=this.getIndentRulesSupport(i);if(!l)return null;const d=this.getInheritIndentForLine(e,t,n),h=t.getLineContent(n);if(d){const i=d.line;if(void 0!==i){const n=r.onEnter(e,"",t.getLineContent(i),"");if(n){let e=s.V8(t.getLineContent(i));return n.removeText&&(e=e.substring(0,e.length-n.removeText)),n.indentAction===a.wU.Indent||n.indentAction===a.wU.IndentOutdent?e=o.shiftIndent(e):n.indentAction===a.wU.Outdent&&(e=o.unshiftIndent(e)),l.shouldDecrease(h)&&(e=o.unshiftIndent(e)),n.appendText&&(e+=n.appendText),s.V8(e)}}return l.shouldDecrease(h)?d.action===a.wU.Indent?d.indentation:o.unshiftIndent(d.indentation):d.action===a.wU.Indent?o.shiftIndent(d.indentation):d.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber);const o=t.getLineTokens(i.startLineNumber),r=(0,l.wH)(o,i.startColumn-1),d=r.getLineContent();let h,c,u=!1;r.firstCharOffset>0&&o.getLanguageId(0)!==r.languageId?(u=!0,h=d.substr(0,i.startColumn-1-r.firstCharOffset)):h=o.getLineContent().substring(0,i.startColumn-1),c=i.isEmpty()?d.substr(i.startColumn-1-r.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset);const g=this.getIndentRulesSupport(r.languageId);if(!g)return null;const p=h,m=s.V8(h),f={getLineTokens:e=>t.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i),getLineContent:e=>e===i.startLineNumber?p:t.getLineContent(e)},_=s.V8(o.getLineContent()),v=this.getInheritIndentForLine(e,f,i.startLineNumber+1);if(!v){const e=u?_:m;return{beforeEnter:e,afterEnter:e}}let b=u?_:v.indentation;return v.action===a.wU.Indent&&(b=n.shiftIndent(b)),g.shouldDecrease(c)&&(b=n.unshiftIndent(b)),{beforeEnter:u?_:m,afterEnter:b}}getIndentActionForType(e,t,i,n,o){if(e<4)return null;const s=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn);if(s.firstCharOffset)return null;const r=this.getIndentRulesSupport(s.languageId);if(!r)return null;const l=s.getLineContent(),d=l.substr(0,i.startColumn-1-s.firstCharOffset);let h;if(h=i.isEmpty()?l.substr(i.startColumn-1-s.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset),!r.shouldDecrease(d+h)&&r.shouldDecrease(d+n+h)){const n=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!n)return null;let s=n.indentation;return n.action!==a.wU.Indent&&(s=o.unshiftIndent(s)),s}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageId());return i?t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,i){const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),o=this.getLanguageConfiguration(n.languageId);if(!o)return null;const s=n.getLineContent(),r=s.substr(0,i.startColumn-1-n.firstCharOffset);let l;l=i.isEmpty()?s.substr(i.startColumn-1-n.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-n.firstCharOffset);let d="";if(i.startLineNumber>1&&0===n.firstCharOffset){const e=this.getScopedLineTokens(t,i.startLineNumber-1);e.languageId===n.languageId&&(d=e.getLineContent())}const h=o.onEnter(e,d,r,l);if(!h)return null;const c=h.indentAction;let u=h.appendText;const g=h.removeText||0;u?c===a.wU.Indent&&(u="\t"+u):u=c===a.wU.Indent||c===a.wU.IndentOutdent?"\t":"";let p=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return g&&(p=p.substring(0,p.length-g)),{indentAction:c,appendText:u,removeText:g,indentation:p}}getIndentationAtPosition(e,t,i){const n=e.getLineContent(t);let o=s.V8(n);return o.length>i-1&&(o=o.substring(0,i-1)),o}getScopedLineTokens(e,t,i){e.forceTokenization(t);const n=e.getLineTokens(t),o=void 0===i?e.getLineMaxColumn(t)-1:i-1;return(0,l.wH)(n,o)}};class E{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new T(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,o.OF)((()=>{for(let e=0;e<this._entries.length;e++)if(this._entries[e]===i){this._entries.splice(e,1),this._resolved=null;break}}))}getResolvedConfiguration(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new M(this.languageId,e))}return this._resolved}_resolve(){return 0===this._entries.length?null:(this._entries.sort(T.cmp),I(this._entries.map((e=>e.configuration))))}}function I(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class T{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class M{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new f(this.underlyingConfig):null,this.comments=M._handleComments(this.underlyingConfig),this.characterPair=new d(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||r.Af,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return(0,r.eq)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new c.EA(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new u(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}static _handleComments(e){let t=e.comments;if(!t)return null;let i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){let[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,C.z)(S,L)},33830:(e,t,i)=>{i.d(t,{c:()=>g,Y:()=>f});var n=i(77538),o=i(14938),s=i(48646),r=i(82173),a=i(43758),l=i(15284),d=i(67802);function h(e,t,i,n){if(Array.isArray(e)){let o=0;for(const s of e){const e=h(s,t,i,n);if(10===e)return e;e>o&&(o=e)}return o}if("string"==typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:o,pattern:s,scheme:r,hasAccessToAllModels:a}=e;if(!n&&!a)return 0;let h=0;if(r)if(r===t.scheme)h=10;else{if("*"!==r)return 0;h=5}if(o)if(o===i)h=10;else{if("*"!==o)return 0;h=Math.max(h,5)}if(s){let e;if(e="string"==typeof s?s:Object.assign(Object.assign({},s),{base:(0,d.Fv)(s.base)}),e!==t.fsPath&&!(0,l.EQ)(e,t.fsPath))return 0;h=10}return h}return 0}var c=i(35208);function u(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(u):!!e.exclusive)}class g{constructor(){this._clock=0,this._entries=[],this._onDidChange=new n.Q5}get onDidChange(){return this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,s.OF)((()=>{if(i){let e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(let e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}}_updateScores(e){let t={uri:e.uri.toString(),language:e.getLanguageId()};if(!this._lastCandidate||this._lastCandidate.language!==t.language||this._lastCandidate.uri!==t.uri){this._lastCandidate=t;for(let t of this._entries)if(t._score=h(t.selector,e.uri,e.getLanguageId(),(0,c.p)(e)),u(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(g._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._score<t._score?1:e._score>t._score?-1:e._time<t._time?1:e._time>t._time?-1:0}}const p=new WeakMap;let m=0;class f{constructor(e,t,i=Number.MAX_SAFE_INTEGER){this._registry=e,this.min=t,this.max=i,this._cache=new r.z6(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,o.SP)(function(e){let t=p.get(e);return void 0===t&&(t=++m,p.set(e,t)),t}(t),e)),0)}_clamp(e){return void 0===e?this.min:Math.min(this.max,Math.max(this.min,Math.floor(1.3*e)))}get(e){const t=this._key(e),i=this._cache.get(t);return this._clamp(null==i?void 0:i.value)}update(e,t){const i=this._key(e);let n=this._cache.get(i);return n||(n=new a.n,this._cache.set(i,n)),n.update(t),this.get(e)}}},86611:(e,t,i)=>{i.d(t,{XT:()=>d,dQ:()=>l});var n=i(85337),o=i(77538),s=i(16742),r=i(95954),a=i(73543);const l=new class{constructor(){this._onDidChangeLanguages=new o.Q5,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t<i;t++)if(this._languages[t]===e)return void this._languages.splice(t,1)}}}getLanguages(){return[].concat(this._languages).concat(this._dynamicLanguages)}};r.B.add("editor.modesRegistry",l);const d="plaintext";l.registerLanguage({id:d,extensions:[".txt"],aliases:[n.N("plainText.alias","Plain Text"),"text"],mimetypes:[a.vW.text]}),s.zu.register(d,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0)},63866:(e,t,i)=>{i.d(t,{Ri:()=>r,TG:()=>s,mh:()=>a,nO:()=>o});var n=i(20365);const o=new class{clone(){return this}equals(e){return this===e}},s="vs.editor.nullMode";function r(e,t,i,o){return new n.hG([new n.WU(o,"",e)],i)}function a(e,t,i,s){let r=new Uint32Array(2);return r[0]=s,r[1]=(16384|e<<0|2<<23)>>>0,new n.Hi(r,null===i?o:i)}},56921:(e,t,i)=>{function n(e,t){let i=e.getCount(),n=e.findTokenIndexAtOffset(t),s=e.getLanguageId(n),r=n;for(;r+1<i&&e.getLanguageId(r+1)===s;)r++;let a=n;for(;a>0&&e.getLanguageId(a-1)===s;)a--;return new o(e,s,a,r+1,e.getStartOffset(a),e.getEndOffset(r))}i.d(t,{Bu:()=>s,wH:()=>n});class o{constructor(e,t,i,n,o,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=s}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function s(e){return 0!=(7&e)}},72852:(e,t,i)=>{i.d(t,{EA:()=>a,Vr:()=>p});var n=i(96024),o=i(25508),s=i(78891);class r{constructor(e,t,i,n,o,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=s,this._openSet=r._toSet(this.open),this._closeSet=r._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}class a{constructor(e,t){this._richEditBracketsBrand=void 0;const i=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e<t;e++)i[e]=e;const n=(e,t)=>{const[i,n]=e,[o,s]=t;return i===o||i===s||n===o||n===s},o=(e,n)=>{const o=Math.min(e,n),s=Math.max(e,n);for(let e=0;e<t;e++)i[e]===s&&(i[e]=o)};for(let s=0;s<t;s++){const r=e[s];for(let a=s+1;a<t;a++)n(r,e[a])&&o(i[s],i[a])}const s=[];for(let n=0;n<t;n++){let o=[],r=[];for(let s=0;s<t;s++)if(i[s]===n){const[t,i]=e[s];o.push(t),r.push(i)}o.length>0&&s.push({open:o,close:r})}return s}(t);this.brackets=i.map(((t,n)=>new r(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e<t;e++)l(o[e],i,n,o);return o=h(o),o.sort(d),o.reverse(),u(o)}(t.open,t.close,i,n),function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e<t;e++)l(o[e],i,n,o);return o=h(o),o.sort(d),o.reverse(),u(o.map(g))}(t.open,t.close,i,n)))),this.forwardRegex=function(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=h(t),u(t)}(this.brackets),this.reversedRegex=function(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=h(t),u(t.map(g))}(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const e of this.brackets){for(const t of e.open)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,t.length);for(const t of e.close)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,t.length)}}}function l(e,t,i,n){for(let o=0,s=t.length;o<s;o++){if(o===i)continue;const s=t[o];for(const t of s.open)t.indexOf(e)>=0&&n.push(t);for(const t of s.close)t.indexOf(e)>=0&&n.push(t)}}function d(e,t){return e.length-t.length}function h(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function c(e){const t=/^[\w ]+$/.test(e);return e=n.ec(e),t?`\\b${e}\\b`:e}function u(e){let t=`(${e.map(c).join(")|(")})`;return n.GF(t,!0)}const g=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){if(o.lZ){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return o.oe().decode(t)}{let t=[],i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}(e)),t}}();class p{static _findPrevBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let r=i.length-(o.index||0),a=o[0].length,l=n+r;return new s.e(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,o){const s=g(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,s,n)}static findNextBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let r=o.index||0,a=o[0].length;if(0===a)return null;let l=n+r;return new s.e(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,o){const s=i.substring(n,o);return this.findNextBracketInText(e,t,s,n)}}},38821:(e,t,i)=>{i.d(t,{C:()=>a,F:()=>l});var n=i(96024),o=i(12062),s=i(63866);const r={getInitialState:()=>s.nO,tokenize2:(e,t,i,n)=>(0,s.mh)(0,e,i,n)};function a(e,t,i=r){return function(e,t,i){let s='<div class="monaco-tokenized-source">';const r=n.uq(e);let a=i.getInitialState();for(let e=0,l=r.length;e<l;e++){const l=r[e];e>0&&(s+="<br/>");const d=i.tokenize2(l,!0,a,0);o.A.convertToEndOffset(d.tokens,l.length);const h=new o.A(d.tokens,l,t).inflate();let c=0;for(let e=0,t=h.getCount();e<t;e++){const t=h.getClassName(e),i=h.getEndOffset(e);s+=`<span class="${t}">${n.YU(l.substring(c,i))}</span>`,c=i}a=d.endState}return s+="</div>",s}(e,t,i||r)}function l(e,t,i,n,o,s,r){let a="<div>",l=n,d=0,h=!0;for(let c=0,u=t.getCount();c<u;c++){const u=t.getEndOffset(c);if(u<=n)continue;let g="";for(;l<u&&l<o;l++){const t=e.charCodeAt(l);switch(t){case 9:let e=s-(l+d)%s;for(d+=e-1;e>0;)r&&h?(g+="&#160;",h=!1):(g+=" ",h=!0),e--;break;case 60:g+="&lt;",h=!1;break;case 62:g+="&gt;",h=!1;break;case 38:g+="&amp;",h=!1;break;case 0:g+="&#00;",h=!1;break;case 65279:case 8232:case 8233:case 133:g+="<22>",h=!1;break;case 13:g+="&#8203",h=!1;break;case 32:r&&h?(g+="&#160;",h=!1):(g+=" ",h=!0);break;default:g+=String.fromCharCode(t),h=!1}}if(a+=`<span style="${t.getInlineStyle(c,i)}">${g}</span>`,u>o||l>=o)break}return a+="</div>",a}},33930:(e,t,i)=>{i.d(t,{p:()=>n});const n=(0,i(7978).yh)("editorWorkerService")},94848:(e,t,i)=>{i.d(t,{OG:()=>S,ML:()=>b,KO:()=>w,Jc:()=>v,Vl:()=>m,Vj:()=>f});var n=i(28245),o=i(98147),s=i(51732),r=i(18339),a=i(35208),l=i(34622),d=i(56718),h=i(3355),c=i(84483);function u(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const i of e.deltas)i.data&&(t+=i.data.length)}return t}(e));let i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else{t[i++]=2,t[i++]=e.deltas.length;for(const n of e.deltas)t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return c.r()||function(e){for(let t=0,i=e.length;t<i;t+=4){const i=e[t+0],n=e[t+1],o=e[t+2],s=e[t+3];e[t+0]=s,e[t+1]=o,e[t+2]=n,e[t+3]=i}}(t),h.KN.wrap(t)}(t)}var g=i(78891),p=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function m(e){return e&&!!e.data}function f(e){return e&&Array.isArray(e.edits)}class _{constructor(e,t){this.provider=e,this.tokens=t}}function v(e){return r.wT.has(e)}function b(e,t,i,n){return p(this,void 0,void 0,(function*(){const s=function(e){const t=r.wT.orderedGroups(e);return t.length>0?t[0]:[]}(e),a=yield Promise.all(s.map((s=>p(this,void 0,void 0,(function*(){let r;try{r=yield s.provideDocumentSemanticTokens(e,s===t?i:null,n)}catch(e){(0,o.Cp)(e),r=null}return r&&(m(r)||f(r))||(r=null),new _(s,r)})))));for(const e of a)if(e.tokens)return e;return a.length>0?a[0]:null}))}class C{constructor(e,t){this.provider=e,this.tokens=t}}function w(e){return r.K7.has(e)}function y(e){const t=r.K7.orderedGroups(e);return t.length>0?t[0]:[]}function S(e,t,i){return p(this,void 0,void 0,(function*(){const n=y(e),s=yield Promise.all(n.map((n=>p(this,void 0,void 0,(function*(){let s;try{s=yield n.provideDocumentRangeSemanticTokens(e,t,i)}catch(e){(0,o.Cp)(e),s=null}return s&&m(s)||(s=null),new C(n,s)})))));for(const e of s)if(e.tokens)return e;return s.length>0?s[0]:null}))}l.P.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i]=t;(0,d.p_)(i instanceof s.o);const n=e.get(a.q).getModel(i);if(!n)return;const o=function(e){const t=r.wT.orderedGroups(e);return t.length>0?t[0]:null}(n);return o?o[0].getLegend():e.get(l.H).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})))),l.P.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i]=t;(0,d.p_)(i instanceof s.o);const o=e.get(a.q).getModel(i);if(!o)return;if(!v(o))return e.get(l.H).executeCommand("_provideDocumentRangeSemanticTokens",i,o.getFullModelRange());const r=yield b(o,null,null,n.T.None);if(!r)return;const{provider:h,tokens:c}=r;if(!c||!m(c))return;const g=u({id:0,type:"full",data:c.data});return c.resultId&&h.releaseDocumentSemanticTokens(c.resultId),g})))),l.P.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i,o]=t;(0,d.p_)(i instanceof s.o);const r=e.get(a.q).getModel(i);if(!r)return;const l=y(r);if(0===l.length)return;if(1===l.length)return l[0].getLegend();if(!o||!g.e.isIRange(o))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),l[0].getLegend();const h=yield S(r,g.e.lift(o),n.T.None);return h?h.provider.getLegend():void 0})))),l.P.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i,o]=t;(0,d.p_)(i instanceof s.o),(0,d.p_)(g.e.isIRange(o));const r=e.get(a.q).getModel(i);if(!r)return;const l=yield S(r,g.e.lift(o),n.T.None);return l&&l.tokens?u({id:0,type:"full",data:l.tokens.data}):void 0}))))},97064:(e,t,i)=>{i.d(t,{i:()=>n});const n=(0,i(7978).yh)("markerDecorationsService")},34587:(e,t,i)=>{i.d(t,{h:()=>n});const n=(0,i(7978).yh)("modeService")},35208:(e,t,i)=>{i.d(t,{p:()=>o,q:()=>n});const n=(0,i(7978).yh)("modelService");function o(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},14634:(e,t,i)=>{i.d(t,{BR:()=>M,e3:()=>R,tw:()=>A});var n=i(77538),o=i(48646),s=i(84483),r=i(98147),a=i(38562),l=i(95098),d=i(18339),h=i(86611),c=i(34587),u=i(4849),g=i(1826),p=i(10554),m=i(28245),f=i(65700),_=i(71481),v=i(56834),b=i(14938),C=i(98363),w=i(31633),y=i(14281),S=i(94848),L=i(20620),x=i(16742),k=function(e,t){return function(i,n){t(i,n,e)}};function N(e){return e.toString()}function D(e){const t=new b.yP,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}class E{constructor(e,t,i){this._modelEventListeners=new o.SL,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange((()=>this.model.setMode(e.languageId))),this.model.setMode(e.languageId)}}const I=s.IJ||s.dz?1:2;class T{constructor(e,t,i,n,o,s,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=s,this.versionId=r,this.alternativeVersionId=a}}let M=class e extends o.JT{constructor(e,t,i,o,s,r,a){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=o,this._undoRedoService=s,this._modeService=r,this._languageConfigurationService=a,this._onModelAdded=this._register(new n.Q5),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new n.Q5),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new n.Q5),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new P(this._themeService,this._modeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration((()=>this._updateModelOptions()))),this._updateModelOptions(),this._register(new O(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(e,t){var i;let n=a.DB.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o=n;if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(o=t),o<1&&(o=1)}let s=a.DB.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(s="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=I;const l=e.eol;"\r\n"===l?r=2:"\n"===l&&(r=1);let d=a.DB.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(d="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let h=a.DB.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(h="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let c=a.DB.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(c="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let u=a.DB.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(u={enabled:!!e.editor.bracketPairColorization.enabled}),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:s,detectIndentation:h,defaultEOL:r,trimAutoWhitespace:d,largeFileOptimizations:c,bracketPairColorizationOptions:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===s.OS||2===s.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(t,i,n){let o=this._modelCreationOptionsByLanguageAndResource[t+i];if(!o){const s=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),r=this._getEOL(i,t);o=e._readModelOptions({editor:s,eol:r},n),this._modelCreationOptionsByLanguageAndResource[t+i]=o}return o}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,o=i.length;n<o;n++){const o=i[n],s=this._models[o],r=s.model.getLanguageId(),a=s.model.uri,l=t[r+a],d=this.getCreationOptions(r,a,s.model.isForSimpleWidget);e._setModelOptionsForModel(s.model,d,l)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&1===e.getLineCount()&&e.setEOL(1===t.defaultEOL?0:1),i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace&&(0,L.fS)(i.bracketPairColorizationOptions,t.bracketPairColorizationOptions)||(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(N(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(N(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(N(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t,i,n),s=new l.yO(e,o,t,i,this._undoRedoService,this._modeService,this._languageConfigurationService);if(i&&this._disposedModels.has(N(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=D(s)===e.sha1;if(n||e.sharesUndoRedoStack){for(const e of t.past)(0,C.e9)(e)&&e.matchesResource(i)&&e.setModel(s);for(const e of t.future)(0,C.e9)(e)&&e.matchesResource(i)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(i,!0,(e=>(0,C.e9)(e)&&e.matchesResource(i))),n&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=N(s.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const a=new E(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=a,a}createModel(e,t,i,n=!1){let o;return t?(o=this._createModelData(e,t.languageId,i,n),this.setMode(o.model,t)):o=this._createModelData(e,h.XT,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;const i=this._models[N(e.uri)];i&&i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push(this._models[n].model)}return e}getModel(e){const t=N(e),i=this._models[t];return i?i.model:null}getSemanticTokensProviderStyling(e){return this._semanticStyling.get(e)}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===w.lg.file||e.scheme===w.lg.vscodeRemote||e.scheme===w.lg.userData||e.scheme===w.lg.vscodeNotebookCell||"fake-fs"===e.scheme}_onWillDispose(t){const i=N(t.uri),n=this._models[i],o=this._undoRedoService.getUriComparisonKey(t.uri)!==t.uri.toString();let s=!1,r=0;if(o||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(t.uri)){const e=this._undoRedoService.getElements(t.uri);if(e.past.length>0||e.future.length>0){for(const i of e.past)(0,C.e9)(i)&&i.matchesResource(t.uri)&&(s=!0,r+=i.heapSize(t.uri),i.setModel(t.uri));for(const i of e.future)(0,C.e9)(i)&&i.matchesResource(t.uri)&&(s=!0,r+=i.heapSize(t.uri),i.setModel(t.uri))}}const a=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(s)if(!o&&r>a){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(t.uri,!1,(e=>(0,C.e9)(e)&&e.matchesResource(t.uri))),this._insertDisposedModel(new T(t.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,r,D(t),t.getVersionId(),t.getAlternativeVersionId()));else if(!o){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageId()+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,i){const n=i.oldLanguage,o=t.getLanguageId(),s=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),r=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,r,s),this._onModelModeChanged.fire({model:t,oldModeId:n})}};M.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,M=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([k(0,g.Ui),k(1,u.y),k(2,f.XE),k(3,_.VZ),k(4,v.tJ),k(5,c.h),k(6,x.c_)],M);const R="editor.semanticHighlighting";function A(e,t,i){var n;const o=null===(n=i.getValue(R,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof o?o:t.getColorTheme().semanticHighlighting}class O extends o.JT{constructor(e,t,i,n){super(),this._watchers=Object.create(null),this._semanticStyling=n;const o=e=>{this._watchers[e.uri.toString()]=new B(e,t,this._semanticStyling)},s=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},r=()=>{for(let n of e.getModels()){const e=this._watchers[n.uri.toString()];A(n,t,i)?e||o(n):e&&s(n,e)}};this._register(e.onModelAdded((e=>{A(e,t,i)&&o(e)}))),this._register(e.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&s(e,t)}))),this._register(i.onDidChangeConfiguration((e=>{e.affectsConfiguration(R)&&r()}))),this._register(t.onDidColorThemeChange(r))}}class P extends o.JT{constructor(e,t,i){super(),this._themeService=e,this._modeService=t,this._logService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}get(e){return this._caches.has(e)||this._caches.set(e,new y.$(e.getLegend(),this._themeService,this._modeService,this._logService)),this._caches.get(e)}}class F{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}class B extends o.JT{constructor(e,t,i){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=i,this._fetchDocumentSemanticTokens=this._register(new p.pY((()=>this._fetchDocumentSemanticTokensNow()),B.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const n=()=>{(0,o.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of d.wT.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>this._fetchDocumentSemanticTokens.schedule(0))))};n(),this._register(d.wT.onDidChange((()=>{n(),this._fetchDocumentSemanticTokens.schedule()}))),this._register(t.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,S.Jc)(this._model))return void(this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1));const e=new m.A,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,S.ML)(this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e;const o=[],s=this._model.onDidChangeContent((e=>{o.push(e)}));n.then((e=>{if(this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticStyling.get(t);this._setDocumentSemanticTokens(t,i||null,n,o)}else this._setDocumentSemanticTokens(null,null,null,o)}),(e=>{e&&(r.VV(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||r.dL(e),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),o.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())}))}static _copy(e,t,i,n,o){for(let s=0;s<o;s++)i[n+s]=e[t+s]}_setDocumentSemanticTokens(e,t,i,n){const o=this._currentDocumentResponse,s=()=>{n.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.setSemanticTokens(null,!0),void s();if((0,S.Vj)(t)){if(!o)return void this._model.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:o.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const i=o.data,n=new Uint32Array(i.length+e);let s=i.length,r=n.length;for(let e=t.edits.length-1;e>=0;e--){const o=t.edits[e],a=s-(o.start+o.deleteCount);a>0&&(B._copy(i,s-a,n,r-a,a),r-=a),o.data&&(B._copy(o.data,0,n,r-o.data.length,o.data.length),r-=o.data.length),s=o.start}s>0&&B._copy(i,0,n,0,s),t={resultId:t.resultId,data:n}}}if((0,S.Vl)(t)){this._currentDocumentResponse=new F(e,t.resultId,t.data);const o=(0,y.h)(t,i,this._model.getLanguageId());if(n.length>0)for(const e of n)for(const t of o)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.setSemanticTokens(o,!0)}else this._model.setSemanticTokens(null,!0);s()}else this._model.setSemanticTokens(null,!1)}}B.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300},6709:(e,t,i)=>{i.d(t,{S:()=>n});const n=(0,i(7978).yh)("textModelService")},14281:(e,t,i)=>{i.d(t,{$:()=>d,h:()=>h});var n=i(18339),o=i(65700),s=i(71481),r=i(8167),a=i(34587),l=function(e,t){return function(i,n){t(i,n,e)}};let d=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._modeService=i,this._logService=n,this._hashTable=new u,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,i){const o=this._modeService.languageIdCodec.encodeLanguageId(i),r=this._hashTable.get(e,t,o);let a;if(r)a=r.metadata,this._logService.getLevel()===s.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${n.NX.getForeground(a)}, fontStyle ${n.NX.getFontStyle(a).toString(2)}`);else{let r=this._legend.tokenTypes[e];const l=[];if(r){let e=t;for(let t=0;e>0&&t<this._legend.tokenModifiers.length;t++)1&e&&l.push(this._legend.tokenModifiers[t]),e>>=1;e>0&&this._logService.getLevel()===s.in.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(r,l,i);void 0===n?a=2147483647:(a=0,void 0!==n.italic&&(a|=1|(n.italic?1:0)<<11),void 0!==n.bold&&(a|=2|(n.bold?2:0)<<11),void 0!==n.underline&&(a|=4|(n.underline?4:0)<<11),n.foreground&&(a|=8|n.foreground<<14),0===a&&(a=2147483647))}else this._logService.getLevel()===s.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,r="not-in-legend";this._hashTable.add(e,t,o,a),this._logService.getLevel()===s.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${r}) / ${t} (${l.join(" ")}): foreground ${n.NX.getForeground(a)}, fontStyle ${n.NX.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}};function h(e,t,i){const n=e.data,o=e.data.length/5|0,s=Math.max(Math.ceil(o/1024),400),a=[];let l=0,d=1,h=0;for(;l<o;){const e=l;let c=Math.min(e+s,o);if(c<o){let t=c;for(;t-1>e&&0===n[5*t];)t--;if(t-1===e){let e=c;for(;e+1<o&&0===n[5*e];)e++;c=e}else c=t}let u=new Uint32Array(4*(c-e)),g=0,p=0,m=0,f=0,_=0;for(;l<c;){const e=5*l,o=n[e],s=n[e+1],r=d+o|0,a=0===o?h+s|0:s,c=n[e+2],v=n[e+3],b=n[e+4],C=t.getMetadata(v,b,i);2147483647!==C&&(0===p&&(p=r),m===r&&_>a&&(t.warnOverlappingSemanticTokens(r,a+1),f<a?u[g-4+2]=a:g-=4),u[g]=r-p,u[g+1]=a,u[g+2]=a+c,u[g+3]=C,g+=4,m=r,f=a,_=a+c),d=r,h=a,l++}g!==u.length&&(u=u.subarray(0,g));const v=new r.Wz(p,new r.OU(u));a.push(v)}return a}d=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([l(1,o.XE),l(2,a.h),l(3,s.VZ)],d);class c{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class u{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=u._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<u._SIZES.length?2/3*this._currentLength:0),this._elements=[],u._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let i=0;i<t;i++)e[i]=null}_hash2(e,t){return(e<<5)-e+t|0}_hashFunc(e,t,i){return this._hash2(this._hash2(e,t),i)%this._currentLength}get(e,t,i){const n=this._hashFunc(e,t,i);let o=this._elements[n];for(;o;){if(o.tokenTypeIndex===e&&o.tokenModifierSet===t&&o.languageId===i)return o;o=o.next}return null}add(e,t,i,n){if(this._elementsCount++,0!==this._growCount&&this._elementsCount>=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=u._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<u._SIZES.length?2/3*this._currentLength:0),this._elements=[],u._nullOutEntries(this._elements,this._currentLength);for(const t of e){let e=t;for(;e;){const t=e.next;e.next=null,this._add(e),e=t}}}this._add(new c(e,t,i,n))}_add(e){const t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}u._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]},4849:(e,t,i)=>{i.d(t,{V:()=>o,y:()=>s});var n=i(7978);const o=(0,n.yh)("textResourceConfigurationService"),s=(0,n.yh)("textResourcePropertiesService")},17799:(e,t,i)=>{i.d(t,{B8:()=>d,Oe:()=>n,UL:()=>c,UX:()=>a,aq:()=>l,ld:()=>r,qq:()=>s,ug:()=>o,xi:()=>h});var n,o,s,r,a,l,d,h,c,u=i(85337);!function(e){e.noSelection=u.N("noSelection","No selection"),e.singleSelectionRange=u.N("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),e.singleSelection=u.N("singleSelection","Line {0}, Column {1}"),e.multiSelectionRange=u.N("multiSelectionRange","{0} selections ({1} characters selected)"),e.multiSelection=u.N("multiSelection","{0} selections"),e.emergencyConfOn=u.N("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=u.N("openingDocs","Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=u.N("readonlyDiffEditor"," in a read-only pane of a diff editor."),e.editableDiffEditor=u.N("editableDiffEditor"," in a pane of a diff editor."),e.readonlyEditor=u.N("readonlyEditor"," in a read-only code editor"),e.editableEditor=u.N("editableEditor"," in a code editor"),e.changeConfigToOnMac=u.N("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=u.N("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=u.N("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=u.N("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),e.tabFocusModeOnMsg=u.N("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=u.N("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),e.tabFocusModeOffMsg=u.N("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=u.N("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=u.N("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=u.N("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=u.N("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=u.N("showAccessibilityHelpAction","Show Accessibility Help")}(n||(n={})),function(e){e.inspectTokensAction=u.N("inspectTokens","Developer: Inspect Tokens")}(o||(o={})),function(e){e.gotoLineActionLabel=u.N("gotoLineActionLabel","Go to Line/Column...")}(s||(s={})),function(e){e.helpQuickAccessActionLabel=u.N("helpQuickAccess","Show all Quick Access Providers")}(r||(r={})),function(e){e.quickCommandActionLabel=u.N("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=u.N("quickCommandActionHelp","Show And Run Commands")}(a||(a={})),function(e){e.quickOutlineActionLabel=u.N("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=u.N("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(l||(l={})),function(e){e.editorViewAccessibleLabel=u.N("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=u.N("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(d||(d={})),function(e){e.toggleHighContrast=u.N("toggleHighContrast","Toggle High Contrast Theme")}(h||(h={})),function(e){e.bulkEditServiceSummary=u.N("bulkEditServiceSummary","Made {0} edits in {1} files")}(c||(c={}))},81312:(e,t,i)=>{i.d(t,{CE:()=>W,DD:()=>C,DS:()=>$,Dl:()=>L,HV:()=>ee,Jn:()=>Z,Kh:()=>a,L7:()=>X,Mm:()=>l,N5:()=>T,Qb:()=>Q,Re:()=>O,TC:()=>S,To:()=>J,UP:()=>V,Vs:()=>B,YF:()=>G,Ym:()=>_,Yp:()=>y,eS:()=>P,e_:()=>k,f9:()=>te,fY:()=>p,hw:()=>v,kp:()=>D,lK:()=>A,lS:()=>q,m$:()=>j,m1:()=>z,m3:()=>Y,m9:()=>R,n0:()=>g,oV:()=>U,r0:()=>H,tR:()=>f,ts:()=>K,x3:()=>I,zJ:()=>F,zk:()=>w,zu:()=>E,zw:()=>x});var n=i(85337),o=i(66051),s=i(98962),r=i(65700);const a=(0,s.P6)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},n.N("lineHighlight","Background color for the highlight of line at the cursor position.")),l=(0,s.P6)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},n.N("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),d=(0,s.P6)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},n.N("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),h=(0,s.P6)("editor.rangeHighlightBorder",{dark:null,light:null,hc:s.xL},n.N("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),c=(0,s.P6)("editor.symbolHighlightBackground",{dark:s.MU,light:s.MU,hc:null},n.N("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),u=(0,s.P6)("editor.symbolHighlightBorder",{dark:null,light:null,hc:s.xL},n.N("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),g=(0,s.P6)("editorCursor.foreground",{dark:"#AEAFAD",light:o.Il.black,hc:o.Il.white},n.N("caret","Color of the editor cursor.")),p=(0,s.P6)("editorCursor.background",null,n.N("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),m=(0,s.P6)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},n.N("editorWhitespaces","Color of whitespace characters in the editor.")),f=(0,s.P6)("editorIndentGuide.background",{dark:m,light:m,hc:m},n.N("editorIndentGuides","Color of the editor indentation guides.")),_=(0,s.P6)("editorIndentGuide.activeBackground",{dark:m,light:m,hc:m},n.N("editorActiveIndentGuide","Color of the active editor indentation guides.")),v=(0,s.P6)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:o.Il.white},n.N("editorLineNumbers","Color of editor line numbers.")),b=(0,s.P6)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:s.xL},n.N("editorActiveLineNumber","Color of editor active line number"),!1,n.N("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),C=(0,s.P6)("editorLineNumber.activeForeground",{dark:b,light:b,hc:b},n.N("editorActiveLineNumber","Color of editor active line number")),w=(0,s.P6)("editorRuler.foreground",{dark:"#5A5A5A",light:o.Il.lightgrey,hc:o.Il.white},n.N("editorRuler","Color of the editor rulers.")),y=(0,s.P6)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},n.N("editorCodeLensForeground","Foreground color of editor CodeLens")),S=(0,s.P6)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},n.N("editorBracketMatchBackground","Background color behind matching brackets")),L=(0,s.P6)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:s.lR},n.N("editorBracketMatchBorder","Color for matching brackets boxes")),x=(0,s.P6)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},n.N("editorOverviewRulerBorder","Color of the overview ruler border.")),k=(0,s.P6)("editorOverviewRuler.background",null,n.N("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),N=(0,s.P6)("editorGutter.background",{dark:s.cv,light:s.cv,hc:s.cv},n.N("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),D=(0,s.P6)("editorUnnecessaryCode.border",{dark:null,light:null,hc:o.Il.fromHex("#fff").transparent(.8)},n.N("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),E=(0,s.P6)("editorUnnecessaryCode.opacity",{dark:o.Il.fromHex("#000a"),light:o.Il.fromHex("#0007"),hc:null},n.N("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),I=(0,s.P6)("editorGhostText.border",{dark:null,light:null,hc:o.Il.fromHex("#fff").transparent(.8)},n.N("editorGhostTextBorder","Border color of ghost text in the editor.")),T=(0,s.P6)("editorGhostText.foreground",{dark:o.Il.fromHex("#ffffff56"),light:o.Il.fromHex("#0007"),hc:null},n.N("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),M=new o.Il(new o.VS(0,122,204,.6)),R=(0,s.P6)("editorOverviewRuler.rangeHighlightForeground",{dark:M,light:M,hc:M},n.N("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),A=(0,s.P6)("editorOverviewRuler.errorForeground",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hc:new o.Il(new o.VS(255,50,50,1))},n.N("overviewRuleError","Overview ruler marker color for errors.")),O=(0,s.P6)("editorOverviewRuler.warningForeground",{dark:s.uo,light:s.uo,hc:s.pW},n.N("overviewRuleWarning","Overview ruler marker color for warnings.")),P=(0,s.P6)("editorOverviewRuler.infoForeground",{dark:s.c6,light:s.c6,hc:s.T8},n.N("overviewRuleInfo","Overview ruler marker color for infos.")),F=(0,s.P6)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},n.N("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),B=(0,s.P6)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},n.N("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),W=(0,s.P6)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},n.N("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),V=(0,s.P6)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),H=(0,s.P6)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),z=(0,s.P6)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),K=(0,s.P6)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new o.Il(new o.VS(255,18,18,.8)),light:new o.Il(new o.VS(255,18,18,.8)),hc:new o.Il(new o.VS(255,50,50,1))},n.N("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),U=(0,s.P6)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),j=(0,s.P6)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),$=(0,s.P6)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),q=(0,s.P6)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),Z=(0,s.P6)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),G=(0,s.P6)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Q=(0,s.P6)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Y=(0,s.P6)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),J=(0,s.P6)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),X=(0,s.P6)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),ee=(0,s.P6)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),te=(0,s.P6)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));(0,r.Ic)(((e,t)=>{const i=e.getColor(s.cv);i&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }`);const n=e.getColor(s.NO);n&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const o=e.getColor(N);o&&t.addRule(`.monaco-editor .margin { background-color: ${o}; }`);const r=e.getColor(d);r&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${r}; }`);const a=e.getColor(h);a&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${a}; }`);const l=e.getColor(c);l&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${l}; }`);const g=e.getColor(u);g&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${g}; }`);const p=e.getColor(m);p&&(t.addRule(`.monaco-editor .mtkw { color: ${p} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${p} !important; }`))}))},73979:(e,t,i)=>{i.d(t,{EY:()=>o,Tj:()=>s});class n{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class o{constructor(e,t,i){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.color=i,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.color<t.color?-1:1}setColorZone(e){this._colorZone=e}getColorZones(){return this._colorZone}}class s{constructor(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(e){this._zones=e,this._zones.sort(o.compare)}setLineHeight(e){return this._lineHeight!==e&&(this._lineHeight=e,this._colorZonesInvalid=!0,!0)}setPixelRatio(e){this._pixelRatio=e,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(e){return this._domWidth!==e&&(this._domWidth=e,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(e){return this._domHeight!==e&&(this._domHeight=e,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(e){return this._outerHeight!==e&&(this._outerHeight=e,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),i=Math.floor(this.getCanvasHeight()),o=i/Math.floor(this._outerHeight),s=Math.floor(4*this._pixelRatio/2);let r=[];for(let a=0,l=this._zones.length;a<l;a++){const l=this._zones[a];if(!e){const e=l.getColorZones();if(e){r.push(e);continue}}const d=Math.floor(o*this._getVerticalOffsetForLine(l.startLineNumber)),h=Math.floor(o*(this._getVerticalOffsetForLine(l.endLineNumber)+t));let c=Math.floor((d+h)/2),u=h-c;u<s&&(u=s),c-u<0&&(c=u),c+u>i&&(c=i-u);const g=l.color;let p=this._color2Id[g];p||(p=++this._lastAssignedId,this._color2Id[g]=p,this._id2Color[p]=g);const m=new n(c-u,c+u,p);l.setColorZone(m),r.push(m)}return this._colorZonesInvalid=!1,r.sort(n.compare),r}}},10626:(e,t,i)=>{i.d(t,{Kp:()=>o,k:()=>a});var n=i(96024);class o{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(!o._equals(e[n],t[n]))return!1;return!0}static extractWrapped(e,t,i){if(0===e.length)return e;const n=t+1,s=i+1,r=i-t,a=[];let l=0;for(const t of e)t.endColumn<=n||t.startColumn>=s||(a[l++]=new o(Math.max(1,t.startColumn-n+1),Math.min(r+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];let s=[],r=0;for(let a=0,l=e.length;a<l;a++){const l=e[a],d=l.range;if(d.endLineNumber<t||d.startLineNumber>t)continue;if(d.isEmpty()&&(0===l.type||3===l.type))continue;const h=d.startLineNumber===t?d.startColumn:i,c=d.endLineNumber===t?d.endColumn:n;s[r++]=new o(h,c,l.inlineClassName,l.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=o._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className<t.className?-1:1:0}}class s{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class r{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i<n;i++)t|=e[i];return t}consumeLowerThan(e,t,i){for(;this.count>0&&this.stopOffsets[0]<e;){let e=0;for(;e+1<this.count&&this.stopOffsets[e]===this.stopOffsets[e+1];)e++;i.push(new s(t,this.stopOffsets[e],this.classNames.join(" "),r._metadata(this.metadata))),t=this.stopOffsets[e]+1,this.stopOffsets.splice(0,e+1),this.classNames.splice(0,e+1),this.metadata.splice(0,e+1),this.count-=e+1}return this.count>0&&t<e&&(i.push(new s(t,e-1,this.classNames.join(" "),r._metadata(this.metadata))),t=e),t}insert(e,t,i){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(i);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];let i=[];const o=new r;let s=0;for(let r=0,a=t.length;r<a;r++){const a=t[r];let l=a.startColumn,d=a.endColumn;const h=a.className,c=1===a.type?2:2===a.type?4:0;if(l>1){const t=e.charCodeAt(l-2);n.ZG(t)&&l--}if(d>1){const t=e.charCodeAt(d-2);n.ZG(t)&&d--}const u=l-1,g=d-2;s=o.consumeLowerThan(u,s,i),0===o.count&&(s=u),o.insert(g,h,c)}return o.consumeLowerThan(1073741824,s,i),i}}},12954:(e,t,i)=>{i.d(t,{IJ:()=>l,Nd:()=>d,d1:()=>u,tF:()=>p,zG:()=>a});var n=i(96024),o=i(25508),s=i(10626);class r{constructor(e,t,i){this._linePartBrand=void 0,this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class a{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class l{constructor(e,t,i,n,o,r,a,l,d,h,c,u,g,p,m,f,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=r,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=d.sort(s.Kp.compare),this.tabSize=h,this.startVisibleColumn=c,this.spaceWidth=u,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===f?4:"boundary"===f?1:"selection"===f?2:"trailing"===f?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort(((e,t)=>e.startOffset<t.startOffset?-1:1)),Math.abs(p-u)<Math.abs(g-u)?(this.renderSpaceWidth=p,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=g,this.renderSpaceCharCode=183)}sameSelection(e){if(null===this.selectionsOnLine)return null===e;if(null===e)return!1;if(e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&s.Kp.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)}}class d{constructor(e,t){this.partIndex=e,this.charIndex=t}}class h{constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(e){return(4294901760&e)>>>16}static getCharIndex(e){return(65535&e)>>>0}setColumnInfo(e,t,i,n){const o=(t<<16|i<<0)>>>0;this._data[e-1]=o,this._absoluteOffsets[e-1]=n+i}getAbsoluteOffset(e){return 0===this._absoluteOffsets.length?0:this._absoluteOffsets[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=h.getPartIndex(t),n=h.getCharIndex(t);return new d(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;let n=(e<<16|i<<0)>>>0,o=0,s=this.length-1;for(;o+1<s;){let e=o+s>>>1,t=this._data[e];if(t===n)return e;t>n?s=e:o=e}if(o===s)return o;let r=this._data[o],a=this._data[s];if(r===n)return o;if(a===n)return s;let l,d=h.getPartIndex(r),c=h.getCharIndex(r);return l=d!==h.getPartIndex(a)?t:h.getCharIndex(a),i-c<=l-i?o:s}}class c{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function u(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("<span>");let i=0,n=0,o=0;for(const s of e.lineDecorations)1!==s.type&&2!==s.type||(t.appendASCIIString('<span class="'),t.appendASCIIString(s.className),t.appendASCIIString('"></span>'),1===s.type&&(o|=1,i++),2===s.type&&(o|=2,n++));t.appendASCIIString("</span>");const s=new h(1,i+n);return s.setColumnInfo(1,i,0,0),new c(s,!1,o)}return t.appendASCIIString("<span><span></span></span>"),new c(new h(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,o=e.canUseHalfwidthRightwardsArrow,s=e.containsForeignElements,r=e.lineContent,a=e.len,l=e.isOverflowing,d=e.parts,u=e.fauxIndentLength,g=e.tabSize,p=e.startVisibleColumn,m=e.containsRTL,_=e.spaceWidth,v=e.renderSpaceCharCode,b=e.renderWhitespace,C=e.renderControlCharacters,w=new h(a+1,d.length);let y=!1,S=0,L=p,x=0,k=0,N=0,D=0;m?t.appendASCIIString('<span dir="ltr">'):t.appendASCIIString("<span>");for(let e=0,l=d.length;e<l;e++){D+=N;const l=d[e],h=l.endIndex,c=l.type,p=0!==b&&l.isWhitespace(),m=p&&!i&&("mtkw"===c||!s),E=S===h&&l.isPseudoAfter();if(x=0,t.appendASCIIString('<span class="'),t.appendASCIIString(m?"mtkz":c),t.appendASCII(34),p){let i=0;{let e=S,t=L;for(;e<h;e++){const n=0|(9===r.charCodeAt(e)?g-t%g:1);i+=n,e>=u&&(t+=n)}}for(m&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(_*i)),t.appendASCIIString('px"')),t.appendASCII(62);S<h;S++){let i;if(w.setColumnInfo(S+1,e-k,x,D),k=0,9===r.charCodeAt(S)){i=g-L%g|0,!o||i>1?t.write1(8594):t.write1(65515);for(let e=2;e<=i;e++)t.write1(160)}else i=1,t.write1(v);x+=i,S>=u&&(L+=i)}N=i}else{let i=0;for(t.appendASCII(62);S<h;S++){w.setColumnInfo(S+1,e-k,x,D),k=0;const o=r.charCodeAt(S);let s=1,a=1;switch(o){case 9:s=g-L%g,a=s;for(let e=1;e<=s;e++)t.write1(160);break;case 32:t.write1(160);break;case 60:t.appendASCIIString("&lt;");break;case 62:t.appendASCIIString("&gt;");break;case 38:t.appendASCIIString("&amp;");break;case 0:C?t.write1(9216):t.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:t.write1(65533);break;default:n.K7(o)&&a++,C&&o<32?t.write1(9216+o):C&&127===o?t.write1(9249):C&&f(o)?(t.appendASCIIString("[U+"),t.appendASCIIString(o.toString(16).toUpperCase().padStart(4,"0")),t.appendASCIIString("]"),s=8):t.write1(o)}x+=s,i+=s,S>=u&&(L+=a)}N=i}E?k++:k=0,S>=a&&!y&&l.isPseudoAfter()&&(y=!0,w.setColumnInfo(S+1,e,x,D)),t.appendASCIIString("</span>")}return y||w.setColumnInfo(a+1,d.length-1,x,D),l&&t.appendASCIIString("<span>&hellip;</span>"),t.appendASCIIString("</span>"),new c(w,m,s)}(function(e){const t=e.lineContent;let i,o;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<t.length?(i=!0,o=e.stopRenderingLineAfter):(i=!1,o=t.length);let a=function(e,t,i){let n=[],o=0;t>0&&(n[o++]=new r(t,"",0));for(let s=0,a=e.getCount();s<a;s++){const a=e.getEndOffset(s);if(a<=t)continue;const l=e.getClassName(s);if(a>=i){n[o++]=new r(i,l,0);break}n[o++]=new r(a,l,0)}return n}(e.lineTokens,e.fauxIndentLength,o);(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(a=function(e,t,i,o){const s=e.continuesWithWrappedLine,a=e.fauxIndentLength,l=e.tabSize,d=e.startVisibleColumn,h=e.useMonospaceOptimizations,c=e.selectionsOnLine,u=1===e.renderWhitespace,g=3===e.renderWhitespace,p=e.renderSpaceWidth!==e.spaceWidth;let m=[],f=0,_=0,v=o[_].type,b=o[_].endIndex;const C=o.length;let w,y=!1,S=n.LC(t);-1===S?(y=!0,S=i,w=i):w=n.ow(t);let L=!1,x=0,k=c&&c[x],N=d%l;for(let e=a;e<i;e++){const s=t.charCodeAt(e);let d;if(k&&e>=k.endOffset&&(x++,k=c&&c[x]),e<S||e>w)d=!0;else if(9===s)d=!0;else if(32===s)if(u)if(L)d=!0;else{const n=e+1<i?t.charCodeAt(e+1):0;d=32===n||9===n}else d=!0;else d=!1;if(d&&c&&(d=!!k&&k.startOffset<=e&&k.endOffset>e),d&&g&&(d=y||e>w),L){if(!d||!h&&N>=l){if(p)for(let t=(f>0?m[f-1].endIndex:a)+1;t<=e;t++)m[f++]=new r(t,"mtkw",1);else m[f++]=new r(e,"mtkw",1);N%=l}}else(e===b||d&&e>a)&&(m[f++]=new r(e,v,0),N%=l);for(9===s?N=l:n.K7(s)?N+=2:N++,L=d;e===b&&(_++,_<C);)v=o[_].type,b=o[_].endIndex}let D=!1;if(L)if(s&&u){let e=i>0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(D=!0)}else D=!0;if(D)if(p)for(let e=(f>0?m[f-1].endIndex:a)+1;e<=i;e++)m[f++]=new r(e,"mtkw",1);else m[f++]=new r(i,"mtkw",1);else m[f++]=new r(i,v,0);return m}(e,t,o,a));let l=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;t<i;t++){const i=e.lineDecorations[t];3===i.type||1===i.type?l|=1:2===i.type&&(l|=2)}a=function(e,t,i,n){n.sort(s.Kp.compare);const o=s.k.normalize(e,n),a=o.length;let l=0,d=[],h=0,c=0;for(let e=0,t=i.length;e<t;e++){const t=i[e],n=t.endIndex,s=t.type,u=t.metadata;for(;l<a&&o[l].startOffset<n;){const e=o[l];if(e.startOffset>c&&(c=e.startOffset,d[h++]=new r(c,s,u)),!(e.endOffset+1<=n)){c=n,d[h++]=new r(c,s+" "+e.className,u|e.metadata);break}c=e.endOffset+1,d[h++]=new r(c,s+" "+e.className,u|e.metadata),l++}n>c&&(c=n,d[h++]=new r(c,s,u))}const u=i[i.length-1].endIndex;if(l<a&&o[l].startOffset===u)for(;l<a&&o[l].startOffset===u;){const e=o[l];d[h++]=new r(c,e.className,e.metadata),l++}return d}(t,0,a,e.lineDecorations)}return e.containsRTL||(a=function(e,t,i){let n=0,o=[],s=0;if(i)for(let i=0,a=t.length;i<a;i++){const a=t[i],l=a.endIndex;if(n+50<l){const t=a.type,i=a.metadata;let d=-1,h=n;for(let a=n;a<l;a++)32===e.charCodeAt(a)&&(d=a),-1!==d&&a-h>=50&&(o[s++]=new r(d+1,t,i),h=d+1,d=-1);h!==l&&(o[s++]=new r(l,t,i))}else o[s++]=a;n=l}else for(let e=0,i=t.length;e<i;e++){const i=t[e],a=i.endIndex;let l=a-n;if(l>50){const e=i.type,t=i.metadata,d=Math.ceil(l/50);for(let i=1;i<d;i++){let a=n+50*i;o[s++]=new r(a,e,t)}o[s++]=new r(a,e,t)}else o[s++]=i;n=a}return o}(t,a,!e.isBasicASCII||e.fontLigatures)),e.renderControlCharacters&&!e.isBasicASCII&&(a=function(e,t){let i=[],n=new r(0,"",0),o=0;for(const s of t){const t=s.endIndex;for(;o<t;o++)f(e.charCodeAt(o))&&(o>n.endIndex&&(n=new r(o,s.type,s.metadata),i.push(n)),n=new r(o+1,"mtkcontrol",s.metadata),i.push(n));o>n.endIndex&&(n=new r(t,s.type,s.metadata),i.push(n))}return i}(t,a)),new m(e.useMonospaceOptimizations,e.canUseHalfwidthRightwardsArrow,t,o,i,a,l,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,e.containsRTL,e.spaceWidth,e.renderSpaceCharCode,e.renderWhitespace,e.renderControlCharacters)}(e),t)}class g{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function p(e){let t=(0,o.l$)(1e4),i=u(e,t);return new g(i.characterMapping,t.build(),i.containsRTL,i.containsForeignElements)}class m{constructor(e,t,i,n,o,s,r,a,l,d,h,c,u,g,p){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=o,this.parts=s,this.containsForeignElements=r,this.fauxIndentLength=a,this.tabSize=l,this.startVisibleColumn=d,this.containsRTL=h,this.spaceWidth=c,this.renderSpaceCharCode=u,this.renderWhitespace=g,this.renderControlCharacters=p}}function f(e){return e<32?9!==e:127===e||e>=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}},91445:(e,t,i)=>{i.d(t,{T:()=>o,o:()=>s});var n=i(21915);class o{constructor(e,t){this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class s{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,n.A)(e);const i=this.values,o=this.prefixSum,s=t.length;return 0!==s&&(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=(0,n.A)(e),t=(0,n.A)(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=(0,n.A)(e),t=(0,n.A)(t);const i=this.values,o=this.prefixSum;if(e>=i.length)return!1;let s=i.length-e;return t>=s&&(t=s),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,n.A)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,s=0,r=0;for(;t<=i;)if(n=t+(i-t)/2|0,s=this.prefixSum[n],r=s-this.values[n],e<r)i=n-1;else{if(!(e>=s))break;t=n+1}return new o(n,e-r)}}},76830:(e,t,i)=>{i.d(t,{$l:()=>p,$t:()=>u,IP:()=>h,SQ:()=>m,Wx:()=>g,l_:()=>r,le:()=>l,ud:()=>d,wA:()=>c});var n=i(96024),o=i(24028),s=i(78891);class r{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class a{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e,t){const i=this.outputLineIndex>0?t:0;return new o.L(e+this.outputLineIndex,i+this.outputOffset+1)}}class l{constructor(e,t,i,n,o){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=i,this.injectionOffsets=n,this.injectionOptions=o}getInputOffsetOfOutputPosition(e,t){let i=0;if(i=0===e?t:this.breakOffsets[e-1]+t,null!==this.injectionOffsets)for(let e=0;e<this.injectionOffsets.length&&i>this.injectionOffsets[e];e++)i<this.injectionOffsets[e]+this.injectionOptions[e].content.length?i=this.injectionOffsets[e]:i-=this.injectionOptions[e].content.length;return i}getOutputPositionOfInputOffset(e,t=2){let i=0;if(null!==this.injectionOffsets)for(let n=0;n<this.injectionOffsets.length&&!(e<this.injectionOffsets[n])&&(1===t||e!==this.injectionOffsets[n]);n++)i+=this.injectionOptions[n].content.length;return e+=i,this.getOutputPositionOfOffsetInUnwrappedLine(e,t)}getOutputPositionOfOffsetInUnwrappedLine(e,t=2){let i=0,n=this.breakOffsets.length-1,o=0,s=0;for(;i<=n;){o=i+(n-i)/2|0;const r=this.breakOffsets[o];if(s=o>0?this.breakOffsets[o-1]:0,0===t)if(e<=s)n=o-1;else{if(!(e>r))break;i=o+1}else if(e<s)n=o-1;else{if(!(e>=r))break;i=o+1}}return new a(o,e-s)}outputPositionToOffsetInUnwrappedLine(e,t){let i=(e>0?this.breakOffsets[e-1]:0)+t;return e>0&&(i-=this.wrappedTextIndentLength),i}normalizeOffsetAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t)return e===i.offsetInUnwrappedLine+i.length?i.offsetInUnwrappedLine+i.length:i.offsetInUnwrappedLine;if(1===t){let e=i.offsetInUnwrappedLine+i.length,t=i.injectedTextIndex;for(;t+1<this.injectionOffsets.length&&this.injectionOffsets[t+1]===this.injectionOffsets[t];)e+=this.injectionOptions[t+1].content.length,t++;return e}let n=i.offsetInUnwrappedLine,o=i.injectedTextIndex;for(;o-1>=0&&this.injectionOffsets[o-1]===this.injectionOffsets[o];)n-=this.injectionOptions[o-1].content.length,o++;return n}getInjectedText(e,t){const i=this.outputPositionToOffsetInUnwrappedLine(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let o=0;o<t.length;o++){const s=i[o].content.length,r=t[o]+n,a=t[o]+n+s;if(r>e)break;if(e<=a)return{injectedTextIndex:o,offsetInUnwrappedLine:r,length:s};n+=s}}}}class d{constructor(e,t){this.tabSize=e,this.data=t}}class h{constructor(e,t,i,n,o,s,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=s,this.inlineDecorations=r}}class c{constructor(e,t,i,n,o,s,r,a,l,d){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=c.isBasicASCII(i,s),this.containsRTL=c.containsRTL(i,this.isBasicASCII,o),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=d}static isBasicASCII(e,t){return!t||n.$i(e)}static containsRTL(e,t,i){return!(t||!i)&&n.Ut(e)}}class u{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class g{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new u(new s.e(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class p{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class m{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static cmp(e,t){return e.zIndex===t.zIndex?e.color<t.color?-1:e.color>t.color?1:0:e.zIndex-t.zIndex}}},52603:(e,t,i)=>{i.d(t,{xC:()=>N,Zg:()=>x,x$:()=>D,Qq:()=>I,Qs:()=>M});var n=i(40700),o=i(76345),s=i(28245),r=i(98147),a=i(59842),l=i(87022),d=i(56718),h=i(51732),c=i(45188),u=i(40658),g=i(24028),p=i(78891),m=i(87178),f=i(18339),_=i(33930),v=i(6709),b=i(1967),C=i(85337),w=i(34622);class y{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}var S=i(7978),L=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function x(e){if(!(e=e.filter((e=>e.range))).length)return;let{range:t}=e[0];for(let i=1;i<e.length;i++)t=p.e.plusRange(t,e[i].range);const{startLineNumber:i,endLineNumber:o}=t;i===o?1===e.length?(0,n.Z9)(C.N("hint11","Made 1 formatting edit on line {0}",i)):(0,n.Z9)(C.N("hintn1","Made {0} formatting edits on line {1}",e.length,i)):1===e.length?(0,n.Z9)(C.N("hint1n","Made 1 formatting edit between lines {0} and {1}",i,o)):(0,n.Z9)(C.N("hintnn","Made {0} formatting edits between lines {1} and {2}",e.length,i,o))}function k(e){const t=[],i=new Set,n=f.Az.ordered(e);for(const e of n)t.push(e),e.extensionId&&i.add(y.toKey(e.extensionId));const o=f.vN.ordered(e);for(const e of o){if(e.extensionId){if(i.has(y.toKey(e.extensionId)))continue;i.add(y.toKey(e.extensionId))}t.push({displayName:e.displayName,extensionId:e.extensionId,provideDocumentFormattingEdits:(t,i,n)=>e.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)})}return t}class N{static setFormatterSelector(e){return{dispose:N._selectors.unshift(e)}}static select(e,t,i){return L(this,void 0,void 0,(function*(){if(0===e.length)return;const n=a.$.first(N._selectors);return n?yield n(e,t,i):void 0}))}}function D(e,t,i,n,o,s){return L(this,void 0,void 0,(function*(){const r=e.get(S.TG),a=(0,u.CL)(t)?t.getModel():t,l=f.vN.ordered(a),d=yield N.select(l,a,n);d&&(o.report(d),yield r.invokeFunction(E,d,t,i,s))}))}function E(e,t,i,n,s){return L(this,void 0,void 0,(function*(){const r=e.get(_.p);let a,l;(0,u.CL)(i)?(a=i.getModel(),l=new c.Dl(i,5,void 0,s)):(a=i,l=new c.YQ(i,s));let d=[],h=0;for(let e of(0,o._2)(n).sort(p.e.compareRangesUsingStarts))h>0&&p.e.areIntersectingOrTouching(d[h-1],e)?d[h-1]=p.e.fromPositions(d[h-1].getStartPosition(),e.getEndPosition()):h=d.push(e);const g=e=>L(this,void 0,void 0,(function*(){return(yield t.provideDocumentRangeFormattingEdits(a,e,a.getFormattingOptions(),l.token))||[]})),f=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>p.e.plusRange(e,t.range)),e[0].range);if(!t.some((e=>p.e.intersectRanges(i,e.range))))return!1;for(let i of e)for(let e of t)if(p.e.intersectRanges(i.range,e.range))return!0;return!1},v=[],C=[];try{for(let e of d){if(l.token.isCancellationRequested)return!0;C.push(yield g(e))}for(let e=0;e<d.length;++e)for(let t=e+1;t<d.length;++t){if(l.token.isCancellationRequested)return!0;if(f(C[e],C[t])){const i=p.e.plusRange(d[e],d[t]),n=yield g(i);d.splice(t,1),d.splice(e,1),d.push(i),C.splice(t,1),C.splice(e,1),C.push(n),e=0,t=0}}for(let e of C){if(l.token.isCancellationRequested)return!0;const t=yield r.computeMoreMinimalEdits(a.uri,e);t&&v.push(...t)}}finally{l.dispose()}if(0===v.length)return!1;if((0,u.CL)(i))b.V.execute(i,v,!0),x(v),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=v,t=new m.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);a.pushEditOperations([t],v.map((e=>({text:e.text,range:p.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(p.e.areIntersectingOrTouching(i,t))return[new m.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function I(e,t,i,n,o){return L(this,void 0,void 0,(function*(){const s=e.get(S.TG),r=(0,u.CL)(t)?t.getModel():t,a=k(r),l=yield N.select(a,r,i);l&&(n.report(l),yield s.invokeFunction(T,l,t,i,o))}))}function T(e,t,i,n,o){return L(this,void 0,void 0,(function*(){const s=e.get(_.p);let r,a,l;(0,u.CL)(i)?(r=i.getModel(),a=new c.Dl(i,5,void 0,o)):(r=i,a=new c.YQ(i,o));try{const e=yield t.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield s.computeMoreMinimalEdits(r.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||0===l.length)return!1;if((0,u.CL)(i))b.V.execute(i,l,2!==n),2!==n&&(x(l),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1));else{const[{range:e}]=l,t=new m.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);r.pushEditOperations([t],l.map((e=>({text:e.text,range:p.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(p.e.areIntersectingOrTouching(i,t))return[new m.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function M(e,t,i,n,o){const a=f.ln.ordered(t);return 0===a.length||a[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,i,n,o,s.T.None)).catch(r.Cp).then((i=>e.computeMoreMinimalEdits(t.uri,i)))}N._selectors=new l.S,w.P.registerCommand("_executeFormatRangeProvider",(function(e,...t){return L(this,void 0,void 0,(function*(){const[i,n,a]=t;(0,d.p_)(h.o.isUri(i)),(0,d.p_)(p.e.isIRange(n));const l=e.get(v.S),c=e.get(_.p),u=yield l.createModelReference(i);try{return function(e,t,i,n,s){return L(this,void 0,void 0,(function*(){const a=f.vN.ordered(t);for(const l of a){let a=yield Promise.resolve(l.provideDocumentRangeFormattingEdits(t,i,n,s)).catch(r.Cp);if((0,o.Of)(a))return yield e.computeMoreMinimalEdits(t.uri,a)}}))}(c,u.object.textEditorModel,p.e.lift(n),a,s.T.None)}finally{u.dispose()}}))})),w.P.registerCommand("_executeFormatDocumentProvider",(function(e,...t){return L(this,void 0,void 0,(function*(){const[i,n]=t;(0,d.p_)(h.o.isUri(i));const a=e.get(v.S),l=e.get(_.p),c=yield a.createModelReference(i);try{return function(e,t,i,n){return L(this,void 0,void 0,(function*(){const s=k(t);for(const a of s){let s=yield Promise.resolve(a.provideDocumentFormattingEdits(t,i,n)).catch(r.Cp);if((0,o.Of)(s))return yield e.computeMoreMinimalEdits(t.uri,s)}}))}(l,c.object.textEditorModel,n,s.T.None)}finally{c.dispose()}}))})),w.P.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){return L(this,void 0,void 0,(function*(){const[i,n,o,s]=t;(0,d.p_)(h.o.isUri(i)),(0,d.p_)(g.L.isIPosition(n)),(0,d.p_)("string"==typeof o);const r=e.get(v.S),a=e.get(_.p),l=yield r.createModelReference(i);try{return M(a,l.object.textEditorModel,g.L.lift(n),o,s)}finally{l.dispose()}}))}))},1967:(e,t,i)=>{i.d(t,{V:()=>s});var n=i(14250),o=i(78891);class s{static _handleEolEdits(e,t){let i,n=[];for(let e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const r=s._handleEolEdits(e,t);1===r.length&&s._isFullModelReplaceEdit(e,r[0])?e.executeEdits("formatEditsCommand",r.map((e=>n.h.replace(o.e.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",r.map((e=>n.h.replaceMove(o.e.lift(e.range),e.text)))),i&&e.pushUndoStop()}}},25899:(e,t,i)=>{i.d(t,{Z:()=>n});const n=(0,i(7978).yh)("themeService")},72805:(e,t,i)=>{i.d(t,{Mj:()=>n.Mj,Q5:()=>n.Q5,Sf:()=>n.Sf,ZL:()=>n.ZL,e6:()=>n.e6,j6:()=>n.j6});var n=i(90850)},47537:(e,t,i)=>{i.d(t,{Mj:()=>n.Mj,Q5:()=>n.Q5,Sf:()=>n.Sf,e6:()=>n.e6,j6:()=>n.j6});var n=i(90850)},78325:(e,t,i)=>{i.d(t,{Mj:()=>n.Mj,Q5:()=>n.Q5,ZL:()=>n.ZL,e6:()=>n.e6,j6:()=>n.j6});var n=i(90850)},27336:(e,t,i)=>{i.d(t,{Mj:()=>n.Mj,Q5:()=>n.Q5,Sf:()=>n.Sf,ZL:()=>n.ZL,e6:()=>n.e6,eB:()=>n.eB,j6:()=>n.j6});var n=i(90850)},42582:(e,t,i)=>{i.d(t,{TG:()=>h}),i(90850);var n,o,s,r,a,l=i(27336);!function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext"}(n||(n={})),function(e){e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev"}(o||(o={})),function(e){e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed"}(s||(s={})),function(e){e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest"}(r||(r={})),function(e){e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs"}(a||(a={}));var d=function(){function e(e,t,i,n){this._onDidChange=new l.Q5,this._onDidExtraLibsChange=new l.Q5,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inlayHintsOptions",{get:function(){return this._inlayHintsOptions},enumerable:!1,configurable:!0}),e.prototype.getExtraLibs=function(){return this._extraLibs},e.prototype.addExtraLib=function(e,t){var i,n=this;if(i=void 0===t?"ts:extralib-"+Math.random().toString(36).substring(2,15):t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:function(){}};var o=1;return this._removedExtraLibs[i]&&(o=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(o=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:o},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var e=n._extraLibs[i];e&&e.version===o&&(delete n._extraLibs[i],n._removedExtraLibs[i]=o,n._fireOnDidExtraLibsChangeSoon())}}},e.prototype.setExtraLibs=function(e){for(var t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(var i=0,n=e;i<n.length;i++){var o=n[i],s=(t=o.filePath||"ts:extralib-"+Math.random().toString(36).substring(2,15),o.content),r=1;this._removedExtraLibs[t]&&(r=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:s,version:r}}this._fireOnDidExtraLibsChangeSoon()},e.prototype._fireOnDidExtraLibsChangeSoon=function(){var e=this;-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=window.setTimeout((function(){e._onDidExtraLibsChangeTimeout=-1,e._onDidExtraLibsChange.fire(void 0)}),0))},e.prototype.getCompilerOptions=function(){return this._compilerOptions},e.prototype.setCompilerOptions=function(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)},e.prototype.getDiagnosticsOptions=function(){return this._diagnosticsOptions},e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)},e.prototype.setWorkerOptions=function(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)},e.prototype.setInlayHintsOptions=function(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)},e.prototype.setMaximumWorkerIdleTime=function(e){},e.prototype.setEagerModelSync=function(e){this._eagerModelSync=e},e.prototype.getEagerModelSync=function(){return this._eagerModelSync},e}(),h=new d({allowNonTsExtensions:!0,target:r.Latest},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),c=new d({allowNonTsExtensions:!0,allowJs:!0,target:r.Latest},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{});function u(){return i.e(2276).then(i.bind(i,82276))}l.Mj.typescript={ModuleKind:n,JsxEmit:o,NewLineKind:s,ScriptTarget:r,ModuleResolutionKind:a,typescriptVersion:"4.4.4",typescriptDefaults:h,javascriptDefaults:c,getTypeScriptWorker:function(){return u().then((function(e){return e.getTypeScriptWorker()}))},getJavaScriptWorker:function(){return u().then((function(e){return e.getJavaScriptWorker()}))}},l.Mj.onLanguage("typescript",(function(){return u().then((function(e){return e.setupTypeScript(h)}))})),l.Mj.onLanguage("javascript",(function(){return u().then((function(e){return e.setupJavaScript(c)}))}))},85337:(e,t,i)=>{function n(e,t,...i){return function(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,i){const n=i[0];return void 0!==t[n]?t[n]:e})),i}(t,i)}i.d(t,{N:()=>n})},12088:(e,t,i)=>{i.d(t,{F:()=>o,U:()=>s});var n=i(72396);const o=(0,i(7978).yh)("accessibilityService"),s=new n.uy("accessibilityModeEnabled",!1)},58236:(e,t,i)=>{i.d(t,{BH:()=>_,NZ:()=>v,U8:()=>b,co:()=>f,eH:()=>m,vr:()=>p});var n=i(92981),o=i(85095),s=i(77538),r=i(59842),a=i(48646),l=i(87022),d=i(34622),h=i(72396),c=i(7978),u=i(65700),g=function(e,t){return function(i,n){t(i,n,e)}};function p(e){return void 0!==e.command}class m{constructor(e){this.id=m._idPool++,this._debugName=e}}m._idPool=0,m.CommandPalette=new m("CommandPalette"),m.EditorContext=new m("EditorContext"),m.SimpleEditorContext=new m("SimpleEditorContext"),m.EditorContextCopy=new m("EditorContextCopy"),m.EditorContextPeek=new m("EditorContextPeek"),m.MenubarEditMenu=new m("MenubarEditMenu"),m.MenubarCopy=new m("MenubarCopy"),m.MenubarGoMenu=new m("MenubarGoMenu"),m.MenubarSelectionMenu=new m("MenubarSelectionMenu"),m.InlineCompletionsActions=new m("InlineCompletionsActions");const f=(0,c.yh)("menuService"),_=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new s.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===m.CommandPalette}}addCommand(e){return this.addCommands(r.$.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,a.OF)((()=>{let t=!1;for(const i of e)t=this._commands.delete(i.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){return this.appendMenuItems(r.$.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,i=new l.S;for(const{id:n,item:o}of e){let e=this._menuItems.get(n);e||(e=new l.S,this._menuItems.set(n,e)),i.push(e.push(o)),t.add(n)}return this._onDidChangeMenu.fire(t),(0,a.OF)((()=>{if(i.size>0){for(let e of i)e();this._onDidChangeMenu.fire(t),i.clear()}}))}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===m.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)p(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class v extends n.wY{constructor(e,t,i,n){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,[],"submenu"),this.item=e,this._menuService=t,this._contextKeyService=i,this._options=n}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=t.getActions(this._options);t.dispose();for(const[,t]of i)t.length>0&&(e.push(...t),e.push(new n.Z0));return e.length&&e.pop(),e}}let b=class e{constructor(t,i,n,s,r){var a,l;if(this._commandService=r,this.id=t.id,this.label=(null==n?void 0:n.renderShortTitle)&&t.shortTitle?"string"==typeof t.shortTitle?t.shortTitle:t.shortTitle.value:"string"==typeof t.title?t.title:t.title.value,this.tooltip=null!==(l="string"==typeof t.tooltip?t.tooltip:null===(a=t.tooltip)||void 0===a?void 0:a.value)&&void 0!==l?l:"",this.enabled=!t.precondition||s.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=s.contextMatchesRules(e.condition),this.checked&&e.tooltip&&(this.tooltip="string"==typeof e.tooltip?e.tooltip:e.tooltip.value),e.title&&(this.label="string"==typeof e.title?e.title:e.title.value)}this.item=t,this.alt=i?new e(i,void 0,n,s,r):void 0,this._options=n,u.kS.isThemeIcon(t.icon)&&(this.class=o.dT.asClassName(t.icon))}dispose(){}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([g(3,h.i6),g(4,d.H)],b)},88915:(e,t,i)=>{i.d(t,{p:()=>n});const n=(0,i(7978).yh)("clipboardService")},34622:(e,t,i)=>{i.d(t,{H:()=>l,P:()=>d});var n=i(77538),o=i(59842),s=i(48646),r=i(87022),a=i(56718);const l=(0,i(7978).yh)("commandService"),d=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new n.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(let i of e.description.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return(0,a.D8)(n,t),i(e,...n)}}const{id:i}=e;let n=this._commands.get(i);n||(n=new r.S,this._commands.set(i,n));let o=n.unshift(e),l=(0,s.OF)((()=>{o();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return d.registerCommand(e,((e,...i)=>e.get(l).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return o.$.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};d.registerCommand("noop",(()=>{}))},1826:(e,t,i)=>{i.d(t,{KV:()=>l,MR:()=>u,Mt:()=>c,O4:()=>g,Od:()=>a,Ui:()=>r,xL:()=>d});var n=i(69868),o=i(7978),s=i(95954);const r=(0,o.yh)("configurationService");function a(e,t){const i=Object.create(null);for(let n in e)l(i,n,e[n],t);return i}function l(e,t,i,n){const o=t.split("."),s=o.pop();let r=e;for(let e=0;e<o.length;e++){let i=o[e],s=r[i];switch(typeof s){case"undefined":s=r[i]=Object.create(null);break;case"object":break;default:return void n(`Ignoring ${t} as ${o.slice(0,e+1).join(".")} is ${JSON.stringify(s)}`)}r=s}if("object"==typeof r&&null!==r)try{r[s]=i}catch(e){n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(r)}`)}else n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(r)}`)}function d(e,t){h(e,t.split("."))}function h(e,t){const i=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(i)){const n=e[i];"object"!=typeof n||Array.isArray(n)||(h(n,t),0===Object.keys(n).length&&delete e[i])}}else delete e[i]}function c(e,t,i){const n=function(e,t){let i=e;for(const e of t){if("object"!=typeof i||null===i)return;i=i[e]}return i}(e,t.split("."));return void 0===n?i:n}function u(){const e=s.B.as(n.IP.Configuration).getConfigurationProperties();return Object.keys(e)}function g(){const e=Object.create(null),t=s.B.as(n.IP.Configuration).getConfigurationProperties();for(let i in t)l(e,i,t[i].default,(e=>console.error(`Conflict in default settings: ${e}`)));return e}},69868:(e,t,i)=>{i.d(t,{G1:()=>_,IP:()=>l,Uh:()=>v});var n=i(77538),o=i(56718),s=i(85337),r=i(16206),a=i(95954);const l={Configuration:"base.contributions.configuration"},d={properties:{},patternProperties:{}},h={properties:{},patternProperties:{}},c={properties:{},patternProperties:{}},u={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},m="vscode://schemas/settings/resourceLanguage",f=a.B.as(r.I.JSONContribution),_=new RegExp("\\[.*\\]$");function v(e){return e.substring(1,e.length-1)}const b=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new n.Q5,this._onDidUpdateConfiguration=new n.Q5,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:s.N("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},f.registerSchema(m,this.resourceLanguageSettingsSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=this.doRegisterConfigurations(e,t);f.registerSchema(m,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t){const i=[];return e.forEach((e=>{i.push(...this.validateAndRegisterProperties(e,t,e.extensionInfo)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)})),i}validateAndRegisterProperties(e,t=!0,i,n=3){var s;n=o.Jp(e.scope)?n:e.scope;let r=[],a=e.properties;if(a)for(let e in a){if(t&&C(e)){delete a[e];continue}const l=a[e];this.updatePropertyDefaultValue(e,l),_.test(e)?l.scope=void 0:(l.scope=o.Jp(l.scope)?n:l.scope,l.restricted=o.Jp(l.restricted)?!!(null===(s=null==i?void 0:i.restrictedConfigurations)||void 0===s?void 0:s.includes(e)):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),r.push(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e])}let l=e.allOf;if(l)for(let e of l)r.push(...this.validateAndRegisterProperties(e,t,i,n));return r}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);let n=e.allOf;n&&n.forEach(t)};t(e)}updateSchema(e,t){switch(d.properties[e]=t,t.scope){case 1:h.properties[e]=t;break;case 2:c.properties[e]=t;break;case 6:u.properties[e]=t;break;case 3:g.properties[e]=t;break;case 4:p.properties[e]=t;break;case 5:p.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:s.N("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:s.N("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:m};this.updatePropertyDefaultValue(t,i),d.properties[t]=i,h.properties[t]=i,c.properties[t]=i,u.properties[t]=i,g.properties[t]=i,p.properties[t]=i}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let i=this.defaultValues[e];o.o8(i)&&(i=t.default),o.o8(i)&&(i=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=i}};function C(e){return e.trim()?_.test(e)?s.N("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==b.getConfigurationProperties()[e]?s.N("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):null:s.N("config.property.empty","Cannot register an empty property")}a.B.add(l.Configuration,b)},72396:(e,t,i)=>{i.d(t,{Ao:()=>d,Eq:()=>M,Fb:()=>h,K8:()=>O,i6:()=>T,uy:()=>I});var n=i(84483),o=i(96024),s=i(7978);let r=n.WE||"";const a=new Map;a.set("false",!1),a.set("true",!0),a.set("isMac",n.dz),a.set("isLinux",n.IJ),a.set("isWindows",n.ED),a.set("isWeb",n.$L),a.set("isMacNative",n.dz&&!n.$L),a.set("isEdge",r.indexOf("Edg/")>=0),a.set("isFirefox",r.indexOf("Firefox")>=0),a.set("isChrome",r.indexOf("Chrome")>=0),a.set("isSafari",r.indexOf("Safari")>=0);const l=Object.prototype.hasOwnProperty;class d{static has(e){return p.create(e)}static equals(e,t){return m.create(e,t)}static regex(e,t){return x.create(e,t)}static not(e){return b.create(e)}static and(...e){return D.create(e,null)}static or(...e){return E.create(e,null,!0)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let i=e.split("||");return E.create(i.map((e=>this._deserializeAndExpression(e,t))),null,!0)}static _deserializeAndExpression(e,t){let i=e.split("&&");return D.create(i.map((e=>this._deserializeOne(e,t))),null)}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){let i=e.split("!=");return v.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return m.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return x.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return f.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return y.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return w.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return L.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return S.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?b.create(e.substr(1).trim()):p.create(e)}static _deserializeValue(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if((0,o.m5)(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let i=e.indexOf("/"),n=e.lastIndexOf("/");if(i===n||i<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let s=e.slice(i+1,n),r="i"===e[n+1]?"i":"";try{return new RegExp(s,r)}catch(i){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${i}`);return console.warn(`bad regexp-value '${e}', parse error: ${i}`),null}}}function h(e,t){const i=e?e.substituteConstants():void 0,n=t?t.substituteConstants():void 0;return!i&&!n||!(!i||!n)&&i.equals(n)}function c(e,t){return e.cmp(t)}class u{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return g.INSTANCE}}u.INSTANCE=new u;class g{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return u.INSTANCE}}g.INSTANCE=new g;class p{constructor(e,t){this.key=e,this.negated=t,this.type=2}static create(e,t=null){const i=a.get(e);return"boolean"==typeof i?i?g.INSTANCE:u.INSTANCE:new p(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:R(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=a.get(this.key);return"boolean"==typeof e?e?g.INSTANCE:u.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this)),this.negated}}class m{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}static create(e,t,i=null){if("boolean"==typeof t)return t?p.create(e,i):b.create(e,i);const n=a.get(e);return"boolean"==typeof n?t===(n?"true":"false")?g.INSTANCE:u.INSTANCE:new m(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=a.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?g.INSTANCE:u.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this.value,this)),this.negated}}class f{constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}static create(e,t){return new f(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.indexOf(i)>=0:"string"==typeof i&&"object"==typeof t&&null!==t&&l.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=_.create(this)),this.negated}}class _{constructor(e){this._actual=e,this.type=11}static create(e){return new _(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class v{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}static create(e,t,i=null){if("boolean"==typeof t)return t?b.create(e,i):p.create(e,i);const n=a.get(e);return"boolean"==typeof n?t===(n?"true":"false")?u.INSTANCE:g.INSTANCE:new v(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=a.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?u.INSTANCE:g.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this.value,this)),this.negated}}class b{constructor(e,t){this.key=e,this.negated=t,this.type=3}static create(e,t=null){const i=a.get(e);return"boolean"==typeof i?i?u.INSTANCE:g.INSTANCE:new b(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:R(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=a.get(this.key);return"boolean"==typeof e?e?u.INSTANCE:g.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this)),this.negated}}function C(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):u.INSTANCE}class w{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}static create(e,t,i=null){return C(t,(t=>new w(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this.key,this.value,this)),this.negated}}class y{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}static create(e,t,i=null){return C(t,(t=>new y(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this.value,this)),this.negated}}class S{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}static create(e,t,i=null){return C(t,(t=>new S(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}class L{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}static create(e,t,i=null){return C(t,(t=>new L(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=w.create(this.key,this.value,this)),this.negated}}class x{constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}static create(e,t){return new x(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return t<i?-1:t>i?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=k.create(this)),this.negated}}class k{constructor(e){this._actual=e,this.type=8}static create(e){return new k(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function N(e){let t=null;for(let i=0,n=e.length;i<n;i++){const n=e[i].substituteConstants();if(e[i]!==n&&null===t){t=[];for(let n=0;n<i;n++)t[n]=e[n]}null!==t&&(t[i]=n)}return null===t?e:t}class D{constructor(e,t){this.expr=e,this.negated=t,this.type=6}static create(e,t){return D._normalizeArr(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=c(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=N(this.expr);return e===this.expr?this:D.create(e,this.negated)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].evaluate(e))return!1;return!0}static _normalizeArr(e,t){const i=[];let n=!1;for(const t of e)if(t)if(1!==t.type){if(0===t.type)return u.INSTANCE;6!==t.type?i.push(t):i.push(...t.expr)}else n=!0;if(0===i.length&&n)return g.INSTANCE;if(0!==i.length){if(1===i.length)return i[0];i.sort(c);for(let e=1;e<i.length;e++)i[e-1].equals(i[e])&&(i.splice(e,1),e--);if(1===i.length)return i[0];for(;i.length>1;){const e=i[i.length-1];if(9!==e.type)break;i.pop();const t=i.pop(),n=0===i.length,o=E.create(e.expr.map((e=>D.create([e,t],null))),null,n);o&&(i.push(o),i.sort(c))}return 1===i.length?i[0]:new D(i,t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(let t of this.expr)e.push(t.negate());this.negated=E.create(e,this,!0)}return this.negated}}class E{constructor(e,t){this.expr=e,this.negated=t,this.type=9}static create(e,t,i){return E._normalizeArr(e,t,i)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=c(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=N(this.expr);return e===this.expr?this:E.create(e,this.negated,!1)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(this.expr[t].evaluate(e))return!0;return!1}static _normalizeArr(e,t,i){let n=[],o=!1;if(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];if(i)if(0!==i.type){if(1===i.type)return g.INSTANCE;9!==i.type?n.push(i):n=n.concat(i.expr)}else o=!0}if(0===n.length&&o)return u.INSTANCE;n.sort(c)}if(0!==n.length){if(1===n.length)return n[0];for(let e=1;e<n.length;e++)n[e-1].equals(n[e])&&(n.splice(e,1),e--);if(1===n.length)return n[0];if(i){for(let e=0;e<n.length;e++)for(let t=e+1;t<n.length;t++)O(n[e],n[t])&&(n.splice(t,1),t--);if(1===n.length)return n[0]}return new E(n,t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of P(t))for(const t of P(i))n.push(D.create([e,t],null));const o=0===e.length;e.unshift(E.create(n,null,o))}this.negated=e[0]}return this.negated}}class I extends p{constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?I._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&I._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}static all(){return I._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return m.create(this.key,e)}}I._info=[];const T=(0,s.yh)("contextKeyService"),M="setContext";function R(e,t){return e<t?-1:e>t?1:0}function A(e,t,i,n){return e<i?-1:e>i?1:t<n?-1:t>n?1:0}function O(e,t){if(6===t.type&&9!==e.type&&6!==e.type)for(const i of t.expr)if(e.equals(i))return!0;const i=P(e.negate()).concat(P(t));i.sort(c);for(let e=0;e<i.length;e++){const t=i[e].negate();for(let n=e+1;n<i.length;n++){const e=i[n];if(t.equals(e))return!0}}return!1}function P(e){return 9===e.type?e.expr:[e]}},53551:(e,t,i)=>{i.d(t,{c:()=>s,d:()=>r});var n=i(84483),o=i(85337);const s=new(i(72396).uy)("isWindows",n.ED,(0,o.N)("isWindows","Whether the operating system is Windows")),r="inputFocus"},40094:(e,t,i)=>{i.d(t,{i:()=>s,u:()=>o});var n=i(7978);const o=(0,n.yh)("contextViewService"),s=(0,n.yh)("contextMenuService")},73444:(e,t,i)=>{i.d(t,{S:()=>n});const n=(0,i(7978).yh)("dialogService")},54231:(e,t,i)=>{i.d(t,{M:()=>n});class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},82415:(e,t,i)=>{i.d(t,{d:()=>r,z:()=>s});var n=i(54231);const o=[];function s(e,t,i){t instanceof n.M||(t=new n.M(t,[],i)),o.push([e,t])}function r(){return o}},7978:(e,t,i)=>{var n;i.d(t,{I8:()=>n,TG:()=>o,jt:()=>a,yh:()=>r}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(n||(n={}));const o=r("instantiationService");function s(e,t,i,o){t[n.DI_TARGET]===t?t[n.DI_DEPENDENCIES].push({id:e,index:i,optional:o}):(t[n.DI_DEPENDENCIES]=[{id:e,index:i,optional:o}],t[n.DI_TARGET]=t)}function r(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");s(t,e,n,!1)};return t.toString=()=>e,n.serviceIds.set(e,t),t}function a(e){return function(t,i,n){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");s(e,t,n,!0)}}},29427:(e,t,i)=>{i.d(t,{y:()=>n});class n{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}},16206:(e,t,i)=>{i.d(t,{I:()=>s});var n=i(77538),o=i(95954);const s={JSONContribution:"base.contributions.json"},r=new class{constructor(){this._onDidChangeSchema=new n.Q5,this.schemasById={}}registerSchema(e,t){var i;this.schemasById[(i=e,i.length>0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};o.B.add(s.JSONContribution,r)},42162:(e,t,i)=>{i.d(t,{d:()=>n});const n=(0,i(7978).yh)("keybindingService")},95272:(e,t,i)=>{i.d(t,{W:()=>l});var n=i(82095),o=i(84483),s=i(34622),r=i(95954);class a{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===o.OS){if(e&&e.win)return e.win}else if(2===o.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=a.bindToCurrentPlatform(e);if(t&&t.primary){const i=(0,n.gm)(t.primary,o.OS);i&&this._registerDefaultKeybinding(i,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let i=0,s=t.secondary.length;i<s;i++){const s=t.secondary[i],r=(0,n.gm)(s,o.OS);r&&this._registerDefaultKeybinding(r,e.id,e.args,e.weight,-i-1,e.when)}}registerCommandAndKeybindingRule(e){this.registerKeybindingRule(e),s.P.registerCommand(e)}static _mightProduceChar(e){return e>=21&&e<=30||e>=31&&e<=56||80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&a._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,n,s,r){1===o.OS&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e.parts,command:t,commandArgs:i,when:r,weight1:n,weight2:s,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(d)),this._cachedMergedKeybindings.slice(0)}}const l=new a;function d(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.command<t.command?-1:e.command>t.command?1:e.weight2-t.weight2}r.B.add("platform.keybindingsRegistry",l)},3143:(e,t,i)=>{i.d(t,{e:()=>n});const n=(0,i(7978).yh)("labelService")},53058:(e,t,i)=>{i.d(t,{Lw:()=>lt,XN:()=>dt,ls:()=>Ut,ev:()=>Rt,CQ:()=>ut});var n=i(48696),o=i(76345),s=i(28245),r=i(77538),a=i(48646),l=(i(71512),i(14785));class d{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:a.JT.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);const r=new s.A,a=o.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class h{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}class c{constructor(e,t,i,n,o={}){const s=()=>this.model,r=n.map((e=>new d(e,s)));this.list=new l.aV(e,t,i,r,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new h(e,t.accessibilityProvider)})}(s,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return r.ju.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return r.ju.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return r.ju.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,o.w6)(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var u=i(23599),g=i(93379),p=i.n(g),m=i(7795),f=i.n(m),_=i(90569),v=i.n(_),b=i(3565),C=i.n(b),w=i(19216),y=i.n(w),S=i(44589),L=i.n(S),x=i(99500),k={};k.styleTagTransform=L(),k.setAttributes=C(),k.insert=v().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=y(),p()(x.Z,k),x.Z&&x.Z.locals&&x.Z.locals;class N{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=N.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-table-tr")),i=[],o=[];for(let e=0;e<this.columns.length;e++){const s=this.renderers[e],r=(0,n.R3)(t,(0,n.$)(".monaco-table-td",{"data-col-index":e}));r.style.width=`${this.getColumnSize(e)}px`,i.push(r),o.push(s.renderTemplate(r))}const s={container:e,cellContainers:i,cellTemplateData:o};return this.renderedTemplates.add(s),s}renderElement(e,t,i,n){for(let o=0;o<this.columns.length;o++){const s=this.columns[o].project(e);this.renderers[o].renderElement(s,t,i.cellTemplateData[o],n)}}disposeElement(e,t,i,n){for(let o=0;o<this.columns.length;o++){const s=this.renderers[o];if(s.disposeElement){const r=this.columns[o].project(e);s.disposeElement(r,t,i.cellTemplateData[o],n)}}}disposeTemplate(e){for(let t=0;t<this.columns.length;t++)this.renderers[t].disposeTemplate(e.cellTemplateData[t]);(0,n.PO)(e.container),this.renderedTemplates.delete(e)}layoutColumn(e,t){for(const{cellContainers:i}of this.renderedTemplates)i[e].style.width=`${t}px`}}N.TemplateId="row";class D{constructor(e,t){this.column=e,this.index=t,this._onDidLayout=new r.Q5,this.onDidLayout=this._onDidLayout.event,this.element=(0,n.$)(".monaco-table-th",{"data-col-index":t,title:e.tooltip},e.label)}get minimumSize(){var e;return null!==(e=this.column.minimumWidth)&&void 0!==e?e:120}get maximumSize(){var e;return null!==(e=this.column.maximumWidth)&&void 0!==e?e:Number.POSITIVE_INFINITY}get onDidChange(){var e;return null!==(e=this.column.onDidChangeWidthConstraints)&&void 0!==e?e:r.ju.None}layout(e){this._onDidLayout.fire([this.index,e])}}class E{constructor(e,t,i,o,s,a){this.virtualDelegate=i,this.domId="table_id_"+ ++E.InstanceCount,this.cachedHeight=0,this.domNode=(0,n.R3)(t,(0,n.$)(`.monaco-table.${this.domId}`));const d=o.map(((e,t)=>new D(e,t))),h={size:d.reduce(((e,t)=>e+t.column.weight),0),views:d.map((e=>({size:e.column.weight,view:e})))};this.splitview=new u.z(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:h}),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const c=new N(o,s,(e=>this.splitview.getViewSize(e)));var g;this.list=new l.aV(e,this.domNode,(g=i,{getHeight:e=>g.getHeight(e),getTemplateId:()=>N.TemplateId}),[c],a),this.columnLayoutDisposable=r.ju.any(...d.map((e=>e.onDidLayout)))((([e,t])=>c.layoutColumn(e,t))),this.styleElement=(0,n.dS)(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}E.InstanceCount=0;var I,T=i(68413),M=i(94961),R=i(74152),A=i(63304);!function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element"}(I||(I={}));class O extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class P{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}var F=i(68081),B=i(59842);function W(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function V(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function H(e){return"boolean"==typeof e.collapsible}class z{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new r.E7,this._onDidChangeCollapseState=new r.Q5,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new r.Q5,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new r.Q5,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=B.$.empty(),n={}){if(0===e.length)throw new O(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,o,s){var r;void 0===n&&(n=B.$.empty()),void 0===s&&(s=null!==(r=o.diffDepth)&&void 0!==r?r:0);const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,o);const l=[...n],d=t[t.length-1],h=new F.Hs({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,d),...l,...a.children.slice(d+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(h.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);const c=t.slice(0,-1),u=(t,i,n)=>{if(s>0)for(let r=0;r<n;r++)t--,i--,this.spliceSmart(e,[...c,t,0],Number.MAX_SAFE_INTEGER,l[i].children,o,s-1)};let g=Math.min(a.children.length,d+i),p=l.length;for(const e of h.changes.sort(((e,t)=>t.originalStart-e.originalStart)))u(g,p,g-(e.originalStart+e.originalLength)),g=e.originalStart,p=e.modifiedStart-d,this.spliceSimple([...c,g],e.originalLength,B.$.slice(l,p,p+e.modifiedLength),o);u(g,p,g)}spliceSimple(e,t,i=B.$.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:d,visible:h}=this.getParentNodeWithListIndex(e),c=[],u=B.$.map(i,(e=>this.createTreeNode(e,a,a.visible?1:0,d,c,n))),g=e[e.length-1],p=a.children.length>0;let m=0;for(let e=g;e>=0&&e<a.children.length;e--){const t=a.children[e];if(t.visible){m=t.visibleChildIndex;break}}const f=[];let _=0,v=0;for(const e of u)f.push(e),v+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=m+_++);const b=(0,o.db)(a.children,g,t,f);r?a.lastDiffIds?(0,o.db)(a.lastDiffIds,g,t,f.map((e=>r.getId(e.element).toString()))):a.lastDiffIds=a.children.map((e=>r.getId(e.element).toString())):a.lastDiffIds=void 0;let C=0;for(const e of b)e.visible&&C++;if(0!==C)for(let e=g+f.length;e<a.children.length;e++){const t=a.children[e];t.visible&&(t.visibleChildIndex-=C)}if(a.visibleChildrenCount+=_-C,d&&h){const e=b.reduce(((e,t)=>e+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(a,v-e),this.list.splice(l,e,c)}if(b.length>0&&s){const e=t=>{s(t),t.children.forEach(e)};b.forEach(e)}const w=a.children.length>0;p!==w&&this.setCollapsible(e.slice(0,-1),w),this._onDidSplice.fire({insertedNodes:f,deletedNodes:b});let y=a;for(;y;){if(2===y.visibility){this.refilter();break}y=y.parent}}rerender(e){if(0===e.length)throw new O(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,o)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&s&&!H(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e<i.children.length;e++)if(i.children[e].visible){if(n>-1){n=-1;break}n=e}n>-1&&this._setCollapseState([...e,n],t)}return s}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const s=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=s-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(H(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!H(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t)}createTreeNode(e,t,i,n,o,s){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&o.push(r);const l=e.children||B.$.empty(),d=n&&0!==a&&!r.collapsed,h=B.$.map(l,(e=>this.createTreeNode(e,r,a,d,o,s)));let c=0,u=1;for(const e of h)r.children.push(e),u+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=c++);return r.collapsible=r.collapsible||r.children.length>0,r.visibleChildrenCount=c,r.visible=2===a?c>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=u):(r.renderNodeCount=0,n&&o.pop()),s&&s(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const s=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const s of e.children)r=this._updateNodeAfterFilterChange(s,o,i,n&&!e.collapsed)||r,s.visible&&(s.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?r:1===o,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-s):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):W(i)?(e.filterData=i.data,V(i.visibility)):(e.filterData=void 0,V(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new O(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:o}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>t.children.length)throw new O(this.user,"Invalid tree location");const r=t.children[s];return{node:r,listIndex:i,revealed:n,visible:o&&r.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){const[s,...r]=e;if(s<0||s>t.children.length)throw new O(this.user,"Invalid tree location");for(let e=0;e<s;e++)i+=t.children[e].renderNodeCount;return n=n&&!t.collapsed,o=o&&t.visible,0===r.length?{parentNode:t,listIndex:i,revealed:n,visible:o}:this.getParentNodeWithListIndex(r,t.children[s],i+1,n,o)}getNode(e=[]){return this.getTreeNode(e)}getNodeLocation(e){const t=[];let i=e;for(;i.parent;)t.push(i.parent.children.indexOf(i)),i=i.parent;return t.reverse()}getParentNodeLocation(e){return 0===e.length?void 0:1===e.length?[]:(0,o.JH)(e)[0]}}var K=i(85095);const U=(0,K.CM)("tree-item-expanded",K.lA.chevronDown),j=(0,K.CM)("tree-filter-on-type-on",K.lA.listFilter),$=(0,K.CM)("tree-filter-on-type-off",K.lA.listSelection),q=(0,K.CM)("tree-filter-clear",K.lA.close),Z=(0,K.CM)("tree-item-loading",K.lA.loading);var G=i(10554),Q=i(59642),Y=i(45303),J=i(43758),X=i(84483),ee=i(9263),te={};te.styleTagTransform=L(),te.setAttributes=C(),te.insert=v().bind(null,"head"),te.domAPI=f(),te.insertStyleElement=y(),p()(ee.Z,te),ee.Z&&ee.Z.locals&&ee.Z.locals;var ie,ne=i(85337);class oe extends T.kX{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function se(e){return e instanceof T.kX?new oe(e):e}class re{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=a.JT.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(se(e),t)}onDragOver(e,t,i,n,s=!0){const r=this.dnd.onDragOver(se(e),t&&t.element,i,n),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return r;if(a&&"boolean"!=typeof r&&r.autoExpand&&(this.autoExpandDisposable=(0,G.Vg)((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500)),"boolean"==typeof r||!r.accept||void 0===r.bubble||r.feedback)return s?r:{accept:"boolean"==typeof r?r:r.accept,effect:"boolean"==typeof r?void 0:r.effect,feedback:[i]};if(1===r.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),s=i.getParentNodeLocation(o),r=i.getNode(s),a=s&&i.getListIndex(s);return this.onDragOver(e,r,a,n,!1)}const l=this.modelProvider(),d=l.getNodeLocation(t),h=l.getListIndex(d),c=l.getListRenderCount(d);return Object.assign(Object.assign({},r),{feedback:(0,o.w6)(h,h+c)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(se(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}class ae{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(ie||(ie={}));class le{constructor(e,t=[]){this._elements=t,this.onDidChange=r.ju.forEach(e,(e=>this._elements=e))}get elements(){return this._elements}}class de{constructor(e,t,i,n,o={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=de.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new Q.r,this.activeIndentNodes=new Set,this.indentGuidesDisposable=a.JT.None,this.disposables=new a.SL,this.templateId=e.templateId,this.updateOptions(o),r.ju.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent&&(this.indent=(0,J.u)(e.indent,0,40)),void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==ie.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new a.SL;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-tl-row")),i=(0,n.R3)(t,(0,n.$)(".monaco-tl-indent")),o=(0,n.R3)(t,(0,n.$)(".monaco-tl-twistie")),s=(0,n.R3)(t,(0,n.$)(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:o,indentGuidesDisposable:a.JT.None,templateData:r}}renderElement(e,t,i,n){"number"==typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const o=de.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${o}px`,i.indent.style.width=o+this.indent-16+"px",this.renderTwistie(e,i),"number"==typeof n&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...U.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...U.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if((0,n.PO)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new a.SL,o=this.modelProvider();let s=e;for(;;){const e=o.getNodeLocation(s),r=o.getParentNodeLocation(e);if(!r)break;const l=o.getNode(r),d=(0,n.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&d.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(d):t.indent.insertBefore(d,t.indent.firstElementChild),this.renderedIndentGuides.add(l,d),i.add((0,a.OF)((()=>this.renderedIndentGuides.delete(l,d)))),s=l}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(e){}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,a.B9)(this.disposables)}}de.DefaultIndent=8;class he{constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new a.SL,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const i=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return i;let n;if(n="boolean"==typeof i?i?1:0:W(i)?V(i.visibility):i,0===n)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:Y.CL.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=Array.isArray(i)?i:[i];for(const e of n){const t=e&&e.toString();if(void 0===t)return{data:Y.CL.Default,visibility:!0};const i=(0,Y.EW)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,!0);if(i)return this._matchCount++,1===n.length?{data:i,visibility:!0}:{data:{label:t,score:i},visibility:!0}}return this.tree.options.filterOnType?2:{data:Y.CL.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,a.B9)(this.disposables)}}class ce{constructor(e,t,i,o,s){this.tree=e,this.view=i,this.filter=o,this.keyboardNavigationDelegate=s,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new r.Q5,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new r.Q5,this.enabledDisposables=new a.SL,this.disposables=new a.SL,this.domNode=(0,n.$)(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add((0,n.nm)(this.domNode,"dragstart",(()=>this.onDragStart()))),this.messageDomNode=(0,n.R3)(i.getHTMLElement(),(0,n.$)(".monaco-list-type-filter-message")),this.labelDomNode=(0,n.R3)(this.domNode,(0,n.$)("span.label"));const l=(0,n.R3)(this.domNode,(0,n.$)(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=(0,n.R3)(l,(0,n.$)("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add((0,n.nm)(this.filterOnTypeDomNode,"input",(()=>this.onDidChangeFilterOnType()))),this.clearDomNode=(0,n.R3)(l,(0,n.$)("button.clear"+q.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=(0,ne.N)("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),void 0!==e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=this.enabledDisposables.add(new R.Y(this.view.getHTMLElement(),"keydown")),t=r.ju.chain(e.event).filter((e=>!(0,l.cK)(e.target)||e.target===this.filterOnTypeDomNode)).filter((e=>"Dead"!==e.key&&!/^Media/.test(e.key))).map((e=>new A.y(e))).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter((()=>this.automaticKeyboardNavigation||this.triggered)).filter((e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(X.dz?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey)).forEach((e=>{e.stopPropagation(),e.preventDefault()})).event,i=this.enabledDisposables.add(new R.Y(this.clearDomNode,"click"));r.ju.chain(r.ju.any(t,i.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"==typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(X.dz?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,(e=>!Y.CL.isDefault(e.filterData)));const i=this.tree.getFocus();if(i.length>0){const e=i[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=(0,n.i)(e),i=e.clientWidth,o=i/2,s=this.domNode.clientWidth,r=new a.SL;let l=this.positionClassName;const d=()=>{switch(l){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=i-s-6+"px"}},h=()=>{this.positionClassName=l,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",(0,a.B9)(r)};d(),this.domNode.classList.remove(l),this.domNode.classList.add("dragging"),r.add((0,a.OF)((()=>this.domNode.classList.remove("dragging")))),r.add((0,n.nm)(document,"dragover",(e=>(e=>{e.preventDefault();const i=e.clientX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),l=i<o?"nw":"ne",d()})(e)))),r.add((0,n.nm)(this.domNode,"dragend",(()=>h()))),M.P$.CurrentDragAndDropData=new M.TN("vscode-ui"),r.add((0,a.OF)((()=>M.P$.CurrentDragAndDropData=void 0)))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...$.classNamesArray),this.filterOnTypeDomNode.classList.add(...j.classNamesArray),this.filterOnTypeDomNode.title=(0,ne.N)("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...j.classNamesArray),this.filterOnTypeDomNode.classList.add(...$.classNamesArray),this.filterOnTypeDomNode.title=(0,ne.N)("enable filter on type","Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=(0,ne.N)("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=(0,ne.N)("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||this.filter.totalCount>0&&this.filter.matchCount<=1||!Y.CL.isDefault(e.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),(0,a.B9)(this.disposables)}}function ue(e){let t=I.Unknown;return(0,n.uU)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=I.Twistie:(0,n.uU)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=I.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function ge(e,t){t(e),e.children.forEach((e=>ge(e,t)))}class pe{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new r.Q5,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){var i;!(null===(i=t)||void 0===i?void 0:i.__forceEvent)&&(0,o.fS)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>ge(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>ge(e,n)));const o=new Map,s=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>ge(e,s)));const r=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=o.get(t);e&&r.push(e)}else r.push(e)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class me extends l.sx{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if((0,l.cK)(e.browserEvent.target)||(0,l.hD)(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let o=!1;if(o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,o&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.model,s=i.getNodeLocation(t),r=e.browserEvent.altKey;if(this.tree.setFocus([s]),i.setCollapsed(s,void 0,r),o&&n)return}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class fe extends l.aV{constructor(e,t,i,n,o,s,r,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=s,this.anchorTrait=r}createMouseController(e){return new me(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],s=[];let r;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&s.push(e+i),this.anchorTrait.has(t)&&(r=e+i)})),n.length>0&&super.setFocus((0,o.EB)([...super.getFocus(),...n])),s.length>0&&super.setSelection((0,o.EB)([...super.getSelection(),...s])),"number"==typeof r&&super.setAnchor(r)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class _e{constructor(e,t,i,o,s={}){this._options=s,this.eventBufferer=new r.E7,this.disposables=new a.SL,this._onWillRefilter=new r.Q5,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new r.Q5;const d=new ae(i),h=new r.ZD,c=new r.ZD,u=new le(c.event);this.renderers=o.map((e=>new de(e,(()=>this.model),h.event,u,s)));for(let e of this.renderers)this.disposables.add(e);let g;s.keyboardNavigationLabelProvider&&(g=new he(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:g}),this.disposables.add(g)),this.focus=new pe((()=>this.view.getFocusedElements()[0]),s.identityProvider),this.selection=new pe((()=>this.view.getSelectedElements()[0]),s.identityProvider),this.anchor=new pe((()=>this.view.getAnchorElement()),s.identityProvider),this.view=new fe(e,t,d,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},function(e,t){return t&&Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:e=>t.identityProvider.getId(e.element)},dnd:t.dnd&&new re(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},t.accessibilityProvider),{getSetSize(t){const i=e(),n=i.getNodeLocation(t),o=i.getParentNodeLocation(n);return i.getNode(o).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>t.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>t.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}),enableKeyboardNavigation:t.simpleKeyboardNavigation})}((()=>this.model),s)),{tree:this})),this.model=this.createModel(e,this.view,s),h.input=this.model.onDidChangeCollapseState;const p=r.ju.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}));if(p((()=>null),null,this.disposables),c.input=r.ju.chain(r.ju.any(p,this.focus.onDidChange,this.selection.onDidChange)).debounce((()=>null),0).map((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]})).event,!1!==s.keyboardSupport){const e=r.ju.chain(this.view.onKeyDown).filter((e=>!(0,l.cK)(e.target))).map((e=>new A.y(e)));e.filter((e=>15===e.keyCode)).on(this.onLeftArrow,this,this.disposables),e.filter((e=>17===e.keyCode)).on(this.onRightArrow,this,this.disposables),e.filter((e=>10===e.keyCode)).on(this.onSpace,this,this.disposables)}if(s.keyboardNavigationLabelProvider){const e=s.keyboardNavigationDelegate||l.WK;this.typeFilterController=new ce(this,this.model,this.view,g,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=(0,n.dS)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===ie.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return r.ju.map(this.view.onMouseDblClick,ue)}get onPointer(){return r.ju.map(this.view.onPointer,ue)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===ie.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}focusNext(e=1,t=!1,i,n=this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){(0,a.B9)(this.disposables),this.view.dispose()}}class ve{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new z(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare:(e,t)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=B.$.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=B.$.empty(),i){const n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{var t;if(null===e.element)return;const s=e;if(n.add(s.element),this.nodes.set(s.element,s),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.add(e),this.nodesByIdentity.set(e,s)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,s)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const s=e;if(n.has(s.element)||this.nodes.delete(s.element),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,s)}}))}preserveCollapseState(e=B.$.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),B.$.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,n=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new O(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new O(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new O(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new O(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function be(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:B.$.map(B.$.from(e.children),be),collapsible:e.collapsible,collapsed:e.collapsed}}function Ce(e){const t=[e.element],i=e.incompressible||!1;let n,o;for(;[o,n]=B.$.consume(B.$.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:B.$.map(B.$.concat(o,n),Ce),collapsible:e.collapsible,collapsed:e.collapsed}}function we(e,t=0){let i;return i=t<e.element.elements.length-1?[we(e,t+1)]:B.$.map(B.$.from(e.children),(e=>we(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function ye(e){return we(e,0)}function Se(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:B.$.map(B.$.from(e.children),(e=>Se(e,t,i)))})}class Le{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new ve(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=B.$.empty(),i){const n=i.diffIdentityProvider&&(o=i.diffIdentityProvider,{getId:e=>e.elements.map((e=>o.getId(e).toString())).join("\0")});var o;if(null===e){const e=B.$.map(t,this.enabled?Ce:be);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const s=this.nodes.get(e);if(!s)throw new Error("Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),d=Se(ye(r),e,t),h=(this.enabled?Ce:be)(d),c=l.children.map((e=>e===r?h:e));this._setChildren(l.element,c,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=B.$.map(t,ye),n=B.$.map(i,e?Ce:be);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new O(this.user,`Tree element not found: ${e}`);return t}}const xe=e=>e[e.length-1];class ke{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new ke(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class Ne{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||xe;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new P((e=>new ke(n,e))),this.model=new Le(e,function(e,t){return{splice(i,n,o){t.splice(i,n,o.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:i=>t.identityProvider.getId(e(i))},sorter:t.sorter&&{compare:(e,i)=>t.sorter.compare(e.elements[0],i.elements[0])},filter:t.filter&&{filter:(i,n)=>t.filter.filter(e(i),n)}})}(n,i))}get onDidSplice(){return r.ju.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return r.ju.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return r.ju.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}setChildren(e,t=B.$.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var De=i(97768);class Ee extends _e{constructor(e,t,i,n,o={}){super(e,t,i,n,o)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=B.$.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new ve(e,t,i)}}class Ie{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([De.H],Ie.prototype,"compressedTreeNodeProvider",null);class Te extends Ee{constructor(e,t,i,n,o={}){const s=()=>this;super(e,t,i,n.map((e=>new Ie(s,e))),function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(s,o))}setChildren(e,t=B.$.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new Ne(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var Me=i(98147),Re=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function Ae(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function Oe(e,t){return!!t.parent&&(t.parent===e||Oe(e,t.parent))}class Pe{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new Pe(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class Fe{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...Z.classNamesArray),!0):(t.classList.remove(...Z.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function Be(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function We(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class Ve extends T.kX{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function He(e){return e instanceof T.kX?new Ve(e):e}class ze{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(He(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(He(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(He(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function Ke(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new ze(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function Ue(e,t){t(e),e.children.forEach((e=>Ue(e,t)))}class je{constructor(e,t,i,n,o,s={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new r.Q5,this._onDidChangeNodeSlowState=new r.Q5,this.nodeMapper=new P((e=>new Pe(e))),this.disposables=new a.SL,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.collapseByDefault=s.collapseByDefault,this.tree=this.createTree(e,t,i,n,s),this.root=Ae({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return r.ju.map(this.tree.onDidChangeFocus,Be)}get onDidChangeSelection(){return r.ju.map(this.tree.onDidChangeSelection,Be)}get onMouseDblClick(){return r.ju.map(this.tree.onMouseDblClick,We)}get onPointer(){return r.ju.map(this.tree.onPointer,We)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,o){const s=new ae(i),r=n.map((e=>new Fe(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=Ke(o)||{};return new Ee(e,t,s,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return Re(this,void 0,void 0,(function*(){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n,o){return Re(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new O(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(yield this.refreshAndRenderNode(s,t,n,o),i)try{this.tree.rerender(s)}catch(e){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return Re(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new O(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event)),n}))}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new O(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return Re(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return Re(this,void 0,void 0,(function*(){let n;return this.subTreeRefreshPromises.forEach(((o,s)=>{!n&&function(e,t){return e===t||Oe(e,t)||Oe(t,e)}(s,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n||this.doRefreshSubTree(e,t,i)}))}doRefreshSubTree(e,t,i){return Re(this,void 0,void 0,(function*(){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const n=yield this.doRefreshNode(e,t,i);e.stale=!1,yield G.jT.settled(n.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}))}doRefreshNode(e,t,i){return Re(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=(0,G.Vs)(800);t.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=this.doGetChildren(e).finally((()=>t.cancel()))}else n=Promise.resolve(B.$.empty());try{const o=yield n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,Me.VV)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=(0,G.PG)((()=>Re(this,void 0,void 0,(function*(){const t=yield this.dataSource.getChildren(e.element);return this.processChildren(t)})))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(Me.dL))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const s=new Map,r=new Map;for(const t of e.children)if(s.set(t.element,t),this.identityProvider){const e=this.tree.isCollapsed(t);r.set(t.id,{node:t,collapsed:e})}const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=Ae({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),d=r.get(l);if(d){const e=d.node;return s.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?d.collapsed?(e.children.forEach((e=>Ue(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const h=Ae({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(h),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(h),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(h):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(h.collapsedByDefault=!1,a.push(h)),h}));for(const e of s.values())Ue(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>i.diffIdentityProvider.getId(e.element)}});this.tree.setChildren(e===this.root?null:e,n,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?B.$.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class $e{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new $e(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class qe{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...Z.classNamesArray),!0):(t.classList.remove(...Z.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,a.B9)(this.disposables)}}class Ze extends je{constructor(e,t,i,n,o,s,r={}){super(e,t,i,o,s,r),this.compressionDelegate=n,this.compressibleNodeMapper=new P((e=>new $e(e))),this.filter=r.filter}createTree(e,t,i,n,o){const s=new ae(i),r=n.map((e=>new qe(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&Ke(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))})})}(o)||{};return new Te(e,t,s,r,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),s=n(this.tree.getFocus());super.render(e,t);const r=this.getSelection();let a=!1;const l=this.getFocus();let d=!1;const h=e=>{const t=e.element;if(t)for(let e=0;e<t.elements.length;e++){const n=i(t.elements[e].element),h=t.elements[t.elements.length-1].element;o.has(n)&&-1===r.indexOf(h)&&(r.push(h),a=!0),s.has(n)&&-1===l.indexOf(h)&&(l.push(h),d=!0)}e.children.forEach(h)};h(this.tree.getCompressedTreeNode(e===this.root?null:e)),a&&this.setSelection(r),d&&this.setFocus(l)}processChildren(e){return this.filter&&(e=B.$.filter(e,(e=>{const t="boolean"==typeof(i=this.filter.filter(e,1))?i?1:0:W(i)?V(i.visibility):V(i);var i;if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t}))),super.processChildren(e)}}class Ge extends _e{constructor(e,t,i,n,o,s={}){super(e,t,i,n,s),this.user=e,this.dataSource=o,this.identityProvider=s.identityProvider}createModel(e,t,i){return new ve(e,t,i)}}var Qe=i(12088),Ye=i(1826),Je=i(69868),Xe=i(72396),et=i(53551),tt=i(7978),it=i(42162),nt=i(95954),ot=i(63235),st=i(65700),rt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},at=function(e,t){return function(i,n){t(i,n,e)}};const lt=(0,tt.yh)("listService");let dt=class{constructor(e){this._themeService=e,this.disposables=new a.SL,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new l.wD((0,n.dS)(),"");this.disposables.add((0,ot.Jl)(e,this._themeService))}if(this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=e),(0,a.F8)(e.onDidFocus((()=>this._lastFocusedWidget=e)),(0,a.OF)((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&(this._lastFocusedWidget=void 0)})))}dispose(){this.disposables.dispose()}};dt=rt([at(0,st.XE)],dt);const ht=new Xe.uy("listFocus",!0),ct=new Xe.uy("listSupportsMultiselect",!0),ut=Xe.Ao.and(ht,Xe.Ao.not(et.d)),gt=new Xe.uy("listHasSelectionOrFocus",!1),pt=new Xe.uy("listDoubleSelection",!1),mt=new Xe.uy("listMultiSelection",!1),ft=new Xe.uy("listSelectionNavigation",!1),_t="listAutomaticKeyboardNavigation";function vt(e,t){const i=e.createScoped(t.getHTMLElement());return ht.bindTo(i),i}const bt="workbench.list.multiSelectModifier",Ct="workbench.list.openMode",wt="workbench.list.horizontalScrolling",yt="workbench.list.keyboardNavigation",St="workbench.list.automaticKeyboardNavigation",Lt="workbench.tree.indent",xt="workbench.tree.renderIndentGuides",kt="workbench.list.smoothScrolling",Nt="workbench.list.mouseWheelScrollSensitivity",Dt="workbench.list.fastScrollSensitivity",Et="workbench.tree.expandMode";function It(e){return"alt"===e.getValue(bt)}class Tt extends a.JT{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=It(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(bt)&&(this.useAltAsMultipleSelectionModifier=It(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,l.Zo)(e)}isSelectionRangeChangeEvent(e){return(0,l.wn)(e)}}function Mt(e,t,i){var n;const o=new a.SL;return[Object.assign(Object.assign({},e),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>i.mightProducePrintableCharacter(e)},smoothScrolling:Boolean(t.getValue(kt)),mouseWheelScrollSensitivity:t.getValue(Nt),fastScrollSensitivity:t.getValue(Dt),multipleSelectionController:null!==(n=e.multipleSelectionController)&&void 0!==n?n:o.add(new Tt(t))}),o]}let Rt=class extends l.aV{constructor(e,t,i,n,o,s,r,a,l,d){const h=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(wt)),[c,u]=Mt(o,l,d);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,ot.o)(a.getColorTheme(),ot.O2)),c),{horizontalScrolling:h})),this.disposables.add(u),this.contextKeyService=vt(s,this),this.themeService=a,this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),ft.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=gt.bindTo(this.contextKeyService),this.listDoubleSelection=pt.bindTo(this.contextKeyService),this.listMultiSelection=mt.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=It(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(bt)&&(this._useAltAsMultipleSelectionModifier=It(l));let t={};if(e.affectsConfiguration(wt)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(wt));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(kt)){const e=Boolean(l.getValue(kt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(Nt)){const e=l.getValue(Nt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Dt)){const e=l.getValue(Dt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Ft(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,ot.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};Rt=rt([at(5,Xe.i6),at(6,lt),at(7,st.XE),at(8,Ye.Ui),at(9,it.d)],Rt);let At=class extends c{constructor(e,t,i,n,o,s,r,l,d,h){const c=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(d.getValue(wt)),[u,g]=Mt(o,d,h);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,ot.o)(l.getColorTheme(),ot.O2)),u),{horizontalScrolling:c})),this.disposables=new a.SL,this.disposables.add(g),this.contextKeyService=vt(s,this),this.themeService=l,this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),ft.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=It(d),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),o.overrideStyles&&this.disposables.add((0,ot.Jl)(this,l,o.overrideStyles)),this.disposables.add(d.onDidChangeConfiguration((e=>{e.affectsConfiguration(bt)&&(this._useAltAsMultipleSelectionModifier=It(d));let t={};if(e.affectsConfiguration(wt)&&void 0===this.horizontalScrolling){const e=Boolean(d.getValue(wt));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(kt)){const e=Boolean(d.getValue(kt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(Nt)){const e=d.getValue(Nt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Dt)){const e=d.getValue(Dt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Ft(this,Object.assign({configurationService:d},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,ot.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};At=rt([at(5,Xe.i6),at(6,lt),at(7,st.XE),at(8,Ye.Ui),at(9,it.d)],At);let Ot=class extends E{constructor(e,t,i,n,o,s,r,l,d,h,c){const u=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(h.getValue(wt)),[g,p]=Mt(s,h,c);super(e,t,i,n,o,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,ot.o)(d.getColorTheme(),ot.O2)),g),{horizontalScrolling:u})),this.disposables=new a.SL,this.disposables.add(p),this.contextKeyService=vt(r,this),this.themeService=d,this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport),ft.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=gt.bindTo(this.contextKeyService),this.listDoubleSelection=pt.bindTo(this.contextKeyService),this.listMultiSelection=mt.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=It(h),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(h.onDidChangeConfiguration((e=>{e.affectsConfiguration(bt)&&(this._useAltAsMultipleSelectionModifier=It(h));let t={};if(e.affectsConfiguration(wt)&&void 0===this.horizontalScrolling){const e=Boolean(h.getValue(wt));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(kt)){const e=Boolean(h.getValue(kt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(Nt)){const e=h.getValue(Nt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Dt)){const e=h.getValue(Dt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Bt(this,Object.assign({configurationService:h},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,ot.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};Ot=rt([at(6,Xe.i6),at(7,lt),at(8,st.XE),at(9,Ye.Ui),at(10,it.d)],Ot);class Pt extends a.JT{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new r.Q5),this.onDidOpen=this._onDidOpen.event,this._register(r.ju.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Ct)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((()=>{this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Ct))})))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class Ft extends Pt{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Bt extends Pt{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Wt extends Pt{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function Vt(e,t){let i=!1;return n=>{if(i)return i=!1,!1;const o=t.softDispatch(n,e);return o&&o.enterChord?(i=!0,!1):(i=!1,!0)}}let Ht=class extends Ee{constructor(e,t,i,n,o,s,r,a,l,d,h){const{options:c,getAutomaticKeyboardNavigation:u,disposable:g}=$t(t,o,s,l,d,h);super(e,t,i,n,c),this.disposables.add(g),this.internals=new qt(this,o,u,o.overrideStyles,s,r,a,l,h),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};Ht=rt([at(5,Xe.i6),at(6,lt),at(7,st.XE),at(8,Ye.Ui),at(9,it.d),at(10,Qe.F)],Ht);let zt=class extends Te{constructor(e,t,i,n,o,s,r,a,l,d,h){const{options:c,getAutomaticKeyboardNavigation:u,disposable:g}=$t(t,o,s,l,d,h);super(e,t,i,n,c),this.disposables.add(g),this.internals=new qt(this,o,u,o.overrideStyles,s,r,a,l,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};zt=rt([at(5,Xe.i6),at(6,lt),at(7,st.XE),at(8,Ye.Ui),at(9,it.d),at(10,Qe.F)],zt);let Kt=class extends Ge{constructor(e,t,i,n,o,s,r,a,l,d,h,c){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=$t(t,s,r,d,h,c);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new qt(this,s,g,s.overrideStyles,r,a,l,d,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Kt=rt([at(6,Xe.i6),at(7,lt),at(8,st.XE),at(9,Ye.Ui),at(10,it.d),at(11,Qe.F)],Kt);let Ut=class extends je{constructor(e,t,i,n,o,s,r,a,l,d,h,c){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=$t(t,s,r,d,h,c);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new qt(this,s,g,s.overrideStyles,r,a,l,d,c),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Ut=rt([at(6,Xe.i6),at(7,lt),at(8,st.XE),at(9,Ye.Ui),at(10,it.d),at(11,Qe.F)],Ut);let jt=class extends Ze{constructor(e,t,i,n,o,s,r,a,l,d,h,c,u){const{options:g,getAutomaticKeyboardNavigation:p,disposable:m}=$t(t,r,a,h,c,u);super(e,t,i,n,o,s,g),this.disposables.add(m),this.internals=new qt(this,r,p,r.overrideStyles,a,l,d,h,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function $t(e,t,i,n,o,s){var r;const a=()=>{let e=Boolean(i.getContextKeyValue(_t));return e&&(e=Boolean(n.getValue(St))),e},l=s.isScreenReaderOptimized(),d=t.simpleKeyboardNavigation||l?"simple":n.getValue(yt),h=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(wt)),[c,u]=Mt(t,n,o),g=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:u,options:Object.assign(Object.assign({keyboardSupport:!1},c),{indent:"number"==typeof n.getValue(Lt)?n.getValue(Lt):void 0,renderIndentGuides:n.getValue(xt),smoothScrolling:Boolean(n.getValue(kt)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:"simple"===d,filterOnType:"filter"===d,horizontalScrolling:h,keyboardNavigationEventFilter:Vt(e,o),additionalScrollHeight:g,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(r=t.expandOnlyOnTwistieClick)&&void 0!==r?r:"doubleClick"===n.getValue(Et)})}}jt=rt([at(7,Xe.i6),at(8,lt),at(9,st.XE),at(10,Ye.Ui),at(11,it.d),at(12,Qe.F)],jt);let qt=class{constructor(e,t,i,n,o,s,r,a,l){this.tree=e,this.themeService=r,this.disposables=[],this.contextKeyService=vt(o,e),this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport),ft.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=gt.bindTo(this.contextKeyService),this.hasDoubleSelection=pt.bindTo(this.contextKeyService),this.hasMultiSelection=mt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=It(a);const d=new Set;d.add(_t);const h=()=>{const t=l.isScreenReaderOptimized()?"simple":a.getValue(yt);e.updateOptions({simpleKeyboardNavigation:"simple"===t,filterOnType:"filter"===t})};this.updateStyleOverrides(n),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0)})),a.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(bt)&&(this._useAltAsMultipleSelectionModifier=It(a)),n.affectsConfiguration(Lt)){const e=a.getValue(Lt);o=Object.assign(Object.assign({},o),{indent:e})}if(n.affectsConfiguration(xt)){const e=a.getValue(xt);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(n.affectsConfiguration(kt)){const e=Boolean(a.getValue(kt));o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(n.affectsConfiguration(yt)&&h(),n.affectsConfiguration(St)&&(o=Object.assign(Object.assign({},o),{automaticKeyboardNavigation:i()})),n.affectsConfiguration(wt)&&void 0===t.horizontalScrolling){const e=Boolean(a.getValue(wt));o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}if(n.affectsConfiguration(Et)&&void 0===t.expandOnlyOnTwistieClick&&(o=Object.assign(Object.assign({},o),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(Et)})),n.affectsConfiguration(Nt)){const e=a.getValue(Nt);o=Object.assign(Object.assign({},o),{mouseWheelScrollSensitivity:e})}if(n.affectsConfiguration(Dt)){const e=a.getValue(Dt);o=Object.assign(Object.assign({},o),{fastScrollSensitivity:e})}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(d)&&e.updateOptions({automaticKeyboardNavigation:i()})})),l.onDidChangeScreenReaderOptimized((()=>h()))),this.navigator=new Wt(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){(0,a.B9)(this.styler),this.styler=e?(0,ot.Jl)(this.tree,this.themeService,e):a.JT.None}dispose(){this.disposables=(0,a.B9)(this.disposables),(0,a.B9)(this.styler),this.styler=void 0}};qt=rt([at(4,Xe.i6),at(5,lt),at(6,st.XE),at(7,Ye.Ui),at(8,Qe.F)],qt),nt.B.as(Je.IP.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,ne.N)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[bt]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[(0,ne.N)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,ne.N)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,ne.N)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[Ct]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,ne.N)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[wt]:{type:"boolean",default:!1,description:(0,ne.N)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Lt]:{type:"number",default:8,minimum:0,maximum:40,description:(0,ne.N)("tree indent setting","Controls tree indentation in pixels.")},[xt]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,ne.N)("render tree indent guides","Controls whether the tree should render indent guides.")},[kt]:{type:"boolean",default:!1,description:(0,ne.N)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Nt]:{type:"number",default:1,description:(0,ne.N)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Dt]:{type:"number",default:5,description:(0,ne.N)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[yt]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,ne.N)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,ne.N)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,ne.N)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,ne.N)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[St]:{type:"boolean",default:!0,markdownDescription:(0,ne.N)("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[Et]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,ne.N)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}})},71481:(e,t,i)=>{i.d(t,{$V:()=>h,VZ:()=>s,in:()=>r,kw:()=>d});var n=i(77538),o=i(48646);const s=(0,i(7978).yh)("logService");var r;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(r||(r={}));const a=r.Info;class l extends o.JT{constructor(){super(...arguments),this.level=a,this._onDidChangeLogLevel=this._register(new n.Q5)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class d extends l{constructor(e=a){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=r.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=r.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=r.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=r.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class h extends o.JT{constructor(e){super(),this.logger=e,this._register(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}error(e,...t){this.logger.error(e,...t)}}},76634:(e,t,i)=>{i.d(t,{H0:()=>o,ZL:()=>n,lT:()=>l});var n,o,s=i(7474),r=i(85337),a=i(7978);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(n||(n={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=(0,r.N)("sev.error","Error"),t[e.Warning]=(0,r.N)("sev.warning","Warning"),t[e.Info]=(0,r.N)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case s.Z.Error:return e.Error;case s.Z.Warning:return e.Warning;case s.Z.Info:return e.Info;case s.Z.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return s.Z.Error;case e.Warning:return s.Z.Warning;case e.Info:return s.Z.Info;case e.Hint:return s.Z.Ignore}}}(n||(n={})),function(e){const t="";function i(e,i){let o=[t];return e.source?o.push(e.source.replace("¦","\\¦")):o.push(t),e.code?"string"==typeof e.code?o.push(e.code.replace("¦","\\¦")):o.push(e.code.value.replace("¦","\\¦")):o.push(t),void 0!==e.severity&&null!==e.severity?o.push(n.toString(e.severity)):o.push(t),e.message&&i?o.push(e.message.replace("¦","\\¦")):o.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?o.push(e.startLineNumber.toString()):o.push(t),void 0!==e.startColumn&&null!==e.startColumn?o.push(e.startColumn.toString()):o.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?o.push(e.endLineNumber.toString()):o.push(t),void 0!==e.endColumn&&null!==e.endColumn?o.push(e.endColumn.toString()):o.push(t),o.push(t),o.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(o||(o={}));const l=(0,a.yh)("markerService")},44794:(e,t,i)=>{i.d(t,{EO:()=>o,lT:()=>n}),i(7474);const n=(0,i(7978).yh)("notificationService");class o{}},49048:(e,t,i)=>{i.d(t,{SW:()=>d,v4:()=>l,xn:()=>h});var n=i(48646),o=i(96024),s=i(51732),r=i(7978),a=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const l=(0,r.yh)("openerService"),d=Object.freeze({_serviceBrand:void 0,registerOpener:()=>n.JT.None,registerValidator:()=>n.JT.None,registerExternalUriResolver:()=>n.JT.None,setDefaultExternalOpener(){},registerExternalOpener:()=>n.JT.None,open(){return a(this,void 0,void 0,(function*(){return!1}))},resolveExternalUri(e){return a(this,void 0,void 0,(function*(){return{resolved:e,dispose(){}}}))}});function h(e,t){return s.o.isUri(e)?(0,o.qq)(e.scheme,t):(0,o.ok)(e,t+":")}},61112:(e,t,i)=>{i.d(t,{E:()=>o,e:()=>s});var n=i(7978);class o{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}o.None=Object.freeze({report(){}});const s=(0,n.yh)("editorProgressService")},65757:(e,t,i)=>{i.d(t,{IP:()=>a,Ry:()=>n});var n,o=i(76345),s=i(48646),r=i(95954);!function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(n||(n={}));const a={Quickaccess:"workbench.contributions.quickaccess"};r.B.add(a.Quickaccess,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),(0,s.OF)((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return(0,o.kX)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||this.defaultProvider}})},58028:(e,t,i)=>{i.d(t,{eJ:()=>s,jG:()=>o.jG});var n=i(7978),o=i(24556);const s=(0,n.yh)("quickInputService")},95954:(e,t,i)=>{i.d(t,{B:()=>s});var n=i(86963),o=i(56718);const s=new class{constructor(){this.data=new Map}add(e,t){n.ok(o.HD(e)),n.ok(o.Kn(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},95210:(e,t,i)=>{i.d(t,{Uy:()=>g,vm:()=>f,fk:()=>p});var n,o=i(77538),s=i(48646),r=i(56718),a=i(10554),l=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(n||(n={}));class d extends s.JT{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new o.Q5),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=n.None,this.cache=new Map,this.flushDelayer=new a.rH(d.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var t,i;null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.accept(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.accept(e,void 0)))}accept(e,t){if(this.state===n.Closed)return;let i=!1;(0,r.Jp)(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return(0,r.Jp)(i)?t:i}getBoolean(e,t){const i=this.get(e);return(0,r.Jp)(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return(0,r.Jp)(i)?t:parseInt(i,10)}set(e,t){return l(this,void 0,void 0,(function*(){if(this.state===n.Closed)return;if((0,r.Jp)(t))return this.delete(e);const i=String(t);return this.cache.get(e)!==i?(this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger((()=>this.flushPending()))):void 0}))}delete(e){return l(this,void 0,void 0,(function*(){if(this.state!==n.Closed)return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger((()=>this.flushPending()))):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return l(this,void 0,void 0,(function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}))}dispose(){this.flushDelayer.dispose(),super.dispose()}}d.DEFAULT_FLUSH_DELAY=100;class h{constructor(){this.onDidChangeItemsExternal=o.ju.None,this.items=new Map}updateItems(e){return l(this,void 0,void 0,(function*(){e.insert&&e.insert.forEach(((e,t)=>this.items.set(t,e))),e.delete&&e.delete.forEach((e=>this.items.delete(e)))}))}}var c=i(7978);const u="__$__targetStorageMarker",g=(0,c.yh)("storageService");var p;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(p||(p={}));class m extends s.JT{constructor(e={flushInterval:m.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new o.K3),this._onDidChangeTarget=this._register(new o.K3),this._onWillSaveState=this._register(new o.Q5),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===u?(0===e?this._globalKeyTargets=void 0:1===e&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n){(0,r.Jp)(t)?this.remove(e,i):this.withPausedEmitters((()=>{var o;this.updateKeyTarget(e,i,n),null===(o=this.getStorage(i))||void 0===o||o.set(e,t)}))}remove(e,t){this.withPausedEmitters((()=>{var i;this.updateKeyTarget(e,t,void 0),null===(i=this.getStorage(t))||void 0===i||i.delete(e)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,o;const s=this.getKeyTargets(t);"number"==typeof i?s[e]!==i&&(s[e]=i,null===(n=this.getStorage(t))||void 0===n||n.set(u,JSON.stringify(s))):"number"==typeof s[e]&&(delete s[e],null===(o=this.getStorage(t))||void 0===o||o.set(u,JSON.stringify(s)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return 0===e?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(u,e);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}}m.DEFAULT_FLUSH_INTERVAL=6e4;class f extends m{constructor(){super(),this.globalStorage=this._register(new d(new h)),this.workspaceStorage=this._register(new d(new h)),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.globalStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e))))}getStorage(e){return 0===e?this.globalStorage:this.workspaceStorage}}},93026:(e,t,i)=>{i.d(t,{b:()=>n});const n=(0,i(7978).yh)("telemetryService")},98962:(e,t,i)=>{i.d(t,{$D:()=>Mt,$d:()=>gt,A2:()=>Q,AB:()=>q,AS:()=>pt,AW:()=>Ce,BO:()=>Xt,C3:()=>A,CA:()=>Gt,CN:()=>Pe,Cd:()=>Dt,Cz:()=>qe,D0:()=>de,D1:()=>ce,DE:()=>Et,Du:()=>se,E3:()=>Rt,EP:()=>T,ES:()=>Le,Ei:()=>Te,F3:()=>ct,Fm:()=>Vt,Fu:()=>je,GO:()=>z,Gj:()=>jt,Gw:()=>mt,HC:()=>Ke,Hf:()=>he,Hz:()=>It,I1:()=>Bt,IP:()=>h,IY:()=>Kt,Id:()=>p,It:()=>Zt,Iv:()=>$t,Jp:()=>Jt,K1:()=>we,KT:()=>zt,LL:()=>Xe,L_:()=>et,Lo:()=>Fe,M6:()=>st,MU:()=>De,NO:()=>le,NP:()=>xt,Ng:()=>ue,OL:()=>ei,OZ:()=>F,Oo:()=>nt,P4:()=>Qe,P6:()=>u,PR:()=>k,PX:()=>ft,Pk:()=>Ft,Pp:()=>Ve,Pv:()=>D,R8:()=>f,RV:()=>M,Rz:()=>xe,S:()=>wt,SP:()=>Ht,SU:()=>R,Sb:()=>Oe,Sn:()=>ri,Sw:()=>w,T8:()=>oe,Tn:()=>rt,U6:()=>Wt,Un:()=>yt,VV:()=>We,Vq:()=>Nt,XE:()=>N,XL:()=>Ye,XZ:()=>m,Xy:()=>Qt,YI:()=>I,ZG:()=>At,Zn:()=>ni,_2:()=>it,_Y:()=>Be,_b:()=>tt,_l:()=>E,_t:()=>P,_w:()=>j,b6:()=>J,b7:()=>H,bK:()=>ze,br:()=>Yt,c6:()=>ne,cb:()=>kt,cv:()=>ae,dC:()=>ot,dR:()=>g,dt:()=>x,et:()=>$,fE:()=>re,fe:()=>ie,g8:()=>K,g_:()=>ke,gk:()=>Me,gp:()=>X,hE:()=>ye,hX:()=>He,j5:()=>V,jU:()=>Ee,jb:()=>Tt,kJ:()=>fe,kV:()=>qt,ke:()=>Ze,kv:()=>dt,kw:()=>oi,lR:()=>_,lU:()=>Ot,lW:()=>be,lX:()=>Y,lo:()=>me,mH:()=>Je,mV:()=>ut,ny:()=>Ne,oQ:()=>ve,oS:()=>Ct,op:()=>_e,ov:()=>Ut,p:()=>O,pW:()=>te,ph:()=>Ue,pn:()=>Ie,pt:()=>Re,qe:()=>U,rg:()=>at,rh:()=>y,s$:()=>ht,sE:()=>S,sK:()=>$e,sg:()=>C,tZ:()=>pe,u2:()=>Pt,uo:()=>ee,ur:()=>b,ux:()=>St,vG:()=>bt,xL:()=>v,yJ:()=>Ae,yb:()=>Se,yn:()=>Z,yp:()=>Ge,yt:()=>lt,zJ:()=>L,zK:()=>ge,zR:()=>G});var n=i(10554),o=i(66051),s=i(77538),r=i(56718),a=i(85337),l=i(16206),d=i(95954);const h={ColorContribution:"base.contributions.colors"},c=new class{constructor(){this._onDidChangeSchema=new s.Q5,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){let s={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=s;let r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults)return ri(i.defaults[t.type],t)}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{let i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function u(e,t,i,n,o){return c.registerColor(e,t,i,n,o)}d.B.add(h.ColorContribution,c);const g=u("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},a.N("foreground","Overall foreground color. This color is only used if not overridden by a component.")),p=u("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},a.N("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),m=u("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},a.N("iconForeground","The default color for icons in the workbench.")),f=u("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},a.N("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),_=u("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},a.N("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),v=u("contrastActiveBorder",{light:null,dark:null,hc:f},a.N("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),b=u("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},a.N("textLinkForeground","Foreground color for links in text.")),C=u("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},a.N("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),w=u("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:o.Il.black},a.N("textCodeBlockBackground","Background color for code blocks in text.")),y=u("widget.shadow",{dark:ni(o.Il.black,.36),light:ni(o.Il.black,.16),hc:null},a.N("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),S=u("input.background",{dark:"#3C3C3C",light:o.Il.white,hc:o.Il.black},a.N("inputBoxBackground","Input box background.")),L=u("input.foreground",{dark:g,light:g,hc:g},a.N("inputBoxForeground","Input box foreground.")),x=u("input.border",{dark:null,light:null,hc:_},a.N("inputBoxBorder","Input box border.")),k=u("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:_},a.N("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),N=u("inputOption.activeBackground",{dark:ni(f,.4),light:ni(f,.2),hc:o.Il.transparent},a.N("inputOption.activeBackground","Background color of activated options in input fields.")),D=u("inputOption.activeForeground",{dark:o.Il.white,light:o.Il.black,hc:null},a.N("inputOption.activeForeground","Foreground color of activated options in input fields.")),E=u("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:o.Il.black},a.N("inputValidationInfoBackground","Input validation background color for information severity.")),I=u("inputValidation.infoForeground",{dark:null,light:null,hc:null},a.N("inputValidationInfoForeground","Input validation foreground color for information severity.")),T=u("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:_},a.N("inputValidationInfoBorder","Input validation border color for information severity.")),M=u("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:o.Il.black},a.N("inputValidationWarningBackground","Input validation background color for warning severity.")),R=u("inputValidation.warningForeground",{dark:null,light:null,hc:null},a.N("inputValidationWarningForeground","Input validation foreground color for warning severity.")),A=u("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:_},a.N("inputValidationWarningBorder","Input validation border color for warning severity.")),O=u("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:o.Il.black},a.N("inputValidationErrorBackground","Input validation background color for error severity.")),P=u("inputValidation.errorForeground",{dark:null,light:null,hc:null},a.N("inputValidationErrorForeground","Input validation foreground color for error severity.")),F=u("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:_},a.N("inputValidationErrorBorder","Input validation border color for error severity.")),B=u("dropdown.background",{dark:"#3C3C3C",light:o.Il.white,hc:o.Il.black},a.N("dropdownBackground","Dropdown background.")),W=u("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:o.Il.white},a.N("dropdownForeground","Dropdown foreground.")),V=u("button.foreground",{dark:o.Il.white,light:o.Il.white,hc:o.Il.white},a.N("buttonForeground","Button foreground color.")),H=u("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},a.N("buttonBackground","Button background color.")),z=u("button.hoverBackground",{dark:ii(H,.2),light:ti(H,.2),hc:null},a.N("buttonHoverBackground","Button background color when hovering.")),K=u("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:o.Il.black},a.N("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),U=u("badge.foreground",{dark:o.Il.white,light:"#333",hc:o.Il.white},a.N("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),j=u("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},a.N("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),$=u("scrollbarSlider.background",{dark:o.Il.fromHex("#797979").transparent(.4),light:o.Il.fromHex("#646464").transparent(.4),hc:ni(_,.6)},a.N("scrollbarSliderBackground","Scrollbar slider background color.")),q=u("scrollbarSlider.hoverBackground",{dark:o.Il.fromHex("#646464").transparent(.7),light:o.Il.fromHex("#646464").transparent(.7),hc:ni(_,.8)},a.N("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),Z=u("scrollbarSlider.activeBackground",{dark:o.Il.fromHex("#BFBFBF").transparent(.4),light:o.Il.fromHex("#000000").transparent(.6),hc:_},a.N("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),G=u("progressBar.background",{dark:o.Il.fromHex("#0E70C0"),light:o.Il.fromHex("#0E70C0"),hc:_},a.N("progressBarBackground","Background color of the progress bar that can show for long running operations.")),Q=u("editorError.background",{dark:null,light:null,hc:null},a.N("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Y=u("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},a.N("editorError.foreground","Foreground color of error squigglies in the editor.")),J=u("editorError.border",{dark:null,light:null,hc:o.Il.fromHex("#E47777").transparent(.8)},a.N("errorBorder","Border color of error boxes in the editor.")),X=u("editorWarning.background",{dark:null,light:null,hc:null},a.N("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ee=u("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},a.N("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),te=u("editorWarning.border",{dark:null,light:null,hc:o.Il.fromHex("#FFCC00").transparent(.8)},a.N("warningBorder","Border color of warning boxes in the editor.")),ie=u("editorInfo.background",{dark:null,light:null,hc:null},a.N("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ne=u("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},a.N("editorInfo.foreground","Foreground color of info squigglies in the editor.")),oe=u("editorInfo.border",{dark:null,light:null,hc:o.Il.fromHex("#3794FF").transparent(.8)},a.N("infoBorder","Border color of info boxes in the editor.")),se=u("editorHint.foreground",{dark:o.Il.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},a.N("editorHint.foreground","Foreground color of hint squigglies in the editor.")),re=u("editorHint.border",{dark:null,light:null,hc:o.Il.fromHex("#eeeeee").transparent(.8)},a.N("hintBorder","Border color of hint boxes in the editor.")),ae=u("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:o.Il.black},a.N("editorBackground","Editor background color.")),le=u("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:o.Il.white},a.N("editorForeground","Editor default foreground color.")),de=u("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},a.N("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),he=u("editorWidget.foreground",{dark:g,light:g,hc:g},a.N("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),ce=u("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:_},a.N("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),ue=u("editorWidget.resizeBorder",{light:null,dark:null,hc:null},a.N("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),ge=u("quickInput.background",{dark:de,light:de,hc:de},a.N("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),pe=u("quickInput.foreground",{dark:he,light:he,hc:he},a.N("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),me=u("quickInputTitle.background",{dark:new o.Il(new o.VS(255,255,255,.105)),light:new o.Il(new o.VS(0,0,0,.06)),hc:"#000000"},a.N("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),fe=u("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:o.Il.white},a.N("pickerGroupForeground","Quick picker color for grouping labels.")),_e=u("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:o.Il.white},a.N("pickerGroupBorder","Quick picker color for grouping borders.")),ve=u("keybindingLabel.background",{dark:new o.Il(new o.VS(128,128,128,.17)),light:new o.Il(new o.VS(221,221,221,.4)),hc:o.Il.transparent},a.N("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),be=u("keybindingLabel.foreground",{dark:o.Il.fromHex("#CCCCCC"),light:o.Il.fromHex("#555555"),hc:o.Il.white},a.N("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),Ce=u("keybindingLabel.border",{dark:new o.Il(new o.VS(51,51,51,.6)),light:new o.Il(new o.VS(204,204,204,.4)),hc:new o.Il(new o.VS(111,195,223))},a.N("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),we=u("keybindingLabel.bottomBorder",{dark:new o.Il(new o.VS(68,68,68,.6)),light:new o.Il(new o.VS(187,187,187,.4)),hc:new o.Il(new o.VS(111,195,223))},a.N("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),ye=u("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},a.N("editorSelectionBackground","Color of the editor selection.")),Se=u("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},a.N("editorSelectionForeground","Color of the selected text for high contrast.")),Le=u("editor.inactiveSelectionBackground",{light:ni(ye,.5),dark:ni(ye,.5),hc:ni(ye,.5)},a.N("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),xe=u("editor.selectionHighlightBackground",{light:si(ye,ae,.3,.6),dark:si(ye,ae,.3,.6),hc:null},a.N("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),ke=u("editor.selectionHighlightBorder",{light:null,dark:null,hc:v},a.N("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),Ne=u("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},a.N("editorFindMatch","Color of the current search match.")),De=u("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},a.N("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Ee=u("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},a.N("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Ie=u("editor.findMatchBorder",{light:null,dark:null,hc:v},a.N("editorFindMatchBorder","Border color of the current search match.")),Te=u("editor.findMatchHighlightBorder",{light:null,dark:null,hc:v},a.N("findMatchHighlightBorder","Border color of the other search matches.")),Me=u("editor.findRangeHighlightBorder",{dark:null,light:null,hc:ni(v,.4)},a.N("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Re=u("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},a.N("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Ae=u("editorHoverWidget.background",{light:de,dark:de,hc:de},a.N("hoverBackground","Background color of the editor hover.")),Oe=u("editorHoverWidget.foreground",{light:he,dark:he,hc:he},a.N("hoverForeground","Foreground color of the editor hover.")),Pe=u("editorHoverWidget.border",{light:ce,dark:ce,hc:ce},a.N("hoverBorder","Border color of the editor hover.")),Fe=u("editorHoverWidget.statusBarBackground",{dark:ii(Ae,.2),light:ti(Ae,.05),hc:de},a.N("statusBarBackground","Background color of the editor hover status bar.")),Be=u("editorLink.activeForeground",{dark:"#4E94CE",light:o.Il.blue,hc:o.Il.cyan},a.N("activeLinkForeground","Color of active links.")),We=u("editorInlayHint.foreground",{dark:ni(U,.8),light:ni(U,.8),hc:U},a.N("editorInlayHintForeground","Foreground color of inline hints")),Ve=u("editorInlayHint.background",{dark:ni(K,.6),light:ni(K,.3),hc:K},a.N("editorInlayHintBackground","Background color of inline hints")),He=u("editorInlayHint.typeForeground",{dark:We,light:We,hc:We},a.N("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),ze=u("editorInlayHint.typeBackground",{dark:Ve,light:Ve,hc:Ve},a.N("editorInlayHintBackgroundTypes","Background color of inline hints for types")),Ke=u("editorInlayHint.parameterForeground",{dark:We,light:We,hc:We},a.N("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Ue=u("editorInlayHint.parameterBackground",{dark:Ve,light:Ve,hc:Ve},a.N("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),je=u("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},a.N("editorLightBulbForeground","The color used for the lightbulb actions icon.")),$e=u("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},a.N("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),qe=new o.Il(new o.VS(155,185,85,.2)),Ze=new o.Il(new o.VS(255,0,0,.2)),Ge=u("diffEditor.insertedTextBackground",{dark:qe,light:qe,hc:null},a.N("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Qe=u("diffEditor.removedTextBackground",{dark:Ze,light:Ze,hc:null},a.N("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Ye=u("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},a.N("diffEditorInsertedOutline","Outline color for the text that got inserted.")),Je=u("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},a.N("diffEditorRemovedOutline","Outline color for text that got removed.")),Xe=u("diffEditor.border",{dark:null,light:null,hc:_},a.N("diffEditorBorder","Border color between the two text editors.")),et=u("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},a.N("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),tt=u("list.focusBackground",{dark:null,light:null,hc:null},a.N("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),it=u("list.focusForeground",{dark:null,light:null,hc:null},a.N("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),nt=u("list.focusOutline",{dark:f,light:f,hc:v},a.N("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ot=u("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},a.N("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),st=u("list.activeSelectionForeground",{dark:o.Il.white,light:o.Il.white,hc:null},a.N("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),rt=u("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},a.N("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),at=u("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},a.N("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),lt=u("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},a.N("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),dt=u("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},a.N("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ht=u("list.inactiveFocusBackground",{dark:null,light:null,hc:null},a.N("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ct=u("list.inactiveFocusOutline",{dark:null,light:null,hc:null},a.N("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ut=u("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},a.N("listHoverBackground","List/Tree background when hovering over items using the mouse.")),gt=u("list.hoverForeground",{dark:null,light:null,hc:null},a.N("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),pt=u("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},a.N("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),mt=u("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:f},a.N("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),ft=u("list.focusHighlightForeground",{dark:mt,light:(_t=ot,vt=mt,"#9DDDFF",{op:5,if:_t,then:vt,else:"#9DDDFF"}),hc:mt},a.N("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));var _t,vt;const bt=u("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:o.Il.black},a.N("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),Ct=u("listFilterWidget.outline",{dark:o.Il.transparent,light:o.Il.transparent,hc:"#f38518"},a.N("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),wt=u("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:_},a.N("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),yt=u("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},a.N("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),St=u("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},a.N("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),Lt=u("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,a.N("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),xt=u("quickInputList.focusForeground",{dark:st,light:st,hc:st},a.N("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),kt=u("quickInputList.focusIconForeground",{dark:rt,light:rt,hc:rt},a.N("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),Nt=u("quickInputList.focusBackground",{dark:oi(Lt,ot),light:oi(Lt,ot),hc:null},a.N("quickInput.listFocusBackground","Quick picker background color for the focused item.")),Dt=u("menu.border",{dark:null,light:null,hc:_},a.N("menuBorder","Border color of menus.")),Et=u("menu.foreground",{dark:W,light:g,hc:W},a.N("menuForeground","Foreground color of menu items.")),It=u("menu.background",{dark:B,light:B,hc:B},a.N("menuBackground","Background color of menu items.")),Tt=u("menu.selectionForeground",{dark:st,light:st,hc:st},a.N("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Mt=u("menu.selectionBackground",{dark:ot,light:ot,hc:ot},a.N("menuSelectionBackground","Background color of the selected menu item in menus.")),Rt=u("menu.selectionBorder",{dark:null,light:null,hc:v},a.N("menuSelectionBorder","Border color of the selected menu item in menus.")),At=u("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:_},a.N("menuSeparatorBackground","Color of a separator menu item in menus.")),Ot=u("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},a.N("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),Pt=u("editor.snippetTabstopHighlightBackground",{dark:new o.Il(new o.VS(124,124,124,.3)),light:new o.Il(new o.VS(10,50,100,.2)),hc:new o.Il(new o.VS(124,124,124,.3))},a.N("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),Ft=u("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},a.N("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),Bt=u("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},a.N("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),Wt=u("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Il(new o.VS(10,50,100,.5)),hc:"#525252"},a.N("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),Vt=u("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},a.N("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),Ht=u("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},a.N("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),zt=u("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},a.N("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Kt=u("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},a.N("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),Ut=u("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},a.N("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),jt=u("minimap.errorHighlight",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hc:new o.Il(new o.VS(255,50,50,1))},a.N("minimapError","Minimap marker color for errors.")),$t=u("minimap.warningHighlight",{dark:ee,light:ee,hc:te},a.N("overviewRuleWarning","Minimap marker color for warnings.")),qt=u("minimap.background",{dark:null,light:null,hc:null},a.N("minimapBackground","Minimap background color.")),Zt=u("minimap.foregroundOpacity",{dark:o.Il.fromHex("#000f"),light:o.Il.fromHex("#000f"),hc:o.Il.fromHex("#000f")},a.N("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),Gt=u("minimapSlider.background",{light:ni($,.5),dark:ni($,.5),hc:ni($,.5)},a.N("minimapSliderBackground","Minimap slider background color.")),Qt=u("minimapSlider.hoverBackground",{light:ni(q,.5),dark:ni(q,.5),hc:ni(q,.5)},a.N("minimapSliderHoverBackground","Minimap slider background color when hovering.")),Yt=u("minimapSlider.activeBackground",{light:ni(Z,.5),dark:ni(Z,.5),hc:ni(Z,.5)},a.N("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),Jt=u("problemsErrorIcon.foreground",{dark:Y,light:Y,hc:Y},a.N("problemsErrorIconForeground","The color used for the problems error icon.")),Xt=u("problemsWarningIcon.foreground",{dark:ee,light:ee,hc:ee},a.N("problemsWarningIconForeground","The color used for the problems warning icon.")),ei=u("problemsInfoIcon.foreground",{dark:ne,light:ne,hc:ne},a.N("problemsInfoIconForeground","The color used for the problems info icon."));function ti(e,t){return{op:0,value:e,factor:t}}function ii(e,t){return{op:1,value:e,factor:t}}function ni(e,t){return{op:2,value:e,factor:t}}function oi(...e){return{op:3,values:e}}function si(e,t,i,n){return{op:4,value:e,background:t,factor:i,transparency:n}}function ri(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?o.Il.fromHex(e):t.getColor(e):e instanceof o.Il?e:"object"==typeof e?function(e,t){var i,n,s;switch(e.op){case 0:return null===(i=ri(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=ri(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(s=ri(e.value,t))||void 0===s?void 0:s.transparent(e.factor);case 3:for(const i of e.values){const e=ri(i,t);if(e)return e}return;case 5:return ri(t.defines(e.if)?e.then:e.else,t);case 4:const a=ri(e.value,t);if(!a)return;const l=ri(e.background,t);return l?a.isDarkerThan(l)?o.Il.getLighterColor(a,l,e.factor).transparent(e.transparency):o.Il.getDarkerColor(a,l,e.factor).transparent(e.transparency):a.transparent(e.factor*e.transparency);default:throw(0,r.vE)(e)}}(e,t):void 0}const ai="vscode://schemas/workbench-colors";let li=d.B.as(l.I.JSONContribution);li.registerSchema(ai,c.getColorSchema());const di=new n.pY((()=>li.notifySchemaChanged(ai)),200);c.onDidChangeSchema((()=>{di.isScheduled()||di.schedule()}))},56459:(e,t,i)=>{i.d(t,{Ks:()=>u,q5:()=>c,s_:()=>f});var n=i(10554),o=i(85095),s=i(77538),r=i(85337),a=i(16206),l=i(95954),d=i(65700);const h=new class{constructor(){this._onDidChange=new s.Q5,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,r.N)("iconDefintion.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,r.N)("iconDefintion.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${o.dT.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}let s={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=s;let r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}getIconFont(e){return this.iconFontsById[e]}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;d.kS.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`};let i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const o of n.filter((e=>!!e.description)).sort(e))i.push(`|<i class="${t(o)}"></i>|${o.id}|${d.kS.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter((e=>!d.kS.isThemeIcon(e.defaults))).sort(e))i.push(`|<i class="${t(o)}"></i>|${o.id}|`);return i.join("\n")}};function c(e,t,i,n){return h.registerIcon(e,t,i,n)}function u(){return h}l.B.add("base.contributions.icons",h),function(){for(const e of o.fK.all)h.registerIcon(e.id,e.definition,e.description);o.fK.onDidRegister((e=>h.registerIcon(e.id,e.definition,e.description)))}();const g="vscode://schemas/icons";let p=l.B.as(a.I.JSONContribution);p.registerSchema(g,h.getIconSchema());const m=new n.pY((()=>p.notifySchemaChanged(g)),200);h.onDidChange((()=>{m.isScheduled()||m.schedule()}));const f=c("widget-close",o.lA.close,(0,r.N)("widgetClose","Icon for the close action in widgets."))},63235:(e,t,i)=>{i.d(t,{Jl:()=>a,O2:()=>l,WZ:()=>r,o:()=>o,tj:()=>h});var n=i(98962);function o(e,t){const i=Object.create(null);for(let o in t){const s=t[o];s&&(i[o]=(0,n.Sn)(s,e))}return i}function s(e,t,i){function n(){const n=o(e.getColorTheme(),t);"function"==typeof i?i(n):i.style(n)}return n(),e.onDidColorThemeChange(n)}function r(e,t,i){return s(t,{badgeBackground:(null==i?void 0:i.badgeBackground)||n.g8,badgeForeground:(null==i?void 0:i.badgeForeground)||n.qe,badgeBorder:n.lR},e)}function a(e,t,i){return s(t,Object.assign(Object.assign({},l),i||{}),e)}const l={listFocusBackground:n._b,listFocusForeground:n._2,listFocusOutline:n.Oo,listActiveSelectionBackground:n.dC,listActiveSelectionForeground:n.M6,listActiveSelectionIconForeground:n.Tn,listFocusAndSelectionBackground:n.dC,listFocusAndSelectionForeground:n.M6,listInactiveSelectionBackground:n.rg,listInactiveSelectionIconForeground:n.kv,listInactiveSelectionForeground:n.yt,listInactiveFocusBackground:n.s$,listInactiveFocusOutline:n.F3,listHoverBackground:n.mV,listHoverForeground:n.$d,listDropBackground:n.AS,listSelectionOutline:n.xL,listHoverOutline:n.xL,listFilterWidgetBackground:n.vG,listFilterWidgetOutline:n.oS,listFilterWidgetNoMatchesOutline:n.S,listMatchesShadow:n.rh,treeIndentGuidesStroke:n.Un,tableColumnsBorder:n.ux},d={shadowColor:n.rh,borderColor:n.Cd,foregroundColor:n.DE,backgroundColor:n.Hz,selectionForegroundColor:n.jb,selectionBackgroundColor:n.$D,selectionBorderColor:n.E3,separatorColor:n.ZG};function h(e,t,i){return s(t,Object.assign(Object.assign({},d),i),e)}},36550:(e,t,i)=>{var n;i.d(t,{e:()=>n}),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST="hc"}(n||(n={}))},65700:(e,t,i)=>{i.d(t,{EN:()=>u,IP:()=>p,Ic:()=>f,XE:()=>d,bB:()=>_,kS:()=>c,m6:()=>g});var n=i(85095),o=i(77538),s=i(48646),r=i(7978),a=i(95954),l=i(36550);const d=(0,r.yh)("themeService");var h,c;function u(e){return{id:e}}function g(e){switch(e){case l.e.DARK:return"vs-dark";case l.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(h||(h={})),function(e){e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||h.isThemeColor(e.color))};const t=new RegExp(`^\\$\\((${n.dT.iconNameExpression}(?:${n.dT.iconModifierExpression})?)\\)$`);e.fromString=function(e){const i=t.exec(e);if(!i)return;let[,n]=i;return{id:n}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)},e.asThemeIcon=function(e,t){return{id:e.id,color:t?u(t):void 0}},e.asClassNameArray=n.dT.asClassNameArray,e.asClassName=n.dT.asClassName,e.asCSSSelector=n.dT.asCSSSelector}(c||(c={}));const p={ThemingContribution:"base.contributions.theming"};let m=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new o.Q5}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,s.OF)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function f(e){return m.onColorThemeChange(e)}a.B.add(p.ThemingContribution,m);class _ extends s.JT{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},56834:(e,t,i)=>{i.d(t,{Xt:()=>s,YO:()=>o,gJ:()=>r,tJ:()=>n});const n=(0,i(7978).yh)("undoRedoService");class o{constructor(e,t){this.resource=e,this.elements=t}}class s{constructor(){this.id=s._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}s._ID=0,s.None=new s;class r{constructor(){this.id=r._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}r._ID=0,r.None=new r},5791:(e,t,i)=>{i.d(t,{ec:()=>n,md:()=>o}),i(82173);const n=(0,i(7978).yh)("contextService");class o{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}},18072:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar {\n\twhite-space: nowrap;\n\theight: 100%;\n}\n\n.monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\theight: 100%;\n\twidth: 100%;\n\talign-items: center;\n}\n\n.monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-action-bar .action-item {\n\tdisplay: block;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-action-bar .action-item .icon,\n.monaco-action-bar .action-item .codicon {\n\tdisplay: block;\n}\n\n.monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 16px;\n\theight: 16px;\n}\n\n.monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n}\n\n.monaco-action-bar .action-item.disabled .action-label,\n.monaco-action-bar .action-item.disabled .action-label::before,\n.monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-action-bar .action-item .action-label.separator {\n\twidth: 1px;\n\theight: 16px;\n\tmargin: 5px 4px !important;\n\tcursor: default;\n\tmin-width: 1px;\n\tpadding: 0;\n\tbackground-color: #bbb;\n}\n\n.secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item {\n\tdisplay: flex;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item > .action-label {\n\tmargin-right: 1px;\n}\n",""]);const a=r},88200:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-aria-container {\n\tposition: absolute; /* try to hide from window but not from screen readers */\n\tleft:-999em;\n}",""]);const a=r},99177:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-text-button {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\twidth: 100%;\n\tpadding: 4px;\n\ttext-align: center;\n\tcursor: pointer;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n.monaco-text-button:focus {\n\toutline-offset: 2px !important;\n}\n\n.monaco-text-button:hover {\n\ttext-decoration: none !important;\n}\n\n.monaco-button.disabled:focus,\n.monaco-button.disabled {\n\topacity: 0.4 !important;\n\tcursor: default;\n}\n\n.monaco-text-button > .codicon {\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n\n.monaco-button-dropdown {\n\tdisplay: flex;\n\tcursor: pointer;\n}\n\n.monaco-button-dropdown > .monaco-dropdown-button {\n\tmargin-left: 1px;\n}\n\n.monaco-description-button {\n\tflex-direction: column;\n}\n\n.monaco-description-button .monaco-button-label {\n\tfont-weight: 500;\n}\n\n.monaco-description-button .monaco-button-description {\n\tfont-style: italic;\n}\n",""]);const a=r},25876:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-custom-checkbox {\n\tmargin-left: 2px;\n\tfloat: left;\n\tcursor: pointer;\n\toverflow: hidden;\n\topacity: 0.7;\n\twidth: 20px;\n\theight: 20px;\n\tborder: 1px solid transparent;\n\tpadding: 1px;\n\tbox-sizing:\tborder-box;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-custom-checkbox:hover,\n.monaco-custom-checkbox.checked {\n\topacity: 1;\n}\n\n.hc-black .monaco-custom-checkbox {\n\tbackground: none;\n}\n\n.hc-black .monaco-custom-checkbox:hover {\n\tbackground: none;\n}\n\n.monaco-custom-checkbox.monaco-simple-checkbox {\n\theight: 18px;\n\twidth: 18px;\n\tborder: 1px solid transparent;\n\tborder-radius: 3px;\n\tmargin-right: 9px;\n\tmargin-left: 0px;\n\tpadding: 0px;\n\topacity: 1;\n\tbackground-size: 16px !important;\n}\n\n/* hide check when unchecked */\n.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked)::before {\n\tvisibility: hidden;\n}\n",""]);const a=r},70953:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.codicon-wrench-subaction {\n\topacity: 0.5;\n}\n\n@keyframes codicon-spin {\n\t100% {\n\t\ttransform:rotate(360deg);\n\t}\n}\n\n.codicon-sync.codicon-modifier-spin,\n.codicon-loading.codicon-modifier-spin,\n.codicon-gear.codicon-modifier-spin,\n.codicon-notebook-state-executing.codicon-modifier-spin {\n\t/* Use steps to throttle FPS to reduce CPU usage */\n\tanimation: codicon-spin 1.5s steps(30) infinite;\n}\n\n.codicon-modifier-disabled {\n\topacity: 0.4;\n}\n\n/* custom speed & easing for loading icon */\n.codicon-loading,\n.codicon-tree-item-loading::before {\n\tanimation-duration: 1s !important;\n\tanimation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important;\n}\n",""]);const a=r},93883:(e,t,i)=>{i.d(t,{Z:()=>u});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s),a=i(61667),l=i.n(a),d=new URL(i(25080),i.b),h=r()(o()),c=l()(d);h.push([e.id,`/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n@font-face {\n\tfont-family: "codicon";\n\tfont-display: block;\n\tsrc: url(${c}) format("truetype");\n}\n\n.codicon[class*='codicon-'] {\n\tfont: normal normal normal 16px/1 codicon;\n\tdisplay: inline-block;\n\ttext-decoration: none;\n\ttext-rendering: auto;\n\ttext-align: center;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n/* icon rules are dynamically created in codiconStyles */\n`,""]);const u=h},63160:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view {\n\tposition: absolute;\n\tz-index: 2500;\n}\n\n.context-view.fixed {\n\tall: initial;\n\tfont-family: inherit;\n\tfont-size: 13px;\n\tposition: fixed;\n\tz-index: 2500;\n\tcolor: inherit;\n}\n",""]);const a=r},21761:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-count-badge {\n\tpadding: 3px 6px;\n\tborder-radius: 11px;\n\tfont-size: 11px;\n\tmin-width: 18px;\n\tmin-height: 18px;\n\tline-height: 11px;\n\tfont-weight: normal;\n\ttext-align: center;\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n}\n\n.monaco-count-badge.long {\n\tpadding: 2px 3px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n",""]);const a=r},53697:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-dropdown {\n\theight: 100%;\n\tpadding: 0;\n}\n\n.monaco-dropdown > .dropdown-label {\n\tcursor: pointer;\n\theight: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.monaco-dropdown > .dropdown-label > .action-label.disabled {\n\tcursor: default;\n}\n\n.monaco-dropdown-with-primary {\n\tdisplay: flex !important;\n\tflex-direction: row;\n\tborder-radius: 5px;\n}\n\n.monaco-dropdown-with-primary > .action-container > .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\n\tfont-size: 12px;\n\tpadding-left: 0px;\n\tpadding-right: 0px;\n\tline-height: 16px;\n\tmargin-left: -3px;\n}\n\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\n\tdisplay: block;\n\tbackground-size: 16px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n",""]);const a=r},19498:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- Find input ---------- */\n\n.monaco-findInput {\n\tposition: relative;\n}\n\n.monaco-findInput .monaco-inputbox {\n\tfont-size: 13px;\n\twidth: 100%;\n}\n\n.monaco-findInput > .controls {\n\tposition: absolute;\n\ttop: 3px;\n\tright: 2px;\n}\n\n.vs .monaco-findInput.disabled {\n\tbackground-color: #E1E1E1;\n}\n\n/* Theming */\n.vs-dark .monaco-findInput.disabled {\n\tbackground-color: #333;\n}\n\n/* Highlighting */\n.monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\n}\n.monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\n}\n.hc-black .monaco-findInput.highlight-0 .controls,\n.vs-dark .monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\n}\n.hc-black .monaco-findInput.highlight-1 .controls,\n.vs-dark .monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\n}\n\n@keyframes monaco-findInput-highlight-0 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-1 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}\n\n@keyframes monaco-findInput-highlight-dark-0 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-dark-1 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}",""]);const a=r},81747:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-hover {\n\tcursor: default;\n\tposition: absolute;\n\toverflow: hidden;\n\tz-index: 50;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n\tbox-sizing: initial;\n\tanimation: fadein 100ms linear;\n\tline-height: 1.5em;\n}\n\n.monaco-hover.hidden {\n\tdisplay: none;\n}\n\n.monaco-hover .hover-contents:not(.html-hover-contents) {\n\tpadding: 4px 8px;\n}\n\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\n\tmax-width: 500px;\n\tword-wrap: break-word;\n}\n\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\n\tmin-width: 100%;\n}\n\n.monaco-hover p,\n.monaco-hover .code,\n.monaco-hover ul {\n\tmargin: 8px 0;\n}\n\n.monaco-hover code {\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-hover hr {\n\tbox-sizing: border-box;\n\tborder-left: 0px;\n\tborder-right: 0px;\n\tmargin-top: 4px;\n\tmargin-bottom: -4px;\n\tmargin-left: -8px;\n\tmargin-right: -8px;\n\theight: 1px;\n}\n\n.monaco-hover p:first-child,\n.monaco-hover .code:first-child,\n.monaco-hover ul:first-child {\n\tmargin-top: 0;\n}\n\n.monaco-hover p:last-child,\n.monaco-hover .code:last-child,\n.monaco-hover ul:last-child {\n\tmargin-bottom: 0;\n}\n\n/* MarkupContent Layout */\n.monaco-hover ul {\n\tpadding-left: 20px;\n}\n.monaco-hover ol {\n\tpadding-left: 20px;\n}\n\n.monaco-hover li > p {\n\tmargin-bottom: 0;\n}\n\n.monaco-hover li > ul {\n\tmargin-top: 0;\n}\n\n.monaco-hover code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-hover .monaco-tokenized-source {\n\twhite-space: pre-wrap;\n}\n\n.monaco-hover .hover-row.status-bar {\n\tfont-size: 12px;\n\tline-height: 22px;\n}\n\n.monaco-hover .hover-row.status-bar .actions {\n\tdisplay: flex;\n\tpadding: 0px 8px;\n}\n\n.monaco-hover .hover-row.status-bar .actions .action-container {\n\tmargin-right: 16px;\n\tcursor: pointer;\n}\n\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\n\tpadding-right: 4px;\n}\n\n.monaco-hover .markdown-hover .hover-contents .codicon {\n\tcolor: inherit;\n\tfont-size: inherit;\n\tvertical-align: middle;\n}\n\n.monaco-hover .hover-contents a.code-link:hover,\n.monaco-hover .hover-contents a.code-link {\n\tcolor: inherit;\n}\n\n.monaco-hover .hover-contents a.code-link:before {\n\tcontent: '(';\n}\n\n.monaco-hover .hover-contents a.code-link:after {\n\tcontent: ')';\n}\n\n.monaco-hover .hover-contents a.code-link > span {\n\ttext-decoration: underline;\n\t/** Hack to force underline to show **/\n\tborder-bottom: 1px solid transparent;\n\ttext-underline-position: under;\n}\n\n/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/\n.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span {\n\tmargin-bottom: 4px;\n\tdisplay: inline-block;\n}\n\n.monaco-hover-content .action-container a {\n\t-webkit-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-hover-content .action-container.disabled {\n\tpointer-events: none;\n\topacity: 0.4;\n\tcursor: default;\n}\n",""]);const a=r},8158:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* ---------- Icon label ---------- */\n\n.monaco-icon-label {\n\tdisplay: flex; /* required for icons support :before rule */\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-icon-label::before {\n\n\t/* svg icons rendered as background image */\n\tbackground-size: 16px;\n\tbackground-position: left center;\n\tbackground-repeat: no-repeat;\n\tpadding-right: 6px;\n\twidth: 16px;\n\theight: 22px;\n\tline-height: inherit !important;\n\tdisplay: inline-block;\n\n\t/* fonts icons */\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tvertical-align: top;\n\n\tflex-shrink: 0; /* fix for https://github.com/microsoft/vscode/issues/13787 */\n}\n\n.monaco-icon-label > .monaco-icon-label-container {\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tflex: 1;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\n\tcolor: inherit;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\n\tmargin: 0 2px;\n\topacity: 0.5;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .7;\n\tmargin-left: 0.5em;\n\tfont-size: 0.9em;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label.nowrap > .monaco-icon-label-container > .monaco-icon-description-container > .label-description{\n\twhite-space: nowrap\n}\n\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .95;\n}\n\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.deprecated {\n\ttext-decoration: line-through;\n\topacity: 0.66;\n}\n\n/* make sure apply italic font style to decorations as well */\n.monaco-icon-label.italic::after {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\ttext-decoration: line-through;\n}\n\n.monaco-icon-label::after {\n\topacity: 0.75;\n\tfont-size: 90%;\n\tfont-weight: 600;\n\tmargin: auto 16px 0 5px; /* https://github.com/microsoft/vscode/issues/113223 */\n\ttext-align: center;\n}\n\n/* make sure selection color wins when a label is being selected */\n.monaco-list:focus .selected .monaco-icon-label, /* list */\n.monaco-list:focus .selected .monaco-icon-label::after\n{\n\tcolor: inherit !important;\n}\n\n.monaco-list-row.focused.selected .label-description,\n.monaco-list-row.selected .label-description {\n\topacity: .8;\n}\n",""]);const a=r},74040:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-inputbox {\n\tposition: relative;\n\tdisplay: block;\n\tpadding: 0;\n\tbox-sizing:\tborder-box;\n\n\t/* Customizable */\n\tfont-size: inherit;\n}\n\n.monaco-inputbox.idle {\n\tborder: 1px solid transparent;\n}\n\n.monaco-inputbox > .ibwrapper > .input,\n.monaco-inputbox > .ibwrapper > .mirror {\n\n\t/* Customizable */\n\tpadding: 4px;\n}\n\n.monaco-inputbox > .ibwrapper {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-inputbox > .ibwrapper > .input {\n\tdisplay: inline-block;\n\tbox-sizing:\tborder-box;\n\twidth: 100%;\n\theight: 100%;\n\tline-height: inherit;\n\tborder: none;\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tresize: none;\n\tcolor: inherit;\n}\n\n.monaco-inputbox > .ibwrapper > input {\n\ttext-overflow: ellipsis;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input {\n\tdisplay: block;\n\t-ms-overflow-style: none; /* IE 10+: hide scrollbars */\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\n\toutline: none;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input::-webkit-scrollbar {\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input.empty {\n\twhite-space: nowrap;\n}\n\n.monaco-inputbox > .ibwrapper > .mirror {\n\tposition: absolute;\n\tdisplay: inline-block;\n\twidth: 100%;\n\ttop: 0;\n\tleft: 0;\n\tbox-sizing: border-box;\n\twhite-space: pre-wrap;\n\tvisibility: hidden;\n\tword-wrap: break-word;\n}\n\n/* Context view */\n\n.monaco-inputbox-container {\n\ttext-align: right;\n}\n\n.monaco-inputbox-container .monaco-inputbox-message {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\ttext-align: left;\n\twidth: 100%;\n\tbox-sizing:\tborder-box;\n\tpadding: 0.4em;\n\tfont-size: 12px;\n\tline-height: 17px;\n\tmargin-top: -1px;\n\tword-wrap: break-word;\n}\n\n/* Action bar support */\n.monaco-inputbox .monaco-action-bar {\n\tposition: absolute;\n\tright: 2px;\n\ttop: 4px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item {\n\tmargin-left: 2px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\n\tbackground-repeat: no-repeat;\n\twidth: 16px;\n\theight: 16px;\n}\n",""]);const a=r},9861:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-keybinding {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 10px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tdisplay: inline-block;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-radius: 3px;\n\tvertical-align: middle;\n\tfont-size: 11px;\n\tpadding: 3px 5px;\n\tmargin: 0 2px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:first-child {\n\tmargin-left: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:last-child {\n\tmargin-right: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-separator {\n\tdisplay: inline-block;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\n\twidth: 6px;\n}\n",""]);const a=r},1425:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-list {\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n}\n\n.monaco-list.mouse-support {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-list > .monaco-scrollable-element {\n\theight: 100%;\n}\n\n.monaco-list-rows {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-list.horizontal-scrolling .monaco-list-rows {\n\twidth: auto;\n\tmin-width: 100%;\n}\n\n.monaco-list-row {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\twidth: 100%;\n}\n\n.monaco-list.mouse-support .monaco-list-row {\n\tcursor: pointer;\n\ttouch-action: none;\n}\n\n/* for OS X ballistic scrolling */\n.monaco-list-row.scrolling {\n\tdisplay: none !important;\n}\n\n/* Focus */\n.monaco-list.element-focused,\n.monaco-list.selection-single,\n.monaco-list.selection-multiple {\n\toutline: 0 !important;\n}\n\n/* Dnd */\n.monaco-drag-image {\n\tdisplay: inline-block;\n\tpadding: 1px 7px;\n\tborder-radius: 10px;\n\tfont-size: 12px;\n\tposition: absolute;\n\tz-index: 1000;\n}\n\n/* Type filter */\n\n.monaco-list-type-filter {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: absolute;\n\tborder-radius: 2px;\n\tpadding: 0px 3px;\n\tmax-width: calc(100% - 10px);\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\ttext-align: right;\n\tbox-sizing: border-box;\n\tcursor: all-scroll;\n\tfont-size: 13px;\n\tline-height: 18px;\n\theight: 20px;\n\tz-index: 1;\n\ttop: 4px;\n}\n\n.monaco-list-type-filter.dragging {\n\ttransition: top 0.2s, left 0.2s;\n}\n\n.monaco-list-type-filter.ne {\n\tright: 4px;\n}\n\n.monaco-list-type-filter.nw {\n\tleft: 4px;\n}\n\n.monaco-list-type-filter > .controls {\n\tdisplay: flex;\n\talign-items: center;\n\tbox-sizing: border-box;\n\ttransition: width 0.2s;\n\twidth: 0;\n}\n\n.monaco-list-type-filter.dragging > .controls,\n.monaco-list-type-filter:hover > .controls {\n\twidth: 36px;\n}\n\n.monaco-list-type-filter > .controls > * {\n\tborder: none;\n\tbox-sizing: border-box;\n\t-webkit-appearance: none;\n\t-moz-appearance: none;\n\tbackground: none;\n\twidth: 16px;\n\theight: 16px;\n\tflex-shrink: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n}\n\n.monaco-list-type-filter > .controls > .filter {\n\tmargin-left: 4px;\n}\n\n.monaco-list-type-filter-message {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\theight: 100%;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 40px 1em 1em 1em;\n\ttext-align: center;\n\twhite-space: normal;\n\topacity: 0.7;\n\tpointer-events: none;\n}\n\n.monaco-list-type-filter-message:empty {\n\tdisplay: none;\n}\n\n/* Electron */\n\n.monaco-list-type-filter {\n\tcursor: grab;\n}\n\n.monaco-list-type-filter.dragging {\n\tcursor: grabbing;\n}\n",""]);const a=r},422:(e,t,i)=>{i.d(t,{Z:()=>p});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s),a=i(61667),l=i.n(a),d=new URL(i(4768),i.b),h=new URL(i(35555),i.b),c=r()(o()),u=l()(d),g=l()(h);c.push([e.id,`/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-mouse-cursor-text {\n\tcursor: text;\n}\n\n/* The following selector looks a bit funny, but that is needed to cover all the workbench and the editor!! */\n.vs-dark .mac .monaco-mouse-cursor-text, .hc-black .mac .monaco-mouse-cursor-text,\n.vs-dark.mac .monaco-mouse-cursor-text, .hc-black.mac .monaco-mouse-cursor-text {\n\tcursor: -webkit-image-set(url(${u}) 1x, url(${g}) 2x) 5 8, text;\n}\n`,""]);const p=c},55255:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-progress-container {\n\twidth: 100%;\n\theight: 5px;\n\toverflow: hidden; /* keep progress bit in bounds */\n}\n\n.monaco-progress-container .progress-bit {\n\twidth: 2%;\n\theight: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tdisplay: none;\n}\n\n.monaco-progress-container.active .progress-bit {\n\tdisplay: inherit;\n}\n\n.monaco-progress-container.discrete .progress-bit {\n\tleft: 0;\n\ttransition: width 100ms linear;\n}\n\n.monaco-progress-container.discrete.done .progress-bit {\n\twidth: 100%;\n}\n\n.monaco-progress-container.infinite .progress-bit {\n\tanimation-name: progress;\n\tanimation-duration: 4s;\n\tanimation-iteration-count: infinite;\n\tanimation-timing-function: linear;\n\ttransform: translate3d(0px, 0px, 0px);\n}\n\n/**\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\n * its relative size to the parent container:\n * parent width: 5000%\n * bit width: 100%\n * translateX should be as follow:\n * 50%: 5000% * 50% - 50% (set to center) = 2450%\n * 100%: 5000% * 100% - 100% (do not overflow) = 4900%\n */\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }\n",""]);const a=r},89760:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n:root {\n\t--sash-size: 4px;\n}\n\n.monaco-sash {\n\tposition: absolute;\n\tz-index: 35;\n\ttouch-action: none;\n}\n\n.monaco-sash.disabled {\n\tpointer-events: none;\n}\n\n.monaco-sash.mac.vertical {\n\tcursor: col-resize;\n}\n\n.monaco-sash.vertical.minimum {\n\tcursor: e-resize;\n}\n\n.monaco-sash.vertical.maximum {\n\tcursor: w-resize;\n}\n\n.monaco-sash.mac.horizontal {\n\tcursor: row-resize;\n}\n\n.monaco-sash.horizontal.minimum {\n\tcursor: s-resize;\n}\n\n.monaco-sash.horizontal.maximum {\n\tcursor: n-resize;\n}\n\n.monaco-sash.disabled {\n\tcursor: default !important;\n\tpointer-events: none !important;\n}\n\n.monaco-sash.vertical {\n\tcursor: ew-resize;\n\ttop: 0;\n\twidth: var(--sash-size);\n\theight: 100%;\n}\n\n.monaco-sash.horizontal {\n\tcursor: ns-resize;\n\tleft: 0;\n\twidth: 100%;\n\theight: var(--sash-size);\n}\n\n.monaco-sash:not(.disabled) > .orthogonal-drag-handle {\n\tcontent: \" \";\n\theight: calc(var(--sash-size) * 2);\n\twidth: calc(var(--sash-size) * 2);\n\tz-index: 100;\n\tdisplay: block;\n\tcursor: all-scroll;\n\tposition: absolute;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.start,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.end {\n\tcursor: nwse-resize;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.end,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.start {\n\tcursor: nesw-resize;\n}\n\n.monaco-sash.vertical > .orthogonal-drag-handle.start {\n\tleft: calc(var(--sash-size) * -0.5);\n\ttop: calc(var(--sash-size) * -1);\n}\n.monaco-sash.vertical > .orthogonal-drag-handle.end {\n\tleft: calc(var(--sash-size) * -0.5);\n\tbottom: calc(var(--sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.start {\n\ttop: calc(var(--sash-size) * -0.5);\n\tleft: calc(var(--sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.end {\n\ttop: calc(var(--sash-size) * -0.5);\n\tright: calc(var(--sash-size) * -1);\n}\n\n.monaco-sash:before {\n\tcontent: '';\n\tpointer-events: none;\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\ttransition: background-color 0.1s ease-out;\n\tbackground: transparent;\n}\n\n.monaco-sash.vertical:before {\n\twidth: var(--sash-hover-size);\n\tleft: calc(50% - (var(--sash-hover-size) / 2));\n}\n\n.monaco-sash.horizontal:before {\n\theight: var(--sash-hover-size);\n\ttop: calc(50% - (var(--sash-hover-size) / 2));\n}\n\n/** Debug **/\n\n.monaco-sash.debug {\n\tbackground: cyan;\n}\n\n.monaco-sash.debug.disabled {\n\tbackground: rgba(0, 255, 255, 0.2);\n}\n\n.monaco-sash.debug:not(.disabled) > .orthogonal-drag-handle {\n\tbackground: red;\n}\n",""]);const a=r},95447:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n",""]);const a=r},10156:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-split-view2 {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .sash-container {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tpointer-events: none;\n}\n\n.monaco-split-view2 > .sash-container > .monaco-sash {\n\tpointer-events: initial;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element {\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container {\n\twidth: 100%;\n\theight: 100%;\n\twhite-space: nowrap;\n\tposition: relative;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twhite-space: initial;\n\tposition: absolute;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view:not(.visible) {\n\tdisplay: none;\n}\n\n.monaco-split-view2.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twidth: 100%;\n}\n\n.monaco-split-view2.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\theight: 100%;\n}\n\n.monaco-split-view2.separator-border > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\tcontent: ' ';\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tz-index: 5;\n\tpointer-events: none;\n\tbackground-color: var(--separator-border);\n}\n\n.monaco-split-view2.separator-border.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 100%;\n\twidth: 1px;\n}\n\n.monaco-split-view2.separator-border.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 1px;\n\twidth: 100%;\n}\n",""]);const a=r},99500:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-table {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n}\n\n.monaco-table > .monaco-split-view2 {\n\tborder-bottom: 1px solid transparent;\n}\n\n.monaco-table > .monaco-list {\n\tflex: 1;\n}\n\n.monaco-table-tr {\n\tdisplay: flex;\n\theight: 100%;\n}\n\n.monaco-table-th {\n\twidth: 100%;\n\theight: 100%;\n\tfont-weight: bold;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table-th,\n.monaco-table-td {\n\tbox-sizing: border-box;\n\tflex-shrink: 0;\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\tcontent: "";\n\tposition: absolute;\n\tleft: calc(var(--sash-size) / 2);\n\twidth: 0;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-table > .monaco-split-view2,\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\ttransition: border-color 0.2s ease-out;\n}\n/*\n.monaco-table:hover > .monaco-split-view2,\n.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\tborder-color: rgba(204, 204, 204, 0.2);\n} */\n',""]);const a=r},9263:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-tl-row {\n\tdisplay: flex;\n\theight: 100%;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-tl-indent {\n\theight: 100%;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 16px;\n\tpointer-events: none;\n}\n\n.hide-arrows .monaco-tl-indent {\n\tleft: 12px;\n}\n\n.monaco-tl-indent > .indent-guide {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\theight: 100%;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-tl-indent > .indent-guide {\n\ttransition: border-color 0.1s linear;\n}\n\n.monaco-tl-twistie,\n.monaco-tl-contents {\n\theight: 100%;\n}\n\n.monaco-tl-twistie {\n\tfont-size: 10px;\n\ttext-align: right;\n\tpadding-right: 6px;\n\tflex-shrink: 0;\n\twidth: 16px;\n\tdisplay: flex !important;\n\talign-items: center;\n\tjustify-content: center;\n\ttransform: translateX(3px);\n}\n\n.monaco-tl-contents {\n\tflex: 1;\n\toverflow: hidden;\n}\n\n.monaco-tl-twistie::before {\n\tborder-radius: 20px;\n}\n\n.monaco-tl-twistie.collapsed::before {\n\ttransform: rotate(-90deg);\n}\n\n.monaco-tl-twistie.codicon-tree-item-loading::before {\n\t/* Use steps to throttle FPS to reduce CPU usage */\n\tanimation: codicon-spin 1.25s steps(30) infinite;\n}\n",""]);const a=r},85406:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tposition: absolute;\n\twidth: 600px;\n\tz-index: 2000;\n\tpadding: 0 1px 1px 1px;\n\tleft: 50%;\n\tmargin-left: -300px;\n}\n\n.quick-input-titlebar {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-left-action-bar {\n\tdisplay: flex;\n\tmargin-left: 4px;\n\tflex: 1;\n}\n\n.quick-input-title {\n\tpadding: 3px 0px;\n\ttext-align: center;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.quick-input-right-action-bar {\n\tdisplay: flex;\n\tmargin-right: 4px;\n\tflex: 1;\n}\n\n.quick-input-right-action-bar > .actions-container {\n\tjustify-content: flex-end;\n}\n\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\n\tbackground-position: center;\n\tbackground-repeat: no-repeat;\n\tpadding: 2px;\n}\n\n.quick-input-description {\n\tmargin: 6px;\n}\n\n.quick-input-header .quick-input-description {\n\tmargin: 4px 2px;\n}\n\n.quick-input-header {\n\tdisplay: flex;\n\tpadding: 6px 6px 0px 6px;\n\tmargin-bottom: -2px;\n}\n\n.quick-input-widget.hidden-input .quick-input-header {\n\t/* reduce margins and paddings when input box hidden */\n\tpadding: 0;\n\tmargin-bottom: 0;\n}\n\n.quick-input-and-message {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex-grow: 1;\n\tmin-width: 0;\n\tposition: relative;\n}\n\n.quick-input-check-all {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-filter {\n\tflex-grow: 1;\n\tdisplay: flex;\n\tposition: relative;\n}\n\n.quick-input-box {\n\tflex-grow: 1;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-box,\n.quick-input-widget.show-checkboxes .quick-input-message {\n\tmargin-left: 5px;\n}\n\n.quick-input-visible-count {\n\tposition: absolute;\n\tleft: -10000px;\n}\n\n.quick-input-count {\n\talign-self: center;\n\tposition: absolute;\n\tright: 4px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-count .monaco-count-badge {\n\tvertical-align: middle;\n\tpadding: 2px 4px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n\n.quick-input-action {\n\tmargin-left: 6px;\n}\n\n.quick-input-action .monaco-text-button {\n\tfont-size: 11px;\n\tpadding: 0 6px;\n\tdisplay: flex;\n\theight: 27.5px;\n\talign-items: center;\n}\n\n.quick-input-message {\n\tmargin-top: -1px;\n\tpadding: 5px 5px 2px 5px;\n\toverflow-wrap: break-word;\n}\n\n.quick-input-message > .codicon {\n\tmargin: 0 0.2em;\n\tvertical-align: text-bottom;\n}\n\n.quick-input-progress.monaco-progress-container {\n\tposition: relative;\n}\n\n.quick-input-progress.monaco-progress-container,\n.quick-input-progress.monaco-progress-container .progress-bit {\n\theight: 2px;\n}\n\n.quick-input-list {\n\tline-height: 22px;\n\tmargin-top: 6px;\n}\n\n.quick-input-widget.hidden-input .quick-input-list {\n\tmargin-top: 0; /* reduce margins when input box hidden */\n}\n\n.quick-input-list .monaco-list {\n\toverflow: hidden;\n\tmax-height: calc(20 * 22px);\n}\n\n.quick-input-list .quick-input-list-entry {\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tpadding: 0 6px;\n}\n\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-width: 1px;\n\tborder-top-style: solid;\n}\n\n.quick-input-list .monaco-list-row[data-index=\"0\"] .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-style: none;\n}\n\n.quick-input-list .quick-input-list-label {\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tflex: 1;\n}\n\n.quick-input-list .quick-input-list-checkbox {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-list .quick-input-list-rows {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tflex: 1;\n\tmargin-left: 5px;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\n\tmargin-left: 10px;\n}\n\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\n\tdisplay: none;\n}\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\n\tdisplay: inline;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\n\tflex: 1; /* make sure the icon label grows within the row */\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\n\tvertical-align: text-bottom;\n}\n\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label span {\n\topacity: 1;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\n}\n\n.quick-input-list .quick-input-list-label-meta {\n\topacity: 0.7;\n\tline-height: normal;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.quick-input-list .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\n\tmargin-right: 8px; /* separate from keybindings or actions */\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tdisplay: flex;\n\tflex: 0;\n\toverflow: visible;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\n\t/*\n\t * By default, actions in the quick input action bar are hidden\n\t * until hovered over them or selected.\n\t */\n\tdisplay: none;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\n\tmargin-right: 4px;\n\tpadding: 0px 2px 2px 2px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-top: 1px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-right: 4px; /* separate from scrollbar */\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\n\tdisplay: flex;\n}\n\n/* focused items in quick pick */\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator {\n\tcolor: inherit\n}\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key {\n\tbackground: none;\n}\n",""]);const a=r},54481:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inputarea {\n\tmin-width: 0;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\toutline: none !important;\n\tresize: none;\n\tborder: none;\n\toverflow: hidden;\n\tcolor: transparent;\n\tbackground-color: transparent;\n}\n/*.monaco-editor .inputarea {\n\tposition: fixed !important;\n\twidth: 800px !important;\n\theight: 500px !important;\n\ttop: initial !important;\n\tleft: initial !important;\n\tbottom: 0 !important;\n\tright: 0 !important;\n\tcolor: black !important;\n\tbackground: white !important;\n\tline-height: 15px !important;\n\tfont-size: 14px !important;\n}*/\n.monaco-editor .inputarea.ime-input {\n\tz-index: 10;\n}\n",""]);const a=r},4808:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\n\tborder-right: 0;\n}\n",""]);const a=r},89241:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcdr = core decorations rendering (div)\n*/\n.monaco-editor .lines-content .cdr {\n\tposition: absolute;\n}",""]);const a=r},58466:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .glyph-margin {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcgmr = core glyph margin rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cgmr {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n",""]);const a=r},56378:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .lines-content .core-guide {\n\tposition: absolute;\n\tbox-sizing: border-box;\n}\n",""]);const a=r},73604:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .line-numbers {\n\tfont-variant-numeric: tabular-nums;\n\tposition: absolute;\n\ttext-align: right;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\tcursor: default;\n\theight: 100%;\n}\n\n.monaco-editor .relative-current-line-number {\n\ttext-align: left;\n\tdisplay: inline-block;\n\twidth: 100%;\n}\n\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\n\tmargin-top: 1px;\n}\n",""]);const a=r},94966:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Uncomment to see lines flashing when they're painted */\n/*.monaco-editor .view-lines > .view-line {\n\tbackground-color: none;\n\tanimation-name: flash-background;\n\tanimation-duration: 800ms;\n}\n@keyframes flash-background {\n\t0% { background-color: lightgreen; }\n\t100% { background-color: none }\n}*/\n\n.mtkcontrol {\n\tcolor: rgb(255, 255, 255) !important;\n\tbackground: rgb(150, 0, 0) !important;\n}\n\n.monaco-editor.no-user-select .lines-content,\n.monaco-editor.no-user-select .view-line,\n.monaco-editor.no-user-select .view-lines {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-editor .view-lines {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .view-line {\n\tposition: absolute;\n\twidth: 100%;\n}\n\n.monaco-editor .mtkz {\n\tdisplay: inline-block;\n}\n\n/* TODO@tokenization bootstrap fix */\n/*.monaco-editor .view-line > span > span {\n\tfloat: none;\n\tmin-height: inherit;\n\tmargin-left: inherit;\n}*/\n",""]);const a=r},61072:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .lines-decorations {\n\tposition: absolute;\n\ttop: 0;\n\tbackground: white;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcldr = core lines decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cldr {\n\tposition: absolute;\n\theight: 100%;\n}",""]);const a=r},7583:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcmdr = core margin decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cmdr {\n\tposition: absolute;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n}",""]);const a=r},61175:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* START cover the case that slider is visible on mouseover */\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\n\topacity: 0;\n\ttransition: opacity 100ms linear;\n}\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\n\topacity: 1;\n}\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\n\topacity: 1;\n}\n/* END cover the case that slider is visible on mouseover */\n\n.monaco-editor .minimap-shadow-hidden {\n\tposition: absolute;\n\twidth: 0;\n}\n.monaco-editor .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -6px;\n\twidth: 6px;\n}\n.monaco-editor.no-minimap-shadow .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -1px;\n\twidth: 1px;\n}\n",""]);const a=r},17782:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .overlayWidgets {\n\tposition: absolute;\n\ttop: 0;\n\tleft:0;\n}",""]);const a=r},33807:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-ruler {\n\tposition: absolute;\n\ttop: 0;\n}",""]);const a=r},56334:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .scroll-decoration {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 6px;\n}",""]);const a=r},17751:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcslr = core selections layer rendering (div)\n*/\n.monaco-editor .lines-content .cslr {\n\tposition: absolute;\n}\n\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\n\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\n",""]);const a=r},46557:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .cursors-layer {\n\tposition: absolute;\n\ttop: 0;\n}\n\n.monaco-editor .cursors-layer > .cursor {\n\tposition: absolute;\n\toverflow: hidden;\n}\n\n/* -- smooth-caret-animation -- */\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\n\ttransition: all 80ms;\n}\n\n/* -- block-outline-style -- */\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\n\tbox-sizing: border-box;\n\tbackground: transparent !important;\n\tborder-style: solid;\n\tborder-width: 1px;\n}\n\n/* -- underline-style -- */\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\n\tborder-bottom-width: 2px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n\tbox-sizing: border-box;\n}\n\n/* -- underline-thin-style -- */\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\n\tborder-bottom-width: 1px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n\tbox-sizing: border-box;\n}\n\n@keyframes monaco-cursor-smooth {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t60%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-phase {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t90%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-expand {\n\t0%,\n\t20% {\n\t\ttransform: scaleY(1);\n\t}\n\t80%,\n\t100% {\n\t\ttransform: scaleY(0);\n\t}\n}\n\n.cursor-smooth {\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-phase {\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-expand > .cursor {\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\n}\n",""]);const a=r},26568:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- DiffEditor ---------- */\n\n.monaco-diff-editor .diffOverview {\n\tz-index: 9;\n}\n\n.monaco-diff-editor .diffOverview .diffViewport {\n\tz-index: 10;\n}\n\n/* colors not externalized: using transparancy on background */\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\n\tz-index: 10;\n}\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\n\n/* ---------- Diff ---------- */\n\n.monaco-editor .insert-sign,\n.monaco-diff-editor .insert-sign,\n.monaco-editor .delete-sign,\n.monaco-diff-editor .delete-sign {\n\tfont-size: 11px !important;\n\topacity: 0.7 !important;\n\tdisplay: flex !important;\n\talign-items: center;\n}\n.monaco-editor.hc-black .insert-sign,\n.monaco-diff-editor.hc-black .insert-sign,\n.monaco-editor.hc-black .delete-sign,\n.monaco-diff-editor.hc-black .delete-sign {\n\topacity: 1;\n}\n\n.monaco-editor .inline-deleted-margin-view-zone {\n\ttext-align: right;\n}\n.monaco-editor .inline-added-margin-view-zone {\n\ttext-align: right;\n}\n\n/* ---------- Inline Diff ---------- */\n\n.monaco-editor .view-zones .view-lines .view-line span {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\n\tcursor: pointer;\n}\n",""]);const a=r},90138:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-diff-editor .diff-review-line-number {\n\ttext-align: right;\n\tdisplay: inline-block;\n}\n\n.monaco-diff-editor .diff-review {\n\tposition: absolute;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-diff-editor .diff-review-summary {\n\tpadding-left: 10px;\n}\n\n.monaco-diff-editor .diff-review-shadow {\n\tposition: absolute;\n}\n\n.monaco-diff-editor .diff-review-row {\n\twhite-space: pre;\n}\n\n.monaco-diff-editor .diff-review-table {\n\tdisplay: table;\n\tmin-width: 100%;\n}\n\n.monaco-diff-editor .diff-review-row {\n\tdisplay: table-row;\n\twidth: 100%;\n}\n\n.monaco-diff-editor .diff-review-spacer {\n\tdisplay: inline-block;\n\twidth: 10px;\n\tvertical-align: middle;\n}\n\n.monaco-diff-editor .diff-review-spacer > .codicon {\n\tfont-size: 9px !important;\n}\n\n.monaco-diff-editor .diff-review-actions {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\ttop: 2px;\n}\n\n.monaco-diff-editor .diff-review-actions .action-label {\n\twidth: 16px;\n\theight: 16px;\n\tmargin: 2px 0;\n}\n",""]);const a=r},4656:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -------------------- IE10 remove auto clear button -------------------- */\n\n::-ms-clear {\n\tdisplay: none;\n}\n\n/* All widgets */\n/* I am not a big fan of this rule */\n.monaco-editor .editor-widget input {\n\tcolor: inherit;\n}\n\n/* -------------------- Editor -------------------- */\n\n.monaco-editor {\n\tposition: relative;\n\toverflow: visible;\n\t-webkit-text-size-adjust: 100%;\n}\n\n/* -------------------- Misc -------------------- */\n\n.monaco-editor .overflow-guard {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.monaco-editor .view-overlays {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n.monaco-editor .auto-closed-character {\n\topacity: 0.3;\n}\n*/\n",""]);const a=r},82623:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .selection-anchor {\n\tbackground-color: #007ACC;\n\twidth: 2px !important;\n}\n",""]);const a=r},62444:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .bracket-match {\n\tbox-sizing: border-box;\n}\n",""]);const a=r},86242:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .contentWidgets .codicon-light-bulb,\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.monaco-editor .contentWidgets .codicon-light-bulb:hover,\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover {\n\tcursor: pointer;\n}\n",""]);const a=r},87443:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .codelens-decoration {\n\toverflow: hidden;\n\tdisplay: inline-block;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .codelens-decoration > span,\n.monaco-editor .codelens-decoration > a {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\twhite-space: nowrap;\n\tvertical-align: sub;\n}\n\n.monaco-editor .codelens-decoration > a {\n\ttext-decoration: none;\n}\n\n.monaco-editor .codelens-decoration > a:hover {\n\tcursor: pointer;\n}\n\n.monaco-editor .codelens-decoration .codicon {\n\tvertical-align: middle;\n\tcolor: currentColor !important;\n}\n\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\n\tcursor: pointer;\n}\n\n@keyframes fadein {\n\t0% { opacity: 0; visibility: visible;}\n\t100% { opacity: 1; }\n}\n\n.monaco-editor .codelens-decoration.fadein {\n\tanimation: fadein 0.1s linear;\n}\n",""]);const a=r},6762:(e,t,i)=>{i.d(t,{Z:()=>u});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s),a=i(61667),l=i.n(a),d=new URL(i(94748),i.b),h=r()(o()),c=l()(d);h.push([e.id,`/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.colorpicker-widget {\n\theight: 190px;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-editor .colorpicker-hover:focus {\n\toutline: none;\n}\n\n\n/* Header */\n\n.colorpicker-header {\n\tdisplay: flex;\n\theight: 24px;\n\tposition: relative;\n\tbackground: url(${c});\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-header .picked-color {\n\twidth: 216px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tline-height: 24px;\n\tcursor: pointer;\n\tcolor: white;\n\tflex: 1;\n}\n\n.colorpicker-header .picked-color .codicon {\n\tcolor: inherit;\n\tfont-size: 14px;\n\tposition: absolute;\n\tleft: 8px;\n}\n\n.colorpicker-header .picked-color.light {\n\tcolor: black;\n}\n\n.colorpicker-header .original-color {\n\twidth: 74px;\n\tz-index: inherit;\n\tcursor: pointer;\n}\n\n\n/* Body */\n\n.colorpicker-body {\n\tdisplay: flex;\n\tpadding: 8px;\n\tposition: relative;\n}\n\n.colorpicker-body .saturation-wrap {\n\toverflow: hidden;\n\theight: 150px;\n\tposition: relative;\n\tmin-width: 220px;\n\tflex: 1;\n}\n\n.colorpicker-body .saturation-box {\n\theight: 150px;\n\tposition: absolute;\n}\n\n.colorpicker-body .saturation-selection {\n\twidth: 9px;\n\theight: 9px;\n\tmargin: -5px 0 0 -5px;\n\tborder: 1px solid rgb(255, 255, 255);\n\tborder-radius: 100%;\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\n\tposition: absolute;\n}\n\n.colorpicker-body .strip {\n\twidth: 25px;\n\theight: 150px;\n}\n\n.colorpicker-body .hue-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: grab;\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\n}\n\n.colorpicker-body .opacity-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: grab;\n\tbackground: url(${c});\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-body .strip.grabbing {\n\tcursor: grabbing;\n}\n\n.colorpicker-body .slider {\n\tposition: absolute;\n\ttop: 0;\n\tleft: -2px;\n\twidth: calc(100% + 4px);\n\theight: 4px;\n\tbox-sizing: border-box;\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\n}\n\n.colorpicker-body .strip .overlay {\n\theight: 150px;\n\tpointer-events: none;\n}\n`,""]);const u=h},19844:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor.vs .dnd-target {\n\tborder-right: 2px dotted black;\n\tcolor: white; /* opposite of black */\n}\n.monaco-editor.vs-dark .dnd-target {\n\tborder-right: 2px dotted #AEAFAD;\n\tcolor: #51504f; /* opposite of #AEAFAD */\n}\n.monaco-editor.hc-black .dnd-target {\n\tborder-right: 2px dotted #fff;\n\tcolor: #000; /* opposite of #fff */\n}\n\n.monaco-editor.mouse-default .view-lines,\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\n.monaco-editor.hc-black.mac.mouse-default .view-lines {\n\tcursor: default;\n}\n.monaco-editor.mouse-copy .view-lines,\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\n.monaco-editor.hc-black.mac.mouse-copy .view-lines {\n\tcursor: copy;\n}",""]);const a=r},84233:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Find widget */\n.monaco-editor .find-widget {\n\tposition: absolute;\n\tz-index: 35;\n\theight: 33px;\n\toverflow: hidden;\n\tline-height: 19px;\n\ttransition: transform 200ms linear;\n\tpadding: 0 4px;\n\tbox-sizing: border-box;\n\ttransform: translateY(calc(-100% - 10px)); /* shadow (10px) */\n}\n\n.monaco-editor .find-widget textarea {\n\tmargin: 0px;\n}\n\n.monaco-editor .find-widget.hiddenEditor {\n\tdisplay: none;\n}\n\n/* Find widget when replace is toggled on */\n.monaco-editor .find-widget.replaceToggled > .replace-part {\n\tdisplay: flex;\n}\n\n.monaco-editor .find-widget.visible {\n\ttransform: translateY(0);\n}\n\n.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\n\toutline: 1px solid -webkit-focus-ring-color;\n\toutline-offset: -1px;\n}\n\n.monaco-editor .find-widget .monaco-inputbox .input {\n\tbackground-color: transparent;\n\tmin-height: 0;\n}\n\n.monaco-editor .find-widget .monaco-findInput .input {\n\tfont-size: 13px;\n}\n\n.monaco-editor .find-widget > .find-part,\n.monaco-editor .find-widget > .replace-part {\n\tmargin: 4px 0 0 17px;\n\tfont-size: 12px;\n\tdisplay: flex;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\n\tmin-height: 25px;\n}\n\n\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\n\tpadding-right: 22px;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .input,\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .mirror,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .input,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\n\tpadding-top: 2px;\n\tpadding-bottom: 2px;\n}\n\n.monaco-editor .find-widget > .find-part .find-actions {\n\theight: 25px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget > .replace-part .replace-actions {\n\theight: 25px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget .monaco-findInput {\n\tvertical-align: middle;\n\tdisplay: flex;\n\tflex:1;\n}\n\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {\n\t/* Make sure textarea inherits the width correctly */\n\twidth: 100%;\n}\n\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical {\n\t/* Hide vertical scrollbar */\n\topacity: 0;\n}\n\n.monaco-editor .find-widget .matchesCount {\n\tdisplay: flex;\n\tflex: initial;\n\tmargin: 0 0 0 3px;\n\tpadding: 2px 0 0 2px;\n\theight: 25px;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\ttext-align: center;\n\tline-height: 23px;\n}\n\n.monaco-editor .find-widget .button {\n\twidth: 16px;\n\theight: 16px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n\tdisplay: flex;\n\tflex: initial;\n\tmargin-left: 3px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* find in selection button */\n.monaco-editor .find-widget .codicon-find-selection {\n\twidth: 22px;\n\theight: 22px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n}\n\n.monaco-editor .find-widget .button.left {\n\tmargin-left: 0;\n\tmargin-right: 3px;\n}\n\n.monaco-editor .find-widget .button.wide {\n\twidth: auto;\n\tpadding: 1px 6px;\n\ttop: -1px;\n}\n\n.monaco-editor .find-widget .button.toggle {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 3px;\n\twidth: 18px;\n\theight: 100%;\n\tborder-radius: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .find-widget .button.toggle.disabled {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget .disabled {\n\topacity: 0.3;\n\tcursor: default;\n}\n\n.monaco-editor .find-widget > .replace-part {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget > .replace-part > .monaco-findInput {\n\tposition: relative;\n\tdisplay: flex;\n\tvertical-align: middle;\n\tflex: auto;\n\tflex-grow: 0;\n\tflex-shrink: 0;\n}\n\n.monaco-editor .find-widget > .replace-part > .monaco-findInput > .controls {\n\tposition: absolute;\n\ttop: 3px;\n\tright: 2px;\n}\n\n/* REDUCED */\n.monaco-editor .find-widget.reduced-find-widget .matchesCount {\n\tdisplay:none;\n}\n\n/* NARROW (SMALLER THAN REDUCED) */\n.monaco-editor .find-widget.narrow-find-widget {\n\tmax-width: 257px !important;\n}\n\n/* COLLAPSED (SMALLER THAN NARROW) */\n.monaco-editor .find-widget.collapsed-find-widget {\n\tmax-width: 170px !important;\n}\n\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\n\tdisplay:none;\n}\n\n.monaco-editor .findMatch {\n\tanimation-duration: 0;\n\tanimation-name: inherit !important;\n}\n\n.monaco-editor .find-widget .monaco-sash {\n\tleft: 0 !important;\n}\n\n.monaco-editor.hc-black .find-widget .button:before {\n\tposition: relative;\n\ttop: 1px;\n\tleft: 2px;\n}\n",""]);const a=r},82488:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .codicon-folding-expanded,\n.monaco-editor .margin-view-overlays .codicon-folding-collapsed {\n\tcursor: pointer;\n\topacity: 0;\n\ttransition: opacity 0.5s;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tfont-size: 140%;\n\tmargin-left: 2px;\n}\n\n.monaco-editor .margin-view-overlays:hover .codicon,\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,\n.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons {\n\topacity: 1;\n}\n\n.monaco-editor .inline-folded:after {\n\tcolor: grey;\n\tmargin: 0.1em 0.2em 0 0.2em;\n\tcontent: "⋯";\n\tdisplay: inline;\n\tline-height: 1em;\n\tcursor: pointer;\n}\n',""]);const a=r},46165:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* marker zone */\n\n.monaco-editor .peekview-widget .head .peekview-title .severity-icon {\n\tdisplay: inline-block;\n\tvertical-align: text-top;\n\tmargin-right: 4px;\n}\n\n.monaco-editor .marker-widget {\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .marker-widget > .stale {\n\topacity: 0.6;\n\tfont-style: italic;\n}\n\n.monaco-editor .marker-widget .title {\n\tdisplay: inline-block;\n\tpadding-right: 5px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer {\n\tposition: absolute;\n\twhite-space: pre;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n\tpadding: 8px 12px 0 20px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message .details {\n\tpadding-left: 6px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message .source,\n.monaco-editor .marker-widget .descriptioncontainer .message span.code {\n\topacity: 0.6;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link {\n\topacity: 0.6;\n\tcolor: inherit;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before {\n\tcontent: '(';\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after {\n\tcontent: ')';\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\n\ttext-decoration: underline;\n\t/** Hack to force underline to show **/\n\tborder-bottom: 1px solid transparent;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .filename {\n\tcursor: pointer;\n}\n",""]);const a=r},2035:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .goto-definition-link {\n\ttext-decoration: underline;\n\tcursor: pointer;\n}",""]);const a=r},93867:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -- zone widget */\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\n\tborder-top-width: 1px;\n\tborder-bottom-width: 1px;\n}\n\n.monaco-editor .reference-zone-widget .inline {\n\tdisplay: inline-block;\n\tvertical-align: top;\n}\n\n.monaco-editor .reference-zone-widget .messages {\n\theight: 100%;\n\twidth: 100%;\n\ttext-align: center;\n\tpadding: 3em 0;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree {\n\tline-height: 23px;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\n\tdisplay: inline-flex;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\n\tcolor: inherit !important;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\n\tmargin-right: 12px;\n\tmargin-left: auto;\n}\n\n/* High Contrast Theming */\n\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\n\tfont-weight: bold;\n}\n",""]);const a=r},6401:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .suggest-preview-additional-widget {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .suggest-preview-additional-widget .content-spacer {\n\tcolor: transparent;\n\twhite-space: pre;\n}\n\n.monaco-editor .suggest-preview-additional-widget .button {\n\tdisplay: inline-block;\n\tcursor: pointer;\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .ghost-text-hidden {\n\topacity: 0;\n\tfont-size: 0;\n}\n\n.monaco-editor .ghost-text-decoration {\n\tfont-style: italic;\n}\n\n.monaco-editor .suggest-preview-text {\n\tfont-style: italic;\n}\n",""]);const a=r},27263:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .detected-link,\n.monaco-editor .detected-link-active {\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .detected-link-active {\n\tcursor: pointer;\n}\n",""]);const a=r},85368:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .monaco-editor-overlaymessage {\n\tpadding-bottom: 8px;\n\tz-index: 10000;\n}\n\n.monaco-editor .monaco-editor-overlaymessage.below {\n\tpadding-bottom: 0;\n\tpadding-top: 8px;\n\tz-index: 10000;\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\n\tanimation: fadeIn 150ms ease-out;\n}\n\n@keyframes fadeOut {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\n\tanimation: fadeOut 100ms ease-out;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message {\n\tpadding: 1px 4px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor {\n\twidth: 0 !important;\n\theight: 0 !important;\n\tborder-color: transparent;\n\tborder-style: solid;\n\tz-index: 1000;\n\tborder-width: 8px;\n\tposition: absolute;\n}\n\n.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.below {\n\tdisplay: none;\n}\n\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.top {\n\tdisplay: inherit;\n\ttop: -8px;\n}\n",""]);const a=r},19499:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .parameter-hints-widget {\n\tz-index: 10;\n\tdisplay: flex;\n\tflex-direction: column;\n\tline-height: 1.5em;\n}\n\n.monaco-editor .parameter-hints-widget > .phwrapper {\n\tmax-width: 440px;\n\tdisplay: flex;\n\tflex-direction: row;\n}\n\n.monaco-editor .parameter-hints-widget.multiple {\n\tmin-height: 3.3em;\n\tpadding: 0;\n}\n\n.monaco-editor .parameter-hints-widget.visible {\n\ttransition: left .05s ease-in-out;\n}\n\n.monaco-editor .parameter-hints-widget p,\n.monaco-editor .parameter-hints-widget ul {\n\tmargin: 8px 0;\n}\n\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\n.monaco-editor .parameter-hints-widget .body {\n\tdisplay: flex;\n\tflex: 1;\n\tflex-direction: column;\n\tmin-height: 100%;\n}\n\n.monaco-editor .parameter-hints-widget .signature {\n\tpadding: 4px 5px;\n}\n\n.monaco-editor .parameter-hints-widget .docs {\n\tpadding: 0 10px 0 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .docs.empty {\n\tdisplay: none;\n}\n\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\n\twhite-space: initial;\n}\n\n.monaco-editor .parameter-hints-widget .docs .markdown-docs code {\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-editor .parameter-hints-widget .docs .code {\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .docs code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-editor .parameter-hints-widget .controls {\n\tdisplay: none;\n\tflex-direction: column;\n\talign-items: center;\n\tmin-width: 22px;\n\tjustify-content: flex-end;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .controls {\n\tdisplay: flex;\n\tpadding: 0 2px;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .button {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n}\n\n.monaco-editor .parameter-hints-widget .button.previous {\n\tbottom: 24px;\n}\n\n.monaco-editor .parameter-hints-widget .overloads {\n\ttext-align: center;\n\theight: 12px;\n\tline-height: 12px;\n\topacity: 0.5;\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\n\tfont-weight: bold;\n}\n\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\n\tfont-weight: bold;\n\tmargin-right: 0.5em;\n}\n",""]);const a=r},72608:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .peekview-widget .head {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title {\n\tdisplay: flex;\n\talign-items: center;\n\tfont-size: 13px;\n\tmargin-left: 20px;\n\tmin-width: 0;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title.clickable {\n\tcursor: pointer;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\n\tfont-size: 0.9em;\n\tmargin-left: 0.5em;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .meta {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .filename {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\n\tcontent: '-';\n\tpadding: 0 0.3em;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions {\n\tflex: 1;\n\ttext-align: right;\n\tpadding-right: 2px;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\n\theight: 100%;\n}\n\n.monaco-editor .peekview-widget > .body {\n\tborder-top: 1px solid;\n\tposition: relative;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\n\tmargin-right: 4px;\n}\n\n.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon {\n\tcolor: inherit !important;\n}\n",""]);const a=r},93287:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .rename-box {\n\tz-index: 100;\n\tcolor: inherit;\n}\n\n.monaco-editor .rename-box.preview {\n\tpadding: 3px 3px 0 3px;\n}\n\n.monaco-editor .rename-box .rename-input {\n\tpadding: 3px;\n\twidth: calc(100% - 6px);\n}\n\n.monaco-editor .rename-box .rename-label {\n\tdisplay: none;\n\topacity: .8;\n}\n\n.monaco-editor .rename-box.preview .rename-label {\n\tdisplay: inherit;\n}\n",""]);const a=r},25165:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .snippet-placeholder {\n\tmin-width: 2px;\n\toutline-style: solid;\n\toutline-width: 1px;\n}\n\n.monaco-editor .finish-snippet-placeholder {\n\toutline-style: solid;\n\toutline-width: 1px;\n}\n",""]);const a=r},62272:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Suggest widget*/\n\n.monaco-editor .suggest-widget {\n\twidth: 430px;\n\tz-index: 40;\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.monaco-editor .suggest-widget.message {\n\tflex-direction: row;\n\talign-items: center;\n}\n\n.monaco-editor .suggest-widget,\n.monaco-editor .suggest-details {\n\tflex: 0 1 auto;\n\twidth: 100%;\n\tborder-style: solid;\n\tborder-width: 1px;\n}\n\n.monaco-editor.hc-black .suggest-widget,\n.monaco-editor.hc-black .suggest-details {\n\tborder-width: 2px;\n}\n\n/* Styles for status bar part */\n\n\n.monaco-editor .suggest-widget .suggest-status-bar {\n\tbox-sizing: border-box;\n\tdisplay: none;\n\tflex-flow: row nowrap;\n\tjustify-content: space-between;\n\twidth: 100%;\n\tfont-size: 80%;\n\tpadding: 0 4px 0 4px;\n\tborder-top: 1px solid transparent;\n\toverflow: hidden;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {\n\tdisplay: flex;\n}\n\n.monaco-editor .suggest-widget .suggest-status-bar .left {\n\tpadding-right: 8px;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {\n\topacity: 0.5;\n\tcolor: inherit;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {\n\tcontent: ', ';\n\tmargin-right: 0.3em;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\n\twidth: 100%;\n}\n\n/* Styles for Message element for when widget is loading or is empty */\n\n.monaco-editor .suggest-widget>.message {\n\tpadding-left: 22px;\n}\n\n/** Styles for the list element **/\n\n.monaco-editor .suggest-widget>.tree {\n\theight: 100%;\n\twidth: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n/** Styles for each row in the list element **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\n\tdisplay: flex;\n\t-mox-box-sizing: border-box;\n\tbox-sizing: border-box;\n\tpadding-right: 10px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 2px 2px;\n\twhite-space: nowrap;\n\tcursor: pointer;\n\ttouch-action: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents {\n\tflex: 1;\n\theight: 100%;\n\toverflow: hidden;\n\tpadding-left: 2px;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main {\n\tdisplay: flex;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: pre;\n\tjustify-content: space-between;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left, .monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\n\tdisplay: flex;\n}\n\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}\n\n/** ReadMore Icon styles **/\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore::before {\n\tcolor: inherit;\n\topacity: 1;\n\tfont-size: 14px;\n\tcursor: pointer;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close {\n\tposition: absolute;\n\ttop: 6px;\n\tright: 2px;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover {\n\topacity: 1;\n}\n\n/** signature, qualifier, type/details opacity **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\n\topacity: 0.7;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.6;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label {\n\tmargin-left: 12px;\n\topacity: 0.4;\n\tfont-size: 85%;\n\tline-height: initial;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\talign-self: center;\n}\n\n/** Type Info and icon next to the label in the focused completion item **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\n\tfont-size: 85%;\n\tmargin-left: 1.1em;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source {\n\tdisplay: inline;\n}\n\n/** Details: if using CompletionItem#details, show on focus **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label {\n\tdisplay: inline;\n}\n\n/** Details: if using CompletionItemLabel#details, always show **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label {\n\tdisplay: inline;\n}\n\n/** Ellipsis on hover **/\n\n.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\n\twidth: calc(100% - 26px);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left {\n\tflex-shrink: 1;\n\tflex-grow: 1;\n\toverflow: hidden;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label {\n\tflex-shrink: 0;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label {\n\tmax-width: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label {\n\tflex-shrink: 1;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\n\toverflow: hidden;\n\tflex-shrink: 4;\n\tmax-width: 70%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\twidth: 18px;\n\theight: 18px;\n\tvisibility: hidden;\n}\n\n/** Do NOT display ReadMore when docs is side/below **/\n\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore, .monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\n\tdisplay: none !important;\n}\n\n/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore {\n\tdisplay: none;\n}\n\n/** Focused item can show ReadMore, but can't when docs is side/below **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore {\n\tvisibility: visible;\n}\n\n/** Styles for each row in the list **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {\n\topacity: 0.66;\n\ttext-decoration: unset;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container {\n\ttext-decoration: line-through;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {\n\theight: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\n\tdisplay: block;\n\theight: 16px;\n\twidth: 16px;\n\tmargin-left: 2px;\n\tbackground-repeat: no-repeat;\n\tbackground-size: 80%;\n\tbackground-position: center;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tmargin-right: 4px;\n}\n\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon, .monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\n\tmargin: 0 0 0 0.3em;\n\tborder: 0.1em solid #000;\n\twidth: 0.7em;\n\theight: 0.7em;\n\tdisplay: inline-block;\n}\n\n/** Styles for the docs of the completion item in focus **/\n\n.monaco-editor .suggest-details-container {\n\tz-index: 41;\n}\n\n.monaco-editor .suggest-details {\n\tdisplay: flex;\n\tflex-direction: column;\n\tcursor: default;\n}\n\n.monaco-editor .suggest-details.no-docs {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element {\n\tflex: 1;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body {\n\tbox-sizing: border-box;\n\theight: 100%;\n\twidth: 100%;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type {\n\tflex: 2;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.7;\n\twhite-space: pre;\n\tmargin: 0 24px 0 0;\n\tpadding: 4px 0 12px 5px;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap {\n\twhite-space: normal;\n\tword-break: break-all;\n}\n\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs {\n\tmargin: 0;\n\tpadding: 4px 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs {\n\tmargin-right: 24px;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs {\n\tpadding: 0;\n\twhite-space: initial;\n\tmin-height: calc(1rem + 8px);\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty) {\n\tpadding: 4px 5px;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child {\n\tmargin-top: 0;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child {\n\tmargin-bottom: 0;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .monaco-tokenized-source {\n\twhite-space: pre;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code {\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon {\n\tvertical-align: sub;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-details code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-editor .suggest-details ul {\n\tpadding-left: 20px;\n}\n\n.monaco-editor .suggest-details ol {\n\tpadding-left: 20px;\n}\n\n.monaco-editor .suggest-details p code {\n\tfont-family: var(--monaco-monospace-font);\n}\n",""]);const a=r},49757:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .zone-widget {\n\tposition: absolute;\n\tz-index: 10;\n}\n\n\n.monaco-editor .zone-widget .zone-widget-container {\n\tborder-top-style: solid;\n\tborder-bottom-style: solid;\n\tborder-top-width: 0;\n\tborder-bottom-width: 0;\n\tposition: relative;\n}\n",""]);const a=r},85081:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .accessibilityHelpWidget {\n\tpadding: 10px;\n\tvertical-align: middle;\n\toverflow: scroll;\n}",""]);const a=r},30412:(e,t,i)=>{i.d(t,{Z:()=>p});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s),a=i(61667),l=i.n(a),d=new URL(i(6161),i.b),h=new URL(i(51096),i.b),c=r()(o()),u=l()(d),g=l()(h);c.push([e.id,`/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .iPadShowKeyboard {\n\twidth: 58px;\n\tmin-width: 0;\n\theight: 36px;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\tresize: none;\n\toverflow: hidden;\n\tbackground: url(${u}) center center no-repeat;\n\tborder: 4px solid #F6F6F6;\n\tborder-radius: 4px;\n}\n\n.monaco-editor.vs-dark .iPadShowKeyboard {\n\tbackground: url(${g}) center center no-repeat;\n\tborder: 4px solid #252526;\n}`,""]);const p=c},38351:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .tokens-inspect-widget {\n\tz-index: 50;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n\tpadding: 10px;\n}\n\n.tokens-inspect-separator {\n\theight: 1px;\n\tborder: 0;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token {\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-length {\n\tfont-weight: normal;\n\tfont-size: 60%;\n\tfloat: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\n\twidth: 100%;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\n\tfont-family: var(--monaco-monospace-font);\n\ttext-align: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-type {\n\tfont-family: var(--monaco-monospace-font);\n}\n",""]);const a=r},50500:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tfont-size: 13px;\n}\n\n.quick-input-widget .monaco-highlighted-label .highlight,\n.quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0066BF;\n}\n\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight {\n\tcolor: #9DDDFF;\n}\n\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0097fb;\n}\n\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #F38518;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(221, 221, 221, 0.4);\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\n\tcolor: #555;\n}\n\n.hc-black .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: transparent;\n\tborder: solid 1px rgb(111, 195, 223);\n\tbox-shadow: none;\n\tcolor: #fff;\n}\n\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(128, 128, 128, 0.17);\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\n\tcolor: #ccc;\n}\n",""]);const a=r},49644:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n/* Default standalone editor fonts */\n.monaco-editor {\n\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-hover p {\n\tmargin: 0;\n}\n\n/* See https://github.com/microsoft/monaco-editor/issues/2168#issuecomment-780078600 */\n.monaco-aria-container {\n\tposition: absolute !important;\n\ttop: 0; /* avoid being placed underneath a sibling element */\n\theight: 1px;\n\twidth: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n}\n\n/* The hc-black theme is already high contrast optimized */\n.monaco-editor.hc-black {\n\t-ms-high-contrast-adjust: none;\n}\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\n@media screen and (-ms-high-contrast:active) {\n\n\t/* current line highlight */\n\t.monaco-editor.vs .view-overlays .current-line,\n\t.monaco-editor.vs-dark .view-overlays .current-line {\n\t\tborder-color: windowtext !important;\n\t\tborder-left: 0;\n\t\tborder-right: 0;\n\t}\n\n\t/* view cursors */\n\t.monaco-editor.vs .cursor,\n\t.monaco-editor.vs-dark .cursor {\n\t\tbackground-color: windowtext !important;\n\t}\n\t/* dnd target */\n\t.monaco-editor.vs .dnd-target,\n\t.monaco-editor.vs-dark .dnd-target {\n\t\tborder-color: windowtext !important;\n\t}\n\n\t/* selected text background */\n\t.monaco-editor.vs .selected-text,\n\t.monaco-editor.vs-dark .selected-text {\n\t\tbackground-color: highlight !important;\n\t}\n\n\t/* allow the text to have a transparent background. */\n\t.monaco-editor.vs .view-line,\n\t.monaco-editor.vs-dark .view-line {\n\t\t-ms-high-contrast-adjust: none;\n\t}\n\n\t/* text color */\n\t.monaco-editor.vs .view-line span,\n\t.monaco-editor.vs-dark .view-line span {\n\t\tcolor: windowtext !important;\n\t}\n\t/* selected text color */\n\t.monaco-editor.vs .view-line span.inline-selected-text,\n\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\n\t\tcolor: highlighttext !important;\n\t}\n\n\t/* allow decorations */\n\t.monaco-editor.vs .view-overlays,\n\t.monaco-editor.vs-dark .view-overlays {\n\t\t-ms-high-contrast-adjust: none;\n\t}\n\n\t/* various decorations */\n\t.monaco-editor.vs .selectionHighlight,\n\t.monaco-editor.vs-dark .selectionHighlight,\n\t.monaco-editor.vs .wordHighlight,\n\t.monaco-editor.vs-dark .wordHighlight,\n\t.monaco-editor.vs .wordHighlightStrong,\n\t.monaco-editor.vs-dark .wordHighlightStrong,\n\t.monaco-editor.vs .reference-decoration,\n\t.monaco-editor.vs-dark .reference-decoration {\n\t\tborder: 2px dotted highlight !important;\n\t\tbackground: transparent !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .rangeHighlight,\n\t.monaco-editor.vs-dark .rangeHighlight {\n\t\tbackground: transparent !important;\n\t\tborder: 1px dotted activeborder !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .bracket-match,\n\t.monaco-editor.vs-dark .bracket-match {\n\t\tborder-color: windowtext !important;\n\t\tbackground: transparent !important;\n\t}\n\n\t/* find widget */\n\t.monaco-editor.vs .findMatch,\n\t.monaco-editor.vs-dark .findMatch,\n\t.monaco-editor.vs .currentFindMatch,\n\t.monaco-editor.vs-dark .currentFindMatch {\n\t\tborder: 2px dotted activeborder !important;\n\t\tbackground: transparent !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .find-widget,\n\t.monaco-editor.vs-dark .find-widget {\n\t\tborder: 1px solid windowtext;\n\t}\n\n\t/* list - used by suggest widget */\n\t.monaco-editor.vs .monaco-list .monaco-list-row,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* scrollbars */\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: background !important;\n\t\tborder: 1px solid windowtext;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\n\t\tbackground: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\tbackground: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\n\t\tbackground: highlight !important;\n\t}\n\n\t/* overview ruler */\n\t.monaco-editor.vs .decorationsOverviewRuler,\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\n\t\topacity: 0;\n\t}\n\n\t/* minimap */\n\t.monaco-editor.vs .minimap,\n\t.monaco-editor.vs-dark .minimap {\n\t\tdisplay: none;\n\t}\n\n\t/* squiggles */\n\t.monaco-editor.vs .squiggly-d-error,\n\t.monaco-editor.vs-dark .squiggly-d-error {\n\t\tbackground: transparent !important;\n\t\tborder-bottom: 4px double #E47777;\n\t}\n\t.monaco-editor.vs .squiggly-c-warning,\n\t.monaco-editor.vs-dark .squiggly-c-warning {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-b-info,\n\t.monaco-editor.vs-dark .squiggly-b-info {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-a-hint,\n\t.monaco-editor.vs-dark .squiggly-a-hint {\n\t\tborder-bottom: 4px double #6c6c6c;\n\t}\n\n\t/* contextmenu */\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* diff editor */\n\t.monaco-diff-editor.vs .diffOverviewRuler,\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\n\t\tdisplay: none;\n\t}\n\t.monaco-editor.vs .line-insert,\n\t.monaco-editor.vs-dark .line-insert,\n\t.monaco-editor.vs .line-delete,\n\t.monaco-editor.vs-dark .line-delete {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .char-insert,\n\t.monaco-editor.vs-dark .char-insert,\n\t.monaco-editor.vs .char-delete,\n\t.monaco-editor.vs-dark .char-delete {\n\t\tbackground: transparent !important;\n\t}\n}\n\n/*.monaco-editor.vs [tabindex="0"]:focus {\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}\n\n.monaco-editor.vs-dark [tabindex="0"]:focus {\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}*/\n',""]);const a=r},18681:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar .action-item.menu-entry .action-label.icon {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50%;\n\tbackground-size: 16px;\n}\n\n.monaco-action-bar .action-item.menu-entry .action-label {\n\tbackground-image: var(--menu-entry-icon-light);\n}\n\n.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,\n.hc-black .monaco-action-bar .action-item.menu-entry .action-label {\n\tbackground-image: var(--menu-entry-icon-dark);\n}\n\n\n.monaco-dropdown-with-default {\n\tdisplay: flex !important;\n\tflex-direction: row;\n\tborder-radius: 5px;\n}\n\n.monaco-dropdown-with-default > .action-container > .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-dropdown-with-default > .action-container.menu-entry > .action-label.icon {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50%;\n\tbackground-size: 16px;\n}\n\n.monaco-dropdown-with-default > .action-container.menu-entry > .action-label {\n\tbackground-image: var(--menu-entry-icon-light);\n}\n\n.vs-dark .monaco-dropdown-with-default > .action-container.menu-entry > .action-label,\n.hc-black .monaco-dropdown-with-default > .action-container.menu-entry > .action-label {\n\tbackground-image: var(--menu-entry-icon-dark);\n}\n\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\n\tfont-size: 12px;\n\tpadding-left: 0px;\n\tpadding-right: 0px;\n\tline-height: 16px;\n\tmargin-left: -3px;\n}\n\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\n\tdisplay: block;\n\tbackground-size: 16px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n",""]);const a=r},26016:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view .monaco-menu {\n\tmin-width: 130px;\n}\n\n",""]);const a=r},32757:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar {\n\twhite-space: nowrap;\n\theight: 100%;\n}\n\n.monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\theight: 100%;\n\twidth: 100%;\n\talign-items: center;\n}\n\n.monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-action-bar .action-item {\n\tdisplay: block;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-action-bar .action-item .icon,\n.monaco-action-bar .action-item .codicon {\n\tdisplay: block;\n}\n\n.monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 16px;\n\theight: 16px;\n}\n\n.monaco-action-bar .action-label {\n\tdisplay: flex;\n\tfont-size: 11px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n}\n\n.monaco-action-bar .action-item.disabled .action-label,\n.monaco-action-bar .action-item.disabled .action-label::before,\n.monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.6;\n}\n\n/* Vertical actions */\n\n.monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-action-bar .action-item .action-label.separator {\n\twidth: 1px;\n\theight: 16px;\n\tmargin: 5px 4px !important;\n\tcursor: default;\n\tmin-width: 1px;\n\tpadding: 0;\n\tbackground-color: #bbb;\n}\n\n.secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item {\n\tdisplay: flex;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item > .action-dropdown-item-separator {\n\tdisplay: flex;\n\talign-items: center;\n\tcursor: default;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item > .action-dropdown-item-separator > div {\n\twidth: 1px;\n}\n",""]);const a=r},93:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-aria-container {\n\tposition: absolute; /* try to hide from window but not from screen readers */\n\tleft:-999em;\n}",""]);const a=r},72013:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-text-button {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\twidth: 100%;\n\tpadding: 4px;\n\tborder-radius: 2px;\n\ttext-align: center;\n\tcursor: pointer;\n\tjustify-content: center;\n\talign-items: center;\n\tborder: 1px solid var(--vscode-button-border, transparent);\n\tline-height: 18px;\n}\n\n.monaco-text-button:focus {\n\toutline-offset: 2px !important;\n}\n\n.monaco-text-button:hover {\n\ttext-decoration: none !important;\n}\n\n.monaco-button.disabled:focus,\n.monaco-button.disabled {\n\topacity: 0.4 !important;\n\tcursor: default;\n}\n\n.monaco-text-button .codicon {\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label {\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tpadding: 0 4px;\n\toverflow: hidden;\n\theight: 28px;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label {\n\tflex-basis: 100%;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label-short {\n\tflex-grow: 1;\n\twidth: 0;\n\toverflow: hidden;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label,\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label-short {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tfont-weight: normal;\n\tfont-style: inherit;\n\tpadding: 4px 0;\n}\n\n.monaco-button-dropdown {\n\tdisplay: flex;\n\tcursor: pointer;\n}\n\n.monaco-button-dropdown.disabled {\n\tcursor: default;\n}\n\n.monaco-button-dropdown > .monaco-button:focus {\n\toutline-offset: -1px !important;\n}\n\n.monaco-button-dropdown.disabled > .monaco-button.disabled,\n.monaco-button-dropdown.disabled > .monaco-button.disabled:focus,\n.monaco-button-dropdown.disabled > .monaco-button-dropdown-separator {\n\topacity: 0.4 !important;\n}\n\n.monaco-button-dropdown > .monaco-button.monaco-text-button {\n\tborder-right-width: 0 !important;\n}\n\n.monaco-button-dropdown .monaco-button-dropdown-separator {\n\tpadding: 4px 0;\n\tcursor: default;\n}\n\n.monaco-button-dropdown .monaco-button-dropdown-separator > div {\n\theight: 100%;\n\twidth: 1px;\n}\n\n.monaco-button-dropdown > .monaco-button.monaco-dropdown-button {\n\tborder: 1px solid var(--vscode-button-border, transparent);\n\tborder-left-width: 0 !important;\n\tborder-radius: 0 2px 2px 0;\n}\n\n.monaco-button-dropdown > .monaco-button.monaco-text-button {\n\tborder-radius: 2px 0 0 2px;\n}\n\n.monaco-description-button {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tmargin: 4px 5px; /* allows button focus outline to be visible */\n}\n\n.monaco-description-button .monaco-button-description {\n\tfont-style: italic;\n\tfont-size: 11px;\n\tpadding: 4px 20px;\n}\n\n.monaco-description-button .monaco-button-label,\n.monaco-description-button .monaco-button-description {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n.monaco-description-button .monaco-button-label > .codicon,\n.monaco-description-button .monaco-button-description > .codicon {\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n\n/* default color styles - based on CSS variables */\n\n.monaco-button.default-colors,\n.monaco-button-dropdown.default-colors > .monaco-button{\n\tcolor: var(--vscode-button-foreground);\n\tbackground-color: var(--vscode-button-background);\n}\n\n.monaco-button.default-colors:hover,\n.monaco-button-dropdown.default-colors > .monaco-button:hover {\n\tbackground-color: var(--vscode-button-hoverBackground);\n}\n\n.monaco-button.default-colors.secondary,\n.monaco-button-dropdown.default-colors > .monaco-button.secondary {\n\tcolor: var(--vscode-button-secondaryForeground);\n\tbackground-color: var(--vscode-button-secondaryBackground);\n}\n\n.monaco-button.default-colors.secondary:hover,\n.monaco-button-dropdown.default-colors > .monaco-button.secondary:hover {\n\tbackground-color: var(--vscode-button-secondaryHoverBackground);\n}\n\n.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator {\n\tbackground-color: var(--vscode-button-background);\n\tborder-top: 1px solid var(--vscode-button-border);\n\tborder-bottom: 1px solid var(--vscode-button-border);\n}\n\n.monaco-button-dropdown.default-colors .monaco-button.secondary + .monaco-button-dropdown-separator {\n\tbackground-color: var(--vscode-button-secondaryBackground);\n}\n\n.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator > div {\n\tbackground-color: var(--vscode-button-separator);\n}\n",""]);const a=r},24081:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.codicon-wrench-subaction {\n\topacity: 0.5;\n}\n\n@keyframes codicon-spin {\n\t100% {\n\t\ttransform:rotate(360deg);\n\t}\n}\n\n.codicon-sync.codicon-modifier-spin,\n.codicon-loading.codicon-modifier-spin,\n.codicon-gear.codicon-modifier-spin,\n.codicon-notebook-state-executing.codicon-modifier-spin {\n\t/* Use steps to throttle FPS to reduce CPU usage */\n\tanimation: codicon-spin 1.5s steps(30) infinite;\n}\n\n.codicon-modifier-disabled {\n\topacity: 0.4;\n}\n\n/* custom speed & easing for loading icon */\n.codicon-loading,\n.codicon-tree-item-loading::before {\n\tanimation-duration: 1s !important;\n\tanimation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important;\n}\n",""]);const a=r},50058:(e,t,i)=>{i.d(t,{Z:()=>u});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s),a=i(61667),l=i.n(a),d=new URL(i(67485),i.b),h=r()(o()),c=l()(d);h.push([e.id,`/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n@font-face {\n\tfont-family: "codicon";\n\tfont-display: block;\n\tsrc: url(${c}) format("truetype");\n}\n\n.codicon[class*='codicon-'] {\n\tfont: normal normal normal 16px/1 codicon;\n\tdisplay: inline-block;\n\ttext-decoration: none;\n\ttext-rendering: auto;\n\ttext-align: center;\n\ttext-transform: none;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n/* icon rules are dynamically created by the platform theme service (see iconsStyleSheet.ts) */\n`,""]);const u=h},16328:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view {\n\tposition: absolute;\n}\n\n.context-view.fixed {\n\tall: initial;\n\tfont-family: inherit;\n\tfont-size: 13px;\n\tposition: fixed;\n\tcolor: inherit;\n}\n",""]);const a=r},90477:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-count-badge {\n\tpadding: 3px 6px;\n\tborder-radius: 11px;\n\tfont-size: 11px;\n\tmin-width: 18px;\n\tmin-height: 18px;\n\tline-height: 11px;\n\tfont-weight: normal;\n\ttext-align: center;\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n}\n\n.monaco-count-badge.long {\n\tpadding: 2px 3px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n",""]);const a=r},25035:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-dropdown {\n\theight: 100%;\n\tpadding: 0;\n}\n\n.monaco-dropdown > .dropdown-label {\n\tcursor: pointer;\n\theight: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.monaco-dropdown > .dropdown-label > .action-label.disabled {\n\tcursor: default;\n}\n\n.monaco-dropdown-with-primary {\n\tdisplay: flex !important;\n\tflex-direction: row;\n\tborder-radius: 5px;\n}\n\n.monaco-dropdown-with-primary > .action-container > .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\n\tfont-size: 12px;\n\tpadding-left: 0px;\n\tpadding-right: 0px;\n\tline-height: 16px;\n\tmargin-left: -3px;\n}\n\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\n\tdisplay: block;\n\tbackground-size: 16px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n",""]);const a=r},96266:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- Find input ---------- */\n\n.monaco-findInput {\n\tposition: relative;\n}\n\n.monaco-findInput .monaco-inputbox {\n\tfont-size: 13px;\n\twidth: 100%;\n}\n\n.monaco-findInput > .controls {\n\tposition: absolute;\n\ttop: 3px;\n\tright: 2px;\n}\n\n.vs .monaco-findInput.disabled {\n\tbackground-color: #E1E1E1;\n}\n\n/* Theming */\n.vs-dark .monaco-findInput.disabled {\n\tbackground-color: #333;\n}\n\n/* Highlighting */\n.monaco-findInput.highlight-0 .controls,\n.hc-light .monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\n}\n\n.monaco-findInput.highlight-1 .controls,\n.hc-light .monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\n}\n\n.hc-black .monaco-findInput.highlight-0 .controls,\n.vs-dark .monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\n}\n\n.hc-black .monaco-findInput.highlight-1 .controls,\n.vs-dark .monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\n}\n\n@keyframes monaco-findInput-highlight-0 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-1 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}\n\n@keyframes monaco-findInput-highlight-dark-0 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-dark-1 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}\n",""]);const a=r},93039:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-hover {\n\tcursor: default;\n\tposition: absolute;\n\toverflow: hidden;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\tbox-sizing: border-box;\n\tanimation: fadein 100ms linear;\n\tline-height: 1.5em;\n\twhite-space: var(--vscode-hover-whiteSpace, normal);\n}\n\n.monaco-hover.hidden {\n\tdisplay: none;\n}\n\n.monaco-hover a:hover:not(.disabled) {\n\tcursor: pointer;\n}\n\n.monaco-hover .hover-contents:not(.html-hover-contents) {\n\tpadding: 4px 8px;\n}\n\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\n\tmax-width: var(--vscode-hover-maxWidth, 500px);\n\tword-wrap: break-word;\n}\n\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\n\tmin-width: 100%;\n}\n\n.monaco-hover p,\n.monaco-hover .code,\n.monaco-hover ul,\n.monaco-hover h1,\n.monaco-hover h2,\n.monaco-hover h3,\n.monaco-hover h4,\n.monaco-hover h5,\n.monaco-hover h6 {\n\tmargin: 8px 0;\n}\n\n.monaco-hover h1,\n.monaco-hover h2,\n.monaco-hover h3,\n.monaco-hover h4,\n.monaco-hover h5,\n.monaco-hover h6 {\n\tline-height: 1.1;\n}\n\n.monaco-hover code {\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-hover hr {\n\tbox-sizing: border-box;\n\tborder-left: 0px;\n\tborder-right: 0px;\n\tmargin-top: 4px;\n\tmargin-bottom: -4px;\n\tmargin-left: -8px;\n\tmargin-right: -8px;\n\theight: 1px;\n}\n\n.monaco-hover p:first-child,\n.monaco-hover .code:first-child,\n.monaco-hover ul:first-child {\n\tmargin-top: 0;\n}\n\n.monaco-hover p:last-child,\n.monaco-hover .code:last-child,\n.monaco-hover ul:last-child {\n\tmargin-bottom: 0;\n}\n\n/* MarkupContent Layout */\n.monaco-hover ul {\n\tpadding-left: 20px;\n}\n.monaco-hover ol {\n\tpadding-left: 20px;\n}\n\n.monaco-hover li > p {\n\tmargin-bottom: 0;\n}\n\n.monaco-hover li > ul {\n\tmargin-top: 0;\n}\n\n.monaco-hover code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-hover .monaco-tokenized-source {\n\twhite-space: var(--vscode-hover-sourceWhiteSpace, pre-wrap);\n}\n\n.monaco-hover .hover-row.status-bar {\n\tfont-size: 12px;\n\tline-height: 22px;\n}\n\n.monaco-hover .hover-row.status-bar .info {\n\tfont-style: italic;\n\tpadding: 0px 8px;\n}\n\n.monaco-hover .hover-row.status-bar .actions {\n\tdisplay: flex;\n\tpadding: 0px 8px;\n}\n\n.monaco-hover .hover-row.status-bar .actions .action-container {\n\tmargin-right: 16px;\n\tcursor: pointer;\n}\n\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\n\tpadding-right: 4px;\n}\n\n.monaco-hover .markdown-hover .hover-contents .codicon {\n\tcolor: inherit;\n\tfont-size: inherit;\n\tvertical-align: middle;\n}\n\n.monaco-hover .hover-contents a.code-link:hover,\n.monaco-hover .hover-contents a.code-link {\n\tcolor: inherit;\n}\n\n.monaco-hover .hover-contents a.code-link:before {\n\tcontent: '(';\n}\n\n.monaco-hover .hover-contents a.code-link:after {\n\tcontent: ')';\n}\n\n.monaco-hover .hover-contents a.code-link > span {\n\ttext-decoration: underline;\n\t/** Hack to force underline to show **/\n\tborder-bottom: 1px solid transparent;\n\ttext-underline-position: under;\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-hover .hover-contents a.code-link > span:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/\n.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span {\n\tmargin-bottom: 4px;\n\tdisplay: inline-block;\n}\n\n.monaco-hover-content .action-container a {\n\t-webkit-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-hover-content .action-container.disabled {\n\tpointer-events: none;\n\topacity: 0.4;\n\tcursor: default;\n}\n",""]);const a=r},94269:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* ---------- Icon label ---------- */\n\n.monaco-icon-label {\n\tdisplay: flex; /* required for icons support :before rule */\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-icon-label::before {\n\n\t/* svg icons rendered as background image */\n\tbackground-size: 16px;\n\tbackground-position: left center;\n\tbackground-repeat: no-repeat;\n\tpadding-right: 6px;\n\twidth: 16px;\n\theight: 22px;\n\tline-height: inherit !important;\n\tdisplay: inline-block;\n\n\t/* fonts icons */\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tvertical-align: top;\n\n\tflex-shrink: 0; /* fix for https://github.com/microsoft/vscode/issues/13787 */\n}\n\n.monaco-icon-label-container.disabled {\n\tcolor: var(--vscode-disabledForeground);\n}\n.monaco-icon-label > .monaco-icon-label-container {\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tflex: 1;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\n\tcolor: inherit;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\n\tmargin: 0 2px;\n\topacity: 0.5;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .7;\n\tmargin-left: 0.5em;\n\tfont-size: 0.9em;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label.nowrap > .monaco-icon-label-container > .monaco-icon-description-container > .label-description{\n\twhite-space: nowrap\n}\n\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .95;\n}\n\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.deprecated {\n\ttext-decoration: line-through;\n\topacity: 0.66;\n}\n\n/* make sure apply italic font style to decorations as well */\n.monaco-icon-label.italic::after {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\ttext-decoration: line-through;\n}\n\n.monaco-icon-label::after {\n\topacity: 0.75;\n\tfont-size: 90%;\n\tfont-weight: 600;\n\tmargin: auto 16px 0 5px; /* https://github.com/microsoft/vscode/issues/113223 */\n\ttext-align: center;\n}\n\n/* make sure selection color wins when a label is being selected */\n.monaco-list:focus .selected .monaco-icon-label, /* list */\n.monaco-list:focus .selected .monaco-icon-label::after\n{\n\tcolor: inherit !important;\n}\n\n.monaco-list-row.focused.selected .label-description,\n.monaco-list-row.selected .label-description {\n\topacity: .8;\n}\n",""]);const a=r},41188:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-inputbox {\n\tposition: relative;\n\tdisplay: block;\n\tpadding: 0;\n\tbox-sizing:\tborder-box;\n\tborder-radius: 2px;\n\n\t/* Customizable */\n\tfont-size: inherit;\n}\n\n.monaco-inputbox > .ibwrapper > .input,\n.monaco-inputbox > .ibwrapper > .mirror {\n\n\t/* Customizable */\n\tpadding: 4px 6px;\n}\n\n.monaco-inputbox > .ibwrapper {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-inputbox > .ibwrapper > .input {\n\tdisplay: inline-block;\n\tbox-sizing:\tborder-box;\n\twidth: 100%;\n\theight: 100%;\n\tline-height: inherit;\n\tborder: none;\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tresize: none;\n\tcolor: inherit;\n}\n\n.monaco-inputbox > .ibwrapper > input {\n\ttext-overflow: ellipsis;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input {\n\tdisplay: block;\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\n\toutline: none;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input::-webkit-scrollbar {\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input.empty {\n\twhite-space: nowrap;\n}\n\n.monaco-inputbox > .ibwrapper > .mirror {\n\tposition: absolute;\n\tdisplay: inline-block;\n\twidth: 100%;\n\ttop: 0;\n\tleft: 0;\n\tbox-sizing: border-box;\n\twhite-space: pre-wrap;\n\tvisibility: hidden;\n\tword-wrap: break-word;\n}\n\n/* Context view */\n\n.monaco-inputbox-container {\n\ttext-align: right;\n}\n\n.monaco-inputbox-container .monaco-inputbox-message {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\ttext-align: left;\n\twidth: 100%;\n\tbox-sizing:\tborder-box;\n\tpadding: 0.4em;\n\tfont-size: 12px;\n\tline-height: 17px;\n\tmargin-top: -1px;\n\tword-wrap: break-word;\n}\n\n/* Action bar support */\n.monaco-inputbox .monaco-action-bar {\n\tposition: absolute;\n\tright: 2px;\n\ttop: 4px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item {\n\tmargin-left: 2px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\n\tbackground-repeat: no-repeat;\n\twidth: 16px;\n\theight: 16px;\n}\n",""]);const a=r},72298:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-keybinding {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 10px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tdisplay: inline-block;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-radius: 3px;\n\tvertical-align: middle;\n\tfont-size: 11px;\n\tpadding: 3px 5px;\n\tmargin: 0 2px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:first-child {\n\tmargin-left: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:last-child {\n\tmargin-right: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-separator {\n\tdisplay: inline-block;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\n\twidth: 6px;\n}\n",""]);const a=r},27703:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-list {\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n}\n\n.monaco-list.mouse-support {\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.monaco-list > .monaco-scrollable-element {\n\theight: 100%;\n}\n\n.monaco-list-rows {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-list.horizontal-scrolling .monaco-list-rows {\n\twidth: auto;\n\tmin-width: 100%;\n}\n\n.monaco-list-row {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\twidth: 100%;\n}\n\n.monaco-list.mouse-support .monaco-list-row {\n\tcursor: pointer;\n\ttouch-action: none;\n}\n\n/* for OS X ballistic scrolling */\n.monaco-list-row.scrolling {\n\tdisplay: none !important;\n}\n\n/* Focus */\n.monaco-list.element-focused,\n.monaco-list.selection-single,\n.monaco-list.selection-multiple {\n\toutline: 0 !important;\n}\n\n/* Dnd */\n.monaco-drag-image {\n\tdisplay: inline-block;\n\tpadding: 1px 7px;\n\tborder-radius: 10px;\n\tfont-size: 12px;\n\tposition: absolute;\n\tz-index: 1000;\n}\n\n/* Filter */\n\n.monaco-list-type-filter-message {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\theight: 100%;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 40px 1em 1em 1em;\n\ttext-align: center;\n\twhite-space: normal;\n\topacity: 0.7;\n\tpointer-events: none;\n}\n\n.monaco-list-type-filter-message:empty {\n\tdisplay: none;\n}\n",""]);const a=r},67548:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-mouse-cursor-text {\n\tcursor: text;\n}\n",""]);const a=r},64185:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-progress-container {\n\twidth: 100%;\n\theight: 5px;\n\toverflow: hidden; /* keep progress bit in bounds */\n}\n\n.monaco-progress-container .progress-bit {\n\twidth: 2%;\n\theight: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tdisplay: none;\n}\n\n.monaco-progress-container.active .progress-bit {\n\tdisplay: inherit;\n}\n\n.monaco-progress-container.discrete .progress-bit {\n\tleft: 0;\n\ttransition: width 100ms linear;\n}\n\n.monaco-progress-container.discrete.done .progress-bit {\n\twidth: 100%;\n}\n\n.monaco-progress-container.infinite .progress-bit {\n\tanimation-name: progress;\n\tanimation-duration: 4s;\n\tanimation-iteration-count: infinite;\n\ttransform: translate3d(0px, 0px, 0px);\n\tanimation-timing-function: linear;\n}\n\n.monaco-progress-container.infinite.infinite-long-running .progress-bit {\n\t/*\n\t\tThe more smooth `linear` timing function can cause\n\t\thigher GPU consumption as indicated in\n\t\thttps://github.com/microsoft/vscode/issues/97900 &\n\t\thttps://github.com/microsoft/vscode/issues/138396\n\t*/\n\tanimation-timing-function: steps(100);\n}\n\n/**\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\n * its relative size to the parent container:\n * parent width: 5000%\n * bit width: 100%\n * translateX should be as follow:\n * 50%: 5000% * 50% - 50% (set to center) = 2450%\n * 100%: 5000% * 100% - 100% (do not overflow) = 4900%\n */\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }\n",""]);const a=r},91629:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n:root {\n\t--vscode-sash-size: 4px;\n}\n\n.monaco-sash {\n\tposition: absolute;\n\tz-index: 35;\n\ttouch-action: none;\n}\n\n.monaco-sash.disabled {\n\tpointer-events: none;\n}\n\n.monaco-sash.mac.vertical {\n\tcursor: col-resize;\n}\n\n.monaco-sash.vertical.minimum {\n\tcursor: e-resize;\n}\n\n.monaco-sash.vertical.maximum {\n\tcursor: w-resize;\n}\n\n.monaco-sash.mac.horizontal {\n\tcursor: row-resize;\n}\n\n.monaco-sash.horizontal.minimum {\n\tcursor: s-resize;\n}\n\n.monaco-sash.horizontal.maximum {\n\tcursor: n-resize;\n}\n\n.monaco-sash.disabled {\n\tcursor: default !important;\n\tpointer-events: none !important;\n}\n\n.monaco-sash.vertical {\n\tcursor: ew-resize;\n\ttop: 0;\n\twidth: var(--vscode-sash-size);\n\theight: 100%;\n}\n\n.monaco-sash.horizontal {\n\tcursor: ns-resize;\n\tleft: 0;\n\twidth: 100%;\n\theight: var(--vscode-sash-size);\n}\n\n.monaco-sash:not(.disabled) > .orthogonal-drag-handle {\n\tcontent: \" \";\n\theight: calc(var(--vscode-sash-size) * 2);\n\twidth: calc(var(--vscode-sash-size) * 2);\n\tz-index: 100;\n\tdisplay: block;\n\tcursor: all-scroll;\n\tposition: absolute;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.start,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.end {\n\tcursor: nwse-resize;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.end,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.start {\n\tcursor: nesw-resize;\n}\n\n.monaco-sash.vertical > .orthogonal-drag-handle.start {\n\tleft: calc(var(--vscode-sash-size) * -0.5);\n\ttop: calc(var(--vscode-sash-size) * -1);\n}\n.monaco-sash.vertical > .orthogonal-drag-handle.end {\n\tleft: calc(var(--vscode-sash-size) * -0.5);\n\tbottom: calc(var(--vscode-sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.start {\n\ttop: calc(var(--vscode-sash-size) * -0.5);\n\tleft: calc(var(--vscode-sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.end {\n\ttop: calc(var(--vscode-sash-size) * -0.5);\n\tright: calc(var(--vscode-sash-size) * -1);\n}\n\n.monaco-sash:before {\n\tcontent: '';\n\tpointer-events: none;\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tbackground: transparent;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-sash:before {\n\ttransition: background-color 0.1s ease-out;\n}\n\n.monaco-sash.hover:before,\n.monaco-sash.active:before {\n\tbackground: var(--vscode-sash-hoverBorder);\n}\n\n.monaco-sash.vertical:before {\n\twidth: var(--vscode-sash-hover-size);\n\tleft: calc(50% - (var(--vscode-sash-hover-size) / 2));\n}\n\n.monaco-sash.horizontal:before {\n\theight: var(--vscode-sash-hover-size);\n\ttop: calc(50% - (var(--vscode-sash-hover-size) / 2));\n}\n\n.pointer-events-disabled {\n\tpointer-events: none !important;\n}\n\n/** Debug **/\n\n.monaco-sash.debug {\n\tbackground: cyan;\n}\n\n.monaco-sash.debug.disabled {\n\tbackground: rgba(0, 255, 255, 0.2);\n}\n\n.monaco-sash.debug:not(.disabled) > .orthogonal-drag-handle {\n\tbackground: red;\n}\n",""]);const a=r},7198:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n\t/* In front of peek view */\n\tz-index: 11;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset;\n}\n\n.monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: var(--vscode-scrollbarSlider-background);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: var(--vscode-scrollbarSlider-hoverBackground);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: var(--vscode-scrollbarSlider-activeBackground);\n}\n",""]);const a=r},46512:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-select-box {\n\twidth: 100%;\n\tcursor: pointer;\n\tborder-radius: 2px;\n}\n\n.monaco-select-box-dropdown-container {\n\tfont-size: 13px;\n\tfont-weight: normal;\n\ttext-transform: none;\n}\n\n/** Actions */\n\n.monaco-action-bar .action-item.select-container {\n\tcursor: default;\n}\n\n.monaco-action-bar .action-item .monaco-select-box {\n\tcursor: pointer;\n\tmin-width: 100px;\n\tmin-height: 18px;\n\tpadding: 2px 23px 2px 8px;\n}\n\n.mac .monaco-action-bar .action-item .monaco-select-box {\n\tfont-size: 11px;\n\tborder-radius: 5px;\n}\n",""]);const a=r},62591:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Use custom CSS vars to expose padding into parent select for padding calculation */\n.monaco-select-box-dropdown-padding {\n\t--dropdown-padding-top: 1px;\n\t--dropdown-padding-bottom: 1px;\n}\n\n.hc-black .monaco-select-box-dropdown-padding,\n.hc-light .monaco-select-box-dropdown-padding {\n\t--dropdown-padding-top: 3px;\n\t--dropdown-padding-bottom: 4px;\n}\n\n.monaco-select-box-dropdown-container {\n\tdisplay: none;\n\tbox-sizing:\tborder-box;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown * {\n\tmargin: 0;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a:focus {\n\toutline: 1px solid -webkit-focus-ring-color;\n\toutline-offset: -1px;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown code {\n\tline-height: 15px; /** For some reason, this is needed, otherwise <code> will take up 20px height */\n\tfont-family: var(--monaco-monospace-font);\n}\n\n\n.monaco-select-box-dropdown-container.visible {\n\tdisplay: flex;\n\tflex-direction: column;\n\ttext-align: left;\n\twidth: 1px;\n\toverflow: hidden;\n\tborder-bottom-left-radius: 3px;\n\tborder-bottom-right-radius: 3px;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container {\n\tflex: 0 0 auto;\n\talign-self: flex-start;\n\tpadding-top: var(--dropdown-padding-top);\n\tpadding-bottom: var(--dropdown-padding-bottom);\n\tpadding-left: 1px;\n\tpadding-right: 1px;\n\twidth: 100%;\n\toverflow: hidden;\n\tbox-sizing:\tborder-box;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane {\n\tpadding: 5px;\n}\n\n.hc-black .monaco-select-box-dropdown-container > .select-box-dropdown-list-container {\n\tpadding-top: var(--dropdown-padding-top);\n\tpadding-bottom: var(--dropdown-padding-bottom);\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row {\n\tcursor: pointer;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-text {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tpadding-left: 3.5px;\n\twhite-space: nowrap;\n\tfloat: left;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-detail {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tpadding-left: 3.5px;\n\twhite-space: nowrap;\n\tfloat: left;\n\topacity: 0.7;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-decorator-right {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tpadding-right: 10px;\n\twhite-space: nowrap;\n\tfloat: right;\n}\n\n\n/* Accepted CSS hiding technique for accessibility reader text */\n/* https://webaim.org/techniques/css/invisiblecontent/ */\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .visually-hidden {\n\t\tposition: absolute;\n\t\tleft: -10000px;\n\t\ttop: auto;\n\t\twidth: 1px;\n\t\theight: 1px;\n\t\toverflow: hidden;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control {\n\tflex: 1 1 auto;\n\talign-self: flex-start;\n\topacity: 0;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div {\n\toverflow: hidden;\n\tmax-height: 0px;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div > .option-text-width-control {\n\tpadding-left: 4px;\n\tpadding-right: 8px;\n\twhite-space: nowrap;\n}\n",""]);const a=r},82470:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-split-view2 {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .sash-container {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tpointer-events: none;\n}\n\n.monaco-split-view2 > .sash-container > .monaco-sash {\n\tpointer-events: initial;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element {\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container {\n\twidth: 100%;\n\theight: 100%;\n\twhite-space: nowrap;\n\tposition: relative;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twhite-space: initial;\n\tposition: absolute;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view:not(.visible) {\n\tdisplay: none;\n}\n\n.monaco-split-view2.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twidth: 100%;\n}\n\n.monaco-split-view2.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\theight: 100%;\n}\n\n.monaco-split-view2.separator-border > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\tcontent: ' ';\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tz-index: 5;\n\tpointer-events: none;\n\tbackground-color: var(--separator-border);\n}\n\n.monaco-split-view2.separator-border.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 100%;\n\twidth: 1px;\n}\n\n.monaco-split-view2.separator-border.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 1px;\n\twidth: 100%;\n}\n",""]);const a=r},1728:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-table {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n.monaco-table > .monaco-split-view2 {\n\tborder-bottom: 1px solid transparent;\n}\n\n.monaco-table > .monaco-list {\n\tflex: 1;\n}\n\n.monaco-table-tr {\n\tdisplay: flex;\n\theight: 100%;\n}\n\n.monaco-table-th {\n\twidth: 100%;\n\theight: 100%;\n\tfont-weight: bold;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table-th,\n.monaco-table-td {\n\tbox-sizing: border-box;\n\tflex-shrink: 0;\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\tcontent: "";\n\tposition: absolute;\n\tleft: calc(var(--vscode-sash-size) / 2);\n\twidth: 0;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\ttransition: border-color 0.2s ease-out;\n}\n',""]);const a=r},16310:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-custom-toggle {\n\tmargin-left: 2px;\n\tfloat: left;\n\tcursor: pointer;\n\toverflow: hidden;\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 3px;\n\tborder: 1px solid transparent;\n\tpadding: 1px;\n\tbox-sizing:\tborder-box;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.monaco-custom-toggle:hover {\n\tbackground-color: var(--vscode-inputOption-hoverBackground);\n}\n\n.hc-black .monaco-custom-toggle:hover,\n.hc-light .monaco-custom-toggle:hover {\n\tborder: 1px dashed var(--vscode-focusBorder);\n}\n\n.hc-black .monaco-custom-toggle,\n.hc-light .monaco-custom-toggle {\n\tbackground: none;\n}\n\n.hc-black .monaco-custom-toggle:hover,\n.hc-light .monaco-custom-toggle:hover {\n\tbackground: none;\n}\n\n.monaco-custom-toggle.monaco-checkbox {\n\theight: 18px;\n\twidth: 18px;\n\tborder: 1px solid transparent;\n\tborder-radius: 3px;\n\tmargin-right: 9px;\n\tmargin-left: 0px;\n\tpadding: 0px;\n\topacity: 1;\n\tbackground-size: 16px !important;\n}\n\n/* hide check when unchecked */\n.monaco-custom-toggle.monaco-checkbox:not(.checked)::before {\n\tvisibility: hidden;\n}\n",""]);const a=r},56651:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-toolbar {\n\theight: 100%;\n}\n\n.monaco-toolbar .toolbar-toggle-more {\n\tdisplay: inline-block;\n\tpadding: 0;\n}\n",""]);const a=r},61766:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-tl-row {\n\tdisplay: flex;\n\theight: 100%;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-tl-row.disabled {\n\tcursor: default;\n}\n.monaco-tl-indent {\n\theight: 100%;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 16px;\n\tpointer-events: none;\n}\n\n.hide-arrows .monaco-tl-indent {\n\tleft: 12px;\n}\n\n.monaco-tl-indent > .indent-guide {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\theight: 100%;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-tl-indent > .indent-guide {\n\ttransition: border-color 0.1s linear;\n}\n\n.monaco-tl-twistie,\n.monaco-tl-contents {\n\theight: 100%;\n}\n\n.monaco-tl-twistie {\n\tfont-size: 10px;\n\ttext-align: right;\n\tpadding-right: 6px;\n\tflex-shrink: 0;\n\twidth: 16px;\n\tdisplay: flex !important;\n\talign-items: center;\n\tjustify-content: center;\n\ttransform: translateX(3px);\n}\n\n.monaco-tl-contents {\n\tflex: 1;\n\toverflow: hidden;\n}\n\n.monaco-tl-twistie::before {\n\tborder-radius: 20px;\n}\n\n.monaco-tl-twistie.collapsed::before {\n\ttransform: rotate(-90deg);\n}\n\n.monaco-tl-twistie.codicon-tree-item-loading::before {\n\t/* Use steps to throttle FPS to reduce CPU usage */\n\tanimation: codicon-spin 1.25s steps(30) infinite;\n}\n\n.monaco-tree-type-filter {\n\tposition: absolute;\n\ttop: 0;\n\tdisplay: flex;\n\tpadding: 3px;\n\tmax-width: 200px;\n\tz-index: 100;\n\tmargin: 0 6px;\n\tborder: 1px solid var(--vscode-widget-border);\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-tree-type-filter {\n\ttransition: top 0.3s;\n}\n\n.monaco-tree-type-filter.disabled {\n\ttop: -40px !important;\n}\n\n.monaco-tree-type-filter-grab {\n\tdisplay: flex !important;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: grab;\n\tmargin-right: 2px;\n}\n\n.monaco-tree-type-filter-grab.grabbing {\n\tcursor: grabbing;\n}\n\n.monaco-tree-type-filter-input {\n\tflex: 1;\n}\n\n.monaco-tree-type-filter-input .monaco-inputbox {\n\theight: 23px;\n}\n\n.monaco-tree-type-filter-input .monaco-inputbox > .ibwrapper > .input,\n.monaco-tree-type-filter-input .monaco-inputbox > .ibwrapper > .mirror {\n\tpadding: 2px 4px;\n}\n\n.monaco-tree-type-filter-input .monaco-findInput > .controls {\n\ttop: 2px;\n}\n\n.monaco-tree-type-filter-actionbar {\n\tmargin-left: 4px;\n}\n\n.monaco-tree-type-filter-actionbar .monaco-action-bar .action-label {\n\tpadding: 2px;\n}\n",""]);const a=r},40504:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inputarea {\n\tmin-width: 0;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\toutline: none !important;\n\tresize: none;\n\tborder: none;\n\toverflow: hidden;\n\tcolor: transparent;\n\tbackground-color: transparent;\n\tz-index: -10;\n}\n/*.monaco-editor .inputarea {\n\tposition: fixed !important;\n\twidth: 800px !important;\n\theight: 500px !important;\n\ttop: initial !important;\n\tleft: initial !important;\n\tbottom: 0 !important;\n\tright: 0 !important;\n\tcolor: black !important;\n\tbackground: white !important;\n\tline-height: 15px !important;\n\tfont-size: 14px !important;\n\tz-index: 10 !important;\n}*/\n.monaco-editor .inputarea.ime-input {\n\tz-index: 10;\n\tcaret-color: var(--vscode-editorCursor-foreground);\n\tcolor: var(--vscode-editor-foreground);\n}\n",""]);const a=r},29463:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .blockDecorations-container {\n\tposition: absolute;\n\ttop: 0;\n\tpointer-events: none;\n}\n\n.monaco-editor .blockDecorations-block {\n\tposition: absolute;\n\tbox-sizing: border-box;\n}\n",""]);const a=r},91260:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\n\tborder-right: 0;\n}\n",""]);const a=r},71329:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcdr = core decorations rendering (div)\n*/\n.monaco-editor .lines-content .cdr {\n\tposition: absolute;\n}",""]);const a=r},64827:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .glyph-margin {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcgmr = core glyph margin rendering (div)\n*/\n.monaco-editor .glyph-margin-widgets .cgmr {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/*\n\tEnsure spinning icons are pixel-perfectly centered and avoid wobble.\n\tThis is only applied to icons that spin to avoid unnecessary\n\tGPU layers and blurry subpixel AA.\n*/\n.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin::before {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n}\n",""]);const a=r},86848:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .lines-content .core-guide {\n\tposition: absolute;\n\tbox-sizing: border-box;\n}\n",""]);const a=r},6184:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .line-numbers {\n\tfont-variant-numeric: tabular-nums;\n\tposition: absolute;\n\ttext-align: right;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\tcursor: default;\n\theight: 100%;\n}\n\n.monaco-editor .relative-current-line-number {\n\ttext-align: left;\n\tdisplay: inline-block;\n\twidth: 100%;\n}\n\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\n\tmargin-top: 1px;\n}\n\n.monaco-editor .line-numbers {\n\tcolor: var(--vscode-editorLineNumber-foreground);\n}\n\n.monaco-editor .line-numbers.active-line-number {\n\tcolor: var(--vscode-editorLineNumber-activeForeground);\n}\n",""]);const a=r},89565:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Uncomment to see lines flashing when they're painted */\n/*.monaco-editor .view-lines > .view-line {\n\tbackground-color: none;\n\tanimation-name: flash-background;\n\tanimation-duration: 800ms;\n}\n@keyframes flash-background {\n\t0% { background-color: lightgreen; }\n\t100% { background-color: none }\n}*/\n\n.mtkcontrol {\n\tcolor: rgb(255, 255, 255) !important;\n\tbackground: rgb(150, 0, 0) !important;\n}\n\n.mtkoverflow {\n\tbackground-color: var(--vscode-button-background, var(--vscode-editor-background));\n\tcolor: var(--vscode-button-foreground, var(--vscode-editor-foreground));\n\tborder-width: 1px;\n\tborder-style: solid;\n\tborder-color: var(--vscode-contrastBorder);\n\tborder-radius: 2px;\n\tpadding: 4px;\n\tcursor: pointer;\n}\n.mtkoverflow:hover {\n\tbackground-color: var(--vscode-button-hoverBackground);\n}\n\n.monaco-editor.no-user-select .lines-content,\n.monaco-editor.no-user-select .view-line,\n.monaco-editor.no-user-select .view-lines {\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n/* Use user-select: text for lookup feature on macOS */\n/* https://github.com/microsoft/vscode/issues/85632 */\n.monaco-editor.mac .lines-content:hover,\n.monaco-editor.mac .view-line:hover,\n.monaco-editor.mac .view-lines:hover {\n\tuser-select: text;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n}\n\n.monaco-editor.enable-user-select {\n\tuser-select: initial;\n\t-webkit-user-select: initial;\n}\n\n.monaco-editor .view-lines {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .view-line {\n\tposition: absolute;\n\twidth: 100%;\n}\n\n.monaco-editor .mtkw {\n\tcolor: var(--vscode-editorWhitespace-foreground) !important;\n}\n\n.monaco-editor .mtkz {\n\tdisplay: inline-block;\n\tcolor: var(--vscode-editorWhitespace-foreground) !important;\n}\n\n/* TODO@tokenization bootstrap fix */\n/*.monaco-editor .view-line > span > span {\n\tfloat: none;\n\tmin-height: inherit;\n\tmargin-left: inherit;\n}*/\n",""]);const a=r},74444:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .lines-decorations {\n\tposition: absolute;\n\ttop: 0;\n\tbackground: white;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcldr = core lines decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cldr {\n\tposition: absolute;\n\theight: 100%;\n}",""]);const a=r},11596:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin {\n\tbackground-color: var(--vscode-editorGutter-background);\n}\n",""]);const a=r},29364:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcmdr = core margin decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cmdr {\n\tposition: absolute;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n}",""]);const a=r},40563:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* START cover the case that slider is visible on mouseover */\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\n\topacity: 0;\n\ttransition: opacity 100ms linear;\n}\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\n\topacity: 1;\n}\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\n\topacity: 1;\n}\n/* END cover the case that slider is visible on mouseover */\n.monaco-editor .minimap-slider .minimap-slider-horizontal {\n\tbackground: var(--vscode-minimapSlider-background);\n}\n.monaco-editor .minimap-slider:hover .minimap-slider-horizontal {\n\tbackground: var(--vscode-minimapSlider-hoverBackground);\n}\n.monaco-editor .minimap-slider.active .minimap-slider-horizontal {\n\tbackground: var(--vscode-minimapSlider-activeBackground);\n}\n.monaco-editor .minimap-shadow-visible {\n\tbox-shadow: var(--vscode-scrollbar-shadow) -6px 0 6px -6px inset;\n}\n.monaco-editor .minimap-shadow-hidden {\n\tposition: absolute;\n\twidth: 0;\n}\n.monaco-editor .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -6px;\n\twidth: 6px;\n}\n.monaco-editor.no-minimap-shadow .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -1px;\n\twidth: 1px;\n}\n\n/* 0.5s fade in/out for the minimap */\n.minimap.autohide {\n\topacity: 0;\n\ttransition: opacity 0.5s;\n}\n.minimap.autohide:hover {\n\topacity: 1;\n}\n",""]);const a=r},59822:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .overlayWidgets {\n\tposition: absolute;\n\ttop: 0;\n\tleft:0;\n}",""]);const a=r},29443:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-ruler {\n\tposition: absolute;\n\ttop: 0;\n\tbox-shadow: 1px 0 0 0 var(--vscode-editorRuler-foreground) inset;\n}\n",""]);const a=r},39649:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .scroll-decoration {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 6px;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;\n}\n",""]);const a=r},52595:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcslr = core selections layer rendering (div)\n*/\n.monaco-editor .lines-content .cslr {\n\tposition: absolute;\n}\n\n.monaco-editor .focused .selected-text {\n\tbackground-color: var(--vscode-editor-selectionBackground);\n}\n\n.monaco-editor .selected-text {\n\tbackground-color: var(--vscode-editor-inactiveSelectionBackground);\n}\n\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\n\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\n\n.monaco-editor.hc-light .top-left-radius\t\t{ border-top-left-radius: 0; }\n.monaco-editor.hc-light .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\n.monaco-editor.hc-light .top-right-radius\t\t{ border-top-right-radius: 0; }\n.monaco-editor.hc-light .bottom-right-radius\t{ border-bottom-right-radius: 0; }\n",""]);const a=r},4057:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .cursors-layer {\n\tposition: absolute;\n\ttop: 0;\n}\n\n.monaco-editor .cursors-layer > .cursor {\n\tposition: absolute;\n\toverflow: hidden;\n\tbox-sizing: border-box;\n}\n\n/* -- smooth-caret-animation -- */\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\n\ttransition: all 80ms;\n}\n\n/* -- block-outline-style -- */\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\n\tbackground: transparent !important;\n\tborder-style: solid;\n\tborder-width: 1px;\n}\n\n/* -- underline-style -- */\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\n\tborder-bottom-width: 2px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n}\n\n/* -- underline-thin-style -- */\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\n\tborder-bottom-width: 1px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n}\n\n@keyframes monaco-cursor-smooth {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t60%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-phase {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t90%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-expand {\n\t0%,\n\t20% {\n\t\ttransform: scaleY(1);\n\t}\n\t80%,\n\t100% {\n\t\ttransform: scaleY(0);\n\t}\n}\n\n.cursor-smooth {\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-phase {\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-expand > .cursor {\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\n}\n",""]);const a=r},19991:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .mwh {\n\tposition: absolute;\n\tcolor: var(--vscode-editorWhitespace-foreground) !important;\n}\n",""]);const a=r},30184:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .diff-hidden-lines-widget {\n\twidth: 100%;\n}\n\n.monaco-editor .diff-hidden-lines {\n\theight: 0px; /* The children each have a fixed height, the transform confuses the browser */\n\ttransform: translate(0px, -10px);\n\tfont-size: 13px;\n\tline-height: 14px;\n}\n\n.monaco-editor .diff-hidden-lines:not(.dragging) .top:hover,\n.monaco-editor .diff-hidden-lines:not(.dragging) .bottom:hover,\n.monaco-editor .diff-hidden-lines .top.dragging,\n.monaco-editor .diff-hidden-lines .bottom.dragging {\n\tbackground-color: var(--vscode-focusBorder);\n}\n\n.monaco-editor .diff-hidden-lines .top,\n.monaco-editor .diff-hidden-lines .bottom {\n\ttransition: background-color 0.1s ease-out;\n\theight: 4px;\n\tbackground-color: transparent;\n\tbackground-clip: padding-box;\n\tborder-bottom: 2px solid transparent;\n\tborder-top: 4px solid transparent;\n\tcursor: ns-resize;\n}\n\n.monaco-editor .diff-hidden-lines .top {\n\ttransform: translate(0px, 4px);\n}\n\n.monaco-editor .diff-hidden-lines .bottom {\n\ttransform: translate(0px, -6px);\n}\n\n.monaco-editor .diff-unchanged-lines {\n\tbackground: var(--vscode-diffEditor-unchangedCodeBackground);\n}\n\n.monaco-editor .noModificationsOverlay {\n\tz-index: 1;\n\tbackground: var(--vscode-editor-background);\n\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n\n.monaco-editor .diff-hidden-lines .center {\n\tbackground: var(--vscode-diffEditor-unchangedRegionBackground);\n\tcolor: var(--vscode-diffEditor-unchangedRegionForeground);\n\toverflow: hidden;\n\tdisplay: block;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\theight: 24px;\n}\n\n.monaco-editor .diff-hidden-lines .center span.codicon {\n\tvertical-align: middle;\n}\n\n.monaco-editor .diff-hidden-lines .center a:hover .codicon {\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n\n.monaco-editor .diff-hidden-lines div.breadcrumb-item {\n\tcursor: pointer;\n}\n\n.monaco-editor .diff-hidden-lines div.breadcrumb-item:hover {\n\tcolor: var(--vscode-editorLink-activeForeground);\n}\n\n.monaco-editor .movedOriginal {\n\tborder: 2px solid var(--vscode-diffEditor-move-border);\n}\n\n.monaco-editor .movedModified {\n\tborder: 2px solid var(--vscode-diffEditor-move-border);\n}\n\n.monaco-editor .movedOriginal.currentMove, .monaco-editor .movedModified.currentMove {\n\tborder: 2px solid var(--vscode-diffEditor-moveActive-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines path.currentMove {\n\tstroke: var(--vscode-diffEditor-moveActive-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines path {\n\tpointer-events: visiblestroke;\n}\n\n.monaco-diff-editor .moved-blocks-lines .arrow {\n\tfill: var(--vscode-diffEditor-move-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines .arrow.currentMove {\n\tfill: var(--vscode-diffEditor-moveActive-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines .arrow-rectangle {\n\tfill: var(--vscode-editor-background);\n}\n\n.monaco-diff-editor .moved-blocks-lines {\n\tposition: absolute;\n\tpointer-events: none;\n}\n\n.monaco-diff-editor .moved-blocks-lines path {\n\tfill: none;\n\tstroke: var(--vscode-diffEditor-move-border);\n\tstroke-width: 2;\n}\n\n.monaco-editor .char-delete.diff-range-empty {\n\tmargin-left: -1px;\n\tborder-left: solid var(--vscode-diffEditor-removedTextBackground) 3px;\n}\n\n.monaco-editor .char-insert.diff-range-empty {\n\tborder-left: solid var(--vscode-diffEditor-insertedTextBackground) 3px;\n}\n\n.monaco-editor .fold-unchanged {\n\tcursor: pointer;\n}\n\n.monaco-diff-editor .diff-moved-code-block {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tmargin-top: -4px;\n}\n\n.monaco-diff-editor .diff-moved-code-block .action-bar .action-label.codicon {\n\twidth: 12px;\n\theight: 12px;\n\tfont-size: 12px;\n}\n",""]);const a=r},22360:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- DiffEditor ---------- */\n\n.monaco-diff-editor .diffOverview {\n\tz-index: 9;\n}\n\n.monaco-diff-editor .diffOverview .diffViewport {\n\tz-index: 10;\n}\n\n/* colors not externalized: using transparancy on background */\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-light\t.scrollbar { background: none; }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\n\tz-index: 10;\n}\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\n.modified-in-monaco-diff-editor.hc-light\t.slider.active { background: none; }\n\n/* ---------- Diff ---------- */\n\n.monaco-editor .insert-sign,\n.monaco-diff-editor .insert-sign,\n.monaco-editor .delete-sign,\n.monaco-diff-editor .delete-sign {\n\tfont-size: 11px !important;\n\topacity: 0.7 !important;\n\tdisplay: flex !important;\n\talign-items: center;\n}\n.monaco-editor.hc-black .insert-sign,\n.monaco-diff-editor.hc-black .insert-sign,\n.monaco-editor.hc-black .delete-sign,\n.monaco-diff-editor.hc-black .delete-sign,\n.monaco-editor.hc-light .insert-sign,\n.monaco-diff-editor.hc-light .insert-sign,\n.monaco-editor.hc-light .delete-sign,\n.monaco-diff-editor.hc-light .delete-sign {\n\topacity: 1;\n}\n\n.monaco-editor .inline-deleted-margin-view-zone {\n\ttext-align: right;\n}\n.monaco-editor .inline-added-margin-view-zone {\n\ttext-align: right;\n}\n\n.monaco-editor .arrow-revert-change {\n\tz-index: 10;\n\tposition: absolute;\n}\n\n.monaco-editor .arrow-revert-change:hover {\n\tcursor: pointer;\n}\n\n/* ---------- Inline Diff ---------- */\n\n.monaco-editor .view-zones .view-lines .view-line span {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\n\tcursor: pointer;\n}\n\n.monaco-editor .char-insert, .monaco-diff-editor .char-insert {\n\tbackground-color: var(--vscode-diffEditor-insertedTextBackground);\n}\n\n.monaco-editor .line-insert, .monaco-diff-editor .line-insert {\n\tbackground-color: var(--vscode-diffEditor-insertedLineBackground, var(--vscode-diffEditor-insertedTextBackground));\n}\n\n.monaco-editor .line-insert,\n.monaco-editor .char-insert {\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-diffEditor-insertedTextBorder);\n}\n.monaco-editor.hc-black .line-insert, .monaco-editor.hc-light .line-insert,\n.monaco-editor.hc-black .char-insert, .monaco-editor.hc-light .char-insert {\n\tborder-style: dashed;\n}\n\n.monaco-editor .line-delete,\n.monaco-editor .char-delete {\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-diffEditor-removedTextBorder);\n}\n.monaco-editor.hc-black .line-delete, .monaco-editor.hc-light .line-delete,\n.monaco-editor.hc-black .char-delete, .monaco-editor.hc-light .char-delete {\n\tborder-style: dashed;\n}\n\n.monaco-editor .inline-added-margin-view-zone,\n.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert {\n\tbackground-color: var(--vscode-diffEditorGutter-insertedLineBackground, var(--vscode-diffEditor-insertedLineBackground), var(--vscode-diffEditor-insertedTextBackground));\n}\n\n.monaco-editor .char-delete, .monaco-diff-editor .char-delete {\n\tbackground-color: var(--vscode-diffEditor-removedTextBackground);\n}\n\n.monaco-editor .line-delete, .monaco-diff-editor .line-delete {\n\tbackground-color: var(--vscode-diffEditor-removedLineBackground, var(--vscode-diffEditor-removedTextBackground));\n}\n\n.monaco-editor .inline-deleted-margin-view-zone,\n.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete {\n\tbackground-color: var(--vscode-diffEditorGutter-removedLineBackground, var(--vscode-diffEditor-removedLineBackground), var(--vscode-diffEditor-removedTextBackground));\n}\n\n.monaco-diff-editor.side-by-side .editor.modified {\n\tbox-shadow: -6px 0 5px -5px var(--vscode-scrollbar-shadow);\n\tborder-left: 1px solid var(--vscode-diffEditor-border);\n}\n\n.monaco-diff-editor .diffViewport {\n\tbackground: var(--vscode-scrollbarSlider-background);\n}\n\n.monaco-diff-editor .diffViewport:hover {\n\tbackground: var(--vscode-scrollbarSlider-hoverBackground);\n}\n\n.monaco-diff-editor .diffViewport:active {\n\tbackground: var(--vscode-scrollbarSlider-activeBackground);\n}\n",""]);const a=r},34504:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-diff-editor .diff-review-line-number {\n\ttext-align: right;\n\tdisplay: inline-block;\n\tcolor: var(--vscode-editorLineNumber-foreground);\n}\n\n.monaco-diff-editor .diff-review {\n\tposition: absolute;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tz-index: 99;\n}\n\n.monaco-diff-editor .diff-review-summary {\n\tpadding-left: 10px;\n}\n\n.monaco-diff-editor .diff-review-shadow {\n\tposition: absolute;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 -6px 6px -6px inset;\n}\n\n.monaco-diff-editor .diff-review-row {\n\twhite-space: pre;\n}\n\n.monaco-diff-editor .diff-review-table {\n\tdisplay: table;\n\tmin-width: 100%;\n}\n\n.monaco-diff-editor .diff-review-row {\n\tdisplay: table-row;\n\twidth: 100%;\n}\n\n.monaco-diff-editor .diff-review-spacer {\n\tdisplay: inline-block;\n\twidth: 10px;\n\tvertical-align: middle;\n}\n\n.monaco-diff-editor .diff-review-spacer > .codicon {\n\tfont-size: 9px !important;\n}\n\n.monaco-diff-editor .diff-review-actions {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\ttop: 2px;\n\tz-index: 100;\n}\n\n.monaco-diff-editor .diff-review-actions .action-label {\n\twidth: 16px;\n\theight: 16px;\n\tmargin: 2px 0;\n}\n",""]);const a=r},97337:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -------------------- IE10 remove auto clear button -------------------- */\n\n::-ms-clear {\n\tdisplay: none;\n}\n\n/* All widgets */\n/* I am not a big fan of this rule */\n.monaco-editor .editor-widget input {\n\tcolor: inherit;\n}\n\n/* -------------------- Editor -------------------- */\n\n.monaco-editor {\n\tposition: relative;\n\toverflow: visible;\n\t-webkit-text-size-adjust: 100%;\n\tcolor: var(--vscode-editor-foreground);\n\tbackground-color: var(--vscode-editor-background);\n}\n.monaco-editor-background {\n\tbackground-color: var(--vscode-editor-background);\n}\n.monaco-editor .rangeHighlight {\n\tbackground-color: var(--vscode-editor-rangeHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-rangeHighlightBorder);\n}\n.monaco-editor.hc-black .rangeHighlight, .monaco-editor.hc-light .rangeHighlight {\n\tborder-style: dotted;\n}\n.monaco-editor .symbolHighlight {\n\tbackground-color: var(--vscode-editor-symbolHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-symbolHighlightBorder);\n}\n.monaco-editor.hc-black .symbolHighlight, .monaco-editor.hc-light .symbolHighlight {\n\tborder-style: dotted;\n}\n\n/* -------------------- Misc -------------------- */\n\n.monaco-editor .overflow-guard {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.monaco-editor .view-overlays {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n.monaco-editor .auto-closed-character {\n\topacity: 0.3;\n}\n*/\n\n\n.monaco-editor .squiggly-error {\n\tborder-bottom: 4px double var(--vscode-editorError-border);\n}\n.monaco-editor .squiggly-error::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorError-background);\n}\n.monaco-editor .squiggly-warning {\n\tborder-bottom: 4px double var(--vscode-editorWarning-border);\n}\n.monaco-editor .squiggly-warning::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorWarning-background);\n}\n.monaco-editor .squiggly-info {\n\tborder-bottom: 4px double var(--vscode-editorInfo-border);\n}\n.monaco-editor .squiggly-info::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorInfo-background);\n}\n.monaco-editor .squiggly-hint {\n\tborder-bottom: 2px dotted var(--vscode-editorHint-border);\n}\n.monaco-editor.showUnused .squiggly-unnecessary {\n\tborder-bottom: 2px dashed var(--vscode-editorUnnecessaryCode-border);\n}\n.monaco-editor.showDeprecated .squiggly-inline-deprecated {\n\ttext-decoration: line-through;\n\ttext-decoration-color: var(--vscode-editor-foreground, inherit);\n}\n",""]);const a=r},34055:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .selection-anchor {\n\tbackground-color: #007ACC;\n\twidth: 2px !important;\n}\n",""]);const a=r},12205:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .bracket-match {\n\tbox-sizing: border-box;\n\tbackground-color: var(--vscode-editorBracketMatch-background);\n\tborder: 1px solid var(--vscode-editorBracketMatch-border);\n}\n",""]);const a=r},32874:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .lightBulbWidget {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.monaco-editor .lightBulbWidget:hover{\n\tcursor: pointer;\n}\n\n.monaco-editor .lightBulbWidget.codicon-light-bulb {\n\tcolor: var(--vscode-editorLightBulb-foreground);\n}\n\n.monaco-editor .lightBulbWidget.codicon-lightbulb-autofix {\n\tcolor: var(--vscode-editorLightBulbAutoFix-foreground, var(--vscode-editorLightBulb-foreground));\n}\n\n.monaco-editor .lightBulbWidget:before {\n\tposition: relative;\n\tz-index: 2;\n}\n\n.monaco-editor .lightBulbWidget:after {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tcontent: '';\n\tdisplay: block;\n\twidth: 100%;\n\theight: 100%;\n\topacity: 0.3;\n\tbackground-color: var(--vscode-editor-background);\n\tz-index: 1;\n}\n",""]);const a=r},32849:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .codelens-decoration {\n\toverflow: hidden;\n\tdisplay: inline-block;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\tcolor: var(--vscode-editorCodeLens-foreground);\n\tline-height: var(--vscode-editorCodeLens-lineHeight);\n\tfont-size: var(--vscode-editorCodeLens-fontSize);\n\tpadding-right: calc(var(--vscode-editorCodeLens-fontSize)*0.5);\n\tfont-feature-settings: var(--vscode-editorCodeLens-fontFeatureSettings);\n\tfont-family: var(--vscode-editorCodeLens-fontFamily), var(--vscode-editorCodeLens-fontFamilyDefault);\n}\n\n.monaco-editor .codelens-decoration>span,\n.monaco-editor .codelens-decoration>a {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\twhite-space: nowrap;\n\tvertical-align: sub;\n}\n\n.monaco-editor .codelens-decoration>a {\n\ttext-decoration: none;\n}\n\n.monaco-editor .codelens-decoration>a:hover {\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n\n.monaco-editor .codelens-decoration>a:hover .codicon {\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n\n.monaco-editor .codelens-decoration .codicon {\n\tvertical-align: middle;\n\tcolor: currentColor !important;\n\tcolor: var(--vscode-editorCodeLens-foreground);\n\tline-height: var(--vscode-editorCodeLens-lineHeight);\n\tfont-size: var(--vscode-editorCodeLens-fontSize);\n}\n\n.monaco-editor .codelens-decoration>a:hover .codicon::before {\n\tcursor: pointer;\n}\n\n@keyframes fadein {\n\t0% {\n\t\topacity: 0;\n\t\tvisibility: visible;\n\t}\n\n\t100% {\n\t\topacity: 1;\n\t}\n}\n\n.monaco-editor .codelens-decoration.fadein {\n\tanimation: fadein 0.1s linear;\n}\n",""]);const a=r},22313:(e,t,i)=>{i.d(t,{Z:()=>u});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s),a=i(61667),l=i.n(a),d=new URL(i(94748),i.b),h=r()(o()),c=l()(d);h.push([e.id,`/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.colorpicker-widget {\n\theight: 190px;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n/* Decoration */\n\n.colorpicker-color-decoration,\n.hc-light .colorpicker-color-decoration {\n\tborder: solid 0.1em #000;\n\tbox-sizing: border-box;\n\tmargin: 0.1em 0.2em 0 0.2em;\n\twidth: 0.8em;\n\theight: 0.8em;\n\tline-height: 0.8em;\n\tdisplay: inline-block;\n\tcursor: pointer;\n}\n\n.hc-black .colorpicker-color-decoration,\n.vs-dark .colorpicker-color-decoration {\n\tborder: solid 0.1em #eee;\n}\n\n/* Header */\n\n.colorpicker-header {\n\tdisplay: flex;\n\theight: 24px;\n\tposition: relative;\n\tbackground: url(${c});\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-header .picked-color {\n\twidth: 240px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tline-height: 24px;\n\tcursor: pointer;\n\tcolor: white;\n\tflex: 1;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n.colorpicker-header .picked-color .picked-color-presentation {\n\twhite-space: nowrap;\n\tmargin-left: 5px;\n\tmargin-right: 5px;\n}\n\n.colorpicker-header .picked-color .codicon {\n\tcolor: inherit;\n\tfont-size: 14px;\n}\n\n.colorpicker-header .picked-color.light {\n\tcolor: black;\n}\n\n.colorpicker-header .original-color {\n\twidth: 74px;\n\tz-index: inherit;\n\tcursor: pointer;\n}\n\n.standalone-colorpicker {\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.colorpicker-header.standalone-colorpicker {\n\tborder-bottom: none;\n}\n\n.colorpicker-header .close-button {\n\tcursor: pointer;\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder-left: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.colorpicker-header .close-button-inner-div {\n\twidth: 100%;\n\theight: 100%;\n\ttext-align: center;\n}\n\n.colorpicker-header .close-button-inner-div:hover {\n\tbackground-color: var(--vscode-toolbar-hoverBackground);\n}\n\n.colorpicker-header .close-icon {\n\tpadding: 3px;\n}\n\n/* Body */\n\n.colorpicker-body {\n\tdisplay: flex;\n\tpadding: 8px;\n\tposition: relative;\n}\n\n.colorpicker-body .saturation-wrap {\n\toverflow: hidden;\n\theight: 150px;\n\tposition: relative;\n\tmin-width: 220px;\n\tflex: 1;\n}\n\n.colorpicker-body .saturation-box {\n\theight: 150px;\n\tposition: absolute;\n}\n\n.colorpicker-body .saturation-selection {\n\twidth: 9px;\n\theight: 9px;\n\tmargin: -5px 0 0 -5px;\n\tborder: 1px solid rgb(255, 255, 255);\n\tborder-radius: 100%;\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\n\tposition: absolute;\n}\n\n.colorpicker-body .strip {\n\twidth: 25px;\n\theight: 150px;\n}\n\n.colorpicker-body .standalone-strip {\n\twidth: 25px;\n\theight: 122px;\n}\n\n.colorpicker-body .hue-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: grab;\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\n}\n\n.colorpicker-body .opacity-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: grab;\n\tbackground: url(${c});\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-body .strip.grabbing {\n\tcursor: grabbing;\n}\n\n.colorpicker-body .slider {\n\tposition: absolute;\n\ttop: 0;\n\tleft: -2px;\n\twidth: calc(100% + 4px);\n\theight: 4px;\n\tbox-sizing: border-box;\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\n}\n\n.colorpicker-body .strip .overlay {\n\theight: 150px;\n\tpointer-events: none;\n}\n\n.colorpicker-body .standalone-strip .standalone-overlay {\n\theight: 122px;\n\tpointer-events: none;\n}\n\n.standalone-colorpicker-body {\n\tdisplay: block;\n\tborder: 1px solid transparent;\n\tborder-bottom: 1px solid var(--vscode-editorHoverWidget-border);\n\toverflow: hidden;\n}\n\n.colorpicker-body .insert-button {\n\tposition: absolute;\n\theight: 20px;\n\twidth: 58px;\n\tpadding: 0px;\n\tright: 8px;\n\tbottom: 8px;\n\tbackground: var(--vscode-button-background);\n\tcolor: var(--vscode-button-foreground);\n\tborder-radius: 2px;\n\tborder: none;\n\tcursor: pointer;\n}\n\n.colorpicker-body .insert-button:hover{\n\tbackground: var(--vscode-button-hoverBackground);\n}\n`,""]);const u=h},97070:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor.vs .dnd-target,\n.monaco-editor.hc-light .dnd-target {\n\tborder-right: 2px dotted black;\n\tcolor: white; /* opposite of black */\n}\n.monaco-editor.vs-dark .dnd-target {\n\tborder-right: 2px dotted #AEAFAD;\n\tcolor: #51504f; /* opposite of #AEAFAD */\n}\n.monaco-editor.hc-black .dnd-target {\n\tborder-right: 2px dotted #fff;\n\tcolor: #000; /* opposite of #fff */\n}\n\n.monaco-editor.mouse-default .view-lines,\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\n.monaco-editor.hc-black.mac.mouse-default .view-lines,\n.monaco-editor.hc-light.mac.mouse-default .view-lines {\n\tcursor: default;\n}\n.monaco-editor.mouse-copy .view-lines,\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\n.monaco-editor.hc-black.mac.mouse-copy .view-lines,\n.monaco-editor.hc-light.mac.mouse-copy .view-lines {\n\tcursor: copy;\n}\n",""]);const a=r},33399:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.post-edit-widget {\n\tbox-shadow: 0 0 8px 2px var(--vscode-widget-shadow);\n\tborder: 1px solid var(--vscode-widget-border, transparent);\n\tborder-radius: 4px;\n\tbackground-color: var(--vscode-editorWidget-background);\n\toverflow: hidden;\n}\n\n.post-edit-widget .monaco-button {\n\tpadding: 2px;\n\tborder: none;\n\tborder-radius: 0;\n}\n\n.post-edit-widget .monaco-button:hover {\n\tbackground-color: var(--vscode-button-secondaryHoverBackground) !important;\n}\n\n.post-edit-widget .monaco-button .codicon {\n\tmargin: 0;\n}\n",""]);const a=r},68875:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .findOptionsWidget {\n\tbackground-color: var(--vscode-editorWidget-background);\n\tcolor: var(--vscode-editorWidget-foreground);\n\tbox-shadow: 0 0 8px 2px var(--vscode-widget-shadow);\n\tborder: 2px solid var(--vscode-contrastBorder);\n}\n",""]);const a=r},56950:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Find widget */\n.monaco-editor .find-widget {\n\tposition: absolute;\n\tz-index: 35;\n\theight: 33px;\n\toverflow: hidden;\n\tline-height: 19px;\n\ttransition: transform 200ms linear;\n\tpadding: 0 4px;\n\tbox-sizing: border-box;\n\ttransform: translateY(calc(-100% - 10px)); /* shadow (10px) */\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n}\n\n.monaco-workbench.reduce-motion .monaco-editor .find-widget {\n\ttransition: transform 0ms linear;\n}\n\n.monaco-editor .find-widget textarea {\n\tmargin: 0px;\n}\n\n.monaco-editor .find-widget.hiddenEditor {\n\tdisplay: none;\n}\n\n/* Find widget when replace is toggled on */\n.monaco-editor .find-widget.replaceToggled > .replace-part {\n\tdisplay: flex;\n}\n\n.monaco-editor .find-widget.visible {\n\ttransform: translateY(0);\n}\n\n.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\n\toutline: 1px solid -webkit-focus-ring-color;\n\toutline-offset: -1px;\n}\n\n.monaco-editor .find-widget .monaco-inputbox .input {\n\tbackground-color: transparent;\n\tmin-height: 0;\n}\n\n.monaco-editor .find-widget .monaco-findInput .input {\n\tfont-size: 13px;\n}\n\n.monaco-editor .find-widget > .find-part,\n.monaco-editor .find-widget > .replace-part {\n\tmargin: 3px 25px 0 17px;\n\tfont-size: 12px;\n\tdisplay: flex;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\n\tmin-height: 25px;\n}\n\n\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\n\tpadding-right: 22px;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .input,\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .mirror,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .input,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\n\tpadding-top: 2px;\n\tpadding-bottom: 2px;\n}\n\n.monaco-editor .find-widget > .find-part .find-actions {\n\theight: 25px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget > .replace-part .replace-actions {\n\theight: 25px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget .monaco-findInput {\n\tvertical-align: middle;\n\tdisplay: flex;\n\tflex:1;\n}\n\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {\n\t/* Make sure textarea inherits the width correctly */\n\twidth: 100%;\n}\n\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical {\n\t/* Hide vertical scrollbar */\n\topacity: 0;\n}\n\n.monaco-editor .find-widget .matchesCount {\n\tdisplay: flex;\n\tflex: initial;\n\tmargin: 0 0 0 3px;\n\tpadding: 2px 0 0 2px;\n\theight: 25px;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\ttext-align: center;\n\tline-height: 23px;\n}\n\n.monaco-editor .find-widget .button {\n\twidth: 16px;\n\theight: 16px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n\tdisplay: flex;\n\tflex: initial;\n\tmargin-left: 3px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* find in selection button */\n.monaco-editor .find-widget .codicon-find-selection {\n\twidth: 22px;\n\theight: 22px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n}\n\n.monaco-editor .find-widget .button.left {\n\tmargin-left: 0;\n\tmargin-right: 3px;\n}\n\n.monaco-editor .find-widget .button.wide {\n\twidth: auto;\n\tpadding: 1px 6px;\n\ttop: -1px;\n}\n\n.monaco-editor .find-widget .button.toggle {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 3px;\n\twidth: 18px;\n\theight: 100%;\n\tborder-radius: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .find-widget .button.toggle.disabled {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget .disabled {\n\tcolor: var(--vscode-disabledForeground);\n\tcursor: default;\n}\n\n.monaco-editor .find-widget > .replace-part {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget > .replace-part > .monaco-findInput {\n\tposition: relative;\n\tdisplay: flex;\n\tvertical-align: middle;\n\tflex: auto;\n\tflex-grow: 0;\n\tflex-shrink: 0;\n}\n\n.monaco-editor .find-widget > .replace-part > .monaco-findInput > .controls {\n\tposition: absolute;\n\ttop: 3px;\n\tright: 2px;\n}\n\n/* REDUCED */\n.monaco-editor .find-widget.reduced-find-widget .matchesCount {\n\tdisplay:none;\n}\n\n/* NARROW (SMALLER THAN REDUCED) */\n.monaco-editor .find-widget.narrow-find-widget {\n\tmax-width: 257px !important;\n}\n\n/* COLLAPSED (SMALLER THAN NARROW) */\n.monaco-editor .find-widget.collapsed-find-widget {\n\tmax-width: 170px !important;\n}\n\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\n\tdisplay:none;\n}\n\n.monaco-editor .findMatch {\n\tanimation-duration: 0;\n\tanimation-name: inherit !important;\n}\n\n.monaco-editor .find-widget .monaco-sash {\n\tleft: 0 !important;\n}\n\n.monaco-editor.hc-black .find-widget .button:before {\n\tposition: relative;\n\ttop: 1px;\n\tleft: 2px;\n}\n\n/* Close button position. */\n.monaco-editor .find-widget > .button.codicon-widget-close {\n\tposition: absolute;\n\ttop: 5px;\n\tright: 4px;\n}\n",""]);const a=r},43388:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,\n.monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,\n.monaco-editor .margin-view-overlays .codicon-folding-expanded,\n.monaco-editor .margin-view-overlays .codicon-folding-collapsed {\n\tcursor: pointer;\n\topacity: 0;\n\ttransition: opacity 0.5s;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tfont-size: 140%;\n\tmargin-left: 2px;\n}\n\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-expanded,\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-collapsed {\n\ttransition: initial;\n}\n\n.monaco-editor .margin-view-overlays:hover .codicon,\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-manual-collapsed,\n.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons {\n\topacity: 1;\n}\n\n.monaco-editor .inline-folded:after {\n\tcolor: grey;\n\tmargin: 0.1em 0.2em 0 0.2em;\n\tcontent: "\\22EF"; /* ellipses unicode character */\n\tdisplay: inline;\n\tline-height: 1em;\n\tcursor: pointer;\n}\n\n.monaco-editor .folded-background {\n\tbackground-color: var(--vscode-editor-foldBackground);\n}\n\n.monaco-editor .cldr.codicon.codicon-folding-expanded,\n.monaco-editor .cldr.codicon.codicon-folding-collapsed,\n.monaco-editor .cldr.codicon.codicon-folding-manual-expanded,\n.monaco-editor .cldr.codicon.codicon-folding-manual-collapsed {\n\tcolor: var(--vscode-editorGutter-foldingControlForeground) !important;\n}\n\n',""]);const a=r},35351:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* marker zone */\n\n.monaco-editor .peekview-widget .head .peekview-title .severity-icon {\n\tdisplay: inline-block;\n\tvertical-align: text-top;\n\tmargin-right: 4px;\n}\n\n.monaco-editor .marker-widget {\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .marker-widget > .stale {\n\topacity: 0.6;\n\tfont-style: italic;\n}\n\n.monaco-editor .marker-widget .title {\n\tdisplay: inline-block;\n\tpadding-right: 5px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer {\n\tposition: absolute;\n\twhite-space: pre;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\tpadding: 8px 12px 0 20px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message .details {\n\tpadding-left: 6px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message .source,\n.monaco-editor .marker-widget .descriptioncontainer .message span.code {\n\topacity: 0.6;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link {\n\topacity: 0.6;\n\tcolor: inherit;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before {\n\tcontent: '(';\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after {\n\tcontent: ')';\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\n\ttext-decoration: underline;\n\t/** Hack to force underline to show **/\n\tborder-bottom: 1px solid transparent;\n\ttext-underline-position: under;\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .filename {\n\tcursor: pointer;\n}\n",""]);const a=r},33257:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .goto-definition-link {\n\ttext-decoration: underline;\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n",""]);const a=r},60879:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -- zone widget */\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\n\tborder-top-width: 1px;\n\tborder-bottom-width: 1px;\n}\n\n.monaco-editor .reference-zone-widget .inline {\n\tdisplay: inline-block;\n\tvertical-align: top;\n}\n\n.monaco-editor .reference-zone-widget .messages {\n\theight: 100%;\n\twidth: 100%;\n\ttext-align: center;\n\tpadding: 3em 0;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree {\n\tline-height: 23px;\n\tbackground-color: var(--vscode-peekViewResult-background);\n\tcolor: var(--vscode-peekViewResult-lineForeground);\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\n\tdisplay: inline-flex;\n\twidth: 100%;\n\theight: 100%;\n\tcolor: var(--vscode-peekViewResult-fileForeground);\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\n\tcolor: inherit !important;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) {\n\tbackground-color: var(--vscode-peekViewResult-selectionBackground);\n\tcolor: var(--vscode-peekViewResult-selectionForeground) !important;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\n\tmargin-right: 12px;\n\tmargin-left: auto;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight {\n\tbackground-color: var(--vscode-peekViewResult-matchHighlightBackground);\n}\n\n.monaco-editor .reference-zone-widget .preview .reference-decoration {\n\tbackground-color: var(--vscode-peekViewEditor-matchHighlightBackground);\n\tborder: 2px solid var(--vscode-peekViewEditor-matchHighlightBorder);\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,\n.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\n\tbackground-color: var(--vscode-peekViewEditor-background);\n}\n\n.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\n\tbackground-color: var(--vscode-peekViewEditorGutter-background);\n}\n\n/* High Contrast Theming */\n\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file,\n.monaco-editor.hc-light .reference-zone-widget .ref-tree .reference-file {\n\tfont-weight: bold;\n}\n\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight,\n.monaco-editor.hc-light .reference-zone-widget .ref-tree .referenceMatch .highlight {\n\tborder: 1px dotted var(--vscode-contrastActiveBorder, transparent);\n\tbox-sizing: border-box;\n}\n",""]);const a=r},41738:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .hoverHighlight {\n\tbackground-color: var(--vscode-editor-hoverHighlightBackground);\n}\n\n.monaco-editor .monaco-hover {\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n\tborder-radius: 3px;\n}\n\n.monaco-editor .monaco-hover a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .monaco-hover a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor .monaco-hover .hover-row .actions {\n\tbackground-color: var(--vscode-editorHoverWidget-statusBarBackground);\n}\n\n.monaco-editor .monaco-hover code {\n\tbackground-color: var(--vscode-textCodeBlock-background);\n}\n\n\n",""]);const a=r},16921:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n.monaco-editor.vs .valueSetReplacement {\n\toutline: solid 2px var(--vscode-editorBracketMatch-border);\n}\n",""]);const a=r},77682:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .suggest-preview-additional-widget {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .suggest-preview-additional-widget .content-spacer {\n\tcolor: transparent;\n\twhite-space: pre;\n}\n\n.monaco-editor .suggest-preview-additional-widget .button {\n\tdisplay: inline-block;\n\tcursor: pointer;\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .ghost-text-hidden {\n\topacity: 0;\n\tfont-size: 0;\n}\n\n.monaco-editor .ghost-text-decoration, .monaco-editor .suggest-preview-text .ghost-text {\n\tfont-style: italic;\n}\n\n.monaco-editor .inline-completion-text-to-replace {\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .suggest-preview-text .ghost-text {\n\tcolor: var(--vscode-editorGhostText-foreground) !important;\n\tbackground-color: var(--vscode-editorGhostText-background);\n\tborder: 1px solid var(--vscode-editorGhostText-border);\n}\n",""]);const a=r},28300:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inlineSuggestionsHints.withBorder {\n\tz-index: 39;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .inlineSuggestionsHints a {\n\tcolor: var(--vscode-foreground);\n}\n\n.monaco-editor .inlineSuggestionsHints a:hover {\n\tcolor: var(--vscode-foreground);\n}\n\n.monaco-editor .inlineSuggestionsHints .keybinding {\n\tdisplay: flex;\n\tmargin-left: 4px;\n\topacity: 0.6;\n}\n\n.monaco-editor .inlineSuggestionsHints .keybinding .monaco-keybinding-key {\n\tfont-size: 8px;\n\tpadding: 2px 3px;\n}\n\n.monaco-editor .inlineSuggestionsHints .availableSuggestionCount a {\n\tdisplay: flex;\n\tmin-width: 19px;\n\tjustify-content: center;\n}\n\n.monaco-editor .inlineSuggestionStatusBarItemLabel {\n\tmargin-right: 2px;\n}\n",""]);const a=r},16668:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.inline-editor-progress-decoration {\n\tdisplay: inline-block;\n\twidth: 1em;\n\theight: 1em;\n}\n\n.inline-progress-widget {\n\tdisplay: flex !important;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n.inline-progress-widget .icon {\n\tfont-size: 80% !important;\n}\n\n.inline-progress-widget:hover .icon {\n\tfont-size: 90% !important;\n\tanimation: none;\n}\n\n.inline-progress-widget:hover .icon::before {\n\tcontent: "\\ea76"; /* codicon-x */\n}\n',""]);const a=r},55040:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .linked-editing-decoration {\n\tbackground-color: var(--vscode-editor-linkedEditingBackground);\n\n\t/* Ensure decoration is visible even if range is empty */\n\tmin-width: 1px;\n}\n",""]);const a=r},28477:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .detected-link,\n.monaco-editor .detected-link-active {\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .detected-link-active {\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n",""]);const a=r},81615:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .rendered-markdown kbd {\n\tbackground-color: var(--vscode-keybindingLabel-background);\n\tcolor: var(--vscode-keybindingLabel-foreground);\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-radius: 3px;\n\tborder-color: var(--vscode-keybindingLabel-border);\n\tborder-bottom-color: var(--vscode-keybindingLabel-bottomBorder);\n\tbox-shadow: inset 0 -1px 0 var(--vscode-widget-shadow);\n\tvertical-align: middle;\n\tpadding: 1px 3px;\n}\n",""]);const a=r},65807:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .monaco-editor-overlaymessage {\n\tpadding-bottom: 8px;\n\tz-index: 10000;\n}\n\n.monaco-editor .monaco-editor-overlaymessage.below {\n\tpadding-bottom: 0;\n\tpadding-top: 8px;\n\tz-index: 10000;\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\n\tanimation: fadeIn 150ms ease-out;\n}\n\n@keyframes fadeOut {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\n\tanimation: fadeOut 100ms ease-out;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message {\n\tpadding: 2px 4px;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-inputValidation-infoBorder);\n\tborder-radius: 3px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message p {\n\tmargin-block: 0px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor.hc-black .monaco-editor-overlaymessage .message,\n.monaco-editor.hc-light .monaco-editor-overlaymessage .message {\n\tborder-width: 2px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor {\n\twidth: 0 !important;\n\theight: 0 !important;\n\tborder-color: transparent;\n\tborder-style: solid;\n\tz-index: 1000;\n\tborder-width: 8px;\n\tposition: absolute;\n\tleft: 2px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor.top {\n\tborder-bottom-color: var(--vscode-inputValidation-infoBorder);\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor.below {\n\tborder-top-color: var(--vscode-inputValidation-infoBorder);\n}\n\n.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.below {\n\tdisplay: none;\n}\n\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.top {\n\tdisplay: inherit;\n\ttop: -8px;\n}\n",""]);const a=r},81386:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .parameter-hints-widget {\n\t/* Must be higher than the sash\'s z-index and terminal canvases but lower than the suggest widget */\n\tz-index: 39;\n\tdisplay: flex;\n\tflex-direction: column;\n\tline-height: 1.5em;\n\tcursor: default;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.hc-black .monaco-editor .parameter-hints-widget,\n.hc-light .monaco-editor .parameter-hints-widget {\n\tborder-width: 2px;\n}\n\n.monaco-editor .parameter-hints-widget > .phwrapper {\n\tmax-width: 440px;\n\tdisplay: flex;\n\tflex-direction: row;\n}\n\n.monaco-editor .parameter-hints-widget.multiple {\n\tmin-height: 3.3em;\n\tpadding: 0;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .body::before {\n\tcontent: "";\n\tdisplay: block;\n\theight: 100%;\n\tposition: absolute;\n\topacity: 0.5;\n\tborder-left: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .parameter-hints-widget p,\n.monaco-editor .parameter-hints-widget ul {\n\tmargin: 8px 0;\n}\n\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\n.monaco-editor .parameter-hints-widget .body {\n\tdisplay: flex;\n\tflex: 1;\n\tflex-direction: column;\n\tmin-height: 100%;\n}\n\n.monaco-editor .parameter-hints-widget .signature {\n\tpadding: 4px 5px;\n\tposition: relative;\n}\n\n.monaco-editor .parameter-hints-widget .signature.has-docs::after {\n\tcontent: "";\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\twidth: 100%;\n\tpadding-top: 4px;\n\topacity: 0.5;\n\tborder-bottom: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .parameter-hints-widget .docs {\n\tpadding: 0 10px 0 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .docs.empty {\n\tdisplay: none;\n}\n\n.monaco-editor .parameter-hints-widget .docs a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .parameter-hints-widget .docs a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n\tcursor: pointer;\n}\n\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\n\twhite-space: initial;\n}\n\n.monaco-editor .parameter-hints-widget .docs code {\n\tfont-family: var(--monaco-monospace-font);\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n\tbackground-color: var(--vscode-textCodeBlock-background);\n}\n\n.monaco-editor .parameter-hints-widget .docs .monaco-tokenized-source,\n.monaco-editor .parameter-hints-widget .docs .code {\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .controls {\n\tdisplay: none;\n\tflex-direction: column;\n\talign-items: center;\n\tmin-width: 22px;\n\tjustify-content: flex-end;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .controls {\n\tdisplay: flex;\n\tpadding: 0 2px;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .button {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n}\n\n.monaco-editor .parameter-hints-widget .button.previous {\n\tbottom: 24px;\n}\n\n.monaco-editor .parameter-hints-widget .overloads {\n\ttext-align: center;\n\theight: 12px;\n\tline-height: 12px;\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\n\tcolor: var(--vscode-editorHoverWidget-highlightForeground);\n\tfont-weight: bold;\n}\n\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\n\tfont-weight: bold;\n\tmargin-right: 0.5em;\n}\n',""]);const a=r},8881:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .peekview-widget .head {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tflex-wrap: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title {\n\tdisplay: flex;\n\talign-items: baseline;\n\tfont-size: 13px;\n\tmargin-left: 20px;\n\tmin-width: 0;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title.clickable {\n\tcursor: pointer;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\n\tfont-size: 0.9em;\n\tmargin-left: 0.5em;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .meta {\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .filename {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\n\tcontent: '-';\n\tpadding: 0 0.3em;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions {\n\tflex: 1;\n\ttext-align: right;\n\tpadding-right: 2px;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\n\theight: 100%;\n}\n\n.monaco-editor .peekview-widget > .body {\n\tborder-top: 1px solid;\n\tposition: relative;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\n\tmargin-right: 4px;\n\talign-self: center;\n}\n\n.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon {\n\tcolor: inherit !important;\n}\n",""]);const a=r},11522:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .rename-box {\n\tz-index: 100;\n\tcolor: inherit;\n\tborder-radius: 4px;\n}\n\n.monaco-editor .rename-box.preview {\n\tpadding: 4px 4px 0 4px;\n}\n\n.monaco-editor .rename-box .rename-input {\n\tpadding: 3px;\n\tborder-radius: 2px;\n}\n\n.monaco-editor .rename-box .rename-label {\n\tdisplay: none;\n\topacity: .8;\n}\n\n.monaco-editor .rename-box.preview .rename-label {\n\tdisplay: inherit;\n}\n",""]);const a=r},15756:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .snippet-placeholder {\n\tmin-width: 2px;\n\toutline-style: solid;\n\toutline-width: 1px;\n\tbackground-color: var(--vscode-editor-snippetTabstopHighlightBackground, transparent);\n\toutline-color: var(--vscode-editor-snippetTabstopHighlightBorder, transparent);\n}\n\n.monaco-editor .finish-snippet-placeholder {\n\toutline-style: solid;\n\toutline-width: 1px;\n\tbackground-color: var(--vscode-editor-snippetFinalTabstopHighlightBackground, transparent);\n\toutline-color: var(--vscode-editor-snippetFinalTabstopHighlightBorder, transparent);\n}\n",""]);const a=r},36098:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .sticky-widget {\n\toverflow: hidden;\n}\n\n.monaco-editor .sticky-widget-line-numbers {\n\tfloat: left;\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-widget-lines-scrollable {\n\tdisplay: inline-block;\n\tposition: absolute;\n\toverflow: hidden;\n\twidth: var(--vscode-editorStickyScroll-scrollableWidth);\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-widget-lines {\n\tposition: absolute;\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-line-number, .monaco-editor .sticky-line-content {\n\tcolor: var(--vscode-editorLineNumber-foreground);\n\twhite-space: nowrap;\n\tdisplay: inline-block;\n\tposition: absolute;\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-line-number .codicon {\n\tfloat: right;\n\ttransition: var(--vscode-editorStickyScroll-foldingOpacityTransition);\n}\n\n.monaco-editor .sticky-line-content {\n\twidth: var(--vscode-editorStickyScroll-scrollableWidth);\n\tbackground-color: inherit;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .sticky-line-number-inner {\n\tdisplay: block;\n\ttext-align: right;\n}\n\n.monaco-editor.hc-black .sticky-widget,\n.monaco-editor.hc-light .sticky-widget {\n\tborder-bottom: 1px solid var(--vscode-contrastBorder);\n}\n\n.monaco-editor .sticky-line-content:hover {\n\tbackground-color: var(--vscode-editorStickyScrollHover-background);\n\tcursor: pointer;\n}\n\n.monaco-editor .sticky-widget {\n\twidth: 100%;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 3px 2px -2px;\n\tz-index: 4;\n\tbackground-color: var(--vscode-editorStickyScroll-background);\n}\n\n.monaco-editor .sticky-widget.peek {\n\tbackground-color: var(--vscode-peekViewEditorStickyScroll-background);\n}\n",""]);const a=r},45224:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Suggest widget*/\n\n.monaco-editor .suggest-widget {\n\twidth: 430px;\n\tz-index: 40;\n\tdisplay: flex;\n\tflex-direction: column;\n\tborder-radius: 3px;\n}\n\n.monaco-editor .suggest-widget.message {\n\tflex-direction: row;\n\talign-items: center;\n}\n\n.monaco-editor .suggest-widget,\n.monaco-editor .suggest-details {\n\tflex: 0 1 auto;\n\twidth: 100%;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: var(--vscode-editorSuggestWidget-border);\n\tbackground-color: var(--vscode-editorSuggestWidget-background);\n}\n\n.monaco-editor.hc-black .suggest-widget,\n.monaco-editor.hc-black .suggest-details,\n.monaco-editor.hc-light .suggest-widget,\n.monaco-editor.hc-light .suggest-details {\n\tborder-width: 2px;\n}\n\n/* Styles for status bar part */\n\n\n.monaco-editor .suggest-widget .suggest-status-bar {\n\tbox-sizing: border-box;\n\tdisplay: none;\n\tflex-flow: row nowrap;\n\tjustify-content: space-between;\n\twidth: 100%;\n\tfont-size: 80%;\n\tpadding: 0 4px 0 4px;\n\tborder-top: 1px solid var(--vscode-editorSuggestWidget-border);\n\toverflow: hidden;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {\n\tdisplay: flex;\n}\n\n.monaco-editor .suggest-widget .suggest-status-bar .left {\n\tpadding-right: 8px;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {\n\tcolor: var(--vscode-editorSuggestWidgetStatus-foreground);\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {\n\tcontent: ', ';\n\tmargin-right: 0.3em;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\n\twidth: 100%;\n}\n\n/* Styles for Message element for when widget is loading or is empty */\n\n.monaco-editor .suggest-widget>.message {\n\tpadding-left: 22px;\n}\n\n/** Styles for the list element **/\n\n.monaco-editor .suggest-widget>.tree {\n\theight: 100%;\n\twidth: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list {\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n/** Styles for each row in the list element **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\n\tdisplay: flex;\n\t-mox-box-sizing: border-box;\n\tbox-sizing: border-box;\n\tpadding-right: 10px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 2px 2px;\n\twhite-space: nowrap;\n\tcursor: pointer;\n\ttouch-action: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused {\n\tcolor: var(--vscode-editorSuggestWidget-selectedForeground);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon {\n\tcolor: var(--vscode-editorSuggestWidget-selectedIconForeground);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents {\n\tflex: 1;\n\theight: 100%;\n\toverflow: hidden;\n\tpadding-left: 2px;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main {\n\tdisplay: flex;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: pre;\n\tjustify-content: space-between;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\n\tdisplay: flex;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused)>.contents>.main .monaco-icon-label {\n\tcolor: var(--vscode-editorSuggestWidget-foreground);\n}\n\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main .monaco-highlighted-label .highlight {\n\tcolor: var(--vscode-editorSuggestWidget-highlightForeground);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused>.contents>.main .monaco-highlighted-label .highlight {\n\tcolor: var(--vscode-editorSuggestWidget-focusHighlightForeground);\n}\n\n/** ReadMore Icon styles **/\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore::before {\n\tcolor: inherit;\n\topacity: 1;\n\tfont-size: 14px;\n\tcursor: pointer;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close {\n\tposition: absolute;\n\ttop: 6px;\n\tright: 2px;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover {\n\topacity: 1;\n}\n\n/** signature, qualifier, type/details opacity **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\n\topacity: 0.7;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.6;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label {\n\tmargin-left: 12px;\n\topacity: 0.4;\n\tfont-size: 85%;\n\tline-height: initial;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\talign-self: center;\n}\n\n/** Type Info and icon next to the label in the focused completion item **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\n\tfont-size: 85%;\n\tmargin-left: 1.1em;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source {\n\tdisplay: inline;\n}\n\n/** Details: if using CompletionItem#details, show on focus **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label {\n\tdisplay: inline;\n}\n\n/** Details: if using CompletionItemLabel#details, always show **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label {\n\tdisplay: inline;\n}\n\n/** Ellipsis on hover **/\n\n.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right.can-expand-details>.details-label {\n\twidth: calc(100% - 26px);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left {\n\tflex-shrink: 1;\n\tflex-grow: 1;\n\toverflow: hidden;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label {\n\tflex-shrink: 0;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label {\n\tmax-width: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label {\n\tflex-shrink: 1;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\n\toverflow: hidden;\n\tflex-shrink: 4;\n\tmax-width: 70%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\twidth: 18px;\n\theight: 18px;\n\tvisibility: hidden;\n}\n\n/** Do NOT display ReadMore when docs is side/below **/\n\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\n\tdisplay: none !important;\n}\n\n/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore {\n\tdisplay: none;\n}\n\n/** Focused item can show ReadMore, but can't when docs is side/below **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right>.readMore {\n\tvisibility: visible;\n}\n\n/** Styles for each row in the list **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {\n\topacity: 0.66;\n\ttext-decoration: unset;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container {\n\ttext-decoration: line-through;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {\n\theight: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\n\tdisplay: block;\n\theight: 16px;\n\twidth: 16px;\n\tmargin-left: 2px;\n\tbackground-repeat: no-repeat;\n\tbackground-size: 80%;\n\tbackground-position: center;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tmargin-right: 4px;\n}\n\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\n\tmargin: 0 0 0 0.3em;\n\tborder: 0.1em solid #000;\n\twidth: 0.7em;\n\theight: 0.7em;\n\tdisplay: inline-block;\n}\n\n/** Styles for the docs of the completion item in focus **/\n\n.monaco-editor .suggest-details-container {\n\tz-index: 41;\n}\n\n.monaco-editor .suggest-details {\n\tdisplay: flex;\n\tflex-direction: column;\n\tcursor: default;\n\tcolor: var(--vscode-editorSuggestWidget-foreground);\n}\n\n.monaco-editor .suggest-details.focused {\n\tborder-color: var(--vscode-focusBorder);\n}\n\n.monaco-editor .suggest-details a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .suggest-details a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor .suggest-details code {\n\tbackground-color: var(--vscode-textCodeBlock-background);\n}\n\n.monaco-editor .suggest-details.no-docs {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element {\n\tflex: 1;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body {\n\tbox-sizing: border-box;\n\theight: 100%;\n\twidth: 100%;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type {\n\tflex: 2;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.7;\n\twhite-space: pre;\n\tmargin: 0 24px 0 0;\n\tpadding: 4px 0 12px 5px;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap {\n\twhite-space: normal;\n\tword-break: break-all;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs {\n\tmargin: 0;\n\tpadding: 4px 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs {\n\tmargin-right: 24px;\n\toverflow: hidden;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs {\n\tpadding: 0;\n\twhite-space: initial;\n\tmin-height: calc(1rem + 8px);\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty) {\n\tpadding: 4px 5px;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child {\n\tmargin-top: 0;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child {\n\tmargin-bottom: 0;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .monaco-tokenized-source {\n\twhite-space: pre;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code {\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon {\n\tvertical-align: sub;\n}\n\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-details code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-editor .suggest-details ul {\n\tpadding-left: 20px;\n}\n\n.monaco-editor .suggest-details ol {\n\tpadding-left: 20px;\n}\n\n.monaco-editor .suggest-details p code {\n\tfont-family: var(--monaco-monospace-font);\n}\n",""]);const a=r},30745:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .codicon.codicon-symbol-array,\n.monaco-workbench .codicon.codicon-symbol-array { color: var(--vscode-symbolIcon-arrayForeground); }\n.monaco-editor .codicon.codicon-symbol-boolean,\n.monaco-workbench .codicon.codicon-symbol-boolean { color: var(--vscode-symbolIcon-booleanForeground); }\n.monaco-editor .codicon.codicon-symbol-class,\n.monaco-workbench .codicon.codicon-symbol-class { color: var(--vscode-symbolIcon-classForeground); }\n.monaco-editor .codicon.codicon-symbol-method,\n.monaco-workbench .codicon.codicon-symbol-method { color: var(--vscode-symbolIcon-methodForeground); }\n.monaco-editor .codicon.codicon-symbol-color,\n.monaco-workbench .codicon.codicon-symbol-color { color: var(--vscode-symbolIcon-colorForeground); }\n.monaco-editor .codicon.codicon-symbol-constant,\n.monaco-workbench .codicon.codicon-symbol-constant { color: var(--vscode-symbolIcon-constantForeground); }\n.monaco-editor .codicon.codicon-symbol-constructor,\n.monaco-workbench .codicon.codicon-symbol-constructor { color: var(--vscode-symbolIcon-constructorForeground); }\n.monaco-editor .codicon.codicon-symbol-value,\n.monaco-workbench .codicon.codicon-symbol-value,\n.monaco-editor .codicon.codicon-symbol-enum,\n.monaco-workbench .codicon.codicon-symbol-enum { color: var(--vscode-symbolIcon-enumeratorForeground); }\n.monaco-editor .codicon.codicon-symbol-enum-member,\n.monaco-workbench .codicon.codicon-symbol-enum-member { color: var(--vscode-symbolIcon-enumeratorMemberForeground); }\n.monaco-editor .codicon.codicon-symbol-event,\n.monaco-workbench .codicon.codicon-symbol-event { color: var(--vscode-symbolIcon-eventForeground); }\n.monaco-editor .codicon.codicon-symbol-field,\n.monaco-workbench .codicon.codicon-symbol-field { color: var(--vscode-symbolIcon-fieldForeground); }\n.monaco-editor .codicon.codicon-symbol-file,\n.monaco-workbench .codicon.codicon-symbol-file { color: var(--vscode-symbolIcon-fileForeground); }\n.monaco-editor .codicon.codicon-symbol-folder,\n.monaco-workbench .codicon.codicon-symbol-folder { color: var(--vscode-symbolIcon-folderForeground); }\n.monaco-editor .codicon.codicon-symbol-function,\n.monaco-workbench .codicon.codicon-symbol-function { color: var(--vscode-symbolIcon-functionForeground); }\n.monaco-editor .codicon.codicon-symbol-interface,\n.monaco-workbench .codicon.codicon-symbol-interface { color: var(--vscode-symbolIcon-interfaceForeground); }\n.monaco-editor .codicon.codicon-symbol-key,\n.monaco-workbench .codicon.codicon-symbol-key { color: var(--vscode-symbolIcon-keyForeground); }\n.monaco-editor .codicon.codicon-symbol-keyword,\n.monaco-workbench .codicon.codicon-symbol-keyword { color: var(--vscode-symbolIcon-keywordForeground); }\n.monaco-editor .codicon.codicon-symbol-module,\n.monaco-workbench .codicon.codicon-symbol-module { color: var(--vscode-symbolIcon-moduleForeground); }\n.monaco-editor .codicon.codicon-symbol-namespace,\n.monaco-workbench .codicon.codicon-symbol-namespace { color: var(--vscode-symbolIcon-namespaceForeground); }\n.monaco-editor .codicon.codicon-symbol-null,\n.monaco-workbench .codicon.codicon-symbol-null { color: var(--vscode-symbolIcon-nullForeground); }\n.monaco-editor .codicon.codicon-symbol-number,\n.monaco-workbench .codicon.codicon-symbol-number { color: var(--vscode-symbolIcon-numberForeground); }\n.monaco-editor .codicon.codicon-symbol-object,\n.monaco-workbench .codicon.codicon-symbol-object { color: var(--vscode-symbolIcon-objectForeground); }\n.monaco-editor .codicon.codicon-symbol-operator,\n.monaco-workbench .codicon.codicon-symbol-operator { color: var(--vscode-symbolIcon-operatorForeground); }\n.monaco-editor .codicon.codicon-symbol-package,\n.monaco-workbench .codicon.codicon-symbol-package { color: var(--vscode-symbolIcon-packageForeground); }\n.monaco-editor .codicon.codicon-symbol-property,\n.monaco-workbench .codicon.codicon-symbol-property { color: var(--vscode-symbolIcon-propertyForeground); }\n.monaco-editor .codicon.codicon-symbol-reference,\n.monaco-workbench .codicon.codicon-symbol-reference { color: var(--vscode-symbolIcon-referenceForeground); }\n.monaco-editor .codicon.codicon-symbol-snippet,\n.monaco-workbench .codicon.codicon-symbol-snippet { color: var(--vscode-symbolIcon-snippetForeground); }\n.monaco-editor .codicon.codicon-symbol-string,\n.monaco-workbench .codicon.codicon-symbol-string { color: var(--vscode-symbolIcon-stringForeground); }\n.monaco-editor .codicon.codicon-symbol-struct,\n.monaco-workbench .codicon.codicon-symbol-struct { color: var(--vscode-symbolIcon-structForeground); }\n.monaco-editor .codicon.codicon-symbol-text,\n.monaco-workbench .codicon.codicon-symbol-text { color: var(--vscode-symbolIcon-textForeground); }\n.monaco-editor .codicon.codicon-symbol-type-parameter,\n.monaco-workbench .codicon.codicon-symbol-type-parameter { color: var(--vscode-symbolIcon-typeParameterForeground); }\n.monaco-editor .codicon.codicon-symbol-unit,\n.monaco-workbench .codicon.codicon-symbol-unit { color: var(--vscode-symbolIcon-unitForeground); }\n.monaco-editor .codicon.codicon-symbol-variable,\n.monaco-workbench .codicon.codicon-symbol-variable { color: var(--vscode-symbolIcon-variableForeground); }\n",""]);const a=r},98367:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.editor-banner {\n\tbox-sizing: border-box;\n\tcursor: default;\n\twidth: 100%;\n\tfont-size: 12px;\n\tdisplay: flex;\n\toverflow: visible;\n\n\theight: 26px;\n\n\tbackground: var(--vscode-banner-background);\n}\n\n\n.editor-banner .icon-container {\n\tdisplay: flex;\n\tflex-shrink: 0;\n\talign-items: center;\n\tpadding: 0 6px 0 10px;\n}\n\n.editor-banner .icon-container.custom-icon {\n\tbackground-repeat: no-repeat;\n\tbackground-position: center center;\n\tbackground-size: 16px;\n\twidth: 16px;\n\tpadding: 0;\n\tmargin: 0 6px 0 10px;\n}\n\n.editor-banner .message-container {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 26px;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n.editor-banner .message-container p {\n\tmargin-block-start: 0;\n\tmargin-block-end: 0;\n}\n\n.editor-banner .message-actions-container {\n\tflex-grow: 1;\n\tflex-shrink: 0;\n\tline-height: 26px;\n\tmargin: 0 4px;\n}\n\n.editor-banner .message-actions-container a.monaco-button {\n\twidth: inherit;\n\tmargin: 2px 8px;\n\tpadding: 0px 12px;\n}\n\n.editor-banner .message-actions-container a {\n\tpadding: 3px;\n\tmargin-left: 12px;\n\ttext-decoration: underline;\n}\n\n.editor-banner .action-container {\n\tpadding: 0 10px 0 6px;\n}\n\n.editor-banner {\n\tbackground-color: var(--vscode-banner-background);\n}\n\n.editor-banner,\n.editor-banner .action-container .codicon,\n.editor-banner .message-actions-container .monaco-link {\n\tcolor: var(--vscode-banner-foreground);\n}\n\n.editor-banner .icon-container .codicon {\n\tcolor: var(--vscode-banner-iconForeground);\n}\n",""]);const a=r},98679:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .unicode-highlight {\n\tborder: 1px solid var(--vscode-editorUnicodeHighlight-border);\n\tbackground-color: var(--vscode-editorUnicodeHighlight-background);\n\tbox-sizing: border-box;\n}\n",""]);const a=r},19620:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .focused .selectionHighlight {\n\tbackground-color: var(--vscode-editor-selectionHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-selectionHighlightBorder);\n}\n.monaco-editor.hc-black .focused .selectionHighlight, .monaco-editor.hc-light .focused .selectionHighlight {\n\tborder-style: dotted;\n}\n\n.monaco-editor .wordHighlight {\n\tbackground-color: var(--vscode-editor-wordHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-wordHighlightBorder);\n}\n.monaco-editor.hc-black .wordHighlight, .monaco-editor.hc-light .wordHighlight {\n\tborder-style: dotted;\n}\n\n.monaco-editor .wordHighlightStrong {\n\tbackground-color: var(--vscode-editor-wordHighlightStrongBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-wordHighlightStrongBorder);\n}\n.monaco-editor.hc-black .wordHighlightStrong, .monaco-editor.hc-light .wordHighlightStrong {\n\tborder-style: dotted;\n}\n\n.monaco-editor .wordHighlightText {\n\tbackground-color: var(--vscode-editor-wordHighlightTextBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-wordHighlightTextBorder);\n}\n.monaco-editor.hc-black .wordHighlightText, .monaco-editor.hc-light .wordHighlightText {\n\tborder-style: dotted;\n}\n",""]);const a=r},51564:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .zone-widget {\n\tposition: absolute;\n\tz-index: 10;\n}\n\n\n.monaco-editor .zone-widget .zone-widget-container {\n\tborder-top-style: solid;\n\tborder-bottom-style: solid;\n\tborder-top-width: 0;\n\tborder-bottom-width: 0;\n\tposition: relative;\n}\n",""]);const a=r},21556:(e,t,i)=>{i.d(t,{Z:()=>p});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s),a=i(61667),l=i.n(a),d=new URL(i(6161),i.b),h=new URL(i(51096),i.b),c=r()(o()),u=l()(d),g=l()(h);c.push([e.id,`/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .iPadShowKeyboard {\n\twidth: 58px;\n\tmin-width: 0;\n\theight: 36px;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\tresize: none;\n\toverflow: hidden;\n\tbackground: url(${u}) center center no-repeat;\n\tborder: 4px solid #F6F6F6;\n\tborder-radius: 4px;\n}\n\n.monaco-editor.vs-dark .iPadShowKeyboard {\n\tbackground: url(${g}) center center no-repeat;\n\tborder: 4px solid #252526;\n}`,""]);const p=c},75189:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .tokens-inspect-widget {\n\tz-index: 50;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\tpadding: 10px;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n.monaco-editor.hc-black .tokens-inspect-widget, .monaco-editor.hc-light .tokens-inspect-widget {\n\tborder-width: 2px;\n}\n\n.monaco-editor .tokens-inspect-widget .tokens-inspect-separator {\n\theight: 1px;\n\tborder: 0;\n\tbackground-color: var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token {\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-length {\n\tfont-weight: normal;\n\tfont-size: 60%;\n\tfloat: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\n\twidth: 100%;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\n\tfont-family: var(--monaco-monospace-font);\n\ttext-align: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-type {\n\tfont-family: var(--monaco-monospace-font);\n}\n",""]);const a=r},93198:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tfont-size: 13px;\n}\n\n.quick-input-widget .monaco-highlighted-label .highlight,\n.quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0066BF;\n}\n\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight {\n\tcolor: #9DDDFF;\n}\n\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0097fb;\n}\n\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #F38518;\n}\n\n.hc-light .quick-input-widget .monaco-highlighted-label .highlight,\n.hc-light .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0F4A85;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(221, 221, 221, 0.4);\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\n\tcolor: #555;\n}\n\n.hc-black .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: transparent;\n\tborder: solid 1px rgb(111, 195, 223);\n\tbox-shadow: none;\n\tcolor: #fff;\n}\n\n.hc-light .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: transparent;\n\tborder: solid 1px #0F4A85;\n\tbox-shadow: none;\n\tcolor: #292929;\n}\n\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(128, 128, 128, 0.17);\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\n\tcolor: #ccc;\n}\n",""]);const a=r},70643:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n/* Default standalone editor fonts */\n.monaco-editor {\n\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-hover p {\n\tmargin: 0;\n}\n\n/* See https://github.com/microsoft/monaco-editor/issues/2168#issuecomment-780078600 */\n.monaco-aria-container {\n\tposition: absolute !important;\n\ttop: 0; /* avoid being placed underneath a sibling element */\n\theight: 1px;\n\twidth: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n}\n\n/*.monaco-editor.vs [tabindex="0"]:focus {\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}\n\n.monaco-editor.vs-dark [tabindex="0"]:focus {\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}*/\n',""]);const a=r},90711:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.action-widget {\n\tfont-size: 13px;\n\tborder-radius: 0;\n\tmin-width: 160px;\n\tmax-width: 80vw;\n\tz-index: 40;\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid var(--vscode-editorWidget-border) !important;\n\tborder-radius: 2px;\n\tbackground-color: var(--vscode-editorWidget-background);\n\tcolor: var(--vscode-editorWidget-foreground);\n}\n\n.context-view-block {\n\tposition: fixed;\n\tcursor: initial;\n\tleft: 0;\n\ttop: 0;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: -1;\n}\n\n.context-view-pointerBlock {\n\tposition: fixed;\n\tcursor: initial;\n\tleft: 0;\n\ttop: 0;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: 2;\n}\n\n.action-widget .monaco-list {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tborder: none !important;\n\tborder-width: 0 !important;\n}\n\n.action-widget .monaco-list:focus:before {\n\toutline: 0 !important;\n}\n\n.action-widget .monaco-list .monaco-scrollable-element {\n\toverflow: visible;\n}\n\n/** Styles for each row in the list element **/\n.action-widget .monaco-list .monaco-list-row {\n\tpadding: 0 10px;\n\twhite-space: nowrap;\n\tcursor: pointer;\n\ttouch-action: none;\n\twidth: 100%;\n}\n\n.action-widget .monaco-list .monaco-list-row.action.focused:not(.option-disabled) {\n\tbackground-color: var(--vscode-quickInputList-focusBackground) !important;\n\tcolor: var(--vscode-quickInputList-focusForeground);\n\toutline: 1px solid var(--vscode-menu-selectionBorder, transparent);\n\toutline-offset: -1px;\n}\n\n.action-widget .monaco-list-row.group-header {\n\tcolor: var(--vscode-descriptionForeground) !important;\n\tfont-weight: 600;\n}\n\n.action-widget .monaco-list .group-header,\n.action-widget .monaco-list .option-disabled,\n.action-widget .monaco-list .option-disabled:before,\n.action-widget .monaco-list .option-disabled .focused,\n.action-widget .monaco-list .option-disabled .focused:before {\n\tcursor: default !important;\n\t-webkit-touch-callout: none;\n\t-webkit-user-select: none;\n\tuser-select: none;\n\tbackground-color: transparent !important;\n\toutline: 0 solid !important;\n}\n\n.action-widget .monaco-list-row.action {\n\tdisplay: flex;\n\tgap: 6px;\n\talign-items: center;\n}\n\n.action-widget .monaco-list-row.action.option-disabled,\n.action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled,\n.action-widget .monaco-list-row.action.option-disabled .codicon,\n.action-widget .monaco-list:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused).option-disabled {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n\n.action-widget .monaco-list-row.action:not(.option-disabled) .codicon {\n\tcolor: inherit;\n}\n\n.action-widget .monaco-list-row.action .title {\n\tflex: 1;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n/* Action bar */\n\n.action-widget .action-widget-action-bar {\n\tbackground-color: var(--vscode-editorHoverWidget-statusBarBackground);\n\tborder-top: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.action-widget .action-widget-action-bar::before {\n\tdisplay: block;\n\tcontent: "";\n\twidth: 100%;\n}\n\n.action-widget .action-widget-action-bar .actions-container {\n\tpadding: 0 8px;\n}\n\n.action-widget-action-bar .action-label {\n\tcolor: var(--vscode-textLink-activeForeground);\n\tfont-size: 12px;\n\tline-height: 22px;\n\tpadding: 0;\n\tpointer-events: all;\n}\n\n.action-widget-action-bar .action-item {\n\tmargin-right: 16px;\n\tpointer-events: none;\n}\n\n.action-widget-action-bar .action-label:hover {\n\tbackground-color: transparent !important;\n}\n\n.monaco-action-bar .actions-container.highlight-toggled .action-label.checked {\n\t/* The important gives this rule precedence over the hover rule. */\n\tbackground: var(--vscode-actionBar-toggledBackground) !important;\n}\n',""]);const a=r},51854:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar .action-item.menu-entry .action-label.icon {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50%;\n\tbackground-size: 16px;\n}\n\n.monaco-dropdown-with-default {\n\tdisplay: flex !important;\n\tflex-direction: row;\n\tborder-radius: 5px;\n}\n\n.monaco-dropdown-with-default > .action-container > .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-dropdown-with-default > .action-container.menu-entry > .action-label.icon {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50%;\n\tbackground-size: 16px;\n}\n\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\n\tfont-size: 12px;\n\tpadding-left: 0px;\n\tpadding-right: 0px;\n\tline-height: 16px;\n\tmargin-left: -3px;\n}\n\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\n\tdisplay: block;\n\tbackground-size: 16px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n",""]);const a=r},57150:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-link {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-link:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n",""]);const a=r},51961:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tposition: absolute;\n\twidth: 600px;\n\tz-index: 2550;\n\tleft: 50%;\n\tmargin-left: -300px;\n\t-webkit-app-region: no-drag;\n\tborder-radius: 6px;\n}\n\n.quick-input-titlebar {\n\tdisplay: flex;\n\talign-items: center;\n\tborder-top-left-radius: 5px; /* match border radius of quick input widget */\n\tborder-top-right-radius: 5px;\n}\n\n.quick-input-left-action-bar {\n\tdisplay: flex;\n\tmargin-left: 4px;\n\tflex: 1;\n}\n\n.quick-input-title {\n\tpadding: 3px 0px;\n\ttext-align: center;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.quick-input-right-action-bar {\n\tdisplay: flex;\n\tmargin-right: 4px;\n\tflex: 1;\n}\n\n.quick-input-right-action-bar > .actions-container {\n\tjustify-content: flex-end;\n}\n\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\n\tbackground-position: center;\n\tbackground-repeat: no-repeat;\n\tpadding: 2px;\n}\n\n.quick-input-description {\n\tmargin: 6px 6px 6px 11px;\n}\n\n.quick-input-header .quick-input-description {\n\tmargin: 4px 2px;\n\tflex: 1;\n}\n\n.quick-input-header {\n\tdisplay: flex;\n\tpadding: 8px 6px 6px 6px;\n}\n\n.quick-input-widget.hidden-input .quick-input-header {\n\t/* reduce margins and paddings when input box hidden */\n\tpadding: 0;\n\tmargin-bottom: 0;\n}\n\n.quick-input-and-message {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex-grow: 1;\n\tmin-width: 0;\n\tposition: relative;\n}\n\n.quick-input-check-all {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-filter {\n\tflex-grow: 1;\n\tdisplay: flex;\n\tposition: relative;\n}\n\n.quick-input-box {\n\tflex-grow: 1;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-box,\n.quick-input-widget.show-checkboxes .quick-input-message {\n\tmargin-left: 5px;\n}\n\n.quick-input-visible-count {\n\tposition: absolute;\n\tleft: -10000px;\n}\n\n.quick-input-count {\n\talign-self: center;\n\tposition: absolute;\n\tright: 4px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-count .monaco-count-badge {\n\tvertical-align: middle;\n\tpadding: 2px 4px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n\n.quick-input-action {\n\tmargin-left: 6px;\n}\n\n.quick-input-action .monaco-text-button {\n\tfont-size: 11px;\n\tpadding: 0 6px;\n\tdisplay: flex;\n\theight: 25px;\n\talign-items: center;\n}\n\n.quick-input-message {\n\tmargin-top: -1px;\n\tpadding: 5px;\n\toverflow-wrap: break-word;\n}\n\n.quick-input-message > .codicon {\n\tmargin: 0 0.2em;\n\tvertical-align: text-bottom;\n}\n\n/* Links in descriptions & validations */\n.quick-input-message a {\n\tcolor: inherit;\n}\n\n.quick-input-progress.monaco-progress-container {\n\tposition: relative;\n}\n\n.quick-input-progress.monaco-progress-container,\n.quick-input-progress.monaco-progress-container .progress-bit {\n\theight: 2px;\n}\n\n.quick-input-list {\n\tline-height: 22px;\n}\n\n.quick-input-widget.hidden-input .quick-input-list {\n\tmargin-top: 4px; /* reduce margins when input box hidden */\n\tpadding-bottom: 4px;\n}\n\n.quick-input-list .monaco-list {\n\toverflow: hidden;\n\tmax-height: calc(20 * 22px);\n\tpadding-bottom: 5px;\n}\n\n.quick-input-list .monaco-scrollable-element {\n\tpadding: 0px 5px;\n}\n\n.quick-input-list .quick-input-list-entry {\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tpadding: 0 6px;\n}\n\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-width: 1px;\n\tborder-top-style: solid;\n}\n\n.quick-input-list .monaco-list-row {\n\tborder-radius: 3px;\n}\n\n.quick-input-list .monaco-list-row[data-index=\"0\"] .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-style: none;\n}\n\n.quick-input-list .quick-input-list-label {\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tflex: 1;\n}\n\n.quick-input-list .quick-input-list-checkbox {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-list .quick-input-list-icon {\n\tbackground-size: 16px;\n\tbackground-position: left center;\n\tbackground-repeat: no-repeat;\n\tpadding-right: 6px;\n\twidth: 16px;\n\theight: 22px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.quick-input-list .quick-input-list-rows {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tflex: 1;\n\tmargin-left: 5px;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\n\tmargin-left: 10px;\n}\n\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\n\tdisplay: none;\n}\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\n\tdisplay: inline;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\n\tflex: 1; /* make sure the icon label grows within the row */\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\n\tvertical-align: text-bottom;\n}\n\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label > span {\n\topacity: 1;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\n}\n\n.quick-input-list .quick-input-list-label-meta {\n\topacity: 0.7;\n\tline-height: normal;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.quick-input-list .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\n\tmargin-right: 4px; /* separate from keybindings or actions */\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tdisplay: flex;\n\tflex: 0;\n\toverflow: visible;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\n\t/*\n\t * By default, actions in the quick input action bar are hidden\n\t * until hovered over them or selected.\n\t */\n\tdisplay: none;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\n\tmargin-right: 4px;\n\tpadding: 0px 2px 2px 2px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-top: 1px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-right: 4px; /* separate from scrollbar */\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\n\tdisplay: flex;\n}\n\n/* focused items in quick pick */\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator {\n\tcolor: inherit\n}\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key {\n\tbackground: none;\n}\n\n/* Quick input separators as full-row item */\n.quick-input-list .quick-input-list-separator-as-item {\n\tfont-weight: 600;\n\tfont-size: 12px;\n}\n",""]);const a=r},81050:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(8081),o=i.n(n),s=i(23645),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .zone-widget .codicon.codicon-error,\n.markers-panel .marker-icon.error, .markers-panel .marker-icon .codicon.codicon-error,\n.text-search-provider-messages .providerMessage .codicon.codicon-error,\n.extensions-viewlet > .extensions .codicon.codicon-error,\n.extension-editor .codicon.codicon-error,\n.preferences-editor .codicon.codicon-error {\n\tcolor: var(--vscode-problemsErrorIcon-foreground);\n}\n\n.monaco-editor .zone-widget .codicon.codicon-warning,\n.markers-panel .marker-icon.warning, .markers-panel .marker-icon .codicon.codicon-warning,\n.text-search-provider-messages .providerMessage .codicon.codicon-warning,\n.extensions-viewlet > .extensions .codicon.codicon-warning,\n.extension-editor .codicon.codicon-warning,\n.preferences-editor .codicon.codicon-warning {\n\tcolor: var(--vscode-problemsWarningIcon-foreground);\n}\n\n.monaco-editor .zone-widget .codicon.codicon-info,\n.markers-panel .marker-icon.info, .markers-panel .marker-icon .codicon.codicon-info,\n.text-search-provider-messages .providerMessage .codicon.codicon-info,\n.extensions-viewlet > .extensions .codicon.codicon-info,\n.extension-editor .codicon.codicon-info,\n.preferences-editor .codicon.codicon-info {\n\tcolor: var(--vscode-problemsInfoIcon-foreground);\n}\n",""]);const a=r},90850:(e,t,i)=>{i.d(t,{AU:()=>Aa,Q5:()=>Oa,VD:()=>Pa,DC:()=>Fa,ZL:()=>za,eB:()=>Ka,Ly:()=>Ba,e6:()=>Wa,Y1:()=>Va,a$:()=>Ha,WU:()=>ja,Sf:()=>Ua,j6:()=>$a,Mj:()=>qa}),i(43017),i(4215),i(69317),i(54367),i(72102),i(55833),i(51925),i(38593),i(46838),i(2719),i(23365),i(93740),i(41895),i(54555),i(76917),i(55015),i(63218),i(96962),i(63737),i(44125),i(61097),i(40832),i(43588),i(60628),i(53385),i(74271),i(41321),i(810),i(84602),i(66348),i(50865),i(52165),i(95733),i(97615),i(50995),i(52293),i(34540),i(93519),i(77061),i(55584),i(38956),i(78944),i(48766),i(73945),i(45048),i(43448),i(61168),i(89995),i(102),i(98762),i(90165),i(25463),i(88088),i(15662),i(64662),i(52614),i(84677),i(79607),i(70943),i(37181),i(86709);var n,o,s,r,a,l,d,h,c,u,g,p,m,f,_,v,b,C,w,y,S,L,x,k,N,D,E,I,T,M,R,A,O,P,F,B=i(38562),W=i(28245),V=i(77538),H=i(96332),z=i(51732),K=i(24028),U=i(78891),j=i(87178),$=i(20365);!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(n||(n={})),function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(o||(o={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(s||(s={})),function(e){e[e.Deprecated=1]="Deprecated"}(r||(r={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(a||(a={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(l||(l={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(d||(d={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(h||(h={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(c||(c={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(u||(u={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingDelete=6]="autoClosingDelete",e[e.autoClosingOvertype=7]="autoClosingOvertype",e[e.autoClosingQuotes=8]="autoClosingQuotes",e[e.autoIndent=9]="autoIndent",e[e.automaticLayout=10]="automaticLayout",e[e.autoSurround=11]="autoSurround",e[e.bracketPairColorization=12]="bracketPairColorization",e[e.guides=13]="guides",e[e.codeLens=14]="codeLens",e[e.codeLensFontFamily=15]="codeLensFontFamily",e[e.codeLensFontSize=16]="codeLensFontSize",e[e.colorDecorators=17]="colorDecorators",e[e.columnSelection=18]="columnSelection",e[e.comments=19]="comments",e[e.contextmenu=20]="contextmenu",e[e.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",e[e.cursorBlinking=22]="cursorBlinking",e[e.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",e[e.cursorStyle=24]="cursorStyle",e[e.cursorSurroundingLines=25]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",e[e.cursorWidth=27]="cursorWidth",e[e.disableLayerHinting=28]="disableLayerHinting",e[e.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",e[e.domReadOnly=30]="domReadOnly",e[e.dragAndDrop=31]="dragAndDrop",e[e.emptySelectionClipboard=32]="emptySelectionClipboard",e[e.extraEditorClassName=33]="extraEditorClassName",e[e.fastScrollSensitivity=34]="fastScrollSensitivity",e[e.find=35]="find",e[e.fixedOverflowWidgets=36]="fixedOverflowWidgets",e[e.folding=37]="folding",e[e.foldingStrategy=38]="foldingStrategy",e[e.foldingHighlight=39]="foldingHighlight",e[e.foldingImportsByDefault=40]="foldingImportsByDefault",e[e.unfoldOnClickAfterEndOfLine=41]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=42]="fontFamily",e[e.fontInfo=43]="fontInfo",e[e.fontLigatures=44]="fontLigatures",e[e.fontSize=45]="fontSize",e[e.fontWeight=46]="fontWeight",e[e.formatOnPaste=47]="formatOnPaste",e[e.formatOnType=48]="formatOnType",e[e.glyphMargin=49]="glyphMargin",e[e.gotoLocation=50]="gotoLocation",e[e.hideCursorInOverviewRuler=51]="hideCursorInOverviewRuler",e[e.hover=52]="hover",e[e.inDiffEditor=53]="inDiffEditor",e[e.inlineSuggest=54]="inlineSuggest",e[e.letterSpacing=55]="letterSpacing",e[e.lightbulb=56]="lightbulb",e[e.lineDecorationsWidth=57]="lineDecorationsWidth",e[e.lineHeight=58]="lineHeight",e[e.lineNumbers=59]="lineNumbers",e[e.lineNumbersMinChars=60]="lineNumbersMinChars",e[e.linkedEditing=61]="linkedEditing",e[e.links=62]="links",e[e.matchBrackets=63]="matchBrackets",e[e.minimap=64]="minimap",e[e.mouseStyle=65]="mouseStyle",e[e.mouseWheelScrollSensitivity=66]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=67]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=68]="multiCursorMergeOverlapping",e[e.multiCursorModifier=69]="multiCursorModifier",e[e.multiCursorPaste=70]="multiCursorPaste",e[e.occurrencesHighlight=71]="occurrencesHighlight",e[e.overviewRulerBorder=72]="overviewRulerBorder",e[e.overviewRulerLanes=73]="overviewRulerLanes",e[e.padding=74]="padding",e[e.parameterHints=75]="parameterHints",e[e.peekWidgetDefaultFocus=76]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=77]="definitionLinkOpensInPeek",e[e.quickSuggestions=78]="quickSuggestions",e[e.quickSuggestionsDelay=79]="quickSuggestionsDelay",e[e.readOnly=80]="readOnly",e[e.renameOnType=81]="renameOnType",e[e.renderControlCharacters=82]="renderControlCharacters",e[e.renderFinalNewline=83]="renderFinalNewline",e[e.renderLineHighlight=84]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=85]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=86]="renderValidationDecorations",e[e.renderWhitespace=87]="renderWhitespace",e[e.revealHorizontalRightPadding=88]="revealHorizontalRightPadding",e[e.roundedSelection=89]="roundedSelection",e[e.rulers=90]="rulers",e[e.scrollbar=91]="scrollbar",e[e.scrollBeyondLastColumn=92]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=93]="scrollBeyondLastLine",e[e.scrollPredominantAxis=94]="scrollPredominantAxis",e[e.selectionClipboard=95]="selectionClipboard",e[e.selectionHighlight=96]="selectionHighlight",e[e.selectOnLineNumbers=97]="selectOnLineNumbers",e[e.showFoldingControls=98]="showFoldingControls",e[e.showUnused=99]="showUnused",e[e.snippetSuggestions=100]="snippetSuggestions",e[e.smartSelect=101]="smartSelect",e[e.smoothScrolling=102]="smoothScrolling",e[e.stickyTabStops=103]="stickyTabStops",e[e.stopRenderingLineAfter=104]="stopRenderingLineAfter",e[e.suggest=105]="suggest",e[e.suggestFontSize=106]="suggestFontSize",e[e.suggestLineHeight=107]="suggestLineHeight",e[e.suggestOnTriggerCharacters=108]="suggestOnTriggerCharacters",e[e.suggestSelection=109]="suggestSelection",e[e.tabCompletion=110]="tabCompletion",e[e.tabIndex=111]="tabIndex",e[e.unusualLineTerminators=112]="unusualLineTerminators",e[e.useShadowDOM=113]="useShadowDOM",e[e.useTabStops=114]="useTabStops",e[e.wordSeparators=115]="wordSeparators",e[e.wordWrap=116]="wordWrap",e[e.wordWrapBreakAfterCharacters=117]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=118]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=119]="wordWrapColumn",e[e.wordWrapOverride1=120]="wordWrapOverride1",e[e.wordWrapOverride2=121]="wordWrapOverride2",e[e.wrappingIndent=122]="wrappingIndent",e[e.wrappingStrategy=123]="wrappingStrategy",e[e.showDeprecated=124]="showDeprecated",e[e.inlayHints=125]="inlayHints",e[e.editorClassName=126]="editorClassName",e[e.pixelRatio=127]="pixelRatio",e[e.tabFocusMode=128]="tabFocusMode",e[e.layoutInfo=129]="layoutInfo",e[e.wrappingInfo=130]="wrappingInfo"}(g||(g={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(p||(p={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(m||(m={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(f||(f={})),function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(_||(_={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(v||(v={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.Semicolon=80]="Semicolon",e[e.Equal=81]="Equal",e[e.Comma=82]="Comma",e[e.Minus=83]="Minus",e[e.Period=84]="Period",e[e.Slash=85]="Slash",e[e.Backquote=86]="Backquote",e[e.BracketLeft=87]="BracketLeft",e[e.Backslash=88]="Backslash",e[e.BracketRight=89]="BracketRight",e[e.Quote=90]="Quote",e[e.OEM_8=91]="OEM_8",e[e.IntlBackslash=92]="IntlBackslash",e[e.Numpad0=93]="Numpad0",e[e.Numpad1=94]="Numpad1",e[e.Numpad2=95]="Numpad2",e[e.Numpad3=96]="Numpad3",e[e.Numpad4=97]="Numpad4",e[e.Numpad5=98]="Numpad5",e[e.Numpad6=99]="Numpad6",e[e.Numpad7=100]="Numpad7",e[e.Numpad8=101]="Numpad8",e[e.Numpad9=102]="Numpad9",e[e.NumpadMultiply=103]="NumpadMultiply",e[e.NumpadAdd=104]="NumpadAdd",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=106]="NumpadSubtract",e[e.NumpadDecimal=107]="NumpadDecimal",e[e.NumpadDivide=108]="NumpadDivide",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.AudioVolumeMute=112]="AudioVolumeMute",e[e.AudioVolumeUp=113]="AudioVolumeUp",e[e.AudioVolumeDown=114]="AudioVolumeDown",e[e.BrowserSearch=115]="BrowserSearch",e[e.BrowserHome=116]="BrowserHome",e[e.BrowserBack=117]="BrowserBack",e[e.BrowserForward=118]="BrowserForward",e[e.MediaTrackNext=119]="MediaTrackNext",e[e.MediaTrackPrevious=120]="MediaTrackPrevious",e[e.MediaStop=121]="MediaStop",e[e.MediaPlayPause=122]="MediaPlayPause",e[e.LaunchMediaPlayer=123]="LaunchMediaPlayer",e[e.LaunchMail=124]="LaunchMail",e[e.LaunchApp2=125]="LaunchApp2",e[e.MAX_VALUE=126]="MAX_VALUE"}(b||(b={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(C||(C={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(w||(w={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(y||(y={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(S||(S={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(L||(L={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(x||(x={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(k||(k={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(N||(N={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(D||(D={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(E||(E={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(I||(I={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(T||(T={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(M||(M={})),function(e){e[e.Deprecated=1]="Deprecated"}(R||(R={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(A||(A={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(O||(O={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(P||(P={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(F||(F={}));class q{static chord(e,t){return(0,H.gx)(e,t)}}function Z(){return{editor:void 0,languages:void 0,CancellationTokenSource:W.A,Emitter:V.Q5,KeyCode:b,KeyMod:q,Position:K.L,Range:U.e,Selection:j.Y,SelectionDirection:I,MarkerSeverity:C,MarkerTag:w,Uri:z.o,Token:$.WU}}q.CtrlCmd=2048,q.Shift=1024,q.Alt=512,q.WinCtrl=256;var G=i(93379),Q=i.n(G),Y=i(7795),J=i.n(Y),X=i(90569),ee=i.n(X),te=i(3565),ie=i.n(te),ne=i(19216),oe=i.n(ne),se=i(44589),re=i.n(se),ae=i(49644),le={};le.styleTagTransform=re(),le.setAttributes=ie(),le.insert=ee().bind(null,"head"),le.domAPI=J(),le.insertStyleElement=oe(),Q()(ae.Z,le),ae.Z&&ae.Z.locals&&ae.Z.locals;var de,he=i(96615),ce=i(48696),ue=i(87022),ge=i(82173),pe=i(32094),me=i(31633),fe=i(82219),_e=i(34622);!function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(de||(de={}));var ve=i(49048),be=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ce=function(e,t){return function(i,n){t(i,n,e)}},we=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let ye=class{constructor(e){this._commandService=e}open(e,t){return we(this,void 0,void 0,(function*(){if(!(0,ve.xn)(e,me.lg.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;"string"==typeof e&&(e=z.o.parse(e));let i=[];try{i=(0,pe.Q)(decodeURIComponent(e.query))}catch(t){try{i=(0,pe.Q)(e.query)}catch(e){}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0}))}};ye=be([Ce(0,_e.H)],ye);let Se=class{constructor(e){this._editorService=e}open(e,t){return we(this,void 0,void 0,(function*(){let i;"string"==typeof e&&(e=z.o.parse(e));const n=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);return n&&(i={startLineNumber:parseInt(n[1]),startColumn:n[2]?parseInt(n[2]):1},e=e.with({fragment:""})),e.scheme===me.lg.file&&(e=(0,fe.AH)(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,context:(null==t?void 0:t.fromUserGesture)?de.USER:de.API},null==t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}))}};Se=be([Ce(0,he.$)],Se);let Le=class{constructor(e,t){this._openers=new ue.S,this._validators=new ue.S,this._resolvers=new ue.S,this._resolvedUriTargets=new ge.Y9((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new ue.S,this._defaultExternalOpener={openExternal:e=>we(this,void 0,void 0,(function*(){return(0,ve.xn)(e,me.lg.http)||(0,ve.xn)(e,me.lg.https)?ce.V3(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>we(this,void 0,void 0,(function*(){return!!((null==t?void 0:t.openExternal)||(0,ve.xn)(e,me.lg.mailto)||(0,ve.xn)(e,me.lg.http)||(0,ve.xn)(e,me.lg.https))&&(yield this._doOpenExternal(e,t),!0)}))}),this._openers.push(new ye(t)),this._openers.push(new Se(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,t){var i;return we(this,void 0,void 0,(function*(){const n="string"==typeof e?z.o.parse(e):e,o=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:e;for(const e of this._validators)if(!(yield e.shouldOpen(o)))return!1;for(const i of this._openers)if(yield i.open(e,t))return!0;return!1}))}resolveExternalUri(e,t){return we(this,void 0,void 0,(function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch(e){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return we(this,void 0,void 0,(function*(){const i="string"==typeof e?z.o.parse(e):e;let n,o;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch(e){n=i}if(o="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners)if(yield t.openExternal(o,{sourceUri:i,preferredOpenerId:e},W.T.None))return!0}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},W.T.None)}))}dispose(){this._validators.clear()}};Le=be([Ce(0,he.$),Ce(1,_e.H)],Le);var xe=i(90143),ke=i(18146),Ne=i(35389),De=i(66054),Ee=i(18339),Ie=i(63866),Te=i(33930),Me=i(34587),Re=i(6709),Ae=i(10554),Oe=i(48646),Pe=i(98147),Fe=i(84483),Be=i(56718),We=i(96024);let Ve=!1;function He(e){Fe.$L&&(Ve||(Ve=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class ze{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.method=i,this.args=n,this.type=0}}class Ke{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class Ue{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.eventName=i,this.arg=n,this.type=2}}class je{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class $e{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class qe{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const i=String(++this._lastSentReq);return new Promise(((n,o)=>{this._pendingReplies[i]={resolve:n,reject:o},this._send(new ze(this._workerId,i,e,t))}))}listen(e,t){let i=null;const n=new V.Q5({onFirstListenerAdd:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new Ue(this._workerId,i,e,t))},onLastListenerRemove:()=>{this._pendingEmitters.delete(i),this._send(new $e(this._workerId,i)),i=null}});return n.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");let t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){let t=e.req;this._handler.handleMessage(e.method,e.args).then((e=>{this._send(new Ke(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,Pe.ri)(e.detail)),this._send(new Ke(this._workerId,t,void 0,(0,Pe.ri)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.eventName,e.arg)((e=>{this._send(new je(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){let t=[];if(0===e.type)for(let i=0;i<e.args.length;i++)e.args[i]instanceof ArrayBuffer&&t.push(e.args[i]);else 1===e.type&&e.res instanceof ArrayBuffer&&t.push(e.res);this._handler.sendMessage(e,t)}}class Ze extends Oe.JT{constructor(e,t,i){super();let n=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",(e=>{this._protocol.handleMessage(e)}),(e=>{n&&n(e)}))),this._protocol=new qe({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(e){return Promise.reject(e)}},handleEvent:(e,t)=>{if(Qe(e)){const n=i[e].call(i,t);if("function"!=typeof n)throw new Error(`Missing dynamic event ${e} on main thread host.`);return n}if(Ge(e)){const t=i[e];if("function"!=typeof t)throw new Error(`Missing event ${e} on main thread host.`);return t}throw new Error(`Malformed event name ${e}`)}}),this._protocol.setWorkerId(this._worker.getId());let o=null;void 0!==Fe.li.require&&"function"==typeof Fe.li.require.getConfig?o=Fe.li.require.getConfig():void 0!==Fe.li.requirejs&&(o=Fe.li.requirejs.s.contexts._.config);const s=Be.$E(i);this._onModuleLoaded=this._protocol.sendMessage("$initialize",[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,s]);const r=(e,t)=>this._request(e,t),a=(e,t)=>this._protocol.listen(e,t);this._lazyProxy=new Promise(((e,i)=>{n=i,this._onModuleLoaded.then((t=>{e(function(e,t,i){const n=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o=e=>function(t){return i(e,t)};let s={};for(const t of e)Qe(t)?s[t]=o(t):Ge(t)?s[t]=i(t,void 0):s[t]=n(t);return s}(t,r,a))}),(e=>{i(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((i,n)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(i,n)}),n)}))}_onError(e,t){console.error(e),console.info(t)}}function Ge(e){return"o"===e[0]&&"n"===e[1]&&We.df(e.charCodeAt(2))}function Qe(e){return/^onDynamic/.test(e)&&We.df(e.charCodeAt(9))}var Ye;const Je=null===(Ye=window.trustedTypes)||void 0===Ye?void 0:Ye.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});class Xe{constructor(e,t,i,n,o){this.id=t;const s=function(e,t){if(Fe.li.MonacoEnvironment){if("function"==typeof Fe.li.MonacoEnvironment.getWorker)return Fe.li.MonacoEnvironment.getWorker(e,t);if("function"==typeof Fe.li.MonacoEnvironment.getWorkerUrl){const i=Fe.li.MonacoEnvironment.getWorkerUrl(e,t);return new Worker(Je?Je.createScriptURL(i):i,{name:t})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}("workerMain.js",i);"function"==typeof s.then?this.worker=s:this.worker=Promise.resolve(s),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=o,"function"==typeof e.addEventListener&&e.addEventListener("error",o)}))}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then((i=>i.postMessage(e,t)))}dispose(){this.worker&&this.worker.then((e=>e.terminate())),this.worker=null}}class et{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){let n=++et.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new Xe(e,n,this._label||"anonymous"+n,t,(e=>{He(e),this._webWorkerFailedBeforeError=e,i(e)}))}}et.LAST_WORKER_ID=0;var tt=i(16742),it=i(68081);function nt(e,t,i,n){return new it.Hs(e,t,i).ComputeDiff(n)}class ot{constructor(e){const t=[],i=[];for(let n=0,o=e.length;n<o;n++)t[n]=dt(e[n],1),i[n]=ht(e[n],1);this.lines=e,this._startColumns=t,this._endColumns=i}getElements(){const e=[];for(let t=0,i=this.lines.length;t<i;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,t,i){const n=[],o=[],s=[];let r=0;for(let a=t;a<=i;a++){const t=this.lines[a],i=e?this._startColumns[a]:1,l=e?this._endColumns[a]:t.length+1;for(let e=i;e<l;e++)n[r]=t.charCodeAt(e-1),o[r]=a+1,s[r]=e,r++}return new st(n,o,s)}}class st{constructor(e,t,i){this._charCodes=e,this._lineNumbers=t,this._columns=i}getElements(){return this._charCodes}getStartLineNumber(e){return this._lineNumbers[e]}getStartColumn(e){return this._columns[e]}getEndLineNumber(e){return this._lineNumbers[e]}getEndColumn(e){return this._columns[e]+1}}class rt{constructor(e,t,i,n,o,s,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=o,this.modifiedStartColumn=s,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){let n,o,s,r,a,l,d,h;return 0===e.originalLength?(n=0,o=0,s=0,r=0):(n=t.getStartLineNumber(e.originalStart),o=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1)),0===e.modifiedLength?(a=0,l=0,d=0,h=0):(a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),d=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),h=i.getEndColumn(e.modifiedStart+e.modifiedLength-1)),new rt(n,o,s,r,a,l,d,h)}}class at{constructor(e,t,i,n,o){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=o}static createFromDiffResult(e,t,i,n,o,s,r){let a,l,d,h,c;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(d=n.getStartLineNumber(t.modifiedStart)-1,h=0):(d=n.getStartLineNumber(t.modifiedStart),h=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const s=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let l=nt(s,a,o,!0).changes;r&&(l=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n<o;n++){const o=e[n],s=o.originalStart-(i.originalStart+i.originalLength),r=o.modifiedStart-(i.modifiedStart+i.modifiedLength);Math.min(s,r)<3?(i.originalLength=o.originalStart+o.originalLength-i.originalStart,i.modifiedLength=o.modifiedStart+o.modifiedLength-i.modifiedStart):(t.push(o),i=o)}return t}(l)),c=[];for(let e=0,t=l.length;e<t;e++)c.push(rt.createFromDiffChange(l[e],s,a))}return new at(a,l,d,h,c)}}class lt{constructor(e,t,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new ot(e),this.modified=new ot(t),this.continueLineDiff=ct(i.maxComputationTime),this.continueCharDiff=ct(0===i.maxComputationTime?0:Math.min(i.maxComputationTime,5e3))}computeDiff(){if(1===this.original.lines.length&&0===this.original.lines[0].length)return 1===this.modified.lines.length&&0===this.modified.lines[0].length?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(1===this.modified.lines.length&&0===this.modified.lines[0].length)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const e=nt(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,i=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const e=[];for(let i=0,n=t.length;i<n;i++)e.push(at.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[i],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:i,changes:e}}const n=[];let o=0,s=0;for(let e=-1,i=t.length;e<i;e++){const r=e+1<i?t[e+1]:null,a=r?r.originalStart:this.originalLines.length,l=r?r.modifiedStart:this.modifiedLines.length;for(;o<a&&s<l;){const e=this.originalLines[o],t=this.modifiedLines[s];if(e!==t){{let i=dt(e,1),r=dt(t,1);for(;i>1&&r>1&&e.charCodeAt(i-2)===t.charCodeAt(r-2);)i--,r--;(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,s+1,1,r)}{let i=ht(e,1),r=ht(t,1);const a=e.length+1,l=t.length+1;for(;i<a&&r<l&&e.charCodeAt(i-1)===e.charCodeAt(r-1);)i++,r++;(i<a||r<l)&&this._pushTrimWhitespaceCharChange(n,o+1,i,a,s+1,r,l)}}o++,s++}r&&(n.push(at.createFromDiffResult(this.shouldIgnoreTrimWhitespace,r,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),o+=r.originalLength,s+=r.modifiedLength)}return{quitEarly:i,changes:n}}_pushTrimWhitespaceCharChange(e,t,i,n,o,s,r){if(this._mergeTrimWhitespaceCharChange(e,t,i,n,o,s,r))return;let a;this.shouldComputeCharChanges&&(a=[new rt(t,i,t,n,o,s,o,r)]),e.push(new at(t,t,o,o,a))}_mergeTrimWhitespaceCharChange(e,t,i,n,o,s,r){const a=e.length;if(0===a)return!1;const l=e[a-1];return 0!==l.originalEndLineNumber&&0!==l.modifiedEndLineNumber&&l.originalEndLineNumber+1===t&&l.modifiedEndLineNumber+1===o&&(l.originalEndLineNumber=t,l.modifiedEndLineNumber=o,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new rt(t,i,t,n,o,s,o,r)),!0)}}function dt(e,t){const i=We.LC(e);return-1===i?t:i+1}function ht(e,t){const i=We.ow(e);return-1===i?t:i+2}function ct(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}var ut=i(91445);class gt{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new K.L(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;n<t;n++)i[n]=this._lines[n].length+e;this._lineStarts=new ut.o(i)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}}_acceptInsertText(e,t){if(0===t.length)return;let i=(0,We.uq)(t);if(1===i.length)return void this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]+this._lines[e.lineNumber-1].substring(e.column-1));i[i.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]);let n=new Uint32Array(i.length-1);for(let t=1;t<i.length;t++)this._lines.splice(e.lineNumber+t-1,0,i[t]),n[t-1]=i[t].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,n)}}var pt=i(42584),mt=i(89745);class ft{constructor(e,t,i){const n=new Uint8Array(e*t);for(let o=0,s=e*t;o<s;o++)n[o]=i;this._data=n,this.rows=e,this.cols=t}get(e,t){return this._data[e*this.cols+t]}set(e,t,i){this._data[e*this.cols+t]=i}}class _t{constructor(e){let t=0,i=0;for(let n=0,o=e.length;n<o;n++){let[o,s,r]=e[n];s>t&&(t=s),o>i&&(i=o),r>i&&(i=r)}t++,i++;let n=new ft(i,t,0);for(let t=0,i=e.length;t<i;t++){let[i,o,s]=e[t];n.set(i,o,s)}this._states=n,this._maxCharCode=t}nextState(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)}}let vt=null,bt=null;class Ct{static _createLink(e,t,i,n,o){let s=o-1;do{const i=t.charCodeAt(s);if(2!==e.get(i))break;s--}while(s>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(s);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&s--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:s+2},url:t.substring(n,s+1)}}static computeLinks(e,t=function(){return null===vt&&(vt=new _t([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),vt}()){const i=function(){if(null===bt){bt=new mt.N(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t<e.length;t++)bt.set(e.charCodeAt(t),1);const t=".,;";for(let e=0;e<t.length;e++)bt.set(t.charCodeAt(e),2)}return bt}();let n=[];for(let o=1,s=e.getLineCount();o<=s;o++){const s=e.getLineContent(o),r=s.length;let a=0,l=0,d=0,h=1,c=!1,u=!1,g=!1,p=!1;for(;a<r;){let e=!1;const r=s.charCodeAt(a);if(13===h){let t;switch(r){case 40:c=!0,t=0;break;case 41:t=c?0:1;break;case 91:g=!0,u=!0,t=0;break;case 93:g=!1,t=u?0:1;break;case 123:p=!0,t=0;break;case 125:t=p?0:1;break;case 39:t=34===d||96===d?0:1;break;case 34:t=39===d||96===d?0:1;break;case 96:t=39===d||34===d?0:1;break;case 42:t=42===d?1:0;break;case 124:t=124===d?1:0;break;case 32:t=g?0:1;break;default:t=i.get(r)}1===t&&(n.push(Ct._createLink(i,s,o,l,a)),e=!0)}else if(12===h){let t;91===r?(u=!0,t=0):t=i.get(r),1===t?e=!0:h=13}else h=t.nextState(h,r),0===h&&(e=!0);e&&(h=1,c=!1,u=!1,p=!1,l=a+1,d=r),a++}13===h&&n.push(Ct._createLink(i,s,o,l,r))}return n}}class wt{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,i,n,o){if(e&&t){let i=this.doNavigateValueSet(t,o);if(i)return{range:e,value:i}}if(i&&n){let e=this.doNavigateValueSet(n,o);if(e)return{range:i,value:e}}return null}doNavigateValueSet(e,t){let i=this.numberReplace(e,t);return null!==i?i:this.textReplace(e,t)}numberReplace(e,t){let i=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),n=Number(e),o=parseFloat(e);return isNaN(n)||isNaN(o)||n!==o?null:0!==n||t?(n=Math.floor(n*i),n+=t?i:-i,String(n/i)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,i){let n=null;for(let o=0,s=e.length;null===n&&o<s;o++)n=this.valueSetReplace(e[o],t,i);return n}valueSetReplace(e,t,i){let n=e.indexOf(t);return n>=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}wt.INSTANCE=new wt;var yt=i(42267),St=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Lt extends gt{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){let i=(0,pt.t2)(e.column,(0,pt.eq)(t),this._lines[e.lineNumber-1],0);return i?new U.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){const t=this._lines,i=this._wordenize.bind(this);let n=0,o="",s=0,r=[];return{*[Symbol.iterator](){for(;;)if(s<r.length){const e=o.substring(r[s].start,r[s].end);s+=1,yield e}else{if(!(n<t.length))break;o=t[n],r=i(o,e),s=0,n+=1}}}}getLineWords(e,t){let i=this._lines[e-1],n=this._wordenize(i,t),o=[];for(const e of n)o.push({word:i.substring(e.start,e.end),startColumn:e.start+1,endColumn:e.end+1});return o}_wordenize(e,t){const i=[];let n;for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)i.push({start:n.index,end:n.index+n[0].length});return i}getValueInRange(e){if((e=this._validateRange(e)).startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let t=this._eol,i=e.startLineNumber-1,n=e.endLineNumber-1,o=[];o.push(this._lines[i].substring(e.startColumn-1));for(let e=i+1;e<n;e++)o.push(this._lines[e]);return o.push(this._lines[n].substring(0,e.endColumn-1)),o.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let t=this._lineStarts.getIndexOf(e),i=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,i)}}_validateRange(e){const t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),i=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||i.lineNumber!==e.endLineNumber||i.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}:e}_validatePosition(e){if(!K.L.isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:i}=e,n=!1;if(t<1)t=1,i=1,n=!0;else if(t>this._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{let e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class xt{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new Lt(z.o.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeDiff(e,t,i,n){return St(this,void 0,void 0,(function*(){const o=this._getModel(e),s=this._getModel(t);if(!o||!s)return null;const r=o.getLinesContent(),a=s.getLinesContent(),l=new lt(r,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:n}).computeDiff(),d=!(l.changes.length>0)&&this._modelsAreIdentical(o,s);return{quitEarly:l.quitEarly,identical:d,changes:l.changes}}))}_modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++)if(e.getLineContent(n)!==t.getLineContent(n))return!1;return!0}computeMoreMinimalEdits(e,t){return St(this,void 0,void 0,(function*(){const i=this._getModel(e);if(!i)return t;const n=[];let o;t=t.slice(0).sort(((e,t)=>e.range&&t.range?U.e.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));for(let{range:e,text:s,eol:r}of t){if("number"==typeof r&&(o=r),U.e.isEmpty(e)&&!s)continue;const t=i.getValueInRange(e);if(s=s.replace(/\r\n|\n|\r/g,i.eol),t===s)continue;if(Math.max(s.length,t.length)>xt._diffLimit){n.push({range:e,text:s});continue}const a=(0,it.a$)(t,s,!1),l=i.offsetAt(U.e.lift(e).getStartPosition());for(const e of a){const t=i.positionAt(l+e.originalStart),o=i.positionAt(l+e.originalStart+e.originalLength),r={text:s.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:o.lineNumber,endColumn:o.column}};i.getValueInRange(r.range)!==r.text&&n.push(r)}}return"number"==typeof o&&n.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),n}))}computeLinks(e){return St(this,void 0,void 0,(function*(){let t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?Ct.computeLinks(e):[]}(t):null}))}textualSuggest(e,t,i,n){return St(this,void 0,void 0,(function*(){const o=new yt.G(!0),s=new RegExp(i,n),r=new Set;e:for(let i of e){const e=this._getModel(i);if(e)for(let i of e.words(s))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>xt._suggestionsLimit))break e}return{words:Array.from(r),duration:o.elapsed()}}))}computeWordRanges(e,t,i,n){return St(this,void 0,void 0,(function*(){let o=this._getModel(e);if(!o)return Object.create(null);const s=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;e<t.endLineNumber;e++){let t=o.getLineWords(e,s);for(const i of t){if(!isNaN(Number(i.word)))continue;let t=r[i.word];t||(t=[],r[i.word]=t),t.push({startLineNumber:e,startColumn:i.startColumn,endLineNumber:e,endColumn:i.endColumn})}}return r}))}navigateValueSet(e,t,i,n,o){return St(this,void 0,void 0,(function*(){let s=this._getModel(e);if(!s)return null;let r=new RegExp(n,o);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});let a=s.getValueInRange(t),l=s.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},r);if(!l)return null;let d=s.getValueInRange(l);return wt.INSTANCE.navigateValueSet(t,a,l,d,i)}))}loadForeignModule(e,t,i){let n={host:Be.IU(i,((e,t)=>this._host.fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(n,t),Promise.resolve(Be.$E(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}xt._diffLimit=1e5,xt._suggestionsLimit=1e4,"function"==typeof importScripts&&(Fe.li.monaco=Z());var kt=i(35208),Nt=i(4849),Dt=i(76345),Et=i(71481),It=function(e,t){return function(i,n){t(i,n,e)}},Tt=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function Mt(e,t){let i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let Rt=class extends Oe.JT{constructor(e,t,i){super(),this._modelService=e,this._workerManager=this._register(new Ot(this._modelService)),this._logService=i,this._register(Ee.pM.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(e,t)=>Mt(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(Ee.KZ.register("*",new At(this._workerManager,t,this._modelService)))}dispose(){super.dispose()}computeDiff(e,t,i,n){return this._workerManager.withWorker().then((o=>o.computeDiff(e,t,i,n)))}computeMoreMinimalEdits(e,t){if((0,Dt.Of)(t)){if(!Mt(this._modelService,e))return Promise.resolve(t);const i=yt.G.create(!0),n=this._workerManager.withWorker().then((i=>i.computeMoreMinimalEdits(e,t)));return n.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed()))),Promise.race([n,(0,Ae.Vs)(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return Mt(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return Mt(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}};Rt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([It(0,kt.q),It(1,Nt.V),It(2,Et.VZ)],Rt);class At{constructor(e,t,i){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return Tt(this,void 0,void 0,(function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestionsMode)Mt(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())Mt(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestionsMode&&t.getLanguageId()!==e.getLanguageId()||n.push(t.uri));if(0===n.length)return;const o=tt.zu.getWordDefinition(e.getLanguageId()),s=e.getWordAtPosition(t),r=s?new U.e(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):U.e.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),d=yield l.textualSuggest(n,null==s?void 0:s.word,o);return d?{duration:d.duration,suggestions:d.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}))}}class Ot extends Oe.JT{constructor(e){super(),this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new Ae.zh).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4)),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new Wt(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class Pt extends Oe.JT{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){let e=new Ae.zh;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(let e in this._syncedModels)(0,Oe.B9)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){let e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){let e=(new Date).getTime(),t=[];for(let i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>6e4&&t.push(i);for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){let i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;let n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const o=new Oe.SL;o.add(i.onDidChangeContent((e=>{this._proxy.acceptModelChanged(n.toString(),e)}))),o.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),o.add((0,Oe.OF)((()=>{this._proxy.acceptRemovedModel(n)}))),this._syncedModels[n]=o}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,Oe.B9)(t)}}class Ft{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Bt{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class Wt extends Oe.JT{constructor(e,t,i){super(),this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new et(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new Ze(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Bt(this)))}catch(e){He(e),this._worker=new Ft(new xt(new Bt(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(He(e),this._worker=new Ft(new xt(new Bt(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new Pt(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return Tt(this,void 0,void 0,(function*(){return this._disposed?Promise.reject((0,Pe.F0)()):this._getProxy().then((i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i)))}))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then((o=>o.computeDiff(e.toString(),t.toString(),i,n)))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then((i=>i.computeMoreMinimalEdits(e.toString(),t)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}textualSuggest(e,t,i){return Tt(this,void 0,void 0,(function*(){const n=yield this._withSyncedResources(e),o=i.source,s=(0,We.mr)(i);return n.textualSuggest(e.map((e=>e.toString())),t,o,s)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then((i=>{let n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);let o=tt.zu.getWordDefinition(n.getLanguageId()),s=o.source,r=(0,We.mr)(o);return i.computeWordRanges(e.toString(),t,s,r)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{let o=this._modelService.getModel(e);if(!o)return null;let s=tt.zu.getWordDefinition(o.getLanguageId()),r=s.source,a=(0,We.mr)(s);return n.navigateValueSet(e.toString(),t,i,r,a)}))}dispose(){super.dispose(),this._disposed=!0}}class Vt extends Wt{constructor(e,t){super(e,t.keepIdleModels||!1,t.label),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?Be.$E(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let o={};for(const e of t)o[e]=n(e,i);return o}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then((e=>this.getProxy()))}}var Ht,zt=i(12062),Kt=i(12954),Ut=i(76830);function jt(e){return"string"==typeof e}function $t(e){return!jt(e)}function qt(e){return!e}function Zt(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Gt(e){return e.replace(/[&<>'"_]/g,"-")}function Qt(e,t){return new Error(`${e.languageId}: ${t}`)}function Yt(e,t,i,n,o){let s=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,r,a,l,d,h,c,u,g){return qt(a)?qt(l)?!qt(d)&&d<n.length?Zt(e,n[d]):!qt(c)&&e&&"string"==typeof e[c]?e[c]:(null===s&&(s=o.split("."),s.unshift(o)),!qt(h)&&h<s.length?Zt(e,s[h]):""):Zt(e,i):"$"}))}function Jt(e,t){let i=t;for(;i&&i.length>0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}class Xt{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new ei(e,t);let i=ei.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new ei(e,t),this._entries[i]=n,n)}}Xt._INSTANCE=new Xt(5);class ei{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return ei._equals(this,e)}push(e){return Xt.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Xt.create(this.parent,e)}}class ti{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new ti(this.languageId,this.state)}}class ii{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==t)return new ni(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new ni(e,t);let i=ei.getStackElementId(e),n=this._entries[i];return n||(n=new ni(e,null),this._entries[i]=n,n)}}ii._INSTANCE=new ii(5);class ni{constructor(e,t){this.stack=e,this.embeddedModeData=t}clone(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:ii.create(this.stack,this.embeddedModeData)}equals(e){return e instanceof ni&&!!this.stack.equals(e.stack)&&(null===this.embeddedModeData&&null===e.embeddedModeData||null!==this.embeddedModeData&&null!==e.embeddedModeData&&this.embeddedModeData.equals(e.embeddedModeData))}}class oi{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(e,t){this._languageId=t}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new $.WU(e,t,this._languageId)))}nestedModeTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=Ee.RW.get(o);if(!r)return this.enterMode(n,o),this.emit(n,""),s;let a=r.tokenize(e,t,s,n);return this._tokens=this._tokens.concat(a.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new $.hG(this._tokens,e)}}class si{constructor(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(e,t){this._currentLanguageId=this._modeService.languageIdCodec.encodeLanguageId(t)}emit(e,t){let i=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){let n=null!==e?e.length:0,o=t.length,s=null!==i?i.length:0;if(0===n&&0===o&&0===s)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===s)return e;let r=new Uint32Array(n+o+s);null!==e&&r.set(e);for(let e=0;e<o;e++)r[n+e]=t[e];return null!==i&&r.set(i,n+o),r}nestedModeTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=Ee.RW.get(o);if(!r)return this.enterMode(n,o),this.emit(n,""),s;let a=r.tokenize2(e,t,s,n);return this._prependTokens=si._merge(this._prependTokens,this._tokens,a.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,a.endState}finalize(e){return new $.Hi(si._merge(this._prependTokens,this._tokens,null),e)}}class ri{constructor(e,t,i,n){this._modeService=e,this._standaloneThemeService=t,this._languageId=i,this._lexer=n,this._embeddedModes=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let o=!1;this._tokenizationRegistryListener=Ee.RW.onDidChange((e=>{if(o)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i<n;i++){let n=e.changedLanguages[i];if(this._embeddedModes[n]){t=!0;break}}t&&(o=!0,Ee.RW.fire([this._languageId]),o=!1)}))}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){let e=[];for(let t in this._embeddedModes){const i=Ee.RW.get(t);if(i){if(i instanceof ri){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}continue}const n=Ee.RW.getPromise(t);n&&e.push(n)}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then((e=>{}))}}getInitialState(){let e=Xt.create(null,this._lexer.start);return ii.create(e,null)}tokenize(e,t,i,n){let o=new oi,s=this._tokenize(e,t,i,n,o);return o.finalize(s)}tokenize2(e,t,i,n){let o=new si(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),s=this._tokenize(e,t,i,n,o);return o.finalize(s)}_tokenize(e,t,i,n,o){return i.embeddedModeData?this._nestedTokenize(e,t,i,n,o):this._myTokenize(e,t,i,n,o)}_findLeavingNestedModeOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=Jt(this._lexer,t.stack.state),!i))throw Qt(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const t of i){if(!$t(t.action)||"@pop"!==t.action.nextEmbedded)continue;o=!0;let i=t.regex,s=t.regex.source;if("^(?:"===s.substr(0,4)&&")"===s.substr(s.length-1,1)){let e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(s.substr(4,s.length-5),e)}let r=e.search(i);-1===r||0!==r&&t.matchOnlyAtLineStart||(-1===n||r<n)&&(n=r)}if(!o)throw Qt(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state);return n}_nestedTokenize(e,t,i,n,o){let s=this._findLeavingNestedModeOffset(e,i);if(-1===s){let s=o.nestedModeTokenize(e,t,i.embeddedModeData,n);return ii.create(i.stack,new ti(i.embeddedModeData.languageId,s))}let r=e.substring(0,s);r.length>0&&o.nestedModeTokenize(r,!1,i.embeddedModeData,n);let a=e.substring(s);return this._myTokenize(a,t,i,n+s,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,o){o.enterMode(n,this._languageId);const s=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedModeData,d=i.stack,h=0,c=null,u=!0;for(;u||h<a;){const i=h,m=d.depth,f=c?c.groups.length:0,_=d.state;let v=null,b=null,C=null,w=null,y=null;if(c){v=c.matches;const e=c.groups.shift();b=e.matched,C=e.action,w=c.rule,0===c.groups.length&&(c=null)}else{if(!u&&h>=a)break;u=!1;let e=this._lexer.tokenizer[_];if(!e&&(e=Jt(this._lexer,_),!e))throw Qt(this._lexer,"tokenizer state is not defined: "+_);let t=r.substr(h);for(const i of e)if((0===h||!i.matchOnlyAtLineStart)&&(v=t.match(i.regex),v)){b=v[0],C=i.action;break}}if(v||(v=[""],b=""),C||(h<a&&(v=[r.charAt(h)],b=v[0]),C=this._lexer.defaultToken),null===b)break;for(h+=b.length;!function(e){return Array.isArray(e)}(C)&&$t(C)&&C.test;)C=C.test(b,v,_,h===a);let S=null;if("string"==typeof C||Array.isArray(C))S=C;else if(C.group)S=C.group;else if(null!==C.token&&void 0!==C.token){if(S=C.tokenSubst?Yt(this._lexer,C.token,b,v,_):C.token,C.nextEmbedded)if("@pop"===C.nextEmbedded){if(!l)throw Qt(this._lexer,"cannot pop embedded mode if not inside one");l=null}else{if(l)throw Qt(this._lexer,"cannot enter embedded mode from within an embedded mode");y=Yt(this._lexer,C.nextEmbedded,b,v,_)}if(C.goBack&&(h=Math.max(0,h-C.goBack)),C.switchTo&&"string"==typeof C.switchTo){let e=Yt(this._lexer,C.switchTo,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!Jt(this._lexer,e))throw Qt(this._lexer,"trying to switch to a state '"+e+"' that is undefined in rule: "+this._safeRuleName(w));d=d.switchTo(e)}else{if(C.transform&&"function"==typeof C.transform)throw Qt(this._lexer,"action.transform not supported");if(C.next)if("@push"===C.next){if(d.depth>=this._lexer.maxStack)throw Qt(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(_)}else if("@pop"===C.next){if(d.depth<=1)throw Qt(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(w));d=d.pop()}else if("@popall"===C.next)d=d.popall();else{let e=Yt(this._lexer,C.next,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!Jt(this._lexer,e))throw Qt(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(w));d=d.push(e)}}C.log&&"string"==typeof C.log&&(g=this._lexer,p=this._lexer.languageId+": "+Yt(this._lexer,C.log,b,v,_),console.log(`${g.languageId}: ${p}`))}if(null===S)throw Qt(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(w));const L=i=>{let s=this._modeService.getModeIdForLanguageName(i);s&&(i=s);const r=this._getNestedEmbeddedModeData(i);if(h<a){const i=e.substr(h);return this._nestedTokenize(i,t,ii.create(d,r),n+h,o)}return ii.create(d,r)};if(Array.isArray(S)){if(c&&c.groups.length>0)throw Qt(this._lexer,"groups cannot be nested: "+this._safeRuleName(w));if(v.length!==S.length+1)throw Qt(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(w));let e=0;for(let t=1;t<v.length;t++)e+=v[t].length;if(e!==b.length)throw Qt(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(w));c={rule:w,matches:v,groups:[]};for(let e=0;e<S.length;e++)c.groups[e]={action:S[e],matched:v[e+1]};h-=b.length}else{{if("@rematch"===S&&(h-=b.length,b="",v=null,S="",null!==y))return L(y);if(0===b.length){if(0===a||m!==d.depth||_!==d.state||(c?c.groups.length:0)!==f)continue;throw Qt(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(w))}let e=null;if(jt(S)&&0===S.indexOf("@brackets")){let t=S.substr(9),i=ai(this._lexer,b);if(!i)throw Qt(this._lexer,"@brackets token returned but no bracket defined as: "+b);e=Gt(i.token+t)}else e=Gt(""===S?"":S+this._lexer.tokenPostfix);i<s&&o.emit(i+n,e)}if(null!==y)return L(y)}}var g,p;return ii.create(d,l)}_getNestedEmbeddedModeData(e){let t=this._locateMode(e);if(t){let e=Ee.RW.get(t);if(e)return new ti(t,e.getInitialState())}return new ti(t||Ie.TG,Ie.nO)}_locateMode(e){if(!e||!this._modeService.isRegisteredMode(e))return null;if(e===this._languageId)return e;const t=this._modeService.getModeId(e);return t&&(this._modeService.triggerMode(t),this._embeddedModes[t]=!0),t}}function ai(e,t){if(!t)return null;t=Zt(e,t);let i=e.brackets;for(const e of i){if(e.open===t)return{token:e.token,bracketType:1};if(e.close===t)return{token:e.token,bracketType:-1}}return null}const li=null===(Ht=window.trustedTypes)||void 0===Ht?void 0:Ht.createPolicy("standaloneColorizer",{createHTML:e=>e});class di{static colorizeElement(e,t,i,n){let o=(n=n||{}).theme||"vs",s=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();e.setTheme(o);let r=i.firstChild?i.firstChild.nodeValue:"";return i.className+=" "+o,this.colorize(t,r||"",s,n).then((e=>{var t;const n=null!==(t=null==li?void 0:li.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>console.error(e)))}static colorize(e,t,i,n){const o=e.languageIdCodec;let s=4;n&&"number"==typeof n.tabSize&&(s=n.tabSize),We.uS(t)&&(t=t.substr(1));let r=We.uq(t),a=e.getModeId(i);if(!a)return Promise.resolve(ci(r,s,o));e.triggerMode(a);const l=Ee.RW.get(a);if(l)return hi(r,s,l,o);const d=Ee.RW.getPromise(a);return new Promise(d?(e,t)=>{d.then((i=>{hi(r,s,i,o).then(e,t)}),t)}:(e,t)=>{let i=null,n=null;const l=()=>{i&&(i.dispose(),i=null),n&&(n.dispose(),n=null);const l=Ee.RW.get(a);l?hi(r,s,l,o).then(e,t):e(ci(r,s,o))};n=new Ae._F,n.cancelAndSet(l,500),i=Ee.RW.onDidChange((e=>{e.changedLanguages.indexOf(a)>=0&&l()}))})}static colorizeLine(e,t,i,n,o=4){const s=Ut.wA.isBasicASCII(e,t),r=Ut.wA.containsRTL(e,s,i);return(0,Kt.tF)(new Kt.IJ(!1,!0,e,!1,s,r,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){let n=e.getLineContent(t);e.forceTokenization(t);let o=e.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function hi(e,t,i,n){return new Promise(((o,s)=>{const r=()=>{const a=function(e,t,i,n){let o=[],s=i.getInitialState();for(let r=0,a=e.length;r<a;r++){let a=e[r],l=i.tokenize2(a,!0,s,0);zt.A.convertToEndOffset(l.tokens,a.length);let d=new zt.A(l.tokens,a,n);const h=Ut.wA.isBasicASCII(a,!0),c=Ut.wA.containsRTL(a,h,!0);let u=(0,Kt.tF)(new Kt.IJ(!1,!0,a,!1,h,c,0,d.inflate(),[],t,0,0,0,0,-1,"none",!1,!1,null));o=o.concat(u.html),o.push("<br/>"),s=l.endState}return o.join("")}(e,t,i,n);if(i instanceof ri){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,s)}o(a)};r()}))}function ci(e,t,i){let n=[];const o=new Uint32Array(2);o[0]=0,o[1]=16793600;for(let s=0,r=e.length;s<r;s++){let r=e[s];o[0]=r.length;const a=new zt.A(o,r,i),l=Ut.wA.isBasicASCII(r,!0),d=Ut.wA.containsRTL(r,l,!0);let h=(0,Kt.tF)(new Kt.IJ(!1,!0,r,!1,l,d,0,a,[],t,0,0,0,0,-1,"none",!1,!1,null));n=n.concat(h.html),n.push("<br/>")}return n.join("")}var ui=i(63304),gi=i(82095),pi=i(7474),mi=i(40658),fi=i(50994),_i=i(38701),vi=i(14250),bi=i(1826),Ci=i(20620),wi=i(69868);class yi{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?(0,bi.Mt)(this.contents,e):this.contents}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=Ci.I8(this.contents),i=Ci.I8(this.overrides),n=[...this.keys];for(const o of e){this.mergeContents(t,o.contents);for(const e of o.overrides){const[t]=i.filter((t=>Dt.fS(t.identifiers,e.identifiers)));t?this.mergeContents(t.contents,e.contents):i.push(Ci.I8(e))}for(const e of o.keys)-1===n.indexOf(e)&&n.push(e)}return new yi(t,n,i)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;let i={};for(const e of Dt.EB([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e],o=t[e];o&&("object"==typeof n&&"object"==typeof o?(n=Ci.I8(n),this.mergeContents(n,o)):n=o),i[e]=n}return new yi(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&Be.Kn(e[i])&&Be.Kn(t[i])?this.mergeContents(e[i],t[i]):e[i]=Ci.I8(t[i])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?Ci._A(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),(0,bi.KV)(this.contents,e,t,(e=>{throw new Error(e)}))}removeValue(e){this.removeKey(e)&&(0,bi.xL)(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;i<t;i++)0===e.indexOf(this.keys[i])&&(t=i);this.keys.splice(t,1,e)}removeKey(e){let t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)}}class Si extends yi{constructor(){const e=(0,bi.O4)(),t=(0,bi.MR)(),i=[];for(const t of Object.keys(e))wi.G1.test(t)&&i.push({identifiers:[(0,wi.Uh)(t).trim()],keys:Object.keys(e[t]),contents:(0,bi.Od)(e[t],(e=>console.error(`Conflict in default settings file: ${e}`)))});super(e,t,i)}}class Li{constructor(e,t,i=new yi,n=new yi,o=new ge.Y9,s=new yi,r=new ge.Y9,a=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=n,this._folderConfigurations=o,this._memoryConfiguration=s,this._memoryConfigurationByResource=r,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new ge.Y9,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidateConfigurationModel(t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new yi,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?i.override(e.overrideIdentifier):i}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e}),[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.user),n=this.parseConfigurationModel(e.workspace),o=e.folders.reduce(((e,t)=>(e.set(z.o.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new ge.Y9);return new Li(t,i,new yi,n,o,new yi,new ge.Y9,!1)}static parseConfigurationModel(e){return new yi(e.contents,e.keys,e.overrides).freeze()}}class xi{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const o=new Set;e.keys.forEach((e=>o.add(e))),e.overrides.forEach((([,e])=>e.forEach((e=>o.add(e))))),this.affectedKeys=[...o.values()];const s=new yi;this.affectedKeys.forEach((e=>s.setValue(e,{}))),this.affectedKeysTree=s.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Li.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,o=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!Ci.fS(n,o)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i,n=(0,bi.Od)({[t]:!0},(()=>{}));for(;"object"==typeof n&&(i=Object.keys(n)[0]);){if(!(e=e[i]))return!1;n=n[i]}return!0}}var ki=i(85337);const Ni=/^(cursor|delete)/;class Di extends Oe.JT{constructor(e,t,i,n,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=o,this._onDidUpdateKeybindings=this._register(new V.Q5),this._currentChord=null,this._currentChordChecker=new Ae.zh,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Ei.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Ae._F,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:V.ju.None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){const i=this.resolveKeyboardEvent(e);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(null===n)return null;const o=this._contextKeyService.getContext(t),s=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,s,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(ki.N("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-i>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchParts();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Ei.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Ei.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[o]=i.getParts();return this._ignoreSingleModifiers=new Ei(o),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let o=null,s=null;if(i){const[t]=e.getSingleModifierDispatchParts();o=t,s=t}else[o]=e.getDispatchParts(),s=this._currentChord?this._currentChord.keypress:null;if(null===o)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const r=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(r,s,o);return this._logService.trace("KeybindingService#dispatch",a,null==l?void 0:l.commandId),l&&l.enterChord?(n=!0,this._enterChordMode(o,a),n):(this._currentChord&&(l&&l.commandId||(this._notificationService.status(ki.N("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,a),{hideAfter:1e4}),n=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(n=!0),void 0===l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,(e=>this._notificationService.warn(e))),Ni.test(l.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class Ei{constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}Ei.EMPTY=new Ei(null);var Ii=i(72396);class Ti{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let t=0,i=e.length;t<i;t++){const i=e[t].command;i&&this._defaultBoundCommands.set(i,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=Ti.combine(e,t);for(let e=0,t=this._keybindings.length;e<t;e++){let t=this._keybindings[e];0!==t.keypressParts.length&&(t.when&&0===t.when.type||this._addKeyPress(t.keypressParts[0],t))}}static _isTargetedForRemoval(e,t,i,n,o){if(e.command!==n)return!1;if(t&&e.keypressParts[0]!==t)return!1;if(i&&e.keypressParts[1]!==i)return!1;if(o){if(!e.when)return!1;if(!(0,Ii.Fb)(o,e.when))return!1}return!0}static combine(e,t){e=e.slice(0);let i=[];for(const n of t){if(!n.command||0===n.command.length||"-"!==n.command.charAt(0)){i.push(n);continue}const t=n.command.substr(1),o=n.keypressParts[0],s=n.keypressParts[1],r=n.when;for(let i=e.length-1;i>=0;i--)this._isTargetedForRemoval(e[i],o,s,t,r)&&e.splice(i,1)}return e.concat(i)}_addKeyPress(e,t){const i=this._map.get(e);if(void 0===i)return this._map.set(e,[t]),void this._addToLookupMap(t);for(let e=i.length-1;e>=0;e--){let n=i[e];if(n.command===t.command)continue;const o=n.keypressParts.length>1,s=t.keypressParts.length>1;o&&s&&n.keypressParts[1]!==t.keypressParts[1]||Ti.whenIsEntirelyIncluded(n.when,t.when)&&this._removeFromLookupMap(n)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(void 0!==t)for(let i=0,n=t.length;i<n;i++)if(t[i]===e)return void t.splice(i,1)}static whenIsEntirelyIncluded(e,t){return!t||1===t.type||!(!e||1===e.type)&&(0,Ii.K8)(e,t)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,t){const i=this._lookupMap.get(e);if(void 0===i||0===i.length)return null;if(1===i.length)return i[0];for(let e=i.length-1;e>=0;e--){const n=i[e];if(t.contextMatchesRules(n.when))return n}return i[i.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?` chorded from ${t}`:""}`);let n=null;if(null!==t){const e=this._map.get(t);if(void 0===e)return this._log("\\ No keybinding entries."),null;n=[];for(let t=0,o=e.length;t<o;t++){let o=e[t];o.keypressParts[1]===i&&n.push(o)}}else{const e=this._map.get(i);if(void 0===e)return this._log("\\ No keybinding entries."),null;n=e}let o=this._findCommand(e,n);return o?null===t&&o.keypressParts.length>1&&null!==o.keypressParts[1]?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${Mi(o.when)}, source: ${Ri(o)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${o.command}, when: ${Mi(o.when)}, source: ${Ri(o)}.`),{enterChord:!1,leaveChord:o.keypressParts.length>1,commandId:o.command,commandArgs:o.commandArgs,bubble:o.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){let n=t[i];if(Ti.contextMatchesRules(e,n.when))return n}return null}static contextMatchesRules(e,t){return!t||t.evaluate(e)}}function Mi(e){return e?`${e.serialize()}`:"no when condition"}function Ri(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}var Ai=i(95272);class Oi{constructor(e,t,i,n,o,s,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?Pi(e.getDispatchParts()):[],e&&0===this.keypressParts.length&&(this.keypressParts=Pi(e.getSingleModifierDispatchParts())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=o,this.extensionId=s,this.isBuiltinExtension=r}}function Pi(e){let t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n)return t;t.push(n)}return t}var Fi=i(66188);class Bi extends gi.f1{constructor(e,t){if(super(),0===t.length)throw(0,Pe.b1)("parts");this._os=e,this._parts=t}getLabel(){return Fi.xo.toLabel(this._os,this._parts,(e=>this._getLabel(e)))}getAriaLabel(){return Fi.X4.toLabel(this._os,this._parts,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:Fi.jC.toLabel(this._os,this._parts,(e=>this._getElectronAccelerator(e)))}isChord(){return this._parts.length>1}getParts(){return this._parts.map((e=>this._getPart(e)))}_getPart(e){return new gi.BQ(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map((e=>this._getDispatchPart(e)))}getSingleModifierDispatchParts(){return this._parts.map((e=>this._getSingleModifierDispatchPart(e)))}}class Wi extends Bi{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return H.kL.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":H.kL.toString(e.keyCode)}_getElectronAccelerator(e){return H.kL.toElectronAccelerator(e.keyCode)}_getDispatchPart(e){return Wi.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=H.kL.toString(e.keyCode),t}_getSingleModifierDispatchPart(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=H.Vd[e];if(-1!==t)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(e){if(!e)return null;if(e instanceof gi.QC)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new gi.QC(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveUserBinding(e,t){const i=Pi(e.map((e=>this._resolveSimpleUserBinding(e))));return i.length>0?[new Wi(new gi.X_(i),t)]:[]}}var Vi=i(44794),Hi=i(5791),zi=i(17799),Ki=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ui=function(e,t){return function(i,n){t(i,n,e)}},ji=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class $i{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new V.Q5}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let qi=class{constructor(e){this.modelService=e}setEditor(e){this.editor=e}createModelReference(e){let t=null;var i,n,o;return this.editor&&(i=this.editor,n=t=>this.findModel(t,e),o=t=>this.findModel(t.getOriginalEditor(),e)||this.findModel(t.getModifiedEditor(),e),t=(0,mi.CL)(i)?n(i):o(i)),t?Promise.resolve(new Oe.Jz(new $i(t))):Promise.reject(new Error("Model not found"))}findModel(e,t){let i=this.modelService.getModel(t);return i&&i.uri.toString()!==t.toString()?null:i}};qi=Ki([Ui(0,kt.q)],qi);class Zi{show(){return Zi.NULL_PROGRESS_RUNNER}showWhile(e,t){return ji(this,void 0,void 0,(function*(){yield e}))}}Zi.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Gi{confirm(e){return this.doConfirm(e).then((e=>({confirmed:e,checkboxChecked:!1})))}doConfirm(e){let t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}class Qi{info(e){return this.notify({severity:pi.Z.Info,message:e})}warn(e){return this.notify({severity:pi.Z.Warning,message:e})}error(e){return this.notify({severity:pi.Z.Error,message:e})}notify(e){switch(e.severity){case pi.Z.Error:console.error(e.message);break;case pi.Z.Warning:console.warn(e.message);break;default:console.log(e.message)}return Qi.NO_OP}status(e,t){return Oe.JT.None}}Qi.NO_OP=new Vi.EO;class Yi{constructor(e){this._onWillExecuteCommand=new V.Q5,this._onDidExecuteCommand=new V.Q5,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=_e.P.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(e){return Promise.reject(e)}}}class Ji extends Di{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._register(ce.nm(s,ce.tw.KEY_DOWN,(e=>{const t=new ui.y(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),this._register(ce.nm(window,ce.tw.KEY_UP,(e=>{const t=new ui.y(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()})))}addDynamicKeybinding(e,t,i,n){const o=(0,gi.gm)(t,Fe.OS),s=new Oe.SL;return o&&(this._dynamicKeybindings.push({keybinding:o.parts,command:e,when:n,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),s.add((0,Oe.OF)((()=>{for(let t=0;t<this._dynamicKeybindings.length;t++)if(this._dynamicKeybindings[t].command===e)return this._dynamicKeybindings.splice(t,1),void this.updateResolver({source:1})})))),s.add(_e.P.registerCommand(e,i)),this.updateResolver({source:1}),s}updateResolver(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(Ai.W.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new Ti(e,t,(e=>this._log(e)))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){let i=[],n=0;for(const o of e){const e=o.when||void 0,s=o.keybinding;if(s){const r=Wi.resolveUserBinding(s,Fe.OS);for(const s of r)i[n++]=new Oi(s,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new Oi(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){let t=new gi.QC(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new Wi(t,Fe.OS)}}function Xi(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof z.o)}class en{constructor(){this._onDidChangeConfiguration=new V.Q5,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new Li(new Si,new yi)}getValue(e,t){const i="string"==typeof e?e:void 0,n=Xi(e)?e:Xi(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()};let i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new xi({keys:i,overrides:[]},t,this._configuration);e.source=7,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}}class tn{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new V.Q5,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=K.L.isIPosition(t)&&t?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0;return void 0===n?this.configurationService.getValue():this.configurationService.getValue(n)}}let nn=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"==typeof i&&"auto"!==i?i:Fe.IJ||Fe.dz?"\n":"\r\n"}};nn=Ki([Ui(0,bi.Ui)],nn);class on{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class sn{constructor(){const e=z.o.from({scheme:sn.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new Hi.md({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}function rn(e,t,i){if(!t)return;if(!(e instanceof en))return;let n=[];Object.keys(t).forEach((e=>{(0,_i.ei)(e)&&n.push([`editor.${e}`,t[e]]),i&&(0,_i.Pe)(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}sn.SCHEME="inmemory";class an{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return ji(this,void 0,void 0,(function*(){const t=new Map;for(let i of e){if(!(i instanceof fi.Gl))throw new Error("bad edit - only text edits are supported");const e=this._modelService.getModel(i.resource);if(!e)throw new Error("bad edit - model not found");if("number"==typeof i.versionId&&e.getVersionId()!==i.versionId)throw new Error("bad state - model changed in the meantime");let n=t.get(e);n||(n=[],t.set(e,n)),n.push(vi.h.replaceMove(U.e.lift(i.textEdit.range),i.textEdit.text))}let i=0,n=0;for(const[e,o]of t)e.pushStackElement(),e.pushEditOperations([],o,(()=>[])),e.pushStackElement(),n+=1,i+=o.length;return{ariaSummary:We.WU(zi.UL.bulkEditServiceSummary,i,n)}}))}}class ln{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}}class dn{constructor(e,t){this._codeEditorService=e,this._container=t,this.onDidLayout=V.ju.None}get dimension(){return this._dimension||(this._dimension=ce.D6(window.document.body)),this._dimension}get container(){return this._container}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}}var hn=i(40700),cn=i(80197),un=i(88726),gn=i(23385),pn=i(25899),mn=i(58236),fn=i(40094),_n=i(7978),vn=i(42162),bn=i(65700),Cn=i(12088),wn=i(88915),yn=i(61112);class Sn extends Oe.JT{constructor(){super(),this._onCodeEditorAdd=this._register(new V.Q5),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new V.Q5),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new V.Q5),this._onDiffEditorRemove=this._register(new V.Q5),this._onDecorationTypeRegistered=this._register(new V.Q5),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}}class Ln{constructor(e,t,i){this._parent=e,this._editorId=t,this._styleSheet=i,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--,0===this._refCount&&(null===(e=this._styleSheet.parentNode)||void 0===e||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){ce.uN(e,this._styleSheet)}}class xn{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){ce.uN(e,this._styleSheet)}}let kn=class extends Sn{constructor(e,t){super(),this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=e||null,this._themeService=t}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new xn(ce.dS())),this._globalStyleSheet}_getOrCreateStyleSheet(e){if(!e)return this._getOrCreateGlobalStyleSheet();const t=e.getContainerDomNode();if(!ce.OO(t))return this._getOrCreateGlobalStyleSheet();const i=e.getId();if(!this._editorStyleSheets.has(i)){const e=new Ln(this,i,ce.dS(t));this._editorStyleSheets.set(i,e)}return this._editorStyleSheets.get(i)}_removeEditorStyleSheets(e){this._editorStyleSheets.delete(e)}registerDecorationType(e,t,i,n,o){let s=this._decorationOptionProviders.get(t);if(!s){const r=this._getOrCreateStyleSheet(o),a={styleSheet:r,key:t,parentTypeKey:n,options:i||Object.create(null)};s=n?new En(this._themeService,r,a):new In(e,this._themeService,r,a),this._decorationOptionProviders.set(t,s),this._onDecorationTypeRegistered.fire(t)}s.refCount++}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorations(e)))))}resolveDecorationOptions(e,t){const i=this._decorationOptionProviders.get(e);if(!i)throw new Error("Unknown decoration type key: "+e);return i.getOptions(this,t)}};var Nn,Dn;kn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(Nn=1,Dn=bn.XE,function(e,t){Dn(e,t,Nn)})],kn);class En{constructor(e,t,i){this._styleSheet=t,this._styleSheet.ref(),this._parentTypeKey=i.parentTypeKey,this.refCount=0,this._beforeContentRules=new Mn(3,i,e),this._afterContentRules=new Mn(4,i,e)}getOptions(e,t){const i=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(i.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(i.afterContentClassName=this._afterContentRules.className),i}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class In{constructor(e,t,i,n){this._disposables=new Oe.SL,this.description=e,this._styleSheet=i,this._styleSheet.ref(),this.refCount=0;const o=e=>{const i=new Mn(e,n,t);if(this._disposables.add(i),i.hasContent)return i.className},s=e=>{const i=new Mn(e,n,t);return this._disposables.add(i),i.hasContent?{className:i.className,hasLetterSpacing:i.hasLetterSpacing}:null};this.className=o(0);const r=s(1);if(r&&(this.inlineClassName=r.className,this.inlineClassNameAffectsLetterSpacing=r.hasLetterSpacing),this.beforeContentClassName=o(3),this.afterContentClassName=o(4),n.options.beforeInjectedText&&n.options.beforeInjectedText.contentText){const e=s(5);this.beforeInjectedText={content:n.options.beforeInjectedText.contentText,inlineClassName:null==e?void 0:e.className,inlineClassNameAffectsLetterSpacing:(null==e?void 0:e.hasLetterSpacing)||n.options.beforeInjectedText.affectsLetterSpacing}}if(n.options.afterInjectedText&&n.options.afterInjectedText.contentText){const e=s(6);this.afterInjectedText={content:n.options.afterInjectedText.contentText,inlineClassName:null==e?void 0:e.className,inlineClassNameAffectsLetterSpacing:(null==e?void 0:e.hasLetterSpacing)||n.options.afterInjectedText.affectsLetterSpacing}}this.glyphMarginClassName=o(2);const a=n.options;this.isWholeLine=Boolean(a.isWholeLine),this.stickiness=a.rangeBehavior;const l=a.light&&a.light.overviewRulerColor||a.overviewRulerColor,d=a.dark&&a.dark.overviewRulerColor||a.overviewRulerColor;void 0===l&&void 0===d||(this.overviewRuler={color:l||d,darkColor:d||l,position:a.overviewRulerLane||De.sh.Center})}getOptions(e,t){return t?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness,before:this.beforeInjectedText,after:this.afterInjectedText}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const Tn={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};",verticalAlign:"vertical-align:{0};"};class Mn{constructor(e,t,i){this._theme=i.getColorTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let n=Rn.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(n=n+" "+Rn.getClassName(this._providerArgs.parentTypeKey,e)),this._className=n,this._unThemedSelector=Rn.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=i.onDidColorThemeChange((e=>{this._theme=i.getColorTheme(),this._removeCSS(),this._buildCSS()})):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let t,i,n;switch(this._ruleType){case 0:t=this.getCSSTextForModelDecorationClassName(e),i=this.getCSSTextForModelDecorationClassName(e.light),n=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:t=this.getCSSTextForModelDecorationInlineClassName(e),i=this.getCSSTextForModelDecorationInlineClassName(e.light),n=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:t=this.getCSSTextForModelDecorationGlyphMarginClassName(e),i=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:t=this.getCSSTextForModelDecorationContentClassName(e.before),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:t=this.getCSSTextForModelDecorationContentClassName(e.after),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;case 5:t=this.getCSSTextForModelDecorationContentClassName(e.beforeInjectedText),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.beforeInjectedText),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.beforeInjectedText);break;case 6:t=this.getCSSTextForModelDecorationContentClassName(e.afterInjectedText),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.afterInjectedText),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.afterInjectedText);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const o=this._providerArgs.styleSheet;let s=!1;t.length>0&&(o.insertRule(`${this._unThemedSelector} {${t}}`,0),s=!0),i.length>0&&(o.insertRule(`.vs${this._unThemedSelector} {${i}}`,0),s=!0),n.length>0&&(o.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${n}}`,0),s=!0),this._hasContent=s}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),void 0!==e.contentIconPath&&t.push(We.WU(Tn.contentIconPath,ce.wY(z.o.revive(e.contentIconPath)))),"string"==typeof e.contentText){const i=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(We.WU(Tn.contentText,i))}this.collectCSSText(e,["verticalAlign","fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const t=[];return void 0!==e.gutterIconPath&&(t.push(We.WU(Tn.gutterIconPath,ce.wY(z.o.revive(e.gutterIconPath)))),void 0!==e.gutterIconSize&&t.push(We.WU(Tn.gutterIconSize,e.gutterIconSize))),t.join("")}collectBorderSettingsCSSText(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(We.WU("box-sizing: border-box;")),!0)}collectCSSText(e,t,i){const n=i.length;for(let n of t){const t=this.resolveValue(e[n]);"string"==typeof t&&i.push(We.WU(Tn[n],t))}return i.length!==n}resolveValue(e){if((0,Ne.I)(e)){this._usesThemeColors=!0;const t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e}}class Rn{static getClassName(e,t){return"ced-"+e+"-"+t}static getSelector(e,t,i){let n=".monaco-editor ."+this.getClassName(e,i);return t&&(n=n+"."+this.getClassName(t,i)),3===i?n+="::before":4===i&&(n+="::after"),n}}var An=function(e,t){return function(i,n){t(i,n,e)}};let On=class extends kn{constructor(e,t,i){super(e,i),this.onCodeEditorAdd((()=>this._checkContextKey())),this.onCodeEditorRemove((()=>this._checkContextKey())),this._editorIsOpen=t.createKey("editorIsOpen",!1),this._activeCodeEditor=null}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}openCodeEditor(e,t,i){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===me.lg.http||i===me.lg.https)return(0,ce.V3)(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};On=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([An(1,Ii.i6),An(2,bn.XE)],On);var Pn=i(73543),Fn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Bn=function(e,t){return function(i,n){t(i,n,e)}};let Wn=0,Vn=!1,Hn=class extends cn.Gm{constructor(e,t,i,n,o,s,r,a,l,d){const h=Object.assign({},t);h.ariaLabel=h.ariaLabel||zi.B8.editorViewAccessibleLabel,h.ariaLabel=h.ariaLabel+";"+zi.B8.accessibilityHelpMessage,super(e,h,{},i,n,o,s,a,l,d),this._standaloneKeybindingService=r instanceof Ji?r:null,function(e){if(!e){if(Vn)return;Vn=!0}hn.wW(e||document.body)}(h.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let n="DYNAMIC_"+ ++Wn,o=Ii.Ao.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),Oe.JT.None;const t=e.id,i=e.label,n=Ii.Ao.and(Ii.Ao.equals("editorId",this.getId()),Ii.Ao.deserialize(e.precondition)),o=e.keybindings,s=Ii.Ao.and(n,Ii.Ao.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),d=new Oe.SL,h=this.getId()+":"+t;if(d.add(_e.P.registerCommand(h,l)),r){let e={command:{id:h,title:i},when:n,group:r,order:a};d.add(mn.BH.appendMenuItem(mn.eH.EditorContext,e))}if(Array.isArray(o))for(const e of o)d.add(this._standaloneKeybindingService.addDynamicKeybinding(h,e,l,s));let c=new gn.p(h,i,i,n,l,this._contextKeyService);return this._actions[t]=c,d.add((0,Oe.OF)((()=>{delete this._actions[t]}))),d}_triggerCommand(e,t){if(this._codeEditorService instanceof On)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};Hn=Fn([Bn(2,_n.TG),Bn(3,he.$),Bn(4,_e.H),Bn(5,Ii.i6),Bn(6,vn.d),Bn(7,bn.XE),Bn(8,Vi.lT),Bn(9,Cn.F)],Hn);let zn=class extends Hn{constructor(e,t,i,n,o,s,r,a,l,d,h,c,u,g,p){const m=Object.assign({},t);rn(c,m,!1);const f=d.registerEditorContainer(e);"string"==typeof m.theme&&d.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&d.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));let _,v=m.model;if(delete m.model,super(e,m,n,o,s,r,a,d,h,u),this._contextViewService=l,this._configurationService=c,this._standaloneThemeService=d,this._register(i),this._register(f),void 0===v?(_=Un(g,p,m.value||"",m.language||Pn.vW.text,void 0),this._ownsModel=!0):(_=v,this._ownsModel=!1),this._attachModel(_),_){let e={oldModelUrl:null,newModelUrl:_.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){rn(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_attachModel(e){super._attachModel(e),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};zn=Fn([Bn(3,_n.TG),Bn(4,he.$),Bn(5,_e.H),Bn(6,Ii.i6),Bn(7,vn.d),Bn(8,fn.u),Bn(9,pn.Z),Bn(10,Vi.lT),Bn(11,bi.Ui),Bn(12,Cn.F),Bn(13,kt.q),Bn(14,Me.h)],zn);let Kn=class extends un.p{constructor(e,t,i,n,o,s,r,a,l,d,h,c,u,g,p){const m=Object.assign({},t);rn(c,m,!0);const f=d.registerEditorContainer(e);"string"==typeof m.theme&&d.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&d.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast)),super(e,m,{},p,a,o,n,l,d,h,u,g),this._contextViewService=r,this._configurationService=c,this._standaloneThemeService=d,this._register(i),this._register(f),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(e){rn(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(Hn,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function Un(e,t,i,n,o){if(i=i||"",!n){const n=i.indexOf("\n");let s=i;return-1!==n&&(s=i.substring(0,n)),jn(e,i,t.createByFilepathOrFirstLine(o||null,s),o)}return jn(e,i,t.create(n),o)}function jn(e,t,i,n){return e.createModel(t,i,n)}Kn=Fn([Bn(3,_n.TG),Bn(4,Ii.i6),Bn(5,vn.d),Bn(6,fn.u),Bn(7,Te.p),Bn(8,he.$),Bn(9,pn.Z),Bn(10,Vi.lT),Bn(11,bi.Ui),Bn(12,fn.i),Bn(13,yn.e),Bn(14,wn.p)],Kn);var $n=i(86611),qn=i(95954);const Zn=Object.prototype.hasOwnProperty;class Gn{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Ie.TG,0),this._register($n.XT,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||Ie.TG}}class Qn extends Oe.JT{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new V.Q5),this.onDidChange=this._onDidChange.event,Qn.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new Gn,this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register($n.dQ.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){Qn.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Pn.bS();const e=$n.dQ.getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{let t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),qn.B.as(wi.IP.Configuration).registerOverrideIdentifiers($n.dQ.getLanguages().map((e=>e.id))),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;Zn.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let e of t.extensions)Pn.sA({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let o of t.filenames)Pn.sA({id:i,mime:n,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(let e of t.filenamePatterns)Pn.sA({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{let t=new RegExp(e);We.IO(t)||Pn.sA({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(e){(0,Pe.dL)(e)}}e.aliases.push(i);let o=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const t of o)t&&0!==t.length&&e.aliases.push(t);let s=null!==o&&o.length>0;if(s&&null===o[0]);else{let t=(s?o[0]:null)||i;!s&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration)}isRegisteredMode(e){return!!Zn.call(this._mimeTypesMap,e)||Zn.call(this._languages,e)}getModeIdForLanguageNameLowercase(e){return Zn.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e]:null}extractModeIds(e){return e?e.split(",").map((e=>e.trim())).map((e=>Zn.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:e)).filter((e=>Zn.call(this._languages,e))):[]}validateLanguageId(e){return e&&e!==Ie.TG?Zn.call(this._languages,e)?e:null:Ie.TG}getModeIdsFromFilepathOrFirstLine(e,t){if(!e&&!t)return[];let i=Pn.G8(e,t);return this.extractModeIds(i.join(","))}}Qn.instanceCount=0;class Yn{constructor(e,t){let i;this._selector=t,this.languageId=this._selector(),this._onDidChange=new V.Q5({onFirstListenerAdd:()=>{i=e((()=>this._evaluate()))},onLastListenerRemove:()=>{i.dispose()}}),this.onDidChange=this._onDidChange.event}_evaluate(){const e=this._selector();e!==this.languageId&&(this.languageId=e,this._onDidChange.fire(this.languageId))}}class Jn extends Oe.JT{constructor(e=!1){super(),this._onDidEncounterLanguage=this._register(new V.Q5),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onLanguagesMaybeChanged=this._register(new V.Q5({leakWarningThreshold:200})),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,Jn.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new Qn(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onLanguagesMaybeChanged.fire())))}dispose(){Jn.instanceCount--,super.dispose()}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,t){const i=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return(0,Dt.Xh)(i,null)}getModeId(e){const t=this._registry.extractModeIds(e);return(0,Dt.Xh)(t,null)}validateLanguageId(e){return this._registry.validateLanguageId(e)}create(e){return new Yn(this.onLanguagesMaybeChanged,(()=>{const t=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(t)}))}createByFilepathOrFirstLine(e,t){return new Yn(this.onLanguagesMaybeChanged,(()=>{const i=this.getModeIdByFilepathOrFirstLine(e,t);return this._createModeAndGetLanguageIdentifier(i)}))}_createModeAndGetLanguageIdentifier(e){const t=this.validateLanguageId(e||"plaintext")||Ie.TG;return this._getOrCreateMode(t),t}triggerMode(e){const t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")}_getOrCreateMode(e){if(!this._encounteredLanguages.has(e)){this._encounteredLanguages.add(e);const t=this.validateLanguageId(e)||Ie.TG;this._onDidEncounterLanguage.fire(t)}}}Jn.instanceCount=0;var Xn=i(14634),eo=i(66051);class to{constructor(e,t,i,n,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}const io=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class no{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(io);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=eo.Il.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class oo{constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];let t=[],i=0;for(let n=0,o=e.length;n<o;n++){let o=e[n],s=-1;if("string"==typeof o.fontStyle){s=0;let e=o.fontStyle.split(" ");for(let t=0,i=e.length;t<i;t++)switch(e[t]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4}}let r=null;"string"==typeof o.foreground&&(r=o.foreground);let a=null;"string"==typeof o.background&&(a=o.background),t[i++]=new to(o.token||"",n,s,r,a)}return t}(e),t)}static createFromParsedTokenTheme(e,t){return function(e,t){e.sort(((e,t)=>{let i=function(e,t){return e<t?-1:e>t?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",o="ffffff";for(;e.length>=1&&""===e[0].token;){let t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}let s=new no;for(let e of t)s.getId(e);let r=s.getId(n),a=s.getId(o),l=new ro(i,r,a),d=new ao(l);for(let t=0,i=e.length;t<i;t++){let i=e[t];d.insert(i.token,i.fontStyle,s.getId(i.foreground),s.getId(i.background))}return new oo(s,d)}(e,t)}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let i=this._cache.get(t);if(void 0===i){let e=this._match(t),n=function(e){let t=e.match(so);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}(t);i=(e.metadata|n<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const so=/\b(comment|string|regex|regexp)\b/;class ro{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new ro(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}class ao{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;let t,i,n=e.indexOf(".");-1===n?(t=e,i=""):(t=e.substring(0,n),i=e.substring(n+1));let o=this._children.get(t);return void 0!==o?o.match(i):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);let o,s,r=e.indexOf(".");-1===r?(o=e,s=""):(o=e.substring(0,r),s=e.substring(r+1));let a=this._children.get(o);void 0===a&&(a=new ao(this._mainRule.clone()),this._children.set(o,a)),a.insert(s,t,i,n)}}var lo=i(81312),ho=i(98962);const co={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[ho.cv]:"#FFFFFE",[ho.NO]:"#000000",[ho.ES]:"#E5EBF1",[lo.tR]:"#D3D3D3",[lo.Ym]:"#939393",[ho.Rz]:"#ADD6FF4D"}},uo={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[ho.cv]:"#1E1E1E",[ho.NO]:"#D4D4D4",[ho.ES]:"#3A3D41",[lo.tR]:"#404040",[lo.Ym]:"#707070",[ho.Rz]:"#ADD6FF26"}},go={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[ho.cv]:"#000000",[ho.NO]:"#FFFFFF",[lo.tR]:"#FFFFFF",[lo.Ym]:"#FFFFFF"}};var po=i(36550),mo=i(56459);const fo="vs",_o="vs-dark",vo="hc-black",bo=qn.B.as(ho.IP.ColorContribution),Co=qn.B.as(bn.IP.ThemingContribution);class wo{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let i=t.base;e.length>0?(yo(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(let t in this.themeData.colors)e.set(t,eo.Il.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=So(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,eo.Il.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){return this.getColors().get(e)||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=bo.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case fo:return po.e.LIGHT;case vo:return po.e.HIGH_CONTRAST;default:return po.e.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let i=So(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=oo.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=Ee.NX.getForeground(n),s=Ee.NX.getFontStyle(n);return{foreground:o,italic:Boolean(1&s),bold:Boolean(2&s),underline:Boolean(4&s)}}}function yo(e){return e===fo||e===_o||e===vo}function So(e){switch(e){case fo:return co;case _o:return uo;case vo:return go}}function Lo(e){let t=So(e);return new wo(e,t)}class xo extends Oe.JT{constructor(){super(),this._onColorThemeChange=this._register(new V.Q5),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(fo,Lo(fo)),this._knownThemes.set(_o,Lo(_o)),this._knownThemes.set(vo,Lo(vo));const e=function(){const e=new V.Q5,t=(0,mo.Ks)();return t.onDidChange((()=>e.fire())),{onDidChange:e.event,getCSS(){const e={},i=i=>{let n=i.defaults;for(;bn.kS.isThemeIcon(n);){const e=t.getIcon(n.id);if(!e)return;n=e.defaults}const o=n.fontId;if(o){const s=t.getIconFont(o);if(s)return e[o]=s,`.codicon-${i.id}:before { content: '${n.fontCharacter}'; font-family: ${(0,ce._h)(o)}; }`}return`.codicon-${i.id}:before { content: '${n.fontCharacter}'; }`},n=[];for(let e of t.getIcons()){const t=i(e);t&&n.push(t)}for(let t in e){const i=e[t].definition.src.map((e=>`${(0,ce.wY)(e.location)} format('${e.format}')`)).join(", ");n.push(`@font-face { src: ${i}; font-family: ${(0,ce._h)(t)}; font-display: block; }`)}return n.join("\n")}}}();this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(fo),e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),ce.uB("(forced-colors: active)",(()=>{this._updateActualTheme()}))}registerEditorContainer(e){return ce.OO(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=ce.dS(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),Oe.JT.None}_registerShadowDomContainer(e){const t=ce.dS(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let e=0;e<this._styleElements.length;e++)if(this._styleElements[e]===t)return void this._styleElements.splice(e,1)}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!yo(t.base)&&!yo(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new wo(e,t)),yo(e)&&this._knownThemes.forEach((t=>{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(fo),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(vo):this._desiredTheme;this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){let e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};Co.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){let t=[];for(let i=1,n=e.length;i<n;i++){let n=e[i];t[i]=`.mtk${i} { color: ${n}; }`}return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; text-underline-position: under; }"),t.join("\n")}(n)),this._themeCSS=e.join("\n"),this._updateCSS(),Ee.RW.setColorMap(n),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._styleElements.forEach((e=>e.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}var ko=i(59842);const No="data-keybinding-context";class Do{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class Eo extends Do{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}Eo.INSTANCE=new Eo;class Io extends Do{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=ge.Id.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(6===e.source){const e=Array.from(ko.$.map(this._values,(([e])=>e)));this._values.clear(),i.fire(new Ro(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...ko.$.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new Ro(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(Io._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Io._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Io._keyPrefix="config.";class To{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class Mo{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class Ro{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class Ao{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class Oo{constructor(e){this._onDidChangeContext=new V.K3({merge:e=>new Ao(e)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new To(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Fo(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return Ti.contextMatchesRules(t,e)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new Mo(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Mo(e))}getContext(e){return this._isDisposed?Eo.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(No)){const t=e.getAttribute(No);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}}let Po=class extends Oo{constructor(e){super(0),this._contexts=new Map,this._toDispose=new Oe.SL,this._lastContextId=0;const t=new Io(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?Eo.INSTANCE:this._contexts.get(e)||Eo.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new Do(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};Po=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,bi.Ui)],Po);class Fo extends Oo{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new Oe.XK,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(No)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(No,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(No),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?Eo.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}_e.P.registerCommand(Ii.Eq,(function(e,t,i){e.get(Ii.i6).createKey(String(t),i)})),_e.P.registerCommand({id:"getContextKeyInfo",handler:()=>[...Ii.uy.all()].sort(((e,t)=>e.key.localeCompare(t.key))),description:{description:(0,ki.N)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),_e.P.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(let i of Ii.uy.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));var Bo,Wo=i(93026),Vo=i(76049),Ho=i(23875),zo=i(63030),Ko=i(7912),Uo=i(42071),jo=i(25074),$o=i(41459),qo=i(45706),Zo=i(63160),Go={};function Qo(e,t,i){const n=i.mode===Bo.ALIGN?i.offset:i.offset+i.size,o=i.mode===Bo.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-n?n:0}Go.styleTagTransform=re(),Go.setAttributes=ie(),Go.insert=ee().bind(null,"head"),Go.domAPI=J(),Go.insertStyleElement=oe(),Q()(Zo.Z,Go),Zo.Z&&Zo.Z.locals&&Zo.Z.locals,function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(Bo||(Bo={}));class Yo extends Oe.JT{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=Oe.JT.None,this.toDisposeOnSetContainer=Oe.JT.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=ce.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,ce.Cp(this.view),this.setContainer(e,t),this._register((0,Oe.OF)((()=>this.setContainer(null,1))))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=ce.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=Jo,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(ce.$("slot"))}else this.container.appendChild(this.view);const i=new Oe.SL;Yo.BUBBLE_UP_EVENTS.forEach((e=>{i.add(ce.mu(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),Yo.BUBBLE_DOWN_EVENTS.forEach((e=>{i.add(ce.mu(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}}show(e){this.isVisible()&&this.hide(),ce.PO(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",ce.$Z(this.view),this.toDisposeOnClean=e.render(this.view)||Oe.JT.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||Fe.gn&&$o.D.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if(ce.Re(t)){let i=ce.i(t);e={top:i.top,left:i.left,width:i.width,height:i.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const i=ce.w(this.view),n=ce.wn(this.view),o=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0;let r,a;if(0===(this.delegate.anchorAxisAlignment||0)){const t={offset:e.top-window.pageYOffset,size:e.height,position:0===o?0:1},l={offset:e.left,size:e.width,position:0===s?0:1,mode:Bo.ALIGN};r=Qo(window.innerHeight,n,t)+window.pageYOffset,qo.e.intersects({start:r,end:r+n},{start:t.offset,end:t.offset+t.size})&&(l.mode=Bo.AVOID),a=Qo(window.innerWidth,i,l)}else{const t={offset:e.left,size:e.width,position:0===s?0:1},l={offset:e.top,size:e.height,position:0===o?0:1,mode:Bo.ALIGN};a=Qo(window.innerWidth,i,t),qo.e.intersects({start:a,end:a+i},{start:t.offset,end:t.offset+t.size})&&(l.mode=Bo.AVOID),r=Qo(window.innerHeight,n,l)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===s?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const l=ce.i(this.container);this.view.style.top=r-(this.useFixedPosition?ce.i(this.view).top:l.top)+"px",this.view.style.left=a-(this.useFixedPosition?ce.i(this.view).left:l.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),ce.Cp(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!ce.jg(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}Yo.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],Yo.BUBBLE_DOWN_EVENTS=["click"];let Jo='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tfont-display: block;\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';var Xo=i(45019),es=i(92981),ts=i(85095),is=i(32881);const ns=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,os=/(&amp;)?(&amp;)([^\s&])/g,ss=(0,ts.CM)("menu-selection",ts.lA.check),rs=(0,ts.CM)("menu-submenu",ts.lA.chevronRight);var as;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(as||(as={}));class ls extends Ko.o{constructor(e,t,i={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const n=document.createElement("div");n.classList.add("monaco-menu"),n.setAttribute("role","presentation"),super(n,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Fe.dz||Fe.IJ?[10]:[]],keyDown:!0}}),this.menuElement=n,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new Oe.SL),this.initializeStyleSheet(e),this._register(zo.o.addTarget(n)),(0,ce.nm)(n,ce.tw.KEY_DOWN,(e=>{new ui.y(e).equals(2)&&e.preventDefault()})),i.enableMnemonics&&this.menuDisposables.add((0,ce.nm)(n,ce.tw.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){ce.zB.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof hs&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),Fe.IJ&&this._register((0,ce.nm)(n,ce.tw.KEY_DOWN,(e=>{const t=new ui.y(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),ce.zB.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),ce.zB.stop(e,!0))}))),this._register((0,ce.nm)(this.domNode,ce.tw.MOUSE_OUT,(e=>{let t=e.relatedTarget;(0,ce.jg)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,ce.nm)(this.actionsList,ce.tw.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,ce.jg)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register(zo.o.addTarget(this.actionsList)),this._register((0,ce.nm)(this.actionsList,zo.t.Tap,(e=>{let t=e.initialTarget;if(t&&(0,ce.jg)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));let o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Xo.s$(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const s=this.scrollableElement.getDomNode();s.style.position="",this._register((0,ce.nm)(n,zo.t.Change,(e=>{ce.zB.stop(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register((0,ce.nm)(s,ce.tw.MOUSE_UP,(e=>{e.preventDefault()}))),n.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((e=>{var t;return!(null===(t=i.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn(`Found submenu cycle: ${e.id}`),!1)})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof cs))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeStyleSheet(e){(0,ce.OO)(e)?(this.styleSheet=(0,ce.dS)(e),this.styleSheet.textContent=us):(ls.globalStyleSheet||(ls.globalStyleSheet=(0,ce.dS)(),ls.globalStyleSheet.textContent=us),this.styleSheet=ls.globalStyleSheet)}style(e){const t=this.getContainer(),i=e.foregroundColor?`${e.foregroundColor}`:"",n=e.backgroundColor?`${e.backgroundColor}`:"",o=e.borderColor?`1px solid ${e.borderColor}`:"",s=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=o,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=s,this.viewItems&&this.viewItems.forEach((t=>{(t instanceof ds||t instanceof cs)&&t.style(e)}))}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t<this.actionsList.children.length;t++)if(e===this.actionsList.children[t]){this.focusedItem=t;break}}updateFocus(e){super.updateFocus(e,!0),void 0!==this.focusedItem&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,t,i){if(e instanceof es.Z0)return new cs(t.context,e,{icon:!0});if(e instanceof es.wY){const n=new hs(e,e.actions,i,Object.assign(Object.assign({},t),{submenuIds:new Set([...t.submenuIds||[],e.id])}));if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}{const i={enableMnemonics:t.enableMnemonics,useEventAsContext:t.useEventAsContext};if(t.getKeyBinding){const n=t.getKeyBinding(e);if(n){const e=n.getLabel();e&&(i.keybinding=e)}}const n=new ds(t.context,e,i);if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}}}class ds extends Uo.Y{constructor(e,t,i={}){if(i.isMenu=!0,super(t,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass="",this.options.label&&i.enableMnemonics){let e=this.getAction().label;if(e){let t=ns.exec(e);t&&(this.mnemonic=(t[1]?t[1]:t[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new Ae.pY((()=>{this.element&&(this._register((0,ce.nm)(this.element,ce.tw.MOUSE_UP,(e=>{if(ce.zB.stop(e,!0),Ho.vU){if(new Vo.n(e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register((0,ce.nm)(this.element,ce.tw.CONTEXT_MENU,(e=>{ce.zB.stop(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=(0,ce.R3)(this.element,(0,ce.$)("a.action-menu-item")),this._action.id===es.Z0.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,ce.R3)(this.item,(0,ce.$)("span.menu-item-check"+ss.cssSelector)),this.check.setAttribute("role","none"),this.label=(0,ce.R3)(this.item,(0,ce.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,ce.R3)(this.item,(0,ce.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){(0,ce.PO)(this.label);let e=(0,is.x$)(this.getAction().label);if(e){const t=function(e){const t=ns,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=ns.exec(e);if(i){e=We.YU(e),os.lastIndex=0;let t=os.exec(e);for(;t&&t[1];)t=os.exec(e);const n=e=>e.replace(/&amp;&amp;/g,"&amp;");t?this.label.append(We.j3(n(e.substr(0,t.index))," "),(0,ce.$)("u",{"aria-hidden":"true"},t[3]),We.oL(n(e.substr(t.index+t[0].length))," ")):this.label.innerText=n(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=ki.N({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.getAction().checked;this.item.classList.toggle("checked",!!e),void 0!==e?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=n)}style(e){this.menuStyle=e,this.applyStyle()}}class hs extends ds{constructor(e,t,i,n){super(e,e,n),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new Oe.SL),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:as.Right,this.showScheduler=new Ae.pY((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new Ae.pY((()=>{this.element&&!(0,ce.jg)((0,ce.vY)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,ce.R3)(this.item,(0,ce.$)("span.submenu-indicator"+rs.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,ce.nm)(this.element,ce.tw.KEY_UP,(e=>{let t=new ui.y(e);(t.equals(17)||t.equals(3))&&(ce.zB.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,ce.nm)(this.element,ce.tw.KEY_DOWN,(e=>{let t=new ui.y(e);(0,ce.vY)()===this.item&&(t.equals(17)||t.equals(3))&&ce.zB.stop(e,!0)}))),this._register((0,ce.nm)(this.element,ce.tw.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,ce.nm)(this.element,ce.tw.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,ce.nm)(this.element,ce.tw.FOCUS_OUT,(e=>{this.element&&!(0,ce.jg)((0,ce.vY)(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)}))))}updateEnabled(){}onClick(e){ce.zB.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(e){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=Qo(e.width,t.width,{position:n===as.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left<i.left+i.width&&(i.left+10+t.width<=e.width&&(o.left=i.left+10),i.top+=10,i.height=0),o.top=Qo(e.height,t.height,{position:0,offset:i.top,size:0}),o.top+t.height===i.top&&o.top+i.height+t.height<=e.height&&(o.top+=i.height),o}createSubmenu(e=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,ce.R3)(this.element,(0,ce.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const t=getComputedStyle(this.parentData.parent.domNode),i=parseFloat(t.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new ls(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new es.eZ],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const n=this.element.getBoundingClientRect(),o={top:n.top-i,left:n.left,height:n.height+2*i,width:n.width},s=this.submenuContainer.getBoundingClientRect(),{top:r,left:a}=this.calculateSubmenuMenuLayout(new ce.Ro(window.innerWidth,window.innerHeight),ce.Ro.lift(s),o,this.expandDirection);this.submenuContainer.style.left=a-s.left+"px",this.submenuContainer.style.top=r-s.top+"px",this.submenuDisposables.add((0,ce.nm)(this.submenuContainer,ce.tw.KEY_UP,(e=>{new ui.y(e).equals(15)&&(ce.zB.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add((0,ce.nm)(this.submenuContainer,ce.tw.KEY_DOWN,(e=>{new ui.y(e).equals(15)&&ce.zB.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=e?`${e}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class cs extends Uo.g{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}let us=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${(0,jo.a)(ss)}\n${(0,jo.a)(rs)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}\n`;var gs=i(26016),ps={};ps.styleTagTransform=re(),ps.setAttributes=ie(),ps.insert=ee().bind(null,"head"),ps.domAPI=J(),ps.insertStyleElement=oe(),Q()(gs.Z,ps),gs.Z&&gs.Z.locals&&gs.Z.locals;var ms=i(63235);class fs{constructor(e,t,i,n,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=document.activeElement;let n=(0,ce.Re)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{let o=e.getMenuClassName?e.getMenuClassName():"";o&&(n.className+=" "+o),this.options.blockMouse&&(this.block=n.appendChild((0,ce.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(0,ce.nm)(this.block,ce.tw.MOUSE_DOWN,(e=>e.stopPropagation())));const s=new Oe.SL,r=e.actionRunner||new es.Wi;return r.onBeforeRun(this.onActionRun,this,s),r.onDidRun(this.onDidActionRun,this,s),i=new ls(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:r,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),s.add((0,ms.tj)(i,this.themeService)),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,s),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,s),s.add((0,ce.nm)(window,ce.tw.BLUR,(()=>this.contextViewService.hideContextView(!0)))),s.add((0,ce.nm)(window,ce.tw.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;let t=new Vo.n(e),i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),(0,Oe.F8)(s,i)},focus:()=>{i&&i.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide&&e.onHide(!!t),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!(0,Pe.VV)(e.error)&&this.notificationService.error(e.error)}}var _s=function(e,t){return function(i,n){t(i,n,e)}};let vs=class extends Oe.JT{constructor(e,t,i,n,o){super(),this.contextMenuHandler=new fs(i,e,t,n,o)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(e),ce._q.getInstance().resetKeyStatus()}};vs=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([_s(0,Wo.b),_s(1,Vi.lT),_s(2,fn.u),_s(3,vn.d),_s(4,bn.XE)],vs);const bs=(0,_n.yh)("layoutService");let Cs=class extends Oe.JT{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=Oe.JT.None,this.container=e.container,this.contextView=this._register(new Yo(this.container,1)),this.layout(),this._register(e.onDidLayout((()=>this.layout())))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t!==this.container&&(this.container=t,this.setContainer(t,i?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const n=(0,Oe.OF)((()=>{this.currentViewDisposable===n&&this.hideContextView()}));return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};Cs=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,bs)],Cs);var ws=i(73444),ys=i(54231);class Ss{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class Ls{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(this._hashFn(t),n),n.incoming.set(this._hashFn(e),i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Ss(e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){let e=[];for(let[t,i]of this._nodes)e.push(`${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return e.join("\n")}findCycleSlow(){for(let[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(let[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}var xs=i(29427);class ks extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class Ns{constructor(e=new xs.y,t=!1,i){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=i,this._services.set(_n.TG,this)}createChild(e){return new Ns(e,this._strict,this)}invokeFunction(e,...t){let i=Ds.traceInvocation(e),n=!1;try{return e({get:(e,t)=>{if(n)throw(0,Pe.L6)("service accessor is only valid during the invocation of its target method");const o=this._getOrCreateServiceInstance(e,i);if(!o&&t!==_n.jt)throw new Error(`[invokeFunction] unknown service '${e}'`);return o}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof ys.M?(i=Ds.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Ds.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=_n.I8.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const t of n){let n=this._getOrCreateServiceInstance(t.id,i);if(!n&&this._strict&&!t.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);o.push(n)}let s=n.length>0?n[0].index:t.length;if(t.length!==s){console.warn(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);let i=s-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,s)}return new e(...[...t,...o])}_setServiceInstance(e,t){if(this._services.get(e)instanceof ys.M)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let i=this._getServiceInstanceOrDescriptor(e);return i instanceof ys.M?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new Ls((e=>e.id.toString()));let o=0;const s=[{id:e,desc:t,_trace:i}];for(;s.length;){const t=s.pop();if(n.lookupOrInsertNode(t),o++>1e3)throw new ks(n);for(let i of _n.I8.getServiceDependencies(t.desc.ctor)){let o=this._getServiceInstanceOrDescriptor(i.id);if(o||i.optional||console.warn(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`),o instanceof ys.M){const e={id:i.id,desc:o,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),s.push(e)}}}for(;;){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new ks(n);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof ys.M){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}n.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof ys.M)return this._createServiceInstance(t,i,n,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t=[],i,n){if(i){const i=new Ae.Ue((()=>this._createInstance(e,t,n)));return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t];let n=i.value,o=n[t];return"function"!=typeof o||(o=o.bind(n),e[t]=o),o},set:(e,t,n)=>(i.value[t]=n,!0)})}return this._createInstance(e,t,n)}}class Ds{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return Ds._None}static traceCreation(e){return Ds._None}branch(e,t){let i=new Ds(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;Ds._totals+=e;let t=!1,i=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){let o=[],s=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,o.push(`${s}CREATES -> ${r}`);let n=e(i+1,l);n&&o.push(n)}else o.push(`${s}uses -> ${r}`);return o.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Ds._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(i.join("\n"))}}Ds._None=new class extends Ds{constructor(){super(-1,null)}stop(){}branch(){return this}},Ds._totals=0;var Es=i(3143),Is=i(53058),Ts=i(76634);class Ms{constructor(){this._byResource=new ge.Y9,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new ge.Y9,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){let i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1,o=this._byResource.get(e);o&&(i=o.delete(t));let s=this._byOwner.get(t);if(s&&(n=s.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,o;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:ko.$.empty():z.o.isUri(e)?null!==(o=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==o?o:ko.$.empty():ko.$.map(ko.$.concat(...this._byOwner.values()),(e=>e[1]))}}class Rs{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new ge.Y9,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===me.lg.inMemory||e.scheme===me.lg.walkThrough||e.scheme===me.lg.walkThroughSnippet)return t;for(const{severity:i}of this._service.read({resource:e}))i===Ts.ZL.Error?t.errors+=1:i===Ts.ZL.Warning?t.warnings+=1:i===Ts.ZL.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class As{constructor(){this._onMarkerChanged=new V.D0({delay:0,merge:As._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new Ms,this._stats=new Rs(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if((0,Dt.XY)(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const o of i){const i=As._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:d,endColumn:h,relatedInformation:c,tags:u}=i;if(s)return a=a>0?a:1,l=l>0?l:1,d=d>=a?d:a,h=h>0?h:l,{resource:t,owner:e,code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:d,endColumn:h,relatedInformation:c,tags:u}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(As._accept(i,n)){const e=t.push(i);if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(null!=i?i:t),s=[];for(const t of e)for(const e of t)if(As._accept(e,n)){const t=s.push(e);if(o>0&&t===o)return s}return s}{const e=[];for(let t of this._data.values())for(let i of t)if(As._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new ge.Y9;for(let i of e)for(let e of i)t.set(e,!0);return Array.from(t.keys())}}var Os=i(95210),Ps=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Fs=function(e,t){return function(i,n){t(i,n,e)}};let Bs=class{constructor(e){this._commandService=e}createMenu(e,t,i){return new Ws(e,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t,this)}};Bs=Ps([Fs(0,_e.H)],Bs);let Ws=class e{constructor(e,t,i,n,o){this._id=e,this._options=t,this._commandService=i,this._contextKeyService=n,this._menuService=o,this._disposables=new Oe.SL,this._menuGroups=[],this._contextKeys=new Set,this._build();const s=new Ae.pY((()=>{this._build(),this._onDidChange.fire(this)}),t.eventDebounceDelay);this._disposables.add(s),this._disposables.add(mn.BH.onDidChangeMenu((t=>{t.has(e)&&s.schedule()})));const r=this._disposables.add(new Oe.SL);this._onDidChange=new V.Q5({onFirstListenerAdd:()=>{const e=new Ae.pY((()=>this._onDidChange.fire(this)),t.eventDebounceDelay);r.add(e),r.add(n.onDidChangeContext((t=>{t.affectsSome(this._contextKeys)&&e.schedule()})))},onLastListenerRemove:r.clear.bind(r)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=mn.BH.getMenuItems(this._id);let i;t.sort(e._compareMenuItems);for(const e of t){const t=e.group||"";i&&i[0]===t||(i=[t,[]],this._menuGroups.push(i)),i[1].push(e),this._collectContextKeys(e)}}_collectContextKeys(t){if(e._fillInKbExprKeys(t.when,this._contextKeys),(0,mn.vr)(t)){if(t.command.precondition&&e._fillInKbExprKeys(t.command.precondition,this._contextKeys),t.command.toggled){const i=t.command.toggled.condition||t.command.toggled;e._fillInKbExprKeys(i,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&mn.BH.getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let i of this._menuGroups){const[n,o]=i,s=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=(0,mn.vr)(t)?new mn.U8(t.command,t.alt,e,this._contextKeyService,this._commandService):new mn.NZ(t,this._menuService,this._contextKeyService,e);s.push(i)}s.length>0&&t.push([n,s])}return t}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}static _compareMenuItems(t,i){let n=t.group,o=i.group;if(n!==o){if(!n)return 1;if(!o)return-1;if("navigation"===n)return-1;if("navigation"===o)return 1;let e=n.localeCompare(o);if(0!==e)return e}let s=t.order||0,r=i.order||0;return s<r?-1:s>r?1:e._compareTitles((0,mn.vr)(t)?t.command.title:t.title,(0,mn.vr)(i)?i.command.title:i.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};Ws=Ps([Fs(2,_e.H),Fs(3,Ii.i6),Fs(4,mn.co)],Ws);var Vs=i(97064),Hs=function(e,t){return function(i,n){t(i,n,e)}};class zs extends Oe.JT{constructor(e){super(),this.model=e,this._markersData=new Map,this._register((0,Oe.OF)((()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()})))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let t=0;t<n.length;t++)this._markersData.set(n[t],e[t]);return 0!==i.length||0!==n.length}getMarker(e){return this._markersData.get(e.id)}}let Ks=class extends Oe.JT{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new V.Q5),this._markerDecorations=new ge.Y9,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new zs(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==me.lg.inMemory&&e.uri.scheme!==me.lg.internal&&e.uri.scheme!==me.lg.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});let i=t.map((t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)})));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=U.e.lift(t);return t.severity!==Ts.ZL.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),e.validateRange(i)}_createDecorationOption(e){let t,i,n,o,s;switch(e.severity){case Ts.ZL.Hint:t=this._hasMarkerTag(e,2)?void 0:this._hasMarkerTag(e,1)?"squiggly-unnecessary":"squiggly-hint",n=0;break;case Ts.ZL.Warning:t="squiggly-warning",i=(0,bn.EN)(lo.Re),n=20,s={color:(0,bn.EN)(ho.Iv),position:De.F5.Inline};break;case Ts.ZL.Info:t="squiggly-info",i=(0,bn.EN)(lo.eS),n=10;break;case Ts.ZL.Error:default:t="squiggly-error",i=(0,bn.EN)(lo.lK),n=30,s={color:(0,bn.EN)(ho.Gj),position:De.F5.Inline}}return e.tags&&(-1!==e.tags.indexOf(1)&&(o="squiggly-inline-unnecessary"),-1!==e.tags.indexOf(2)&&(o="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:i,position:De.sh.Right},minimap:s,zIndex:n,inlineClassName:o}}_hasMarkerTag(e,t){return!!e.tags&&e.tags.indexOf(t)>=0}};Ks=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Hs(0,kt.q),Hs(1,Ts.lT)],Ks);var Us=i(82415),js=function(e,t){return function(i,n){t(i,n,e)}};let $s=class extends Oe.JT{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new V.Q5,this._accessibilityModeEnabledContext=Cn.U.bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire())}))),i(),this.onDidChangeScreenReaderOptimized((()=>i()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}getAccessibilitySupport(){return this._accessibilitySupport}};$s=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([js(0,Ii.i6),js(1,bi.Ui)],$s);var qs=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Zs{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,t){return qs(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);try{return yield navigator.clipboard.writeText(e)}catch(e){console.error(e)}const i=document.activeElement,n=document.body.appendChild((0,ce.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)}))}readText(e){return qs(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(e){return console.error(e),""}}))}readFindText(){return qs(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return qs(this,void 0,void 0,(function*(){this.findText=e}))}}var Gs=i(56834),Qs=function(e,t){return function(i,n){t(i,n,e)}},Ys=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function Js(e){return e.scheme===me.lg.file?e.fsPath:e.path}let Xs=0;class er{constructor(e,t,i,n,o,s,r){this.id=++Xs,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class tr{constructor(e,t){this.resourceLabel=e,this.reason=t}}class ir{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(0===i.reason?e:t).push(i.resourceLabel);let i=[];return e.length>0&&i.push(ki.N({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(ki.N({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class nr{constructor(e,t,i,n,o,s,r){this.id=++Xs,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new ir),this.removedResources.has(t)||this.removedResources.set(t,new tr(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new ir),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new tr(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class or{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(` * [UNDO] ${this._past[t]}`);for(let t=this._future.length-1;t>=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e<i;e++)t.push(this._past[e].id);for(let e=this._future.length-1;e>=0;e--)t.push(this._future[e].id);return new Gs.YO(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let s=0,r=this._past.length;s<r;s++,n++){const r=this._past[s];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,o=0),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let o=this._future.length-1;o>=0;o--,n++){const r=this._future[o];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,s=o),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==s&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class sr{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;e<t;e++)this._versionIds[e]=this.editStacks[e].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const rr=new or("","");rr.locked=!0;let ar=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);let t=[];for(const e of this._editStacks)t.push(e[1].toString());console.log(t.join("\n"))}pushElement(e,t=Gs.Xt.None,i=Gs.gJ.None){if(0===e.type){const n=Js(e.resource),o=this.getUriComparisonKey(e.resource);this._pushElement(new er(e,n,o,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,o=[],s=[];for(const t of e.resources){const e=Js(t),i=this.getUriComparisonKey(t);n.has(i)||(n.add(i),o.push(e),s.push(i))}1===o.length?this._pushElement(new er(e,o[0],s[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new nr(e,o,s,t.id,t.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const i=e.resourceLabels[t],n=e.strResources[t];let o;this._editStacks.has(n)?o=this._editStacks.get(n):(o=new or(i,n),this._editStacks.set(n,o)),o.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);if(e.hasFutureElements())return null;const i=e.getClosestPastElement();return i?i.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const e of i){const t=Js(e.resource),i=this.getUriComparisonKey(e.resource),o=new er(e,t,i,0,0,0,0);n.set(o.strResource,o)}for(const i of e.strResources)t&&t.has(i)||this._editStacks.get(i).splitPastWorkspaceElement(e,n)}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const e of i){const t=Js(e.resource),i=this.getUriComparisonKey(e.resource),o=new er(e,t,i,0,0,0,0);n.set(o.strResource,o)}for(const i of e.strResources)t&&t.has(i)||this._editStacks.get(i).splitFutureWorkspaceElement(e,n)}removeElements(e){const t="string"==typeof e?e:this.getUriComparisonKey(e);this._editStacks.has(t)&&(this._editStacks.get(t).dispose(),this._editStacks.delete(t))}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);this._editStacks.has(n)&&this._editStacks.get(n).setElementsValidFlag(t,i)}createSnapshot(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).createSnapshot(e):new Gs.YO(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),i.hasPastElements()||i.hasFutureElements()||(i.dispose(),this._editStacks.delete(t))}}getElements(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&s.sourceId===e&&(!t||s.sourceOrder>t.sourceOrder)&&(t=s,i=n)}return[t,i]}canUndo(e){if(e instanceof Gs.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasPastElements()}_onError(e,t){(0,Pe.dL)(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const s=this._acquireLocks(i);let r;try{r=t()}catch(t){return s(),n.dispose(),this._onError(t,e)}return r?r.then((()=>(s(),n.dispose(),o())),(t=>(s(),n.dispose(),this._onError(t,e)))):(s(),n.dispose(),o())}_invokeWorkspacePrepare(e){return Ys(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return Oe.JT.None;const t=e.actual.prepareUndoRedo();return void 0===t?Oe.JT.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(Oe.JT.None);const i=e.actual.prepareUndoRedo();return i?(0,Oe.Wf)(i)?t(i):i.then((e=>t(e))):t(Oe.JT.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||rr);return new sr(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new lr(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new lr}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,ki.N({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,ki.N({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestPastElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,ki.N({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,ki.N({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,ki.N({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,n,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return Ys(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const o=yield this._dialogService.show(pi.Z.Info,ki.N("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[ki.N({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",i.editStacks.length),ki.N("nok","Undo this File"),ki.N("cancel","Cancel")],{cancelId:2});if(2===o.choice)return;if(1===o.choice)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const s=this._checkWorkspaceUndo(e,t,i,!1);if(s)return s.returnValue;n=!0}let o;try{o=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const s=this._checkWorkspaceUndo(e,t,i,!0);if(s)return o.dispose(),s.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,o,(()=>this._continueUndoInGroup(t.groupId,n)))}))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new sr([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=ki.N({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof Gs.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),o=n.getClosestPastElement();if(o){if(o.groupId){const[e,n]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&n)return this._undo(n,t,i)}if((o.sourceId!==t||o.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,i):this._resourceUndo(n,o,i)}finally{}}}_confirmAndContinueUndo(e,t,i){return Ys(this,void 0,void 0,(function*(){if(1!==(yield this._dialogService.show(pi.Z.Info,ki.N("confirmDifferentSource","Would you like to undo '{0}'?",i.label),[ki.N("confirmDifferentSource.yes","Yes"),ki.N("cancel","Cancel")],{cancelId:1})).choice)return this._undo(e,t,!0)}))}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.sourceId===e&&(!t||s.sourceOrder<t.sourceOrder)&&(t=s,i=n)}return[t,i]}canRedo(e){if(e instanceof Gs.gJ){const[,t]=this._findClosestRedoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasFutureElements()}_tryToSplitAndRedo(e,t,i,n){if(t.canSplit())return this._splitFutureWorkspaceElement(t,i),this._notificationService.warn(n),new lr(this._redo(e));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new lr}_checkWorkspaceRedo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,ki.N({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,ki.N({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestFutureElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndRedo(e,t,null,ki.N({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,ki.N({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,ki.N({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return Ys(this,void 0,void 0,(function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new sr([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=ki.N({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.groupId===e&&(!t||s.groupOrder<t.groupOrder)&&(t=s,i=n)}return[t,i]}_continueRedoInGroup(e){if(!e)return;const[,t]=this._findClosestRedoElementInGroup(e);return t?this._redo(t):void 0}redo(e){if(e instanceof Gs.gJ){const[,t]=this._findClosestRedoElementWithSource(e.id);return t?this._redo(t):void 0}return"string"==typeof e?this._redo(e):this._redo(this.getUriComparisonKey(e))}_redo(e){if(!this._editStacks.has(e))return;const t=this._editStacks.get(e),i=t.getClosestFutureElement();if(i){if(i.groupId){const[e,t]=this._findClosestRedoElementInGroup(i.groupId);if(i!==e&&t)return this._redo(t)}try{return 1===i.type?this._workspaceRedo(e,i):this._resourceRedo(t,i)}finally{}}}};ar=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Qs(0,ws.S),Qs(1,Vi.lT)],ar);class lr{constructor(e){this.returnValue=e}}(0,Us.z)(Gs.tJ,ar);var dr=i(50500),hr={};hr.styleTagTransform=re(),hr.setAttributes=ie(),hr.insert=ee().bind(null,"head"),hr.domAPI=J(),hr.insertStyleElement=oe(),Q()(dr.Z,hr),dr.Z&&dr.Z.locals&&dr.Z.locals;var cr=i(87107),ur=i(87668),gr=i(99177),pr={};pr.styleTagTransform=re(),pr.setAttributes=ie(),pr.insert=ee().bind(null,"head"),pr.domAPI=J(),pr.insertStyleElement=oe(),Q()(gr.Z,pr),gr.Z&&gr.Z.locals&&gr.Z.locals;const mr={buttonBackground:eo.Il.fromHex("#0E639C"),buttonHoverBackground:eo.Il.fromHex("#006BB3"),buttonForeground:eo.Il.white};class fr extends Oe.JT{constructor(e,t){super(),this._onDidClick=this._register(new V.Q5),this.options=t||Object.create(null),(0,Ci.jB)(this.options,mr,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(zo.o.addTarget(this._element)),[ce.tw.CLICK,zo.t.Tap].forEach((e=>{this._register((0,ce.nm)(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):ce.zB.stop(e)})))})),this._register((0,ce.nm)(this._element,ce.tw.KEY_DOWN,(e=>{const t=new ui.y(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._element.blur(),i=!0),i&&ce.zB.stop(t,!0)}))),this._register((0,ce.nm)(this._element,ce.tw.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.setHoverBackground()}))),this._register((0,ce.nm)(this._element,ce.tw.MOUSE_OUT,(e=>{this.applyStyles()}))),this.focusTracker=this._register((0,ce.go)(this._element)),this._register(this.focusTracker.onDidFocus((()=>this.setHoverBackground()))),this._register(this.focusTracker.onDidBlur((()=>this.applyStyles()))),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?(0,ce.mc)(this._element,...(0,ur.T)(e)):this._element.textContent=e,"string"==typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}var _r=i(7842),vr=i(55255),br={};br.styleTagTransform=re(),br.setAttributes=ie(),br.insert=ee().bind(null,"head"),br.domAPI=J(),br.insertStyleElement=oe(),Q()(vr.Z,br),vr.Z&&vr.Z.locals&&vr.Z.locals;const Cr="done",wr="active",yr="infinite",Sr="discrete",Lr={progressBarBackground:eo.Il.fromHex("#0E70C0")};class xr extends Oe.JT{constructor(e,t){super(),this.options=t||Object.create(null),(0,Ci.jB)(this.options,Lr,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new Ae.pY((()=>(0,ce.$Z)(this.element)),0)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(wr,yr,Sr),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(Cr),this.element.classList.contains(yr)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Sr,Cr),this.element.classList.add(wr,yr),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}var kr=i(23231),Nr=i(85406),Dr={};Dr.styleTagTransform=re(),Dr.setAttributes=ie(),Dr.insert=ee().bind(null,"head"),Dr.domAPI=J(),Dr.insertStyleElement=oe(),Q()(Nr.Z,Dr),Nr.Z&&Nr.Z.locals&&Nr.Z.locals;const Er={},Ir=new kr.R("quick-input-button-icon-");function Tr(e){if(!e)return;let t;const i=e.dark.toString();return Er[i]?t=Er[i]:(t=Ir.nextId(),ce.fk(`.${t}`,`background-image: ${ce.wY(e.light||e.dark)}`),ce.fk(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${ce.wY(e.dark)}`),Er[i]=t),t}var Mr=i(24556),Rr=i(97691);const Ar=ce.$;class Or extends Oe.JT{constructor(e){super(),this.parent=e,this.onKeyDown=e=>ce.nm(this.inputBox.inputElement,ce.tw.KEY_DOWN,(t=>{e(new ui.y(t))})),this.onMouseDown=e=>ce.nm(this.inputBox.inputElement,ce.tw.MOUSE_DOWN,(t=>{e(new Vo.n(t))})),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=ce.R3(this.parent,Ar(".quick-input-box")),this.inputBox=this._register(new Rr.W(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return"password"===this.inputBox.inputElement.type}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===pi.Z.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===pi.Z.Info?1:e===pi.Z.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===pi.Z.Info?1:e===pi.Z.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}var Pr=i(75526),Fr=i(9569),Br=i(9861),Wr={};Wr.styleTagTransform=re(),Wr.setAttributes=ie(),Wr.insert=ee().bind(null,"head"),Wr.domAPI=J(),Wr.insertStyleElement=oe(),Q()(Br.Z,Wr),Br.Z&&Br.Z.locals&&Br.Z.locals;const Vr=ce.$;class Hr{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=ce.R3(e,Vr(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&Hr.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(ce.R3(this.domNode,Vr("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){ce.PO(this.domNode),this.keyElements.clear()}renderPart(e,t,i){const n=Fi.xo.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(null==i?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(null==i?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(null==i?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(null==i?void 0:i.metaKey),n.separator);const o=t.keyLabel;o&&this.renderKey(e,o,Boolean(null==i?void 0:i.keyCode),"")}renderKey(e,t,i,n){ce.R3(e,this.createKeyElement(t,i?".highlight":"")),n&&ce.R3(e,Vr("span.monaco-keybinding-key-separator",void 0,n))}renderUnbound(e){ce.R3(e,this.createKeyElement((0,ki.N)("unbound","Unbound")))}createKeyElement(e,t=""){const i=Vr("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),i}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const t of this.keyElements)this.labelBackground&&(t.style.backgroundColor=null===(e=this.labelBackground)||void 0===e?void 0:e.toString()),this.labelBorder&&(t.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(t.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(t.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&(0,Ci.fS)(e.firstPart,t.firstPart)&&(0,Ci.fS)(e.chordPart,t.chordPart)}}const zr=new Ae.Ue((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));var Kr=i(97768),Ur=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const jr=ce.$;class $r{constructor(e){this.hidden=!1,this._onChecked=new V.Q5,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class qr{get templateId(){return qr.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=ce.R3(e,jr(".quick-input-list-entry"));const i=ce.R3(t.entry,jr("label.quick-input-list-label"));t.toDisposeTemplate.push(ce.mu(i,ce.tw.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=ce.R3(i,jr("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(ce.mu(t.checkbox,ce.tw.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const n=ce.R3(i,jr(".quick-input-list-rows")),o=ce.R3(n,jr(".quick-input-list-row")),s=ce.R3(n,jr(".quick-input-list-row"));t.label=new Fr.g(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const r=ce.R3(o,jr(".quick-input-list-entry-keybinding"));t.keybinding=new Hr(r,Fe.OS);const a=ce.R3(s,jr(".quick-input-list-label-meta"));return t.detail=new Pr.q(a,!0),t.separator=ce.R3(t.entry,jr(".quick-input-list-separator")),t.actionBar=new Ko.o(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=(0,Oe.B9)(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked((e=>i.checkbox.checked=e)));const{labelHighlights:n,descriptionHighlights:o,detailHighlights:s}=e,r=Object.create(null);r.matches=n||[],r.descriptionTitle=e.saneDescription,r.descriptionMatches=o||[],r.extraClasses=e.item.iconClasses,r.italic=e.item.italic,r.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,r),i.keybinding.set(e.item.keybinding),i.detail.set(e.saneDetail,s),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),i.actionBar.clear();const a=e.item.buttons;a&&a.length?(i.actionBar.push(a.map(((t,i)=>{let n=t.iconClass||(t.iconPath?Tr(t.iconPath):void 0);t.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible");const o=new es.aU(`id-${i}`,"",n,!0,(()=>{return i=this,n=void 0,s=function*(){e.fireButtonTriggered({button:t,item:e.item})},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(i,n||[])).next())}));var i,n,o,s}));return o.tooltip=t.tooltip||"",o})),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=(0,Oe.B9)(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=(0,Oe.B9)(e.toDisposeElement),e.toDisposeTemplate=(0,Oe.B9)(e.toDisposeTemplate)}}qr.ID="listelement";class Zr{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return qr.ID}}var Gr;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(Gr||(Gr={}));class Qr{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new V.Q5,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new V.Q5,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new V.Q5,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new V.Q5,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new V.Q5,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new V.Q5,this.onKeyDown=this._onKeyDown.event,this._onLeave=new V.Q5,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=ce.R3(this.parent,jr(".quick-input-list"));const n=new Zr,o=new Yr;this.list=i.createList("QuickInput",this.container,n,[new qr],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((e=>{const t=new ui.y(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(Fe.dz?e.metaKey:e.ctrlKey)&&this.list.setFocus((0,Dt.w6)(this.list.length));break;case 16:const t=this.list.getFocus();1===t.length&&0===t[0]&&this._onLeave.fire();break;case 18:const i=this.list.getFocus();1===i.length&&i[0]===this.list.length-1&&this._onLeave.fire()}this._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(ce.nm(this.container,ce.tw.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))}))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return V.ju.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return V.ju.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e=>e.item)),event:e.browserEvent})))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n.hidden){if(!n.checked)return!1;t=!0}}return t}getCheckedCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].checked&&e++;return e}getVisibleCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach((t=>{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=(0,Oe.B9)(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce(((i,n,o)=>{var s,r,a;if("separator"!==n.type){const l=o&&e[o-1],d=n.label&&n.label.replace(/\r?\n/g," "),h=n.meta&&n.meta.replace(/\r?\n/g," "),c=n.description&&n.description.replace(/\r?\n/g," "),u=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[d,c,u].map((e=>(0,ts.JL)(e))).filter((e=>!!e)).join(", ");i.push(new $r({index:o,item:n,saneLabel:d,saneMeta:h,saneAriaLabel:g,saneDescription:c,saneDetail:u,labelHighlights:null===(s=n.highlights)||void 0===s?void 0:s.label,descriptionHighlights:null===(r=n.highlights)||void 0===r?void 0:r.description,detailHighlights:null===(a=n.highlights)||void 0===a?void 0:a.detail,checked:!1,separator:l&&"separator"===l.type?l:void 0,fireButtonTriggered:t}))}return i}),[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map((e=>e.onChecked((()=>this.fireCheckedEvents()))))),this.elementsToIndexes=this.elements.reduce(((e,t,i)=>(e.set(t.item,i),e)),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(e){if(this.list.setFocus(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e)))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item))}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===Gr.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=Gr.First),e===Gr.Previous&&0===this.list.getFocus()[0]&&(e=Gr.Last),e===Gr.Second&&this.list.length<2&&(e=Gr.First),e){case Gr.First:this.list.focusFirst();break;case Gr.Second:this.list.focusNth(1);break;case Gr.Last:this.list.focusLast();break;case Gr.Next:this.list.focusNext();break;case Gr.Previous:this.list.focusPrevious();break;case Gr.NextPage:this.list.focusNextPage();break;case Gr.PreviousPage:this.list.focusPreviousPage()}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let t;this.elements.forEach((i=>{const n=this.matchOnLabel?(0,Be.f6)((0,is.Gt)(e,(0,is.Ho)(i.saneLabel))):void 0,o=this.matchOnDescription?(0,Be.f6)((0,is.Gt)(e,(0,is.Ho)(i.saneDescription||""))):void 0,s=this.matchOnDetail?(0,Be.f6)((0,is.Gt)(e,(0,is.Ho)(i.saneDetail||""))):void 0,r=this.matchOnMeta?(0,Be.f6)((0,is.Gt)(e,(0,is.Ho)(i.saneMeta||""))):void 0;if(n||o||s||r?(i.labelHighlights=n,i.descriptionHighlights=o,i.detailHighlights=s,i.hidden=!1):(i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!i.item.alwaysShow),i.separator=void 0,!this.sortByLabel){const e=i.index&&this.inputElements[i.index-1];t=e&&"separator"===e.type?e:t,t&&!i.hidden&&(i.separator=t,t=void 0)}}))}else this.elements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.separator=t&&"separator"===t.type?t:void 0}));const t=this.elements.filter((e=>!e.hidden));if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort(((e,t)=>function(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:0===n.length&&0===o.length?0:function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=n.startsWith(i),r=o.startsWith(i);if(s!==r)return s?-1:1;if(s&&r){if(n.length<o.length)return-1;if(n.length>o.length)return 1}return 0}(e,t,i);if(s)return s;const r=n.endsWith(i);if(r!==o.endsWith(i))return r?-1:1;const a=function(e,t,i=!1){const n=e||"",o=t||"",s=zr.value.collator.compare(n,o);return zr.value.collatorIsNumeric&&0===s&&n!==o?n<o?-1:1:s}(n,o);return 0!==a?a:n.localeCompare(o)}(e.saneLabel,t.saneLabel,i)}(e,t,i)))}return this.elementsToIndexes=t.reduce(((e,t,i)=>(e.set(t.item,i),e)),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=(0,Oe.B9)(this.elementDisposables),this.disposables=(0,Oe.B9)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}Ur([Kr.H],Qr.prototype,"onDidChangeFocus",null),Ur([Kr.H],Qr.prototype,"onDidChangeSelection",null);class Yr{getWidgetAriaLabel(){return(0,ki.N)("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var Jr=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Xr=ce.$,ea={iconClass:(0,ts.CM)("quick-input-back",ts.lA.arrowLeft).classNames,tooltip:(0,ki.N)("quickInput.back","Back"),handle:-1};class ta extends Oe.JT{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=ta.noPromptMessage,this._severity=pi.Z.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new V.Q5),this.onDidHideEmitter=this._register(new V.Q5),this.onDisposeEmitter=this._register(new V.Q5),this.visibleDisposables=this._register(new Oe.SL),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!Fe.gn;this._ignoreFocusOut=e&&!Fe.gn,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Mr.Jq.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||"&nbsp;"===this.ui.title.innerHTML||(this.ui.title.innerText=" ");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new Ae._F,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter((e=>e===ea));this.ui.leftActionBar.push(e.map(((e,t)=>{const i=new es.aU(`id-${t}`,"",e.iconClass||Tr(e.iconPath),!0,(()=>Jr(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==ea));this.ui.rightActionBar.push(t.map(((e,t)=>{const i=new es.aU(`id-${t}`,"",e.iconClass||Tr(e.iconPath),!0,(()=>Jr(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,ce.mc(this.ui.message,...(0,ur.T)(i))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,ki.N)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==pi.Z.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}ta.noPromptMessage=(0,ki.N)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class ia extends ta{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new V.Q5),this.onWillAcceptEmitter=this._register(new V.Q5),this.onDidAcceptEmitter=this._register(new V.Q5),this.onDidCustomEmitter=this._register(new V.Q5),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?Mr.jG.NONE:Mr.jG.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new V.Q5),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new V.Q5),this.onDidTriggerItemButtonEmitter=this._register(new V.Q5),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e||"",this.update(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Mr.X5:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(Gr.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.inputBox.onMouseDown((e=>{this.autoFocusOnList||this.ui.list.clearFocus()}))),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((e=>{switch(e.keyCode){case 18:this.ui.list.focus(Gr.Next),this.canSelectMany&&this.ui.list.domFocus(),ce.zB.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(Gr.Previous):this.ui.list.focus(Gr.Last),this.canSelectMany&&this.ui.list.domFocus(),ce.zB.stop(e,!0);break;case 12:this.ui.list.focus(Gr.NextPage),this.canSelectMany&&this.ui.list.domFocus(),ce.zB.stop(e,!0);break;case 11:this.ui.list.focus(Gr.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),ce.zB.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Gr.First),ce.zB.stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Gr.Last),ce.zB.stop(e,!0))}}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this.ui.list.onDidChangeFocus((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,Dt.fS)(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&(0,Dt.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,Dt.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return ce.nm(this.ui.container,ce.tw.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new ui.y(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const[n,o]=e.getParts();return!(o||(n.shiftKey&&4===i?t.ctrlKey||t.altKey||t.metaKey:!(n.altKey&&6===i||n.ctrlKey&&5===i||n.metaKey&&57===i)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",t&&!this.description);const i={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!t,progressBar:!t,visibleCount:!0,count:this.canSelectMany,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const n=this.ariaLabel||this.placeholder||ia.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case Mr.jG.NONE:this._itemActivation=Mr.jG.FIRST;break;case Mr.jG.SECOND:this.ui.list.focus(Gr.Second),this._itemActivation=Mr.jG.FIRST;break;case Mr.jG.LAST:this.ui.list.focus(Gr.Last),this._itemActivation=Mr.jG.FIRST;break;default:this.trySelectFirst()}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Gr.First)),this.keepScrollPosition&&(this.scrollTop=e)}}ia.DEFAULT_ARIA_LABEL=(0,ki.N)("quickInputBox.ariaLabel","Type to narrow down results.");class na extends Oe.JT{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new V.Q5),this.onDidCustomEmitter=this._register(new V.Q5),this.onDidTriggerButtonEmitter=this._register(new V.Q5),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new V.Q5),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new V.Q5),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(ce.nm(window,ce.tw.KEY_DOWN,e,!0)),this._register(ce.nm(window,ce.tw.KEY_UP,e,!0)),this._register(ce.nm(window,ce.tw.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=ce.R3(this.parentElement,Xr(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=ce.dS(e),i=ce.R3(e,Xr(".quick-input-titlebar")),n=this._register(new Ko.o(i));n.domNode.classList.add("quick-input-left-action-bar");const o=ce.R3(i,Xr(".quick-input-title")),s=this._register(new Ko.o(i));s.domNode.classList.add("quick-input-right-action-bar");const r=ce.R3(e,Xr(".quick-input-description")),a=ce.R3(e,Xr(".quick-input-header")),l=ce.R3(a,Xr("input.quick-input-check-all"));l.type="checkbox",this._register(ce.mu(l,ce.tw.CHANGE,(e=>{const t=l.checked;y.setAllVisibleChecked(t)}))),this._register(ce.nm(l,ce.tw.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const d=ce.R3(a,Xr(".quick-input-description")),h=ce.R3(a,Xr(".quick-input-and-message")),c=ce.R3(h,Xr(".quick-input-filter")),u=this._register(new Or(c));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=ce.R3(c,Xr(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new _r.Z(g,{countFormat:(0,ki.N)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),m=ce.R3(c,Xr(".quick-input-count"));m.setAttribute("aria-live","polite");const f=new _r.Z(m,{countFormat:(0,ki.N)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),_=ce.R3(a,Xr(".quick-input-action")),v=new fr(_);v.label=(0,ki.N)("ok","OK"),this._register(v.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const b=ce.R3(a,Xr(".quick-input-action")),C=new fr(b);C.label=(0,ki.N)("custom","Custom"),this._register(C.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const w=ce.R3(h,Xr(`#${this.idPrefix}message.quick-input-message`)),y=this._register(new Qr(e,this.idPrefix+"list",this.options));this._register(y.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(y.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(y.onChangedCheckedCount((e=>{f.setCount(e)}))),this._register(y.onLeave((()=>{setTimeout((()=>{u.setFocus(),this.controller instanceof ia&&this.controller.canSelectMany&&y.clearFocus()}),0)}))),this._register(y.onDidChangeFocus((()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")})));const S=new xr(e);S.getContainer().classList.add("quick-input-progress");const L=ce.go(e);return this._register(L),this._register(ce.nm(e,ce.tw.FOCUS,(e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0}),!0)),this._register(L.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(Mr.Jq.Blur),this.previousFocusElement=void 0}))),this._register(ce.nm(e,ce.tw.FOCUS,(e=>{u.setFocus()}))),this._register(ce.nm(e,ce.tw.KEY_DOWN,(t=>{const i=new ui.y(t);switch(i.keyCode){case 3:ce.zB.stop(t,!0),this.onDidAcceptEmitter.fire();break;case 9:ce.zB.stop(t,!0),this.hide(Mr.Jq.Gesture);break;case 2:if(!i.altKey&&!i.ctrlKey&&!i.metaKey){const n=[".action-label.codicon"];e.classList.contains("show-checkboxes")?n.push("input"):n.push("input[type=text]"),this.getUI().list.isDisplayed()&&n.push(".monaco-list");const o=e.querySelectorAll(n.join(", "));i.shiftKey&&i.target===o[0]?(ce.zB.stop(t,!0),o[o.length-1].focus()):i.shiftKey||i.target!==o[o.length-1]||(ce.zB.stop(t,!0),o[0].focus())}}}))),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:o,description1:r,description2:d,rightActionBar:s,checkAll:l,filterContainer:c,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:m,count:f,okContainer:_,ok:v,message:w,customButtonContainer:b,customButton:C,list:y,progressBar:S,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},i=W.T.None){return new Promise(((n,o)=>{let s=e=>{s=n,t.onKeyMods&&t.onKeyMods(r.keyMods),n(e)};if(i.isCancellationRequested)return void s(void 0);const r=this.createQuickPick();let a;const l=[r,r.onDidAccept((()=>{if(r.canSelectMany)s(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(s(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(s(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),o=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=o}}})))),r.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{(0,Oe.B9)(l),s(void 0)}))];r.title=t.title,r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,r.quickNavigate=t.quickNavigate,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(r.activeItems=[a])})),r.show(),Promise.resolve(e).then(void 0,(e=>{o(e),r.hide()}))}))}createQuickPick(){const e=this.getUI();return new ia(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(pi.Z.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),ce.mc(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();ea.tooltip=n?(0,ki.N)("quickInput.backWithKeybinding","Back ({0})",n):(0,ki.N)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!(null===(t=this.ui)||void 0===t?void 0:t.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",n||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,na.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const s=[];this.styles.list.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));const r=s.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}}na.MAX_WIDTH=600;var oa=i(32683),sa=i(65757),ra=i(58028),aa=function(e,t){return function(i,n){t(i,n,e)}};let la=class extends Oe.JT{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=qn.B.as(sa.IP.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[o,s]=this.getOrInstantiateProvider(e),r=this.visibleQuickAccess,a=null==r?void 0:r.descriptor;if(r&&s&&a===s)return e===s.prefix||(null==i?void 0:i.preserveValue)||(r.picker.value=e),void this.adjustValueSelection(r.picker,s,i);if(s&&!(null==i?void 0:i.preserveValue)){let t;if(r&&a&&a!==s){const e=r.value.substr(a.prefix.length);e&&(t=`${s.prefix}${e}`)}if(!t){const e=null==o?void 0:o.defaultFilterValue;e===sa.Ry.LAST?t=this.lastAcceptedPickerValues.get(s):"string"==typeof e&&(t=`${s.prefix}${e}`)}"string"==typeof t&&(e=t)}const l=new Oe.SL,d=l.add(this.quickInputService.createQuickPick());let h,c;d.value=e,this.adjustValueSelection(d,s,i),d.placeholder=null==s?void 0:s.placeholder,d.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!r,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(d.itemActivation=null!==(n=null==i?void 0:i.itemActivation)&&void 0!==n?n:ra.jG.SECOND),d.contextKey=null==s?void 0:s.contextKey,d.filterValue=e=>e.substring(s?s.prefix.length:0),(null==s?void 0:s.placeholder)&&(d.ariaLabel=null==s?void 0:s.placeholder),t&&(h=new Promise((e=>c=e)),l.add((0,oa.I)(d.onWillAccept)((e=>{e.veto(),d.hide()})))),l.add(this.registerPickerListeners(d,o,s,e));const u=l.add(new W.A);return o&&l.add(o.provide(d,u.token)),(0,oa.I)(d.onDidHide)((()=>{0===d.selectedItems.length&&u.cancel(),l.dispose(),null==c||c(d.selectedItems)})),d.show(),t?h:void 0}adjustValueSelection(e,t,i){var n;let o;o=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n){const o=new Oe.SL,s=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add((0,Oe.OF)((()=>{s===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),o.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0}):s.value=e}))),i&&o.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),o}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};la=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([aa(0,ra.eJ),aa(1,_n.TG)],la);var da=function(e,t){return function(i,n){t(i,n,e)}};let ha=class extends bn.bB{constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=o,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(la))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const o={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(),createList:(e,t,i,n,o)=>this.instantiationService.createInstance(Is.ev,e,t,i,n,o),styles:this.computeStyles()},s=this._register(new na(Object.assign(Object.assign({},o),t)));return s.layout(e.dimension,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0),this._register(e.onDidLayout((t=>{var i,n;return s.layout(t,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0)}))),this._register(s.onShow((()=>this.resetContextKeys()))),this._register(s.onHide((()=>this.resetContextKeys()))),s}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Ii.uy(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},i=W.T.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},(0,ms.o)(this.theme,{quickInputBackground:ho.zK,quickInputForeground:ho.tZ,quickInputTitleBackground:ho.lo,contrastBorder:ho.lR,widgetShadow:ho.rh})),inputBox:(0,ms.o)(this.theme,{inputForeground:ho.zJ,inputBackground:ho.sE,inputBorder:ho.dt,inputValidationInfoBackground:ho._l,inputValidationInfoForeground:ho.YI,inputValidationInfoBorder:ho.EP,inputValidationWarningBackground:ho.RV,inputValidationWarningForeground:ho.SU,inputValidationWarningBorder:ho.C3,inputValidationErrorBackground:ho.p,inputValidationErrorForeground:ho._t,inputValidationErrorBorder:ho.OZ}),countBadge:(0,ms.o)(this.theme,{badgeBackground:ho.g8,badgeForeground:ho.qe,badgeBorder:ho.lR}),button:(0,ms.o)(this.theme,{buttonForeground:ho.j5,buttonBackground:ho.b7,buttonHoverBackground:ho.GO,buttonBorder:ho.lR}),progressBar:(0,ms.o)(this.theme,{progressBarBackground:ho.zR}),keybindingLabel:(0,ms.o)(this.theme,{keybindingLabelBackground:ho.oQ,keybindingLabelForeground:ho.lW,keybindingLabelBorder:ho.AW,keybindingLabelBottomBorder:ho.K1,keybindingLabelShadow:ho.rh}),list:(0,ms.o)(this.theme,{listBackground:ho.zK,listInactiveFocusForeground:ho.NP,listInactiveSelectionIconForeground:ho.cb,listInactiveFocusBackground:ho.Vq,listFocusOutline:ho.xL,listInactiveFocusOutline:ho.xL,pickerGroupBorder:ho.op,pickerGroupForeground:ho.kJ})}}};ha=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([da(0,_n.TG),da(1,Ii.i6),da(2,bn.XE),da(3,Cn.F),da(4,bs)],ha);var ca=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ua=function(e,t){return function(i,n){t(i,n,e)}};let ga=class extends ha{constructor(e,t,i,n,o,s){super(t,i,n,o,s),this.host=void 0;const r=ma.get(e);this.host={_serviceBrand:void 0,get container(){return r.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};ga=ca([ua(1,_n.TG),ua(2,Ii.i6),ua(3,bn.XE),ua(4,Cn.F),ua(5,bs)],ga);let pa=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(ga,e);this.mapEditorToService.set(e,t),(0,oa.I)(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=W.T.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};pa=ca([ua(0,_n.TG),ua(1,he.$)],pa);class ma{constructor(e){this.editor=e,this.widget=new fa(this.editor)}static get(e){return e.getContribution(ma.ID)}dispose(){this.widget.dispose()}}ma.ID="editor.controller.quickInput";class fa{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return fa.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}var _a;fa.ID="editor.contrib.quickInputWidget",(0,cr._K)(ma.ID,ma),function(e){const t=new xs.y;class i{constructor(e,t){this._serviceId=e,this._factory=t,this._value=null}get id(){return this._serviceId}get(e){if(!this._value){if(e&&(this._value=e[this._serviceId.toString()]),this._value||(this._value=this._factory(e)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");t.set(this._serviceId,this._value)}return this._value}}e.LazyStaticService=i;let n=[];function o(e,t){let o=new i(e,t);return n.push(o),o}e.init=function(e){let t=new xs.y;for(const[e,i]of(0,Us.d)())t.set(e,i);for(let i in e)e.hasOwnProperty(i)&&t.set((0,_n.yh)(i),e[i]);n.forEach((i=>t.set(i.id,i.get(e))));let i=new Ns(t,!0);return t.set(_n.TG,i),[t,i]},e.instantiationService=o(_n.TG,(()=>new Ns(t,!0)));const s=new en;e.configurationService=o(bi.Ui,(()=>s)),e.resourceConfigurationService=o(Nt.V,(()=>new tn(s))),e.resourcePropertiesService=o(Nt.y,(()=>new nn(s))),e.contextService=o(Hi.ec,(()=>new sn)),e.labelService=o(Es.e,(()=>new ln)),e.telemetryService=o(Wo.b,(()=>new on)),e.dialogService=o(ws.S,(()=>new Gi)),e.notificationService=o(Vi.lT,(()=>new Qi)),e.markerService=o(Ts.lT,(()=>new As)),e.modeService=o(Me.h,(e=>new Jn)),e.standaloneThemeService=o(pn.Z,(()=>new xo)),e.logService=o(Et.VZ,(()=>new Et.$V(new Et.kw))),e.undoRedoService=o(Gs.tJ,(t=>new ar(e.dialogService.get(t),e.notificationService.get(t)))),e.languageConfigurationService=o(tt.c_,(t=>new tt.UU(e.configurationService.get(t),e.modeService.get(t)))),e.modelService=o(kt.q,(t=>new Xn.BR(e.configurationService.get(t),e.resourcePropertiesService.get(t),e.standaloneThemeService.get(t),e.logService.get(t),e.undoRedoService.get(t),e.modeService.get(t),e.languageConfigurationService.get(t)))),e.markerDecorationsService=o(Vs.i,(t=>new Ks(e.modelService.get(t),e.markerService.get(t)))),e.contextKeyService=o(Ii.i6,(t=>new Po(e.configurationService.get(t)))),e.codeEditorService=o(he.$,(t=>new On(null,e.contextKeyService.get(t),e.standaloneThemeService.get(t)))),e.editorProgressService=o(yn.e,(()=>new Zi)),e.storageService=o(Os.Uy,(()=>new Os.vm)),e.editorWorkerService=o(Te.p,(t=>new Rt(e.modelService.get(t),e.resourceConfigurationService.get(t),e.logService.get(t))))}(_a||(_a={}));class va extends Oe.JT{constructor(e,t){super();const[i,n]=_a.init(t);this._serviceCollection=i,this._instantiationService=n;const o=this.get(bi.Ui),s=this.get(Vi.lT),r=this.get(Wo.b),a=this.get(bn.XE),l=this.get(Et.VZ),d=this.get(Ii.i6);let h=(e,i)=>{let n=null;return t&&(n=t[e.toString()]),n||(n=i()),this._serviceCollection.set(e,n),n};h(Cn.F,(()=>new $s(d,o))),h(Is.Lw,(()=>new Is.XN(a)));let c=h(_e.H,(()=>new Yi(this._instantiationService))),u=h(vn.d,(()=>this._register(new Ji(d,c,r,s,l,e)))),g=h(bs,(()=>new dn(_a.codeEditorService.get(he.$),e)));h(ra.eJ,(()=>new pa(n,_a.codeEditorService.get(he.$))));let p=h(fn.u,(()=>this._register(new Cs(g))));h(wn.p,(()=>new Zs)),h(fn.i,(()=>{const e=new vs(r,s,p,u,a);return e.configure({blockMouse:!1}),this._register(e)})),h(mn.co,(()=>new Bs(c))),h(fi.vu,(()=>new an(_a.modelService.get(kt.q))))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}var ba=i(69836);function Ca(e,t,i){let n=new va(e,t),o=null;n.has(Re.S)||(o=new qi(_a.modelService.get()),n.set(Re.S,o)),n.has(ve.v4)||n.set(ve.v4,new Le(n.get(he.$),n.get(_e.H)));let s=i(n);return o&&o.setEditor(s),s}function wa(e,t){return"boolean"==typeof e?e:t}function ya(e,t){return"string"==typeof e?e:t}function Sa(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function La(e,t){t=t.replace(/@@/g,"");let i,n=0;do{i=!1,t=t.replace(/@(\w+)/g,(function(n,o){i=!0;let s="";if("string"==typeof e[o])s=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?Qt(e,"language definition does not contain attribute '"+o+"', used at: "+t):Qt(e,"attribute reference '"+o+"' must be a string, used at: "+t);s=e[o].source}return qt(s)?"":"(?:"+s+")"})),n++}while(i&&n<5);t=t.replace(/\x01/g,"@");let o=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,o)}function xa(e,t,i,n){let o=-1,s=i,r=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);r&&(r[3]&&(o=parseInt(r[3]),r[2]&&(o+=100)),s=r[4]);let a,l="~",d=s;if(s&&0!==s.length?/^\w*$/.test(d)?l="==":(r=s.match(/^(@|!@|~|!~|==|!=)(.*)$/),r&&(l=r[1],d=r[2])):(l="!=",d=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(d))if("@"===l||"!@"===l){let i=e[d];if(!i)throw Qt(e,"the @ match target '"+d+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const e of t)if("string"!=typeof e)return!1;return!0}(0,i))throw Qt(e,"the @ match target '"+d+"' must be an array of strings, in rule: "+t);let n=Sa(i,e.ignoreCase);a=function(e){return"@"===l?n(e):!n(e)}}else if("~"===l||"!~"===l)if(d.indexOf("$")<0){let t=La(e,"^"+d+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,i,n,o){return La(e,"^"+Yt(e,d,i,n,o)+"$").test(t)};else if(d.indexOf("$")<0){let t=Zt(e,d);a=function(e){return"=="===l?e===t:e!==t}}else{let t=Zt(e,d);a=function(i,n,o,s,r){let a=Yt(e,t,n,o,s);return"=="===l?i===a:i!==a}}else{let t=Sa(d.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===o?{name:i,value:n,test:function(e,t,i,n){return a(e,e,t,i,n)}}:{name:i,value:n,test:function(e,t,i,n){let s=function(e,t,i,n){if(n<0)return e;if(n<t.length)return t[n];if(n>=100){n-=100;let e=i.split(".");if(e.unshift(i),n<e.length)return e[n]}return null}(e,t,i,o);return a(s||"",e,t,i,n)}}}function ka(e,t,i){if(i){if("string"==typeof i)return i;if(i.token||""===i.token){if("string"!=typeof i.token)throw Qt(e,"a 'token' attribute must be of type string, in rule: "+t);{let n={token:i.token};if(i.token.indexOf("$")>=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw Qt(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw Qt(e,"the next state must be a string value in rule: "+t);{let o=i.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,Yt(e,o,"",[],""))))throw Qt(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=o}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){let n=[];for(let o=0,s=i.length;o<s;o++)n[o]=ka(e,t,i[o]);return{group:n}}if(i.cases){let n=[];for(let o in i.cases)if(i.cases.hasOwnProperty(o)){const s=ka(e,t,i.cases[o]);"@default"===o||"@"===o||""===o?n.push({test:void 0,value:s,name:o}):"@eos"===o?n.push({test:function(e,t,i,n){return n},value:s,name:o}):n.push(xa(e,t,o,s))}const o=e.defaultToken;return{test:function(e,t,i,s){for(const o of n)if(!o.test||o.test(e,t,i,s))return o.value;return o}}}throw Qt(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t)}return{token:""}}class Na{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if("string"==typeof t)i=t;else{if(!(t instanceof RegExp))throw Qt(e,"rules must start with a match string or regular expression: "+this.name);i=t.source}this.matchOnlyAtLineStart=i.length>0&&"^"===i[0],this.name=this.name+": "+i,this.regex=La(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=ka(e,this.name,t)}}class Da{constructor(e,t){this._languageId=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i,n){if("function"==typeof this._actual.tokenize)return Ea.adaptTokenize(this._languageId,this._actual,e,i,n);throw new Error("Not supported!")}tokenize2(e,t,i){let n=this._actual.tokenizeEncoded(e,i);return new $.Hi(n.tokens,n.endState)}}class Ea{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._modeService=i,this._standaloneThemeService=n}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,i){let n=[],o=0;for(let s=0,r=e.length;s<r;s++){const r=e[s];let a=r.startIndex;0===s?a=0:a<o&&(a=o),n[s]=new $.WU(a+i,r.scopes,t),o=a}return n}static adaptTokenize(e,t,i,n,o){let s,r=t.tokenize(i,n),a=Ea._toClassicTokens(r.tokens,e,o);return s=r.endState.equals(n)?n:r.endState,new $.hG(a,s)}tokenize(e,t,i,n){return Ea.adaptTokenize(this._languageId,this._actual,e,i,n)}_toBinaryTokens(e,t,i){const n=e.encodeLanguageId(this._languageId),o=this._standaloneThemeService.getColorTheme().tokenTheme;let s=[],r=0,a=0;for(let e=0,l=t.length;e<l;e++){const l=t[e],d=o.match(n,l.scopes);if(r>0&&s[r-1]===d)continue;let h=l.startIndex;0===e?h=0:h<a&&(h=a),s[r++]=h+i,s[r++]=d,a=h}let l=new Uint32Array(r);for(let e=0;e<r;e++)l[e]=s[e];return l}tokenize2(e,t,i,n){let o,s=this._actual.tokenize(e,i),r=this._toBinaryTokens(this._modeService.languageIdCodec,s.tokens,n);return o=s.endState.equals(i)?i:s.endState,new $.Hi(r,o)}}function Ia(e){return e&&"function"==typeof e.then}var Ta,Ma=i(52603);B.BH.wrappingIndent.defaultValue=0,B.BH.glyphMargin.defaultValue=!1,B.BH.autoIndent.defaultValue=3,B.BH.overviewRulerLanes.defaultValue=2,Ma.xC.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const Ra=Z();Ra.editor={create:function(e,t,i){return Ca(e,i||{},(i=>new zn(e,t,i,i.get(_n.TG),i.get(he.$),i.get(_e.H),i.get(Ii.i6),i.get(vn.d),i.get(fn.u),i.get(pn.Z),i.get(Vi.lT),i.get(bi.Ui),i.get(Cn.F),i.get(kt.q),i.get(Me.h))))},onDidCreateEditor:function(e){return _a.codeEditorService.get().onCodeEditorAdd((t=>{e(t)}))},createDiffEditor:function(e,t,i){return Ca(e,i||{},(i=>new Kn(e,t,i,i.get(_n.TG),i.get(Ii.i6),i.get(vn.d),i.get(fn.u),i.get(Te.p),i.get(he.$),i.get(pn.Z),i.get(Vi.lT),i.get(bi.Ui),i.get(fn.i),i.get(yn.e),i.get(wn.p))))},createDiffNavigator:function(e,t){return new xe.F(e,t)},createModel:function(e,t,i){return Un(_a.modelService.get(),_a.modeService.get(),e,t,i)},setModelLanguage:function(e,t){_a.modelService.get().setMode(e,_a.modeService.get().create(t))},setModelMarkers:function(e,t,i){e&&_a.markerService.get().changeOne(t,e.uri,i)},getModelMarkers:function(e){return _a.markerService.get().read(e)},onDidChangeMarkers:function(e){return _a.markerService.get().onMarkerChanged(e)},getModels:function(){return _a.modelService.get().getModels()},getModel:function(e){return _a.modelService.get().getModel(e)},onDidCreateModel:function(e){return _a.modelService.get().onModelAdded(e)},onWillDisposeModel:function(e){return _a.modelService.get().onModelRemoved(e)},onDidChangeModelLanguage:function(e){return _a.modelService.get().onModelModeChanged((t=>{e({model:t.model,oldLanguage:t.oldModeId})}))},createWebWorker:function(e){return function(e,t){return new Vt(e,t)}(_a.modelService.get(),e)},colorizeElement:function(e,t){const i=_a.standaloneThemeService.get();return i.registerEditorContainer(e),di.colorizeElement(i,_a.modeService.get(),e,t)},colorize:function(e,t,i){return _a.standaloneThemeService.get().registerEditorContainer(document.body),di.colorize(_a.modeService.get(),e,t,i)},colorizeModelLine:function(e,t,i=4){return _a.standaloneThemeService.get().registerEditorContainer(document.body),di.colorizeModelLine(e,t,i)},tokenize:function(e,t){_a.modeService.get().triggerMode(t);let i=(r=t,Ee.RW.get(r)||{getInitialState:()=>Ie.nO,tokenize:(e,t,i,n)=>(0,Ie.Ri)(r,e,i,n)}),n=(0,We.uq)(e),o=[],s=i.getInitialState();var r;for(let e=0,t=n.length;e<t;e++){let t=n[e],r=i.tokenize(t,!0,s,0);o[e]=r.tokens,s=r.endState}return o},defineTheme:function(e,t){_a.standaloneThemeService.get().defineTheme(e,t)},setTheme:function(e){_a.standaloneThemeService.get().setTheme(e)},remeasureFonts:function(){(0,ba.P)()},registerCommand:function(e,t){return _e.P.registerCommand({id:e,handler:t})},AccessibilitySupport:n,ContentWidgetPositionPreference:l,CursorChangeReason:d,DefaultEndOfLine:h,EditorAutoIndentStrategy:u,EditorOption:g,EndOfLinePreference:p,EndOfLineSequence:m,MinimapPosition:y,MouseTargetType:S,OverlayWidgetPositionPreference:L,OverviewRulerLane:x,RenderLineNumbersType:k,RenderMinimap:N,ScrollbarVisibility:E,ScrollType:D,TextEditorCursorBlinkingStyle:A,TextEditorCursorStyle:O,TrackedRangeStickiness:P,WrappingIndent:F,ConfigurationChangedEvent:B.Bb,BareFontInfo:ke.E4,FontInfo:ke.pR,TextModelResolvedOptions:De.dJ,FindMatch:De.tk,EditorType:Ne.g,EditorOptions:B.BH},Ra.languages={register:function(e){$n.dQ.registerLanguage(e)},getLanguages:function(){let e=[];return e=e.concat($n.dQ.getLanguages()),e},onLanguage:function(e,t){let i=_a.modeService.get().onDidEncounterLanguage((n=>{n===e&&(i.dispose(),t())}));return i},getEncodedLanguageId:function(e){return _a.modeService.get().languageIdCodec.encodeLanguageId(e)},setLanguageConfiguration:function(e,t){const i=_a.modeService.get().validateLanguageId(e);if(!i)throw new Error(`Cannot set configuration for unknown language ${e}`);return tt.zu.register(i,t,100)},setColorMap:function(e){if(e){const t=[null];for(let i=1,n=e.length;i<n;i++)t[i]=eo.Il.fromHex(e[i]);_a.standaloneThemeService.get().setColorMapOverride(t)}else _a.standaloneThemeService.get().setColorMapOverride(null)},setTokensProvider:function(e,t){const i=_a.modeService.get().validateLanguageId(e);if(!i)throw new Error(`Cannot set tokens provider for unknown language ${e}`);const n=e=>function(e){return"tokenizeEncoded"in e}(e)?new Da(i,e):new Ea(i,e,_a.modeService.get(),_a.standaloneThemeService.get());return Ia(t)?Ee.RW.registerPromise(e,t.then((e=>n(e)))):Ee.RW.register(e,n(t))},setMonarchTokensProvider:function(e,t){const i=t=>function(e,t,i,n){return new ri(e,t,i,n)}(_a.modeService.get(),_a.standaloneThemeService.get(),e,function(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");let i={};i.languageId=e,i.includeLF=wa(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=wa(t.ignoreCase,!1),i.unicode=wa(t.unicode,!1),i.tokenPostfix=ya(t.tokenPostfix,"."+i.languageId),i.defaultToken=ya(t.defaultToken,"source"),i.usesEmbedded=!1;let n=t;function o(e,s,r){for(const a of r){let r=a.include;if(r){if("string"!=typeof r)throw Qt(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw Qt(i,"include target '"+r+"' is not defined at: "+e);o(e+"."+r,s,t.tokenizer[r])}else{const t=new Na(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw Qt(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw Qt(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=wa(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}s.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw Qt(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(let e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,o("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Qt(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let s=[];for(let e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw Qt(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw Qt(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");s.push({token:t.token+i.tokenPostfix,open:Zt(i,t.open),close:Zt(i,t.close)})}return i.brackets=s,i.noThrow=!0,i}(e,t));return Ia(t)?Ee.RW.registerPromise(e,t.then((e=>i(e)))):Ee.RW.register(e,i(t))},registerReferenceProvider:function(e,t){return Ee.FL.register(e,t)},registerRenameProvider:function(e,t){return Ee.G0.register(e,t)},registerCompletionItemProvider:function(e,t){return Ee.KZ.register(e,t)},registerSignatureHelpProvider:function(e,t){return Ee.nD.register(e,t)},registerHoverProvider:function(e,t){return Ee.xp.register(e,{provideHover:(e,i,n)=>{let o=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then((e=>{if(e)return!e.range&&o&&(e.range=new U.e(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new U.e(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return Ee.vJ.register(e,t)},registerDocumentHighlightProvider:function(e,t){return Ee.vH.register(e,t)},registerLinkedEditingRangeProvider:function(e,t){return Ee.id.register(e,t)},registerDefinitionProvider:function(e,t){return Ee.Ct.register(e,t)},registerImplementationProvider:function(e,t){return Ee.vI.register(e,t)},registerTypeDefinitionProvider:function(e,t){return Ee.tA.register(e,t)},registerCodeLensProvider:function(e,t){return Ee.He.register(e,t)},registerCodeActionProvider:function(e,t,i){return Ee.H9.register(e,{providedCodeActionKinds:null==i?void 0:i.providedCodeActionKinds,provideCodeActions:(e,i,n,o)=>{let s=_a.markerService.get().read({resource:e.uri}).filter((e=>U.e.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:s,only:n.only},o)},resolveCodeAction:t.resolveCodeAction})},registerDocumentFormattingEditProvider:function(e,t){return Ee.Az.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return Ee.vN.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return Ee.ln.register(e,t)},registerLinkProvider:function(e,t){return Ee.pM.register(e,t)},registerColorProvider:function(e,t){return Ee.OH.register(e,t)},registerFoldingRangeProvider:function(e,t){return Ee.aC.register(e,t)},registerDeclarationProvider:function(e,t){return Ee.RN.register(e,t)},registerSelectionRangeProvider:function(e,t){return Ee.AC.register(e,t)},registerDocumentSemanticTokensProvider:function(e,t){return Ee.wT.register(e,t)},registerDocumentRangeSemanticTokensProvider:function(e,t){return Ee.K7.register(e,t)},registerInlineCompletionsProvider:function(e,t){return Ee.zu.register(e,t)},registerInlayHintsProvider:function(e,t){return Ee.mX.register(e,t)},DocumentHighlightKind:c,CompletionItemKind:s,CompletionItemTag:r,CompletionItemInsertTextRule:o,SymbolKind:M,SymbolTag:R,IndentAction:f,CompletionTriggerKind:a,SignatureHelpTriggerKind:T,InlayHintKind:_,InlineCompletionTriggerKind:v,FoldingRangeKind:Ee.AD};const Aa=Ra.CancellationTokenSource,Oa=Ra.Emitter,Pa=Ra.KeyCode,Fa=Ra.KeyMod,Ba=Ra.Position,Wa=Ra.Range,Va=Ra.Selection,Ha=Ra.SelectionDirection,za=Ra.MarkerSeverity,Ka=Ra.MarkerTag,Ua=Ra.Uri,ja=Ra.Token,$a=Ra.editor,qa=Ra.languages;var Za;((null===(Ta=Fe.li.MonacoEnvironment)||void 0===Ta?void 0:Ta.globalAPI)||"function"==typeof define&&i.amdO)&&(self.monaco=Ra),void 0!==self.require&&"function"==typeof self.require.config&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]}),i(29126),i(89808),i(13598),i(52042),i(50497),i(11336),i(76334),i(30253),i(47940),i(18162),i(79556),i(56292),i(40605),i(30282),i(42429),i(24129),i(88765),i(43814),i(45067),i(21589),i(97820),i(40927),i(26220),i(1526),i(64091),i(40902),i(68423),i(17476),i(16745),i(43763),i(72323),i(46595),i(36831),i(66079),i(90158),i(38698),i(82665),i(51944),i(77365),i(37562),i(6595),i(75769),i(51714),i(86935),i(62893),i(27616),i(83335),i(46266),i(89723),i(55788),i(48746),i(94992),i(16563),i(57296),i(85098),i(83187),i(12026),i(76194),i(5566),i(26254),i(5734),i(40191),i(93127),i(34483),i(40840),i(37266),i(2375),i(96461),i(76628),i(40185),i(27776),i(28118),i(96337),i(87530),i(25929),i(17918),i(6205),i(46837),i(88307),i(39585),i(58203),i(67077),i(81905),i(94199),self.MonacoEnvironment=(Za={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"},{globalAPI:!1,getWorkerUrl:function(e,t){var n=i.p,o=(n?n.replace(/\/$/,"")+"/":"")+Za[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(o)){var s=String(window.location),r=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(o.substring(0,r.length)!==r){/^(\/\/)/.test(o)&&(o=window.location.protocol+o);var a=new Blob(["/*"+t+'*/importScripts("'+o+'");'],{type:"application/javascript"});return URL.createObjectURL(a)}}return o}})},99762:(e,t,i)=>{i.r(t),i.d(t,{CancellationTokenSource:()=>o.AU,Emitter:()=>o.Q5,KeyCode:()=>o.VD,KeyMod:()=>o.DC,MarkerSeverity:()=>o.ZL,MarkerTag:()=>o.eB,Position:()=>o.Ly,Range:()=>o.e6,Selection:()=>o.Y1,SelectionDirection:()=>o.a$,Token:()=>o.WU,Uri:()=>o.Sf,default:()=>wb,editor:()=>o.j6,languages:()=>o.Mj});var n={};i.r(n),i.d(n,{CancellationTokenSource:()=>o.AU,Emitter:()=>o.Q5,KeyCode:()=>o.VD,KeyMod:()=>o.DC,MarkerSeverity:()=>o.ZL,MarkerTag:()=>o.eB,Position:()=>o.Ly,Range:()=>o.e6,Selection:()=>o.Y1,SelectionDirection:()=>o.a$,Token:()=>o.WU,Uri:()=>o.Sf,editor:()=>o.j6,languages:()=>o.Mj}),i(43017),i(4215),i(69317),i(54367),i(72102),i(55833),i(51925),i(38593),i(46838),i(2719),i(23365),i(93740),i(41895),i(54555),i(76917),i(55015),i(63218),i(96962),i(63737),i(44125),i(61097),i(40832),i(43588),i(60628),i(53385),i(74271),i(41321),i(810),i(84602),i(66348),i(50865),i(52165),i(95733),i(97615),i(50995),i(52293),i(34540),i(93519),i(77061),i(55584),i(38956),i(78944),i(48766),i(73945),i(45048),i(43448),i(61168),i(89995),i(102),i(98762),i(90165),i(25463),i(88088),i(15662),i(64662),i(52614),i(84677),i(79607),i(70943),i(37181),i(86709),i(42582);var o=i(90850),s=i(72805),r=function(){function e(e,t,i){this._onDidChange=new s.Q5,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this.options},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),e.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setDiagnosticsOptions=function(e){this.setOptions(e)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}(),a={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0}},l={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},d=new r("css",a,l),h=new r("scss",a,l),c=new r("less",a,l);function u(){return i.e(7404).then(i.bind(i,57404))}s.Mj.css={cssDefaults:d,lessDefaults:c,scssDefaults:h},s.Mj.onLanguage("less",(function(){u().then((function(e){return e.setupMode(c)}))})),s.Mj.onLanguage("scss",(function(){u().then((function(e){return e.setupMode(h)}))})),s.Mj.onLanguage("css",(function(){u().then((function(e){return e.setupMode(d)}))}));var g=i(78325),p=function(){function e(e,t,i){this._onDidChange=new g.Q5,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}(),m=new p("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});g.Mj.json={jsonDefaults:m},g.Mj.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),g.Mj.onLanguage("json",(function(){i.e(1894).then(i.bind(i,1894)).then((function(e){return e.setupMode(m)}))}));var f=i(47537),_=function(){function e(e,t,i){this._onDidChange=new f.Q5,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),e.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}(),v={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:null,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},suggest:{},data:{useDefaultDataProvider:!0}};function b(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===C,documentFormattingEdits:e===C,documentRangeFormattingEdits:e===C}}var C="html",w="handlebars",y="razor",S=E(C,v,b(C)),L=S.defaults,x=E(w,v,b(w)),k=x.defaults,N=E(y,v,b(y)),D=N.defaults;function E(e,t,n){var o=this;void 0===t&&(t=v),void 0===n&&(n=b(e));var s,r=new _(e,t,n),a=f.Mj.onLanguage(e,(function(){return e=o,t=void 0,a=function(){return function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(!((o=(o=r.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){r=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(6===s[0]&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e],n=0}finally{i=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}(this,(function(e){switch(e.label){case 0:return[4,i.e(6331).then(i.bind(i,96331))];case 1:return s=e.sent().setupMode(r),[2]}}))},new((n=void 0)||(n=Promise))((function(i,o){function s(e){try{l(a.next(e))}catch(e){o(e)}}function r(e){try{l(a.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((a=a.apply(e,t||[])).next())}));var e,t,n,a}));return{defaults:r,dispose:function(){a.dispose(),null==s||s.dispose(),s=void 0}}}f.Mj.html={htmlDefaults:L,razorDefaults:D,handlebarDefaults:k,htmlLanguageService:S,handlebarLanguageService:x,razorLanguageService:N,registerHTMLLanguageService:E};var I=i(34906),T={},M={},R=function(){function e(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((function(e,i){t._lazyLoadPromiseResolve=e,t._lazyLoadPromiseReject=i}))}return e.getOrCreate=function(t){return M[t]||(M[t]=new e(t)),M[t]},e.prototype.whenLoaded=function(){return this._lazyLoadPromise},e.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,T[this._languageId].loader().then((function(t){return e._lazyLoadPromiseResolve(t)}),(function(t){return e._lazyLoadPromiseReject(t)}))),this._lazyLoadPromise},e}();function A(e){var t=e.id;T[t]=e,I.Mj.register(e);var i=R.getOrCreate(t);I.Mj.setMonarchTokensProvider(t,i.whenLoaded().then((function(e){return e.language}))),I.Mj.onLanguage(t,(function(){i.load().then((function(e){I.Mj.setLanguageConfiguration(t,e.conf)}))}))}A({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:function(){return i.e(8952).then(i.bind(i,58952))}}),A({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:function(){return i.e(9088).then(i.bind(i,39088))}}),A({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:function(){return i.e(4299).then(i.bind(i,54299))}}),A({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:function(){return i.e(4756).then(i.bind(i,4756))}}),A({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:function(){return i.e(5322).then(i.bind(i,75322))}}),A({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:function(){return i.e(8583).then(i.bind(i,88583))}}),A({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:function(){return i.e(3181).then(i.bind(i,13181))}}),A({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:function(){return i.e(8683).then(i.bind(i,68683))}}),A({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:function(){return i.e(5542).then(i.bind(i,95542))}}),A({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:function(){return i.e(5542).then(i.bind(i,95542))}}),A({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:function(){return i.e(9404).then(i.bind(i,99404))}}),A({id:"csp",extensions:[],aliases:["CSP","csp"],loader:function(){return i.e(1462).then(i.bind(i,81462))}}),A({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:function(){return i.e(2616).then(i.bind(i,92616))}}),A({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:function(){return i.e(9753).then(i.bind(i,69753))}}),A({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:function(){return i.e(4450).then(i.bind(i,14450))}}),A({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:function(){return i.e(2787).then(i.bind(i,2787))}}),A({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:function(){return i.e(8874).then(i.bind(i,58874))}}),A({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:function(){return i.e(6778).then(i.bind(i,46778))}}),A({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:function(){return i.e(5324).then(i.bind(i,25324))}}),A({id:"go",extensions:[".go"],aliases:["Go"],loader:function(){return i.e(6967).then(i.bind(i,16967))}}),A({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:function(){return i.e(9965).then(i.bind(i,29965))}}),A({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:function(){return i.e(2577).then(i.bind(i,52577))}}),A({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:function(){return i.e(6562).then(i.bind(i,16562))}}),A({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:function(){return i.e(3460).then(i.bind(i,83460))}}),A({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:function(){return i.e(2169).then(i.bind(i,22169))}}),A({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:function(){return i.e(5129).then(i.bind(i,55129))}}),A({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return i.e(1326).then(i.bind(i,21326))}}),A({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:function(){return i.e(8067).then(i.bind(i,28067))}}),A({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:function(){return i.e(6605).then(i.bind(i,26605))}}),A({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:function(){return i.e(440).then(i.bind(i,20440))}}),A({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:function(){return i.e(5966).then(i.bind(i,85966))}}),A({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:function(){return i.e(2494).then(i.bind(i,22494))}}),A({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:function(){return i.e(9738).then(i.bind(i,69738))}}),A({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:function(){return i.e(6454).then(i.bind(i,86454))}}),A({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return i.e(6514).then(i.bind(i,66514))}}),A({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:function(){return i.e(3798).then(i.bind(i,23798))}}),A({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:function(){return i.e(7051).then(i.bind(i,67051))}}),A({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:function(){return i.e(683).then(i.bind(i,40683))}}),A({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:function(){return i.e(6153).then(i.bind(i,76153))}}),A({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:function(){return i.e(614).then(i.bind(i,90614))}}),A({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:function(){return i.e(750).then(i.bind(i,750))}}),A({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:function(){return i.e(6625).then(i.bind(i,96625))}}),A({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:function(){return i.e(4644).then(i.bind(i,84644))}}),A({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:function(){return i.e(7252).then(i.bind(i,87252))}}),A({id:"pla",extensions:[".pla"],loader:function(){return i.e(8992).then(i.bind(i,78992))}}),A({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:function(){return i.e(2613).then(i.bind(i,22613))}}),A({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:function(){return i.e(7034).then(i.bind(i,67034))}}),A({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:function(){return i.e(6488).then(i.bind(i,76488))}}),A({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:function(){return i.e(427).then(i.bind(i,20427))}}),A({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:function(){return i.e(1281).then(i.bind(i,11281))}}),A({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:function(){return i.e(1513).then(i.bind(i,1513))}}),A({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:function(){return i.e(2567).then(i.bind(i,12567))}}),A({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:function(){return i.e(7392).then(i.bind(i,17392))}}),A({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:function(){return i.e(5510).then(i.bind(i,15510))}}),A({id:"redis",extensions:[".redis"],aliases:["redis"],loader:function(){return i.e(7970).then(i.bind(i,67970))}}),A({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:function(){return i.e(5291).then(i.bind(i,65291))}}),A({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:function(){return i.e(5305).then(i.bind(i,75305))}}),A({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:function(){return i.e(4245).then(i.bind(i,4245))}}),A({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:function(){return i.e(9654).then(i.bind(i,19654))}}),A({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:function(){return i.e(6812).then(i.bind(i,76812))}}),A({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:function(){return i.e(8689).then(i.bind(i,68689))}}),A({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:function(){return i.e(277).then(i.bind(i,50277))}}),A({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:function(){return i.e(9409).then(i.bind(i,59409))}}),A({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:function(){return i.e(994).then(i.bind(i,30994))}}),A({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:function(){return i.e(3178).then(i.bind(i,3178))}}),A({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:function(){return i.e(2212).then(i.bind(i,32212))}}),A({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:function(){return i.e(8773).then(i.bind(i,28773))}}),A({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:function(){return i.e(2561).then(i.bind(i,32561))}}),A({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:function(){return i.e(896).then(i.bind(i,10896))}}),A({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:function(){return i.e(5082).then(i.bind(i,55082))}}),A({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:function(){return i.e(5209).then(i.bind(i,45209))}}),A({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:function(){return i.e(5209).then(i.bind(i,45209))}}),A({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:function(){return i.e(7732).then(i.bind(i,67732))}}),A({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:function(){return i.e(3259).then(i.bind(i,63259))}}),A({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return i.e(9893).then(i.bind(i,49893))}}),A({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:function(){return i.e(8712).then(i.bind(i,8712))}}),A({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:function(){return i.e(3967).then(i.bind(i,36291))}}),A({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:function(){return i.e(9141).then(i.bind(i,79141))}});var O=i(83345),P=i(80197),F=(i(88726),i(90143),i(40700)),B=i(70880),W=i(96332),V=i(93379),H=i.n(V),z=i(7795),K=i.n(z),U=i(90569),j=i.n(U),$=i(3565),q=i.n($),Z=i(19216),G=i.n(Z),Q=i(44589),Y=i.n(Q),J=i(82623),X={};X.styleTagTransform=Y(),X.setAttributes=q(),X.insert=j().bind(null,"head"),X.domAPI=K(),X.insertStyleElement=G(),H()(J.Z,X),J.Z&&J.Z.locals&&J.Z.locals;var ee=i(87107),te=i(87178),ie=i(51778),ne=i(85337),oe=i(72396),se=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const re=new oe.uy("selectionAnchorSet",!1);let ae=class e{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=re.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],i=this.editor.deltaDecorations(t,[{range:te.Y.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:(new B.W5).appendText((0,ne.N)("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=i[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,F.Z9)((0,ne.N)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(te.Y.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};var le,de;ae.ID="editor.contrib.selectionAnchorController",ae=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(le=1,de=oe.i6,function(e,t){de(e,t,le)})],ae);class he extends ee.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,ne.N)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2080),weight:100}})}run(e,t){return se(this,void 0,void 0,(function*(){ae.get(t).setSelectionAnchor()}))}}class ce extends ee.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,ne.N)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:re})}run(e,t){return se(this,void 0,void 0,(function*(){ae.get(t).goToSelectionAnchor()}))}}class ue extends ee.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,ne.N)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:re,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2089),weight:100}})}run(e,t){return se(this,void 0,void 0,(function*(){ae.get(t).selectFromAnchorToCursor()}))}}class ge extends ee.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,ne.N)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:re,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:9,weight:100}})}run(e,t){return se(this,void 0,void 0,(function*(){ae.get(t).cancelSelectionAnchor()}))}}(0,ee._K)(ae.ID,ae),(0,ee.Qr)(he),(0,ee.Qr)(ce),(0,ee.Qr)(ue),(0,ee.Qr)(ge);var pe=i(10554),me=i(48646),fe=i(62444),_e={};_e.styleTagTransform=Y(),_e.setAttributes=q(),_e.insert=j().bind(null,"head"),_e.domAPI=K(),_e.insertStyleElement=G(),H()(fe.Z,_e),fe.Z&&fe.Z.locals&&fe.Z.locals;var ve=i(24028),be=i(78891),Ce=i(66054),we=i(95098),ye=i(81312),Se=i(58236),Le=i(98962),xe=i(65700);const ke=(0,Le.P6)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},ne.N("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Ne extends ee.R6{constructor(){super({id:"editor.action.jumpToBracket",label:ne.N("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:3160,weight:100}})}run(e,t){let i=Ie.get(t);i&&i.jumpToBracket()}}class De extends ee.R6{constructor(){super({id:"editor.action.selectToBracket",label:ne.N("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){const n=Ie.get(t);if(!n)return;let o=!0;i&&!1===i.selectBrackets&&(o=!1),n.selectToBracket(o)}}class Ee{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class Ie extends me.JT{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new pe.pY((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(63),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(63)&&(this._matchBrackets=this._editor.getOption(63),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}static get(e){return e.getContribution(Ie.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.matchBracket(i);let o=null;if(n)n[0].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.findEnclosingBrackets(i);if(t)o=t[0].getStartPosition();else{const t=e.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new te.Y(o.lineNumber,o.column,o.lineNumber,o.column):new te.Y(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const o=n.getStartPosition();let s=t.matchBracket(o);if(!s&&(s=t.findEnclosingBrackets(o),!s)){const e=t.findNextBracket(o);e&&e.range&&(s=t.matchBracket(e.range.getStartPosition()))}let r=null,a=null;if(s){s.sort(be.e.compareRangesUsingStarts);const[t,i]=s;if(r=e?t.getStartPosition():t.getEndPosition(),a=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(o)){const e=r;r=a,a=e}}r&&a&&i.push(new te.Y(r.lineNumber,r.column,a.lineNumber,a.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let o=[],s=0;for(let t=0,i=e.length;t<i;t++){let i=e[t];i.isEmpty()&&(o[s++]=i.getStartPosition())}o.length>1&&o.sort(ve.L.compare);let r=[],a=0,l=0,d=n.length;for(let e=0,i=o.length;e<i;e++){let i=o[e];for(;l<d&&n[l].position.isBefore(i);)l++;if(l<d&&n[l].position.equals(i))r[a++]=n[l];else{let e=t.matchBracket(i),n=Ie._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;e||"always"!==this._matchBrackets||(e=t.findEnclosingBrackets(i,20),n=Ie._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),r[a++]=new Ee(i,e,n)}}this._lastBracketsData=r,this._lastVersionId=i}}Ie.ID="editor.contrib.bracketMatchingController",Ie._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=we.qx.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,xe.EN)(ke),position:Ce.sh.Center}}),Ie._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=we.qx.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),(0,ee._K)(Ie.ID,Ie),(0,ee.Qr)(De),(0,ee.Qr)(Ne),(0,xe.Ic)(((e,t)=>{const i=e.getColor(ye.TC);i&&t.addRule(`.monaco-editor .bracket-match { background-color: ${i}; }`);const n=e.getColor(ye.Dl);n&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${n}; }`)})),Se.BH.appendMenuItem(Se.eH.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:ne.N({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class Te{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const s=new be.e(i,n-1,i,n),r=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new be.e(i,o,i,o),r)}else{const s=new be.e(i,o,i,o+1),r=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new be.e(i,n,i,n),r)}}computeCursorState(e,t){return this._isMovingLeft?new te.Y(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new te.Y(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class Me extends ee.R6{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],n=t.getSelections();for(const e of n)i.push(new Te(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}(0,ee.Qr)(class extends Me{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:ne.N("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:ie.u.writable})}}),(0,ee.Qr)(class extends Me{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:ne.N("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:ie.u.writable})}});var Re=i(63703),Ae=i(12495);class Oe extends ee.R6{constructor(){super({id:"editor.action.transposeLetters",label:ne.N("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],o=t.getSelections();for(let e of o){if(!e.isEmpty())continue;let t=e.startLineNumber,o=e.startColumn,s=i.getLineMaxColumn(t);if(1===t&&(1===o||2===o&&2===s))continue;let r=o===s?e.getPosition():Ae.o.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),a=Ae.o.leftPosition(i,r),l=Ae.o.leftPosition(i,a),d=i.getValueInRange(be.e.fromPositions(l,a)),h=i.getValueInRange(be.e.fromPositions(a,r)),c=be.e.fromPositions(l,r);n.push(new Re.T4(c,h+d))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,ee.Qr)(Oe);var Pe=i(23875),Fe=i(84483),Be=i(43770),We=i(96615),Ve=i(88915);const He="9_cutcopypaste",ze=Fe.tY||document.queryCommandSupported("cut"),Ke=Fe.tY||document.queryCommandSupported("copy"),Ue=void 0!==navigator.clipboard&&!Pe.vU||document.queryCommandSupported("paste");function je(e){return e.register(),e}const $e=ze?je(new ee.AJ({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Fe.tY?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Se.eH.MenubarEditMenu,group:"2_ccp",title:ne.N({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:Se.eH.EditorContext,group:He,title:ne.N("actions.clipboard.cutLabel","Cut"),when:ie.u.writable,order:1},{menuId:Se.eH.CommandPalette,group:"",title:ne.N("actions.clipboard.cutLabel","Cut"),order:1},{menuId:Se.eH.SimpleEditorContext,group:He,title:ne.N("actions.clipboard.cutLabel","Cut"),when:ie.u.writable,order:1}]})):void 0,qe=Ke?je(new ee.AJ({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Fe.tY?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Se.eH.MenubarEditMenu,group:"2_ccp",title:ne.N({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:Se.eH.EditorContext,group:He,title:ne.N("actions.clipboard.copyLabel","Copy"),order:2},{menuId:Se.eH.CommandPalette,group:"",title:ne.N("actions.clipboard.copyLabel","Copy"),order:1},{menuId:Se.eH.SimpleEditorContext,group:He,title:ne.N("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Se.BH.appendMenuItem(Se.eH.MenubarEditMenu,{submenu:Se.eH.MenubarCopy,title:{value:ne.N("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),Se.BH.appendMenuItem(Se.eH.EditorContext,{submenu:Se.eH.EditorContextCopy,title:{value:ne.N("copy as","Copy As"),original:"Copy As"},group:He,order:3});const Ze=Ue?je(new ee.AJ({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Fe.tY?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Se.eH.MenubarEditMenu,group:"2_ccp",title:ne.N({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:Se.eH.EditorContext,group:He,title:ne.N("actions.clipboard.pasteLabel","Paste"),when:ie.u.writable,order:4},{menuId:Se.eH.CommandPalette,group:"",title:ne.N("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:Se.eH.SimpleEditorContext,group:He,title:ne.N("actions.clipboard.pasteLabel","Paste"),when:ie.u.writable,order:4}]})):void 0;class Ge extends ee.R6{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:ne.N("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:ie.u.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(32)&&t.getSelection().isEmpty()||(Be.RA.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),Be.RA.forceCopyWithSyntaxHighlighting=!1))}}function Qe(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(We.$).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(32),i=n.getSelection();return i&&i.isEmpty()&&!e||document.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(document.execCommand(t),!0))))}Qe($e,"cut"),Qe(qe,"copy"),Ze&&(Ze.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(We.$),n=e.get(Ve.p),o=i.getFocusedCodeEditor();return!(!o||!o.hasTextFocus())&&(!(!document.execCommand("paste")&&Fe.$L)||(s=void 0,r=void 0,l=function*(){const e=yield n.readText();if(""!==e){const t=Be.Nl.INSTANCE.get(e);let i=!1,n=null,s=null;t&&(i=o.getOption(32)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,s=t.mode),o.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:s})}},new((a=void 0)||(a=Promise))((function(e,t){function i(e){try{o(l.next(e))}catch(e){t(e)}}function n(e){try{o(l.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof a?o:new a((function(e){e(o)}))).then(i,n)}o((l=l.apply(s,r||[])).next())}))));var s,r,a,l})),Ze.addImplementation(0,"generic-dom",((e,t)=>(document.execCommand("paste"),!0)))),Ke&&(0,ee.Qr)(Ge);var Ye=i(28245);class Je{constructor(e){this.executor=e,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var Xe=i(96024),et=i(50994),tt=i(76345),it=i(98147),nt=i(51732),ot=i(45188),st=i(18339),rt=i(35208),at=i(34622),lt=i(61112);class dt{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+dt.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new dt(this.value+dt.sep+e)}}function ht(e,t,i){return!(!t.contains(e)||i&&t.contains(i))}dt.sep=".",dt.None=new dt("@@none@@"),dt.Empty=new dt(""),dt.QuickFix=new dt("quickfix"),dt.Refactor=new dt("refactor"),dt.Source=new dt("source"),dt.SourceOrganizeImports=dt.Source.append("organizeImports"),dt.SourceFixAll=dt.Source.append("fixAll");class ct{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return e&&"object"==typeof e?new ct(ct.getKindFromUser(e,t.kind),ct.getApplyFromUser(e,t.apply),ct.getPreferredUser(e)):new ct(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new dt(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}}var ut=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const gt="editor.action.codeAction",pt="editor.action.refactor",mt="editor.action.sourceAction",ft="editor.action.organizeImports",_t="editor.action.fixAll";class vt{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return ut(this,void 0,void 0,(function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(e){(0,it.Cp)(e)}t&&(this.action.edit=t.edit)}return this}))}}class bt extends me.JT{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(bt.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:(0,tt.Of)(e.diagnostics)?(0,tt.Of)(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:(0,tt.Of)(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&dt.QuickFix.contains(new dt(e.kind))&&!!e.isPreferred))}}const Ct={actions:[],documentation:void 0};function wt(e,t,i,n,o){var s;const r=i.filter||{},a={only:null===(s=r.include)||void 0===s?void 0:s.value,trigger:i.type},l=new ot.YQ(e,o),d=function(e,t){return st.H9.all(e).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>function(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>ht(t,i,e.include)))||!e.includeSourceActions&&dt.Source.contains(t))}(t,new dt(e))))))}(e,r),h=new me.SL,c=d.map((i=>ut(this,void 0,void 0,(function*(){try{n.report(i);const o=yield i.provideCodeActions(e,t,a,l.token);if(o&&h.add(o),l.token.isCancellationRequested)return Ct;const s=((null==o?void 0:o.actions)||[]).filter((e=>e&&function(e,t){const i=t.kind?new dt(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>ht(i,t,e.include)))||!e.includeSourceActions&&i&&dt.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}(r,e))),d=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new dt(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new dt(e.kind)))return t.command}(i,s,r.include);return{actions:s.map((e=>new vt(e,i))),documentation:d}}catch(e){if((0,it.VV)(e))throw e;return(0,it.Cp)(e),Ct}})))),u=st.H9.onDidChange((()=>{const t=st.H9.all(e);(0,tt.fS)(t,d)||l.cancel()}));return Promise.all(c).then((e=>{const t=(0,tt.xH)(e.map((e=>e.actions))),i=(0,tt.kX)(e.map((e=>e.documentation)));return new bt(t,i,h)})).finally((()=>{u.dispose(),l.dispose()}))}at.P.registerCommand("_executeCodeActionProvider",(function(e,t,i,n,o){return ut(this,void 0,void 0,(function*(){if(!(t instanceof nt.o))throw(0,it.b1)();const s=e.get(rt.q).getModel(t);if(!s)throw(0,it.b1)();const r=te.Y.isISelection(i)?te.Y.liftSelection(i):be.e.isIRange(i)?s.validateRange(i):void 0;if(!r)throw(0,it.b1)();const a="string"==typeof n?new dt(n):void 0,l=yield wt(s,r,{type:1,filter:{includeSourceActions:!0,include:a}},lt.E.None,Ye.T.None),d=[],h=Math.min(l.validActions.length,"number"==typeof o?o:0);for(let e=0;e<h;e++)d.push(l.validActions[e].resolve(Ye.T.None));try{return yield Promise.all(d),l.validActions.map((e=>e.action))}finally{setTimeout((()=>l.dispose()),100)}}))}));var yt=i(85368),St={};St.styleTagTransform=Y(),St.setAttributes=q(),St.insert=j().bind(null,"head"),St.domAPI=K(),St.insertStyleElement=G(),H()(yt.Z,St),yt.Z&&yt.Z.locals&&yt.Z.locals;var Lt=i(36550);let xt=class e{constructor(t,i){this._messageWidget=new me.XK,this._messageListeners=new me.SL,this._editor=t,this._visible=e.MESSAGE_VISIBLE.bindTo(i),this._editorListener=this._editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit()))}static get(t){return t.getContribution(e.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;(0,F.Z9)(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new Nt(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText((()=>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(new pe._F((()=>this.closeMessage()),3e3)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new be.e(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Nt.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(ne.N("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};xt.ID="editor.contrib.messageController",xt.MESSAGE_VISIBLE=new oe.uy("messageVisible",!1,ne.N("messageVisible","Whether the editor is currently showing an inline message")),xt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,oe.i6)],xt);const kt=ee._l.bindToContribution(xt.get);(0,ee.fK)(new kt({id:"leaveEditorMessage",precondition:xt.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class Nt{constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const s=document.createElement("div");s.classList.add("message"),s.textContent=n,this._domNode.appendChild(s);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const i=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",i)};return t=setTimeout(i,110),e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}(0,ee._K)(xt.ID,xt),(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le.EP);if(i){let n=e.type===Lt.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${i}; }`),t.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${i}; }`),t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${n}px solid ${i}; }`)}const n=e.getColor(Le._l);n&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${n}; }`);const o=e.getColor(Le.YI);o&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${o}; }`)}));var Dt=i(7978),Et=i(48696),It=i(92981),Tt=i(40094),Mt=i(42162),Rt=function(e,t){return function(i,n){t(i,n,e)}};class At extends It.aU{constructor(e,t){super(e.command?e.command.id:e.title,e.title.replace(/\r\n|\r|\n/g," "),void 0,!e.disabled,t),this.action=e}}let Ot=class extends me.JT{constructor(e,t,i,n){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._visible=!1,this._showingActions=this._register(new me.XK),this._keybindingResolver=new Pt({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}show(e,t,i,n){return o=this,s=void 0,a=function*(){const o=n.includeDisabledActions?t.allActions:t.validActions;if(!o.length)return void(this._visible=!1);if(!this._editor.getDomNode())throw this._visible=!1,(0,it.F0)();this._visible=!0,this._showingActions.value=t;const s=this.getMenuActions(e,o,t.documentation),r=ve.L.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},a=this._keybindingResolver.getResolver(),l=this._editor.getOption(113);this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>r,getActions:()=>s,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof At?a(e.action):void 0})},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function n(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,n)}l((a=a.apply(o,s||[])).next())}));var o,s,r,a}getMenuActions(e,t,i){var n,o;const s=e=>new At(e.action,(()=>this._delegate.onSelectCodeAction(e))),r=t.map(s),a=[...i],l=this._editor.getModel();if(l&&r.length)for(const i of st.H9.all(l))i._getAdditionalMenuItems&&a.push(...i._getAdditionalMenuItems({trigger:e.type,only:null===(o=null===(n=e.filter)||void 0===n?void 0:n.include)||void 0===o?void 0:o.value},t.map((e=>e.action))));return a.length&&r.push(new It.Z0,...a.map((e=>s(new vt({title:e.title,command:e},void 0))))),r}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=(0,Et.i)(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}};Ot=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Rt(2,Tt.i),Rt(3,Mt.d)],Ot);class Pt{constructor(e){this._keybindingProvider=e}getResolver(){const e=new Je((()=>this._keybindingProvider.getKeybindings().filter((e=>Pt.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===ft?t={kind:dt.SourceOrganizeImports.value}:e.command===_t&&(t={kind:dt.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},ct.fromUser(t,{kind:dt.None,apply:"never"}))}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new dt(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}}Pt.codeActionCommands=[pt,gt,mt,ft,_t];var Ft=i(64573),Bt=i(63030),Wt=i(85095),Vt=i(77538),Ht=i(86242),zt={};zt.styleTagTransform=Y(),zt.setAttributes=q(),zt.insert=j().bind(null,"head"),zt.domAPI=K(),zt.insertStyleElement=G(),H()(Ht.Z,zt),Ht.Z&&Ht.Z.locals&&Ht.Z.locals;var Kt;!function(e){e.Hidden={type:0},e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(Kt||(Kt={}));let Ut=class e extends me.JT{constructor(e,t,i,n){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new Vt.Q5),this.onClick=this._onClick.event,this._state=Kt.Hidden,this._domNode=document.createElement("div"),this._domNode.className=Wt.lA.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),Bt.o.ignoreTarget(this._domNode),this._register(Et.Gw(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=Et.i(this._domNode),n=this._editor.getOption(58);let o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(o+=n),this._onClick.fire({x:e.posx,y:t+i+o,actions:this.state.actions,trigger:this.state.trigger})}))),this._register(Et.nm(this._domNode,"mouseenter",(e=>{if(1!=(1&e.buttons))return;this.hide();const t=new Ft.Z;t.startMonitoring(e.target,e.buttons,Ft.e,(()=>{}),(()=>{t.dispose()}))}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(56)&&!this._editor.getOption(56).enabled&&this.hide()}))),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(t,i,n){if(t.validActions.length<=0)return this.hide();const o=this._editor.getOptions();if(!o.get(56).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(n),l=s.getOptions().tabSize,d=o.get(43),h=s.getLineContent(r),c=we.yO.computeIndentLevel(h,l),u=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let g=r;if(!(d.spaceWidth*c>22))if(r>1&&!u(r-1))g-=1;else if(u(r+1)){if(a*d.spaceWidth<22)return this.hide()}else g+=1;this.state=new Kt.Showing(t,i,n,{position:{lineNumber:g,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=Kt.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...Wt.lA.lightBulb.classNamesArray),this._domNode.classList.add(...Wt.lA.lightbulbAutofix.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e)return void(this.title=ne.N("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",e.getLabel()))}this._domNode.classList.remove(...Wt.lA.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...Wt.lA.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=e?ne.N("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):ne.N("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};Ut._posPref=[0],Ut=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,Mt.d)],Ut),(0,xe.Ic)(((e,t)=>{var i;const n=null===(i=e.getColor(Le.cv))||void 0===i?void 0:i.transparent(.7),o=e.getColor(Le.Fu);o&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${Wt.lA.lightBulb.cssSelector} {\n\t\t\tcolor: ${o};\n\t\t\tbackground-color: ${n};\n\t\t}`);const s=e.getColor(Le.sK);s&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${Wt.lA.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${s};\n\t\t\tbackground-color: ${n};\n\t\t}`)}));var jt,$t=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let qt=class extends me.JT{constructor(e,t,i,n,o){super(),this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new me.XK),jt.set(this,!1),this._codeActionWidget=new Je((()=>this._register(o.createInstance(Ot,this._editor,{onSelectCodeAction:e=>$t(this,void 0,void 0,(function*(){this.delegate.applyCodeAction(e,!0)}))})))),this._lightBulbWidget=new Je((()=>{const e=this._register(o.createInstance(Ut,this._editor,t,i));return this._register(e.onClick((e=>this.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1})))),e}))}dispose(){(function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,i):o?o.value=i:t.set(e,i)})(this,jt,!0,"f"),super.dispose()}update(e){var t,i,n;return $t(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let o;try{o=yield e.actions}catch(e){return void(0,it.dL)(e)}if(!function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}(this,jt,"f"))if(this._lightBulbWidget.getValue().update(o,e.trigger,e.position),1===e.trigger.type){if(null===(i=e.trigger.filter)||void 0===i?void 0:i.include){const t=this.tryGetValidActionToApply(e.trigger,o);if(t){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(t,!1)}finally{o.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,o);if(t&&t.action.disabled)return xt.get(this._editor).showMessage(t.action.disabled,e.trigger.context.position),void o.dispose()}}const t=!!(null===(n=e.trigger.filter)||void 0===n?void 0:n.include);if(e.trigger.context&&(!o.allActions.length||!t&&!o.validActions.length))return xt.get(this._editor).showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=o,void o.dispose();this._activeCodeActions.value=o,this._codeActionWidget.getValue().show(e.trigger,o,e.position,{includeDisabledActions:t})}else this._codeActionWidget.getValue().isVisible?o.dispose():this._activeCodeActions.value=o}))}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}showCodeActionList(e,t,i,n){return $t(this,void 0,void 0,(function*(){this._codeActionWidget.getValue().show(e,t,i,n)}))}};jt=new WeakMap,qt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(4,Dt.TG)],qt);var Zt,Gt=i(76634),Qt=i(44794),Yt=i(93026),Jt=i(82219),Xt=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)};const ei=new oe.uy("supportedCodeAction","");class ti extends me.JT{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new pe._F),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._onCursorChange())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>(0,Jt.Xy)(e,t.uri)))&&this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(be.e.intersectRanges(n,e))return be.e.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&2===e.type){const{lineNumber:e,column:n}=i.getPosition(),o=t.getLineContent(e);if(0===o.length)return;if(1===n){if(/\s/.test(o[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[n-2])&&/\s/.test(o[n-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i)return void this._signalChange(void 0);const n=this._getRangeOfMarker(t),o=n?n.getStartPosition():t.getStartPosition(),s={trigger:e,selection:t,position:o};return this._signalChange(s),s}}var ii;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,i,n){this.trigger=e,this.rangeOrSelection=t,this.position=i,this._cancellablePromise=n,this.type=1,this.actions=n.catch((e=>{if((0,it.VV)(e))return ni;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(ii||(ii={}));const ni={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class oi extends me.JT{constructor(e,t,i,n){super(),this._editor=e,this._markerService=t,this._progressService=n,this._codeActionOracle=this._register(new me.XK),this._state=ii.Empty,this._onDidChangeState=this._register(new Vt.Q5),this.onDidChangeState=this._onDidChangeState.event,Zt.set(this,!1),this._supportedCodeActions=ei.bindTo(i),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(st.H9.onDidChange((()=>this._update()))),this._update()}dispose(){Xt(this,Zt,"f")||(function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,i):o?o.value=i:t.set(e,i)}(this,Zt,!0,"f"),super.dispose(),this.setState(ii.Empty,!0))}_update(){if(Xt(this,Zt,"f"))return;this._codeActionOracle.value=void 0,this.setState(ii.Empty);const e=this._editor.getModel();if(e&&st.H9.has(e)&&!this._editor.getOption(80)){const t=[];for(const i of st.H9.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new ti(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(ii.Empty);const n=(0,pe.PG)((i=>wt(e,t.selection,t.trigger,lt.E.None,i)));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(n,250)),this.setState(new ii.Triggered(t.trigger,t.selection,t.position,n))}),void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||Xt(this,Zt,"f")||this._onDidChangeState.fire(e))}}Zt=new WeakMap;var si=function(e,t){return function(i,n){t(i,n,e)}},ri=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function ai(e){return oe.Ao.regex(ei.keys()[0],new RegExp("(\\s|^)"+(0,Xe.ec)(e.value)+"\\b"))}const li={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:ne.N("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:ne.N("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[ne.N("args.schema.apply.first","Always apply the first returned code action."),ne.N("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),ne.N("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:ne.N("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let di=class e extends me.JT{constructor(e,t,i,n,o){super(),this._instantiationService=o,this._editor=e,this._model=this._register(new oi(this._editor,t,i,n)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._ui=new Je((()=>this._register(new qt(e,ui.Id,vi.Id,{applyCodeAction:(e,t)=>ri(this,void 0,void 0,(function*(){try{yield this._applyCodeAction(e)}finally{t&&this._trigger({type:2,filter:{}})}}))},this._instantiationService))))}static get(t){return t.getContribution(e.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,i){if(!this._editor.hasModel())return;xt.get(this._editor).closeMessage();const n=this._editor.getPosition();this._trigger({type:1,filter:t,autoApply:i,context:{notAvailableMessage:e,position:n}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(hi,e,this._editor)}};function hi(e,t,i){return ri(this,void 0,void 0,(function*(){const n=e.get(et.vu),o=e.get(at.H),s=e.get(Yt.b),r=e.get(Qt.lT);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred}),yield t.resolve(Ye.T.None),t.action.edit&&(yield n.apply(et.fo.convert(t.action.edit),{editor:i,label:t.action.title})),t.action.command)try{yield o.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);r.error("string"==typeof t?t:ne.N("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}))}function ci(e,t,i,n){if(e.hasModel()){const o=di.get(e);o&&o.manualTriggerAtCurrentPosition(t,i,n)}}di.ID="editor.contrib.quickFixController",di=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([si(1,Gt.lT),si(2,oe.i6),si(3,lt.e),si(4,Dt.TG)],di);class ui extends ee.R6{constructor(){super({id:ui.Id,label:ne.N("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:oe.Ao.and(ie.u.writable,ie.u.hasCodeActionsProvider),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:2132,weight:100}})}run(e,t){return ci(t,ne.N("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}ui.Id="editor.action.quickFix";class gi extends ee._l{constructor(){super({id:gt,precondition:oe.Ao.and(ie.u.writable,ie.u.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:li}]}})}runEditorCommand(e,t,i){const n=ct.fromUser(i,{kind:dt.Empty,apply:"ifSingle"});return ci(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?ne.N("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):ne.N("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?ne.N("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):ne.N("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class pi extends ee.R6{constructor(){super({id:pt,label:ne.N("refactor.label","Refactor..."),alias:"Refactor...",precondition:oe.Ao.and(ie.u.writable,ie.u.hasCodeActionsProvider),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:oe.Ao.and(ie.u.writable,ai(dt.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:li}]}})}run(e,t,i){const n=ct.fromUser(i,{kind:dt.Refactor,apply:"never"});return ci(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?ne.N("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):ne.N("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?ne.N("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):ne.N("editor.action.refactor.noneMessage","No refactorings available"),{include:dt.Refactor.contains(n.kind)?n.kind:dt.None,onlyIncludePreferredActions:n.preferred},n.apply)}}class mi extends ee.R6{constructor(){super({id:mt,label:ne.N("source.label","Source Action..."),alias:"Source Action...",precondition:oe.Ao.and(ie.u.writable,ie.u.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:oe.Ao.and(ie.u.writable,ai(dt.Source))},description:{description:"Source Action...",args:[{name:"args",schema:li}]}})}run(e,t,i){const n=ct.fromUser(i,{kind:dt.Source,apply:"never"});return ci(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?ne.N("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):ne.N("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?ne.N("editor.action.source.noneMessage.preferred","No preferred source actions available"):ne.N("editor.action.source.noneMessage","No source actions available"),{include:dt.Source.contains(n.kind)?n.kind:dt.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class fi extends ee.R6{constructor(){super({id:ft,label:ne.N("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:oe.Ao.and(ie.u.writable,ai(dt.SourceOrganizeImports)),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:1581,weight:100}})}run(e,t){return ci(t,ne.N("editor.action.organize.noneMessage","No organize imports action available"),{include:dt.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}class _i extends ee.R6{constructor(){super({id:_t,label:ne.N("fixAll.label","Fix All"),alias:"Fix All",precondition:oe.Ao.and(ie.u.writable,ai(dt.SourceFixAll))})}run(e,t){return ci(t,ne.N("fixAll.noneMessage","No fix all action available"),{include:dt.SourceFixAll,includeSourceActions:!0},"ifSingle")}}class vi extends ee.R6{constructor(){super({id:vi.Id,label:ne.N("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:oe.Ao.and(ie.u.writable,ai(dt.QuickFix)),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return ci(t,ne.N("editor.action.autoFix.noneMessage","No auto fixes available"),{include:dt.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}vi.Id="editor.action.autoFix",(0,ee._K)(di.ID,di),(0,ee.Qr)(ui),(0,ee.Qr)(pi),(0,ee.Qr)(mi),(0,ee.Qr)(fi),(0,ee.Qr)(vi),(0,ee.Qr)(_i),(0,ee.fK)(new gi);var bi=i(14938),Ci=i(38562),wi=i(33830),yi=i(56718),Si=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Li{constructor(){this.lenses=[],this._disposables=new me.SL}dispose(){this._disposables.dispose()}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function xi(e,t){return Si(this,void 0,void 0,(function*(){const i=st.He.ordered(e),n=new Map,o=new Li,s=i.map(((i,s)=>Si(this,void 0,void 0,(function*(){n.set(i,s);try{const n=yield Promise.resolve(i.provideCodeLenses(e,t));n&&o.add(n,i)}catch(e){(0,it.Cp)(e)}}))));return yield Promise.all(s),o.lenses=o.lenses.sort(((e,t)=>e.symbol.range.startLineNumber<t.symbol.range.startLineNumber?-1:e.symbol.range.startLineNumber>t.symbol.range.startLineNumber?1:n.get(e.provider)<n.get(t.provider)?-1:n.get(e.provider)>n.get(t.provider)?1:e.symbol.range.startColumn<t.symbol.range.startColumn?-1:e.symbol.range.startColumn>t.symbol.range.startColumn?1:0)),o}))}at.P.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;(0,yi.p_)(nt.o.isUri(i)),(0,yi.p_)("number"==typeof n||!n);const o=e.get(rt.q).getModel(i);if(!o)throw(0,it.b1)();const s=[],r=new me.SL;return xi(o,Ye.T.None).then((e=>{r.add(e);let t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?s.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(o,i.symbol,Ye.T.None)).then((e=>s.push(e||i.symbol))));return Promise.all(t)})).then((()=>s)).finally((()=>{setTimeout((()=>r.dispose()),100)}))}));var ki=i(32683),Ni=i(82173),Di=i(82415),Ei=i(95210);const Ii=(0,Dt.yh)("ICodeLensCache");class Ti{constructor(e,t){this.lineCount=e,this.data=t}}let Mi=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Ni.z6(20,.75),(0,pe.To)((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),(0,ki.I)(e.onWillSaveState)((i=>{i.reason===Ei.fk.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new Li;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new Ti(e.getLineCount(),n);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new be.e(e,1,e,11)});const o=new Li;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new Ti(i.lineCount,o))}}catch(e){}}};Mi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,Ei.Uy)],Mi),(0,Di.z)(Ii,Mi);var Ri=i(87668),Ai=i(87443),Oi={};Oi.styleTagTransform=Y(),Oi.setAttributes=q(),Oi.insert=j().bind(null,"head"),Oi.domAPI=K(),Oi.insertStyleElement=G(),H()(Ai.Z,Oi),Ai.Z&&Ai.Z.locals&&Ai.Z.locals;class Pi{constructor(e,t,i){this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class Fi{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+Fi._idPool++,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let i=[],n=!1;for(let t=0;t<e.length;t++){const o=e[t];if(o&&(n=!0,o.command)){const n=(0,Ri.T)(o.command.title.trim());o.command.id?(i.push(Et.$("a",{id:String(t),title:o.command.tooltip},...n)),this._commands.set(String(t),o.command)):i.push(Et.$("span",{title:o.command.tooltip},...n)),t+1<e.length&&i.push(Et.$("span",void 0," | "))}}n?(Et.mc(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):Et.mc(this._domNode,Et.$("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){const t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}}Fi._idPool=0;class Bi{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){let t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let e=0,i=t.length;e<i;e++)this._addDecorationsCallbacks[e](t[e])}}class Wi{constructor(e,t,i,n,o,s,r){let a;this._isDisposed=!1,this._editor=t,this._className=i,this._data=e,this._decorationIds=[];let l=[];this._data.forEach(((e,t)=>{e.symbol.command&&l.push(e.symbol),n.addDecoration({range:e.symbol.range,options:we.qx.EMPTY},(e=>this._decorationIds[t]=e)),a=a?be.e.plusRange(a,e.symbol.range):be.e.lift(e.symbol.range)})),this._viewZone=new Pi(a.startLineNumber-1,s,r),this._viewZoneId=o.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new Fi(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||be.e.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:we.qx.EMPTY},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t<this._decorationIds.length;t++){const i=e.getDecorationRange(this._decorationIds[t]);i&&(this._data[t].symbol.range=i)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){const i=e[t];if(i){const{symbol:e}=this._data[t];e.command=i.command||e.command}}}getCommand(e){var t;return null===(t=this._contentWidget)||void 0===t?void 0:t.getCommand(e)}getLineNumber(){const e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}getItems(){return this._data}}(0,xe.Ic)(((e,t)=>{const i=e.getColor(ye.Yp);i&&(t.addRule(`.monaco-editor .codelens-decoration { color: ${i}; }`),t.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${i}; }`));const n=e.getColor(Le._Y);n&&(t.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${n} !important; }`),t.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${n} !important; }`))}));var Vi=i(58028),Hi=function(e,t){return function(i,n){t(i,n,e)}};let zi=class{constructor(e,t,i,n){this._editor=e,this._commandService=t,this._notificationService=i,this._codeLensCache=n,this._disposables=new me.SL,this._localToDispose=new me.SL,this._lenses=[],this._getCodeLensModelDelays=new wi.Y(st.He,250,2500),this._oldCodeLensModels=new me.SL,this._resolveCodeLensesDelays=new wi.Y(st.He,250,2500),this._resolveCodeLensesScheduler=new pe.pY((()=>this._resolveCodeLensesInViewport()),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(43)||e.hasChanged(16)||e.hasChanged(15))&&this._updateLensStyle(),e.hasChanged(14)&&this._onModelChange()}))),this._disposables.add(st.He.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+(0,bi.vp)(this._editor.getId()).toString(16),this._styleElement=Et.dS(Et.OO(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){let e,t=this._editor.getOption(16);return!t||t<5?(t=.9*this._editor.getOption(45)|0,e=this._editor.getOption(58)):e=t*Math.max(1.3,this._editor.getOption(58)/this._editor.getOption(45))|0,{codeLensHeight:e,fontSize:t}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(15),n=this._editor.getOption(43),o=`--codelens-font-family${this._styleClassName}`,s=`--codelens-font-features${this._styleClassName}`;let r=`\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(.5*t)}px; font-feature-settings: var(${s}) }\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; }\n\t\t`;i&&(r+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${o}), ${Ci.hL.fontFamily}}`),this._styleElement.textContent=r,this._editor.getContainerDomNode().style.setProperty(o,null!=i?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(s,n.fontFeatureSettings),this._editor.changeViewZones((t=>{for(let i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!st.He.has(e))return void(t&&this._localToDispose.add((0,pe.Vg)((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const t of st.He.all(e))if("function"==typeof t.onDidChange){let e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new pe.pY((()=>{var t;const n=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=(0,pe.PG)((t=>xi(e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const o=this._getCodeLensModelDelays.update(e,Date.now()-n);i.delay=o,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()}),it.dL)}),this._getCodeLensModelDelays.get(e));this._localToDispose.add(i),this._localToDispose.add((0,me.OF)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{let i=[],n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));let o=new Bi;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule()}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,me.OF)((()=>{if(this._editor.getModel()){const e=ot.ZF.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){let i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new Bi;for(const e of this._lenses)e.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t,i=this._editor.getModel().getLineCount(),n=[];for(let o of e.lenses){let e=o.symbol.range.startLineNumber;e<1||e>i||(t&&t[t.length-1].symbol.range.startLineNumber===e?t.push(o):(t=[o],n.push(t)))}const o=ot.ZF.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=new Bi;let o=0,r=0;for(;r<n.length&&o<this._lenses.length;){let e=n[r][0].symbol.range.startLineNumber,a=this._lenses[o].getLineNumber();a<e?(this._lenses[o].dispose(i,t),this._lenses.splice(o,1)):a===e?(this._lenses[o].updateCodeLensSymbols(n[r],i),r++,o++):(this._lenses.splice(o,0,new Wi(n[r],this._editor,this._styleClassName,i,t,s.codeLensHeight,(()=>this._resolveCodeLensesInViewportSoon()))),o++,r++)}for(;o<this._lenses.length;)this._lenses[o].dispose(i,t),this._lenses.splice(o,1);for(;r<n.length;)this._lenses.push(new Wi(n[r],this._editor,this._styleClassName,i,t,s.codeLensHeight,(()=>this._resolveCodeLensesInViewportSoon()))),r++;i.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach((e=>{const o=e.computeIfNecessary(t);o&&(i.push(o),n.push(e))})),0===i.length)return;const o=Date.now(),s=(0,pe.PG)((e=>{const o=i.map(((i,o)=>{const s=new Array(i.length),r=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(s[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{s[n]=e}),it.Cp)));return Promise.all(r).then((()=>{e.isCancellationRequested||n[o].isDisposed()||n[o].updateCommands(s)}))}));return Promise.all(o)}));this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDelays.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,it.dL)(e),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getLenses(){return this._lenses}};zi.ID="css.editor.codeLens",zi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Hi(1,at.H),Hi(2,Qt.lT),Hi(3,Ii)],zi),(0,ee._K)(zi.ID,zi),(0,ee.Qr)(class extends ee.R6{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:ie.u.hasCodeLensProvider,label:(0,ne.N)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return i=this,n=void 0,s=function*(){if(!t.hasModel())return;const i=e.get(Vi.eJ),n=e.get(at.H),o=e.get(Qt.lT),s=t.getSelection().positionLineNumber,r=t.getContribution(zi.ID),a=[];for(let e of r.getLenses())if(e.getLineNumber()===s)for(let t of e.getItems()){const{command:e}=t.symbol;e&&a.push({label:e.title,command:e})}if(0===a.length)return;const l=yield i.pick(a,{canPickMany:!1});if(l)try{yield n.executeCommand(l.command.id,...l.command.arguments||[])}catch(e){o.error(e)}},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(i,n||[])).next())}));var i,n,o,s}});var Ki=i(66051);function Ui(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}at.P.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof nt.o))throw(0,it.b1)();const n=e.get(rt.q).getModel(i);if(!n)throw(0,it.b1)();const o=[],s=st.OH.ordered(n).reverse().map((e=>Promise.resolve(e.provideDocumentColors(n,Ye.T.None)).then((e=>{if(Array.isArray(e))for(let t of e)o.push({range:t.range,color:[t.color.red,t.color.green,t.color.blue,t.color.alpha]})}))));return Promise.all(s).then((()=>o))})),at.P.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,n]=t,{uri:o,range:s}=n;if(!(o instanceof nt.o&&Array.isArray(i)&&4===i.length&&be.e.isIRange(s)))throw(0,it.b1)();const[r,a,l,d]=i,h=e.get(rt.q).getModel(o);if(!h)throw(0,it.b1)();const c={range:s,color:{red:r,green:a,blue:l,alpha:d}},u=[],g=st.OH.ordered(h).reverse().map((e=>Promise.resolve(e.provideColorPresentations(h,c,Ye.T.None)).then((e=>{Array.isArray(e)&&u.push(...e)}))));return Promise.all(g).then((()=>u))}));var ji=i(1826),$i=function(e,t){return function(i,n){t(i,n,e)}};let qi=class e extends me.JT{constructor(e,t,i){super(),this._editor=e,this._codeEditorService=t,this._configurationService=i,this._localToDispose=this._register(new me.SL),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(e.onDidChangeModel((()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()}))),this._register(e.onDidChangeModelLanguage((()=>this.onModelChanged()))),this._register(st.OH.onDidChange((()=>this.onModelChanged()))),this._register(e.onDidChangeConfiguration((()=>{let e=this._isEnabled;this._isEnabled=this.isEnabled(),e!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"==typeof i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(17)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const t=this._editor.getModel();t&&st.OH.has(t)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new pe._F,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),e.RECOMPUTE_TIME))}))),this.beginCompute())}beginCompute(){this._computePromise=(0,pe.PG)((e=>{const t=this._editor.getModel();return t?function(e,t){const i=[],n=st.OH.ordered(e).reverse().map((n=>Promise.resolve(n.provideDocumentColors(e,t)).then((e=>{if(Array.isArray(e))for(let t of e)i.push({colorInfo:t,provider:n})}))));return Promise.all(n).then((()=>i))}(t,e):Promise.resolve([])})),this._computePromise.then((e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}),it.dL)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:we.qx.EMPTY})));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}updateColorDecorators(e){let t=[],i={};for(let n=0;n<e.length&&t.length<500;n++){const{red:o,green:s,blue:r,alpha:a}=e[n].colorInfo.color,l=new Ki.VS(Math.round(255*o),Math.round(255*s),Math.round(255*r),a);let d=(0,bi.vp)(`rgba(${l.r},${l.g},${l.b},${l.a})`).toString(16),h=`rgba(${l.r}, ${l.g}, ${l.b}, ${l.a})`,c="colorBox-"+d;this._decorationsTypes.has(c)||i[c]||this._codeEditorService.registerDecorationType("color-detector-color",c,{before:{contentText:" ",border:"solid 0.1em #000",margin:"0.1em 0.2em 0 0.2em",width:"0.8em",height:"0.8em",backgroundColor:h},dark:{before:{border:"solid 0.1em #eee"}}},void 0,this._editor),i[c]=!0,t.push({range:{startLineNumber:e[n].colorInfo.range.startLineNumber,startColumn:e[n].colorInfo.range.startColumn,endLineNumber:e[n].colorInfo.range.endLineNumber,endColumn:e[n].colorInfo.range.endColumn},options:this._codeEditorService.resolveDecorationOptions(c,!0)})}this._decorationsTypes.forEach((e=>{i[e]||this._codeEditorService.removeDecorationType(e)})),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,t)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach((e=>{this._codeEditorService.removeDecorationType(e)}))}getColorData(e){const t=this._editor.getModel();if(!t)return null;const i=t.getDecorationsInRange(be.e.fromPositions(e,e)).filter((e=>this._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}};qi.ID="editor.contrib.colorDetector",qi.RECOMPUTE_TIME=1e3,qi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([$i(1,We.$),$i(2,ji.Ui)],qi),(0,ee._K)(qi.ID,qi);var Zi=i(34587),Gi=i(2035),Qi={};Qi.styleTagTransform=Y(),Qi.setAttributes=q(),Qi.insert=j().bind(null,"head"),Qi.domAPI=K(),Qi.insertStyleElement=G(),H()(Gi.Z,Qi),Gi.Z&&Gi.Z.locals&&Gi.Z.locals;var Yi=i(6709);function Ji(e,t){return!!e[t]}class Xi{constructor(e,t){this.target=e.target,this.hasTriggerModifier=Ji(e.event,t.triggerModifier),this.hasSideBySideModifier=Ji(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class en{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=Ji(e,t.triggerModifier)}}class tn{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function nn(e){return"altKey"===e?Fe.dz?new tn(57,"metaKey",6,"altKey"):new tn(5,"ctrlKey",6,"altKey"):Fe.dz?new tn(6,"altKey",57,"metaKey"):new tn(6,"altKey",5,"ctrlKey")}class on extends me.JT{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new Vt.Q5),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new Vt.Q5),this.onExecute=this._onExecute.event,this._onCancel=this._register(new Vt.Q5),this.onCancel=this._onCancel.event,this._editor=e,this._opts=nn(this._editor.getOption(69)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(69)){const e=nn(this._editor.getOption(69));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new Xi(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new Xi(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new Xi(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new en(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new en(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var sn=i(7912),rn=i(20620),an=i(72608),ln={};ln.styleTagTransform=Y(),ln.setAttributes=q(),ln.insert=j().bind(null,"head"),ln.domAPI=K(),ln.insertStyleElement=G(),H()(an.Z,ln),an.Z&&an.Z.locals&&an.Z.locals;var dn=i(12088),hn=function(e,t){return function(i,n){t(i,n,e)}};let cn=class extends P.Gm{constructor(e,t,i,n,o,s,r,a,l,d){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,o,s,r,a,l,d),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){rn.jB(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};cn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([hn(3,Dt.TG),hn(4,We.$),hn(5,at.H),hn(6,oe.i6),hn(7,xe.XE),hn(8,Qt.lT),hn(9,dn.F)],cn);var un=i(86629),gn=i(23231),pn=i(49757),mn={};mn.styleTagTransform=Y(),mn.setAttributes=q(),mn.insert=j().bind(null,"head"),mn.domAPI=K(),mn.insertStyleElement=G(),H()(pn.Z,mn),pn.Z&&pn.Z.locals&&pn.Z.locals;const fn=new Ki.Il(new Ki.VS(0,122,204)),_n={showArrow:!0,showFrame:!0,className:"",frameColor:fn,arrowColor:fn,keepEditorSelection:!1};class vn{constructor(e,t,i,n,o,s){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class bn{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class Cn{constructor(e){this._editor=e,this._ruleName=Cn._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),Et.uN(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){Et.uN(this._ruleName),Et.fk(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:be.e.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}Cn._IdGenerator=new gn.R(".arrow-decoration-");class wn{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new me.SL,this.container=null,this._isShowing=!1,this.editor=e,this.options=rn.I8(t),rn.jB(this.options,_n,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new Cn(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash&&this._resizeSash.layout()}get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const i=t.getDecorationRange(e);return i?i.getStartPosition():void 0}show(e,t){const i=be.e.isIRange(e)?be.e.lift(e):be.e.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:i,options:we.qx.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(58),t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";const s=document.createElement("div");s.style.overflow="hidden";const r=this.editor.getOption(58),a=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,a);let l=0,d=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(r/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(d=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new vn(s,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e))),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new bn("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:d;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}let h=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=h+"px",this.container.style.overflow="hidden"),this._doLayout(h,o),this.options.keepEditorSelection||this.editor.setSelection(e);const c=this.editor.getModel();if(c){const t=e.endLineNumber+1;t<=c.getLineCount()?this.revealLine(t,!1):this.revealLine(c.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new un.g(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){let i=(t.currentY-e.startY)/this.editor.getOption(58),n=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+n;o>5&&o<35&&this._relayout(o)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var yn=i(63304),Sn=i(42071),Ln=i(53697),xn={};xn.styleTagTransform=Y(),xn.setAttributes=q(),xn.insert=j().bind(null,"head"),xn.domAPI=K(),xn.insertStyleElement=G(),H()(Ln.Z,xn),Ln.Z&&Ln.Z.locals&&Ln.Z.locals;class kn extends It.Wi{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new Vt.Q5),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,Et.R3)(e,(0,Et.$)(".monaco-dropdown")),this._label=(0,Et.R3)(this._element,(0,Et.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[Et.tw.CLICK,Et.tw.MOUSE_DOWN,Bt.t.Tap])this._register((0,Et.nm)(this.element,e,(e=>Et.zB.stop(e,!0))));for(const e of[Et.tw.MOUSE_DOWN,Bt.t.Tap])this._register((0,Et.nm)(this._label,e,(e=>{e instanceof MouseEvent&&e.detail>1||(this.visible?this.hide():this.show())})));this._register((0,Et.nm)(this._label,Et.tw.KEY_UP,(e=>{const t=new yn.y(e);(t.equals(3)||t.equals(10))&&(Et.zB.stop(e,!0),this.visible?this.hide():this.show())})));const n=i(this._label);n&&this._register(n),this._register(Bt.o.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class Nn extends kn{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class Dn extends Sn.Y{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new Vt.Q5),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=(0,Et.R3)(e,(0,Et.$)("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new Nn(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const i=!this.getAction().enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}var En=i(66188),In=i(18681),Tn={};Tn.styleTagTransform=Y(),Tn.setAttributes=q(),Tn.insert=j().bind(null,"head"),Tn.domAPI=K(),Tn.insertStyleElement=G(),H()(In.Z,Tn),In.Z&&In.Z.locals&&In.Z.locals;var Mn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Rn=function(e,t){return function(i,n){t(i,n,e)}},An=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let On=class extends Sn.g{constructor(e,t,i,n,o){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable}),this._keybindingService=i,this._notificationService=n,this._contextKeyService=o,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new me.XK),this._altKey=Et._q.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return An(this,void 0,void 0,(function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}}))}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(Fe.ED||Fe.IJ)&&this._altKey.keyStatus.shiftKey;const n=()=>{const e=t&&i;e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event((e=>{i=e.altKey||(Fe.ED||Fe.IJ)&&e.shiftKey,n()}))),this._register((0,Et.nm)(e,"mouseleave",(e=>{t=!1,n()}))),this._register((0,Et.nm)(e,"mouseenter",(e=>{t=!0,n()})))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let n=t?(0,ne.N)("titleAndKb","{0} ({1})",i,t):i;if(!this._wantsAltCommand&&this._menuItemAction.alt){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),o=i?(0,ne.N)("titleAndKb","{0} ({1})",e,i):e;n+=`\n[${En.xo.modifierLabels[Fe.OS].altKey}] ${o}`}this.label.title=n}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const o=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(o)if(xe.kS.isThemeIcon(o)){const e=xe.kS.asClassNameArray(o);n.classList.add(...e),this._itemClassDispose.value=(0,me.OF)((()=>{n.classList.remove(...e)}))}else o.light&&n.style.setProperty("--menu-entry-icon-light",(0,Et.wY)(o.light)),o.dark&&n.style.setProperty("--menu-entry-icon-dark",(0,Et.wY)(o.dark)),n.classList.add("icon"),this._itemClassDispose.value=(0,me.OF)((()=>{n.classList.remove("icon"),n.style.removeProperty("--menu-entry-icon-light"),n.style.removeProperty("--menu-entry-icon-dark")}))}};On=Mn([Rn(2,Mt.d),Rn(3,Qt.lT),Rn(4,oe.i6)],On);let Pn=class extends Dn{constructor(e,t,i){var n,o;const s=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null!==(n=null==t?void 0:t.menuAsChild)&&void 0!==n&&n,classNames:null!==(o=null==t?void 0:t.classNames)&&void 0!==o?o:xe.kS.isThemeIcon(e.item.icon)?xe.kS.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,s)}render(e){if(super.render(e),this.element){e.classList.add("menu-entry");const{icon:t}=this._action.item;t&&!xe.kS.isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",(0,Et.wY)(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",(0,Et.wY)(t.dark)))}}};Pn=Mn([Rn(2,Tt.i)],Pn);let Fn=class extends Sn.Y{constructor(e,t,i,n,o,s,r,a){var l,d,h;let c;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=s,this._instaService=r,this._storageService=a,this._container=null,this._storageKey=`${e.item.submenu._debugName}_lastActionId`;let u=a.get(this._storageKey,1);u&&(c=e.actions.find((e=>u===e.id))),c||(c=e.actions[0]),this._defaultAction=this._instaService.createInstance(On,c,void 0);const g=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null===(l=null==t?void 0:t.menuAsChild)||void 0===l||l,classNames:null!==(d=null==t?void 0:t.classNames)&&void 0!==d?d:["codicon","codicon-chevron-down"],actionRunner:null!==(h=null==t?void 0:t.actionRunner)&&void 0!==h?h:new It.Wi});this._dropdown=new Dn(e,e.actions,this._contextMenuService,g),this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof Se.U8&&this.update(e.action)}))}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(On,e,void 0),this._defaultAction.actionRunner=new class extends It.Wi{runAction(e,t){return An(this,void 0,void 0,(function*(){yield e.run(void 0)}))}},this._container&&this._defaultAction.render((0,Et.Ce)(this._container,(0,Et.$)(".action-container")))}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=(0,Et.$)(".action-container");this._defaultAction.render((0,Et.R3)(this._container,t)),this._register((0,Et.nm)(t,Et.tw.KEY_DOWN,(e=>{const t=new yn.y(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=(0,Et.$)(".dropdown-action-container");this._dropdown.render((0,Et.R3)(this._container,i)),this._register((0,Et.nm)(i,Et.tw.KEY_DOWN,(e=>{var t;const i=new yn.y(e);i.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),null===(t=this._defaultAction.element)||void 0===t||t.focus(),i.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};function Bn(e,t,i){return t instanceof Se.U8?e.createInstance(On,t,void 0):t instanceof Se.NZ?t.item.rememberDefaultAction?e.createInstance(Fn,t,i):e.createInstance(Pn,t,i):void 0}Fn=Mn([Rn(2,Mt.d),Rn(3,Qt.lT),Rn(4,Tt.i),Rn(5,Se.co),Rn(6,Dt.TG),Rn(7,Ei.Uy)],Fn);var Wn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Vn=function(e,t){return function(i,n){t(i,n,e)}};const Hn=(0,Dt.yh)("IPeekViewService");var zn;(0,Di.z)(Hn,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose()),this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}}),function(e){e.inPeekEditor=new oe.uy("inReferenceSearchEditor",!0,ne.N("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(zn||(zn={}));let Kn=class{constructor(e,t){e instanceof cn&&zn.inPeekEditor.bindTo(t)}dispose(){}};Kn.ID="editor.contrib.referenceController",Kn=Wn([Vn(1,oe.i6)],Kn),(0,ee._K)(Kn.ID,Kn);const Un={headerBackgroundColor:Ki.Il.white,primaryHeadingColor:Ki.Il.fromHex("#333333"),secondaryHeadingColor:Ki.Il.fromHex("#6c6c6cb3")};let jn=class extends wn{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new Vt.Q5,this.onDidClose=this._onDidClose.event,rn.jB(this.options,Un,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();let e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=Et.$(".head"),this._bodyElement=Et.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const i=Et.$(".peekview-title");this.options.supportOnTitleClick&&(i.classList.add("clickable"),Et.mu(i,"click",(e=>this._onTitleClick(e)))),Et.R3(this._headElement,i),this._fillTitleIcon(i),this._primaryHeading=Et.$("span.filename"),this._secondaryHeading=Et.$("span.dirname"),this._metaHeading=Et.$("span.meta"),Et.R3(i,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=Et.$(".peekview-actions");Et.R3(this._headElement,n);const o=this._getActionBarOptions();this._actionbarWidget=new sn.o(n,o),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new It.aU("peekview.close",ne.N("label.close","Close"),Wt.lA.close.classNames,!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:Bn.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Et.PO(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Et.$Z(this._metaHeading)):Et.Cp(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(58)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};jn=Wn([Vn(2,Dt.TG)],jn);const $n=(0,Le.P6)("peekViewTitle.background",{dark:(0,Le.Zn)(Le.c6,.1),light:(0,Le.Zn)(Le.c6,.1),hc:null},ne.N("peekViewTitleBackground","Background color of the peek view title area.")),qn=(0,Le.P6)("peekViewTitleLabel.foreground",{dark:Ki.Il.white,light:Ki.Il.black,hc:Ki.Il.white},ne.N("peekViewTitleForeground","Color of the peek view title.")),Zn=(0,Le.P6)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hc:"#FFFFFF99"},ne.N("peekViewTitleInfoForeground","Color of the peek view title info.")),Gn=(0,Le.P6)("peekView.border",{dark:Le.c6,light:Le.c6,hc:Le.lR},ne.N("peekViewBorder","Color of the peek view borders and arrow.")),Qn=(0,Le.P6)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:Ki.Il.black},ne.N("peekViewResultsBackground","Background color of the peek view result list.")),Yn=(0,Le.P6)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:Ki.Il.white},ne.N("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),Jn=(0,Le.P6)("peekViewResult.fileForeground",{dark:Ki.Il.white,light:"#1E1E1E",hc:Ki.Il.white},ne.N("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),Xn=(0,Le.P6)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},ne.N("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),eo=(0,Le.P6)("peekViewResult.selectionForeground",{dark:Ki.Il.white,light:"#6C6C6C",hc:Ki.Il.white},ne.N("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),to=(0,Le.P6)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:Ki.Il.black},ne.N("peekViewEditorBackground","Background color of the peek view editor.")),io=(0,Le.P6)("peekViewEditorGutter.background",{dark:to,light:to,hc:to},ne.N("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),no=(0,Le.P6)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},ne.N("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),oo=(0,Le.P6)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},ne.N("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),so=(0,Le.P6)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:Le.xL},ne.N("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var ro=i(40658),ao=i(95272),lo=i(53058);class ho{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=gn.a.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?(0,ne.N)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",(0,Jt.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):(0,ne.N)("aria.oneReference","symbol in {0} on line {1} at column {2}",(0,Jt.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class co{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:o,endLineNumber:s,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:o-t}),l=new be.e(n,a.startColumn,n,o),d=new be.e(s,r,s,1073741824),h=i.getValueInRange(l).replace(/^\s+/,""),c=i.getValueInRange(e);return{value:h+c+i.getValueInRange(d).replace(/\s+$/,""),highlight:{start:h.length,end:h.length+c.length}}}}class uo{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Ni.Y9}dispose(){(0,me.B9)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,ne.N)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,Jt.EZ)(this.uri),this.uri.fsPath):(0,ne.N)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,Jt.EZ)(this.uri),this.uri.fsPath)}resolve(e){return t=this,i=void 0,o=function*(){if(0!==this._previews.size)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new co(i))}catch(e){(0,it.dL)(e)}return this},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}}class go{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new Vt.Q5,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(go._compareReferences);for(let t of e)if(n&&Jt.SF.isEqual(n.uri,t.uri,!0)||(n=new uo(this,t.uri),this.groups.push(n)),0===n.children.length||0!==go._compareReferences(t,n.children[n.children.length-1])){const e=new ho(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){(0,me.B9)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new go(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,ne.N)("aria.result.0","No results found"):1===this.references.length?(0,ne.N)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,ne.N)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,ne.N)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:i}=e,n=i.children.indexOf(e),o=i.children.length,s=i.parent.groups.length;return 1===s||t&&n+1<o||!t&&n>0?(n=t?(n+1)%o:(n+o-1)%o,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%s,i.parent.groups[n].children[0]):(n=(n+s-1)%s,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:Xe.Mh(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLen<t.prefixLen?1:e.offsetDist<t.offsetDist?-1:e.offsetDist>t.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&be.e.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return Jt.SF.compare(e.uri,t.uri)||be.e.compareRangesUsingStarts(e.range,t.range)}}var po=i(23599),mo=i(31633),fo=i(93867),_o={};_o.styleTagTransform=Y(),_o.setAttributes=q(),_o.insert=j().bind(null,"head"),_o.domAPI=K(),_o.insertStyleElement=G(),H()(fo.Z,_o),fo.Z&&fo.Z.locals&&fo.Z.locals;var vo=i(16742),bo=i(7842),Co=i(75526),wo=i(9569),yo=i(45303),So=i(80453);function Lo(e){if(!e)return;"string"==typeof e&&(e=nt.o.file(e));const t=(0,Jt.EZ)(e)||(e.scheme===mo.lg.file?e.fsPath:e.path);return Fe.ED&&(0,So.vY)(t)?xo(t):t}function xo(e){return(0,So.oP)(e)?e.charAt(0).toUpperCase()+e.slice(1):e}var ko=i(3143),No=i(63235),Do=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Eo=function(e,t){return function(i,n){t(i,n,e)}};let Io=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof go||e instanceof uo}getChildren(e){if(e instanceof go)return e.groups;if(e instanceof uo)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};Io=Do([Eo(0,Yi.S)],Io);class To{getHeight(){return 23}getTemplateId(e){return e instanceof uo?Oo.id:Fo.id}}let Mo=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof ho){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return(0,Jt.EZ)(e.uri)}};Mo=Do([Eo(0,Mt.d)],Mo);class Ro{getId(e){return e instanceof ho?e.id:e.uri}}let Ao=class extends me.JT{constructor(e,t,i){super(),this._uriLabel=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new wo.g(n,{supportHighlights:!0})),this.badge=new bo.Z(Et.R3(n,Et.$(".count"))),this._register((0,No.WZ)(this.badge,i)),e.appendChild(n)}set(e,t){let i=(0,Jt.XX)(e.uri);this.file.setLabel(Lo(e.uri),this._uriLabel.getUriLabel(i,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat((0,ne.N)("referencesCount","{0} references",n)):this.badge.setTitleFormat((0,ne.N)("referenceCount","{0} reference",n))}};Ao=Do([Eo(1,ko.e),Eo(2,xe.XE)],Ao);let Oo=class e{constructor(t){this._instantiationService=t,this.templateId=e.id}renderTemplate(e){return this._instantiationService.createInstance(Ao,e)}renderElement(e,t,i){i.set(e.element,(0,yo.mB)(e.filterData))}disposeTemplate(e){e.dispose()}};Oo.id="FileReferencesRenderer",Oo=Do([Eo(0,Dt.TG)],Oo);class Po{constructor(e){this.label=new Co.q(e,!1)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!yo.CL.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,yo.mB)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${(0,Jt.EZ)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class Fo{constructor(){this.templateId=Fo.id}renderTemplate(e){return new Po(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}Fo.id="OneReferenceRenderer";class Bo{getWidgetAriaLabel(){return(0,ne.N)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Wo=i(56834),Vo=function(e,t){return function(i,n){t(i,n,e)}},Ho=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class zo{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new me.SL,this._callOnModelChange=new me.SL,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(let t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,o=e.children.length;n<o;n++){let o=e.children[n];this._decorationIgnoreSet.has(o.id)||o.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:o.range,options:zo.DecorationOptions}),i.push(n))}const n=this._editor.deltaDecorations([],t);for(let t=0;t<n.length;t++)this._decorations.set(n[t],e.children[i[t]])}_onDecorationChanged(){const e=[],t=this._editor.getModel();if(t){for(let[i,n]of this._decorations){const o=t.getDecorationRange(i);if(!o)continue;let s=!1;be.e.equalsRange(o,n.range)||((be.e.spansMultipleLines(o)||n.range.endColumn-n.range.startColumn!=o.endColumn-o.startColumn)&&(s=!0),s?(this._decorationIgnoreSet.add(n.id),e.push(i)):n.range=o)}for(let t=0,i=e.length;t<i;t++)this._decorations.delete(e[t]);this._editor.deltaDecorations(e,[])}}removeDecorations(){this._editor.deltaDecorations([...this._decorations.keys()],[]),this._decorations.clear()}}zo.DecorationOptions=we.qx.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class Ko{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const n=JSON.parse(e);t=n.ratio,i=n.heightInLines}catch(e){}return{ratio:t||.7,heightInLines:i||18}}}class Uo extends lo.ls{}let jo=class extends jn{constructor(e,t,i,n,o,s,r,a,l,d,h,c){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},s),this._defaultTreeKeyboardSupport=t,this.layoutData=i,this._textModelResolverService=o,this._instantiationService=s,this._peekViewService=r,this._uriLabel=a,this._undoRedoService=l,this._keybindingService=d,this._modeService=h,this._languageConfigurationService=c,this._disposeOnNewModel=new me.SL,this._callOnDispose=new me.SL,this._onDidSelectReference=new Vt.Q5,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new Et.Ro(0,0),this._applyTheme(n.getColorTheme()),this._callOnDispose.add(n.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),(0,me.B9)(this._preview),(0,me.B9)(this._previewNotAvailableMessage),(0,me.B9)(this._tree),(0,me.B9)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(Gn)||Ki.Il.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor($n)||Ki.Il.transparent,primaryHeadingColor:e.getColor(qn),secondaryHeadingColor:e.getColor(Zn)})}show(e){this.editor.revealRangeInCenterIfOutsideViewport(e,0),super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=Et.R3(e,Et.$("div.messages")),Et.Cp(this._messageContainer),this._splitView=new po.z(e,{orientation:1}),this._previewContainer=Et.R3(e,Et.$("div.preview.inline")),this._preview=this._instantiationService.createInstance(cn,this._previewContainer,{scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}},this.editor),Et.Cp(this._previewContainer),this._previewNotAvailableMessage=new we.yO(ne.N("missingPreviewMessage","no preview available"),we.yO.DEFAULT_CREATION_OPTIONS,null,null,this._undoRedoService,this._modeService,this._languageConfigurationService),this._treeContainer=Et.R3(e,Et.$("div.ref-tree.inline"));const t={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new Bo,keyboardNavigationLabelProvider:this._instantiationService.createInstance(Mo),identityProvider:new Ro,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:Qn}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(Et.mu(this._treeContainer,"keydown",(e=>{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(Uo,"ReferencesWidget",this._treeContainer,new To,[this._instantiationService.createInstance(Oo),this._instantiationService.createInstance(Fo)],this._instantiationService.createInstance(Io),t),this._splitView.addView({onDidChange:Vt.ju.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},po.M.Distribute),this._splitView.addView({onDidChange:Vt.ju.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},po.M.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));let i=(e,t)=>{e instanceof ho&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")})),Et.Cp(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Et.Ro(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=ne.N("noResults","No results"),Et.$Z(this._messageContainer),Promise.resolve(void 0)):(Et.Cp(this._messageContainer),this._decorationsManager=new zo(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),Et.$Z(this._treeContainer),Et.$Z(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof ho?e:e instanceof uo&&e.children.length>0?e.children[0]:void 0}revealReference(e){return Ho(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return Ho(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==mo.lg.inMemory?this.setTitle((0,Jt.Hx)(e.uri),this._uriLabel.getUriLabel((0,Jt.XX)(e.uri))):this.setTitle(ne.N("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent)),this._tree.reveal(e);const n=yield i;if(!this._model)return void n.dispose();(0,me.B9)(this._previewModelReference);const o=n.object;if(o){const t=this._preview.getModel()===o.textEditorModel?0:1,i=be.e.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(o.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}))}};jo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Vo(3,xe.XE),Vo(4,Yi.S),Vo(5,Dt.TG),Vo(6,Hn),Vo(7,ko.e),Vo(8,Wo.tJ),Vo(9,Mt.d),Vo(10,Zi.h),Vo(11,vo.c_)],jo),(0,xe.Ic)(((e,t)=>{const i=e.getColor(no);i&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${i}; }`);const n=e.getColor(oo);n&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${n}; }`);const o=e.getColor(so);o&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${o}; box-sizing: border-box; }`);const s=e.getColor(Le.xL);s&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${s}; box-sizing: border-box; }`);const r=e.getColor(Qn);r&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${r}; }`);const a=e.getColor(Yn);a&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${a}; }`);const l=e.getColor(Jn);l&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${l}; }`);const d=e.getColor(Xn);d&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${d}; }`);const h=e.getColor(eo);h&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${h} !important; }`);const c=e.getColor(to);c&&t.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: ${c};}`);const u=e.getColor(io);u&&t.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: ${u};}`)}));var $o=function(e,t){return function(i,n){t(i,n,e)}},qo=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Zo=new oe.uy("referenceSearchVisible",!1,ne.N("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Go=class e{constructor(e,t,i,n,o,s,r,a){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=r,this._configurationService=a,this._disposables=new me.SL,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Zo.bindTo(i)}static get(t){return t.getContribution(e.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const o="peekViewLayout",s=Ko.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(jo,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(ne.N("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{let{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t):this.openReference(t,!1,!0)}})));const r=++this._requestIdPool;t.then((t=>{var i;if(r===this._requestIdPool&&this._widget)return null===(i=this._model)||void 0===i||i.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(ne.N("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let t=this._editor.getModel().uri,i=new ve.L(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(76)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return qo(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return qo(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(t){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const i=be.e.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:i}},this._editor).then((t=>{var n;if(this._ignoreModelChangeEvent=!1,t&&this._widget)if(this._editor===t)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=e.get(t),s=this._model.clone();this.closeWidget(),t.focus(),o.toggleWidget(i,(0,pe.PG)((e=>Promise.resolve(s))),null!==(n=this._peekMode)&&void 0!==n&&n)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,it.dL)(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,pinned:i}},this._editor,t)}};function Qo(e,t){const i=function(e){let t=e.get(We.$).getFocusedCodeEditor();return t instanceof cn?t.getParentEditor():t}(e);if(!i)return;let n=Go.get(i);n&&t(n)}Go.ID="editor.contrib.referencesController",Go=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([$o(2,oe.i6),$o(3,We.$),$o(4,Qt.lT),$o(5,Dt.TG),$o(6,Ei.Uy),$o(7,ji.Ui)],Go),ao.W.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,W.gx)(2089,60),when:oe.Ao.or(Zo,zn.inPeekEditor),handler(e){Qo(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),ao.W.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:oe.Ao.or(Zo,zn.inPeekEditor),handler(e){Qo(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),ao.W.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:oe.Ao.or(Zo,zn.inPeekEditor),handler(e){Qo(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),at.P.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),at.P.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),at.P.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),at.P.registerCommand("closeReferenceSearch",(e=>Qo(e,(e=>e.closeWidget())))),ao.W.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:oe.Ao.and(zn.inPeekEditor,oe.Ao.not("config.editor.stablePeek"))}),ao.W.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:oe.Ao.and(Zo,oe.Ao.not("config.editor.stablePeek"))}),ao.W.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:oe.Ao.and(Zo,lo.CQ),handler(e){var t;const i=null===(t=e.get(lo.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof ho&&Qo(e,(e=>e.revealReference(i[0])))}}),ao.W.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:oe.Ao.and(Zo,lo.CQ),handler(e){var t;const i=null===(t=e.get(lo.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof ho&&Qo(e,(e=>e.openReference(i[0],!0,!0)))}}),at.P.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(lo.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof ho&&Qo(e,(e=>e.openReference(i[0],!1,!0)))}));var Yo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Jo=function(e,t){return function(i,n){t(i,n,e)}};const Xo=new oe.uy("hasSymbols",!1,(0,ne.N)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),es=(0,Dt.yh)("ISymbolNavigationService");let ts=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=Xo.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new is(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),o=i.getPosition();if(!n||!o)return;let s=!1,r=!1;for(const e of t.references)if((0,Jt.Xy)(e.uri,n.uri))s=!0,r=r||be.e.containsPosition(e.range,o);else if(s)break;s&&r||this.reset()}));this._currentState=(0,me.F8)(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:be.e.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?(0,ne.N)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):(0,ne.N)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};ts=Yo([Jo(0,oe.i6),Jo(1,We.$),Jo(2,Qt.lT),Jo(3,Mt.d)],ts),(0,Di.z)(es,ts,!0),(0,ee.fK)(new class extends ee._l{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:Xo,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(es).revealNext(t)}}),ao.W.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:Xo,primary:9,handler(e){e.get(es).reset()}});let is=class{constructor(e){this._listener=new Map,this._disposables=new me.SL,this._onDidChange=new Vt.Q5,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,me.B9)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,me.F8)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};is=Yo([Jo(0,We.$)],is);var ns=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function os(e,t,i,n){const o=i.ordered(e).map((i=>Promise.resolve(n(i,e,t)).then(void 0,(e=>{(0,it.Cp)(e)}))));return Promise.all(o).then((e=>{const t=[];for(let i of e)Array.isArray(i)?t.push(...i):i&&t.push(i);return t}))}function ss(e,t,i){return os(e,t,st.Ct,((e,t,n)=>e.provideDefinition(t,n,i)))}function rs(e,t,i){return os(e,t,st.RN,((e,t,n)=>e.provideDeclaration(t,n,i)))}function as(e,t,i){return os(e,t,st.vI,((e,t,n)=>e.provideImplementation(t,n,i)))}function ls(e,t,i){return os(e,t,st.tA,((e,t,n)=>e.provideTypeDefinition(t,n,i)))}function ds(e,t,i,n){return os(e,t,st.FL,((e,t,o)=>ns(this,void 0,void 0,(function*(){const s=yield e.provideReferences(t,o,{includeDeclaration:!0},n);if(!i||!s||2!==s.length)return s;const r=yield e.provideReferences(t,o,{includeDeclaration:!1},n);return r&&1===r.length?r:s}))))}function hs(e){return ns(this,void 0,void 0,(function*(){const t=yield e(),i=new go(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}))}(0,ee.sb)("_executeDefinitionProvider",((e,t)=>hs((()=>ss(e,t,Ye.T.None))))),(0,ee.sb)("_executeDeclarationProvider",((e,t)=>hs((()=>rs(e,t,Ye.T.None))))),(0,ee.sb)("_executeImplementationProvider",((e,t)=>hs((()=>as(e,t,Ye.T.None))))),(0,ee.sb)("_executeTypeDefinitionProvider",((e,t)=>hs((()=>ls(e,t,Ye.T.None))))),(0,ee.sb)("_executeReferenceProvider",((e,t)=>hs((()=>ds(e,t,!1,Ye.T.None)))));var cs,us,gs,ps,ms,fs,_s,vs,bs=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};Se.BH.appendMenuItem(Se.eH.EditorContext,{submenu:Se.eH.EditorContextPeek,title:ne.N("peek.submenu","Peek"),group:"navigation",order:100});const Cs=new Set;function ws(e){const t=new e;return(0,ee.QG)(t),Cs.add(t.id),t}class ys extends ee.R6{constructor(e,t){super(t),this._configuration=e}run(e,t){if(!t.hasModel())return Promise.resolve(void 0);const i=e.get(Qt.lT),n=e.get(We.$),o=e.get(lt.e),s=e.get(es),r=t.getModel(),a=t.getPosition(),l=new ot.Dl(t,5),d=(0,pe.eP)(this._getLocationModel(r,a,l.token),l.token).then((e=>bs(this,void 0,void 0,(function*(){if(!e||l.token.isCancellationRequested)return;let i;if((0,F.Z9)(e.ariaMessage),e.referenceAt(r.uri,a)){const e=this._getAlternativeCommand(t);e!==this.id&&Cs.has(e)&&(i=t.getAction(e))}const o=e.references.length;if(0===o){if(!this._configuration.muteMessage){const e=r.getWordAtPosition(a);xt.get(t).showMessage(this._getNoResultFoundMessage(e),a)}}else{if(1!==o||!i)return this._onResult(n,s,t,e);i.run()}}))),(e=>{i.error(e)})).finally((()=>{l.dispose()}));return o.showWhile(d,250),d}_onResult(e,t,i,n){return bs(this,void 0,void 0,(function*(){const o=this._getGoToPreference(i);if(i instanceof cn||!(this._configuration.openInPeek||"peek"===o&&n.references.length>1)){const s=n.firstReference(),r=n.references.length>1&&"gotoAndPeek"===o,a=yield this._openReference(i,e,s,this._configuration.openToSide,!r);r&&a?this._openInPeek(a,n):n.dispose(),"goto"===o&&t.put(s)}else this._openInPeek(i,n)}))}_openReference(e,t,i,n,o){return bs(this,void 0,void 0,(function*(){let s;if((0,st.vx)(i)&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const r=yield t.openCodeEditor({resource:i.uri,options:{selection:be.e.collapseToStart(s),selectionRevealType:3}},e,n);if(r){if(o){const e=r.getModel(),t=r.deltaDecorations([],[{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{r.getModel()===e&&r.deltaDecorations(t,[])}),350)}return r}}))}_openInPeek(e,t){let i=Go.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),(0,pe.PG)((e=>Promise.resolve(t))),this._configuration.openInPeek):t.dispose()}}class Ss extends ys{_getLocationModel(e,t,i){return bs(this,void 0,void 0,(function*(){return new go(yield ss(e,t,i),ne.N("def.title","Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?ne.N("noResultWord","No definition found for '{0}'",e.word):ne.N("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(50).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(50).multipleDefinitions}}const Ls=Fe.$L&&!Pe.$W?2118:70;ws(((cs=class e extends Ss{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:ne.N("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:oe.Ao.and(ie.u.hasDefinitionProvider,ie.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:Ls,weight:100},contextMenuOpts:{group:"navigation",order:1.1}}),at.P.registerCommandAlias("editor.action.goToDeclaration",e.id)}}).id="editor.action.revealDefinition",cs)),ws(((us=class e extends Ss{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,label:ne.N("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:oe.Ao.and(ie.u.hasDefinitionProvider,ie.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,Ls),weight:100}}),at.P.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}).id="editor.action.revealDefinitionAside",us)),ws(((gs=class e extends Ss{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,label:ne.N("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:oe.Ao.and(ie.u.hasDefinitionProvider,zn.notInPeekEditor,ie.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:Se.eH.EditorContextPeek,group:"peek",order:2}}),at.P.registerCommandAlias("editor.action.previewDeclaration",e.id)}}).id="editor.action.peekDefinition",gs));class xs extends ys{_getLocationModel(e,t,i){return bs(this,void 0,void 0,(function*(){return new go(yield rs(e,t,i),ne.N("decl.title","Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?ne.N("decl.noResultWord","No declaration found for '{0}'",e.word):ne.N("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(50).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(50).multipleDeclarations}}ws(((ps=class e extends xs{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:ne.N("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:oe.Ao.and(ie.u.hasDeclarationProvider,ie.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(e){return e&&e.word?ne.N("decl.noResultWord","No declaration found for '{0}'",e.word):ne.N("decl.generic.noResults","No declaration found")}}).id="editor.action.revealDeclaration",ps)),ws(class extends xs{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:ne.N("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:oe.Ao.and(ie.u.hasDeclarationProvider,zn.notInPeekEditor,ie.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Se.eH.EditorContextPeek,group:"peek",order:3}})}});class ks extends ys{_getLocationModel(e,t,i){return bs(this,void 0,void 0,(function*(){return new go(yield ls(e,t,i),ne.N("typedef.title","Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?ne.N("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):ne.N("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(50).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(50).multipleTypeDefinitions}}ws(((ms=class e extends ks{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:ne.N("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:oe.Ao.and(ie.u.hasTypeDefinitionProvider,ie.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}}).ID="editor.action.goToTypeDefinition",ms)),ws(((fs=class e extends ks{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:ne.N("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:oe.Ao.and(ie.u.hasTypeDefinitionProvider,zn.notInPeekEditor,ie.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Se.eH.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",fs));class Ns extends ys{_getLocationModel(e,t,i){return bs(this,void 0,void 0,(function*(){return new go(yield as(e,t,i),ne.N("impl.title","Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?ne.N("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):ne.N("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(50).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(50).multipleImplementations}}ws(((_s=class e extends Ns{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:ne.N("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:oe.Ao.and(ie.u.hasImplementationProvider,ie.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:2118,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}}).ID="editor.action.goToImplementation",_s)),ws(((vs=class e extends Ns{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:ne.N("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:oe.Ao.and(ie.u.hasImplementationProvider,zn.notInPeekEditor,ie.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:Se.eH.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",vs));class Ds extends ys{_getNoResultFoundMessage(e){return e?ne.N("references.no","No references found for '{0}'",e.word):ne.N("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(50).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(50).multipleReferences}}ws(class extends Ds{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:ne.N("goToReferences.label","Go to References"),alias:"Go to References",precondition:oe.Ao.and(ie.u.hasReferenceProvider,zn.notInPeekEditor,ie.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(e,t,i){return bs(this,void 0,void 0,(function*(){return new go(yield ds(e,t,!0,i),ne.N("ref.title","References"))}))}}),ws(class extends Ds{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:ne.N("references.action.label","Peek References"),alias:"Peek References",precondition:oe.Ao.and(ie.u.hasReferenceProvider,zn.notInPeekEditor,ie.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Se.eH.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i){return bs(this,void 0,void 0,(function*(){return new go(yield ds(e,t,!1,i),ne.N("ref.title","References"))}))}});class Es extends ys{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:ne.N("label.generic","Go to Any Symbol"),alias:"Go to Any Symbol",precondition:oe.Ao.and(zn.notInPeekEditor,ie.u.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i){return bs(this,void 0,void 0,(function*(){return new go(this._references,ne.N("generic.title","Locations"))}))}_getNoResultFoundMessage(e){return e&&ne.N("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(50).multipleReferences}_getAlternativeCommand(){return""}}at.P.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:nt.o},{name:"position",description:"The position at which to start",constraint:ve.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(e,t,i,n,o,s,r)=>bs(void 0,void 0,void 0,(function*(){(0,yi.p_)(nt.o.isUri(t)),(0,yi.p_)(ve.L.isIPosition(i)),(0,yi.p_)(Array.isArray(n)),(0,yi.p_)(void 0===o||"string"==typeof o),(0,yi.p_)(void 0===r||"boolean"==typeof r);const a=e.get(We.$),l=yield a.openCodeEditor({resource:t},a.getFocusedCodeEditor());if((0,ro.CL)(l))return l.setPosition(i),l.revealPositionInCenterIfOutsideViewport(i,0),l.invokeWithinContext((e=>{const t=new class extends Es{_getNoResultFoundMessage(e){return s||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(s),openInPeek:Boolean(r),openToSide:!1},n,o);e.get(Dt.TG).invokeFunction(t.run.bind(t),l)}))}))}),at.P.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:nt.o},{name:"position",description:"The position at which to start",constraint:ve.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(e,t,i,n,o)=>bs(void 0,void 0,void 0,(function*(){e.get(at.H).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}))}),at.P.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{(0,yi.p_)(nt.o.isUri(t)),(0,yi.p_)(ve.L.isIPosition(i));const n=e.get(We.$);return n.openCodeEditor({resource:t},n.getFocusedCodeEditor()).then((e=>{if(!(0,ro.CL)(e)||!e.hasModel())return;const t=Go.get(e);if(!t)return;const n=(0,pe.PG)((t=>ds(e.getModel(),ve.L.lift(i),!1,t).then((e=>new go(e,ne.N("ref.title","References")))))),o=new be.e(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(o,n,!1))}))}}),at.P.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),Se.BH.appendMenuItems([{id:Se.eH.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:ne.N({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:Se.eH.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:ne.N({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:Se.eH.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:ne.N({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:Se.eH.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:ne.N({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:Se.eH.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:ne.N({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},group:"4_symbol_nav",order:5}}]);var Is=function(e,t){return function(i,n){t(i,n,e)}};let Ts=class e{constructor(e,t,i){this.textModelResolverService=t,this.modeService=i,this.toUnhook=new me.SL,this.toUnhookForKeyboard=new me.SL,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let n=new on(e);this.toUnhook.add(n),this.toUnhook.add(n.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,(0,yi.f6)(t))}))),this.toUnhook.add(n.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).then((()=>{this.removeLinkDecorations()}),(e=>{this.removeLinkDecorations(),(0,it.dL)(e)}))}))),this.toUnhook.add(n.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(t){return t.getContribution(e.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then((()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return Promise.resolve(0);this.currentWordAtPosition=i;let n=new ot.yy(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,pe.PG)((t=>this.findDefinition(e,t))),this.previousPromise.then((t=>{if(t&&t.length&&n.validate(this.editor))if(t.length>1)this.addDecoration(new be.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),(new B.W5).appendText(ne.N("multipleResults","Click to show {0} definitions.",t.length)));else{let n=t[0];if(!n.uri)return;this.textModelResolverService.createModelReference(n.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:o}}=t,{startLineNumber:s}=n.range;if(s<1||s>o.getLineCount())return void t.dispose();const r=this.getPreviewValue(o,s,n);let a;a=n.originSelectionRange?be.e.lift(n.originSelectionRange):new be.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);const l=this.modeService.getModeIdByFilepathOrFirstLine(o.uri);this.addDecoration(a,(new B.W5).appendCodeblock(l||"",r)),t.dispose()}))}else this.removeLinkDecorations()})).then(void 0,it.dL)}getPreviewValue(t,i,n){let o=n.targetSelectionRange?n.range:this.getPreviewRangeBasedOnBrackets(t,i);return o.endLineNumber-o.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(t,i)),this.stripIndentationFromPreviewRange(t,i,o)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;o<i.endLineNumber;o++){const t=e.getLineFirstNonWhitespaceColumn(o);n=Math.min(n,t)}return e.getValueInRange(i).replace(new RegExp(`^\\s{${n-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(t,i){const n=t.getLineFirstNonWhitespaceColumn(i),o=Math.min(t.getLineCount(),i+e.MAX_SOURCE_PREVIEW_LINES);let s=i+1;for(;s<o&&n!==t.getLineFirstNonWhitespaceColumn(s);s++);return new be.e(i,1,s+1,1)}getPreviewRangeBasedOnBrackets(t,i){const n=Math.min(t.getLineCount(),i+e.MAX_SOURCE_PREVIEW_LINES),o=[];let s=!0,r=t.findNextBracket(new ve.L(i,1));for(;null!==r;){if(0===o.length)o.push(r);else{const e=o[o.length-1];if(e.open[0]===r.open[0]&&e.isOpen&&!r.isOpen?o.pop():o.push(r),0===o.length){if(!s)return new be.e(i,1,r.range.endLineNumber+1,1);s=!1}}const e=t.getLineMaxColumn(i);let a=r.range.endLineNumber,l=r.range.endColumn;if(e===r.range.endColumn&&(a++,l=1),a>n)return new be.e(i,1,n+1,1);r=t.findNextBracket(new ve.L(a,l))}return new be.e(i,1,n+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[i])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&st.Ct.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?ss(i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext((e=>{const i=!t&&this.editor.getOption(77)&&!this.isInPeekEditor(e);return new Ss({openToSide:t,openInPeek:i,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,this.editor)}))}isInPeekEditor(e){const t=e.get(oe.i6);return zn.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};Ts.ID="editor.contrib.gotodefinitionatposition",Ts.MAX_SOURCE_PREVIEW_LINES=8,Ts=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Is(1,Yi.S),Is(2,Zi.h)],Ts),(0,ee._K)(Ts.ID,Ts),(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le._Y);i&&t.addRule(`.monaco-editor .goto-definition-link { color: ${i} !important; }`)}));var Ms=i(45019),Rs=i(81747),As={};As.styleTagTransform=Y(),As.setAttributes=q(),As.insert=j().bind(null,"head"),As.domAPI=K(),As.insertStyleElement=G(),H()(Rs.Z,As),Rs.Z&&Rs.Z.locals&&Rs.Z.locals;const Os=Et.$;class Ps extends me.JT{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this._scrollbar=this._register(new Ms.s$(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}class Fs extends me.JT{constructor(e,t,i){super(),this.actionContainer=Et.R3(e,Os("div.action-container")),this.action=Et.R3(this.actionContainer,Os("a.action")),this.action.setAttribute("href","#"),this.action.setAttribute("role","button"),t.iconClass&&Et.R3(this.action,Os(`span.icon.${t.iconClass}`)),Et.R3(this.action,Os("span")).textContent=i?`${t.label} (${i})`:t.label,this._register(Et.nm(this.actionContainer,Et.tw.MOUSE_DOWN,(e=>{e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer)}))),this.setEnabled(!0)}static render(e,t,i){return new Fs(e,t,i)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var Bs=i(35248);class Ws{constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new Vt.Q5,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new Vt.Q5,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new Vt.Q5,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let e=0;e<this.colorPresentations.length;e++)if(t.toLowerCase()===this.colorPresentations[e].label){this.presentationIndex=e,this._onDidChangePresentation.fire(this.presentation);break}}flushColor(){this._onColorFlushed.fire(this._color)}}var Vs=i(6762),Hs={};Hs.styleTagTransform=Y(),Hs.setAttributes=q(),Hs.insert=j().bind(null,"head"),Hs.domAPI=K(),Hs.insertStyleElement=G(),H()(Vs.Z,Hs),Vs.Z&&Vs.Z.locals&&Vs.Z.locals;const zs=Et.$;class Ks extends me.JT{constructor(e,t,i){super(),this.model=t,this.domNode=zs(".colorpicker-header"),Et.R3(e,this.domNode),this.pickedColorNode=Et.R3(this.domNode,zs(".picked-color"));const n=(0,ne.N)("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this.pickedColorNode.setAttribute("title",n);const o=Et.R3(this.domNode,zs(".original-color"));o.style.backgroundColor=Ki.Il.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(Le.yJ)||Ki.Il.white,this._register((0,xe.Ic)(((e,t)=>{this.backgroundColor=e.getColor(Le.yJ)||Ki.Il.white}))),this._register(Et.nm(this.pickedColorNode,Et.tw.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(Et.nm(o,Et.tw.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=Ki.Il.Format.CSS.format(t.color)||"",this.pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter())}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=Ki.Il.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(zs(".codicon.codicon-color-mode"))}}class Us extends me.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this.domNode=zs(".colorpicker-body"),Et.R3(e,this.domNode),this.saturationBox=new js(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new qs(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new Zs(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new Ki.Il(new Ki.tx(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new Ki.Il(new Ki.tx(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new Ki.Il(new Ki.tx(360===i?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class js extends me.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new Vt.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Vt.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=zs(".saturation-wrap"),Et.R3(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",Et.R3(this.domNode,this.canvas),this.selection=zs(".saturation-selection"),Et.R3(this.domNode,this.selection),this.layout(),this._register(Et.Lo(this.domNode,(e=>this.onMouseDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new Ft.Z);const t=Et.i(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,Ft.e,(e=>this.onDidChangePosition(e.posx-t.left,e.posy-t.top)),(()=>null));const i=Et.qV(document,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new Ki.Il(new Ki.tx(e.h,1,1,1)),i=this.canvas.getContext("2d"),n=i.createLinearGradient(0,0,this.canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const o=i.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this.canvas.width,this.canvas.height),i.fillStyle=Ki.Il.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class $s extends me.JT{constructor(e,t){super(),this.model=t,this._onDidChange=new Vt.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Vt.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=Et.R3(e,zs(".strip")),this.overlay=Et.R3(this.domNode,zs(".overlay")),this.slider=Et.R3(this.domNode,zs(".slider")),this.slider.style.top="0px",this._register(Et.Lo(this.domNode,(e=>this.onMouseDown(e)))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new Ft.Z),i=Et.i(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,Ft.e,(e=>this.onDidChangeTop(e.posy-i.top)),(()=>null));const n=Et.qV(document,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class qs extends $s{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,o=new Ki.Il(new Ki.VS(t,i,n,1)),s=new Ki.Il(new Ki.VS(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}}class Zs extends $s{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class Gs extends Bs.${constructor(e,t,i,n){super(),this.model=t,this.pixelRatio=i,this._register((0,Pe.fX)((()=>this.layout())));const o=zs(".colorpicker-widget");e.appendChild(o);const s=new Ks(o,this.model,n);this.body=new Us(o,this.model,this.pixelRatio),this._register(s),this._register(this.body)}layout(){this.body.layout()}}var Qs=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Ys{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Js=class{constructor(e,t,i){this._editor=e,this._hover=t,this._themeService=i}computeSync(e,t){return[]}computeAsync(e,t,i){return Qs(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=qi.get(this._editor);for(const i of t){if("color-detector-color"!==i.options.description)continue;const t=e.getColorData(i.range.getStartPosition());if(t)return[yield this._createColorHover(this._editor.getModel(),t.colorInfo,t.provider)]}return[]}))}_createColorHover(e,t,i){return Qs(this,void 0,void 0,(function*(){const n=e.getValueInRange(t.range),{red:o,green:s,blue:r,alpha:a}=t.color,l=new Ki.VS(Math.round(255*o),Math.round(255*s),Math.round(255*r),a),d=new Ki.Il(l),h=yield Ui(e,t,i,Ye.T.None),c=new Ws(d,[],0);return c.colorPresentations=h||[],c.guessColorPresentation(d,n),new Ys(this,be.e.lift(t.range),c,i)}))}renderHoverParts(e,t,i){if(0===e.length||!this._editor.hasModel())return me.JT.None;const n=new me.SL,o=e[0],s=this._editor.getModel(),r=o.model,a=n.add(new Gs(t,r,this._editor.getOption(127),this._themeService));let l=new be.e(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn);const d=()=>{let e,t;if(r.presentation.textEdit){e=[r.presentation.textEdit],t=new be.e(r.presentation.textEdit.range.startLineNumber,r.presentation.textEdit.range.startColumn,r.presentation.textEdit.range.endLineNumber,r.presentation.textEdit.range.endColumn);const i=this._editor.getModel()._setTrackedRange(null,t,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",e),t=this._editor.getModel()._getTrackedRange(i)||t}else e=[{identifier:null,range:l,text:r.presentation.label,forceMoveMarkers:!1}],t=l.setEndPosition(l.endLineNumber,l.startColumn+r.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",e);r.presentation.additionalTextEdits&&(e=[...r.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",e),this._hover.hide()),this._editor.pushUndoStop(),l=t},h=e=>Ui(s,{range:l,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},o.provider,Ye.T.None).then((e=>{r.colorPresentations=e||[]}));return n.add(r.onColorFlushed((e=>{h(e).then(d)}))),n.add(r.onDidChangeColor(h)),this._hover.setColorPicker(a),n}};Js=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,xe.XE)],Js);class Xs{constructor(e,t,i,n,o){this._computer=e,this._state=0,this._hoverTime=o,this._firstWaitScheduler=new pe.pY((()=>this._triggerAsyncComputation()),0),this._secondWaitScheduler=new pe.pY((()=>this._triggerSyncComputation()),0),this._loadingMessageScheduler=new pe.pY((()=>this._showLoadingMessage()),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=i,this._progressCallback=n}setHoverTime(e){this._hoverTime=e}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=(0,pe.PG)((e=>this._computer.computeAsync(e))),this._asyncComputationPromise.then((e=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(e)}),(e=>this._onError(e)))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(e){this._completeCallback(e)}_onError(e){this._errorCallback?this._errorCallback(e):(0,it.dL)(e)}_onProgress(e){this._progressCallback(e)}start(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}class er{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class tr{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}var ir=Object.hasOwnProperty,nr=Object.setPrototypeOf,or=Object.isFrozen,sr=Object.getPrototypeOf,rr=Object.getOwnPropertyDescriptor,ar=Object.freeze,lr=Object.seal,dr=Object.create,hr="undefined"!=typeof Reflect&&Reflect,cr=hr.apply,ur=hr.construct;cr||(cr=function(e,t,i){return e.apply(t,i)}),ar||(ar=function(e){return e}),lr||(lr=function(e){return e}),ur||(ur=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}(t))))});var gr,pr=Lr(Array.prototype.forEach),mr=Lr(Array.prototype.pop),fr=Lr(Array.prototype.push),_r=Lr(String.prototype.toLowerCase),vr=Lr(String.prototype.match),br=Lr(String.prototype.replace),Cr=Lr(String.prototype.indexOf),wr=Lr(String.prototype.trim),yr=Lr(RegExp.prototype.test),Sr=(gr=TypeError,function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return ur(gr,t)});function Lr(e){return function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return cr(e,t,n)}}function xr(e,t){nr&&nr(e,null);for(var i=t.length;i--;){var n=t[i];if("string"==typeof n){var o=_r(n);o!==n&&(or(t)||(t[i]=o),n=o)}e[n]=!0}return e}function kr(e){var t=dr(null),i=void 0;for(i in e)cr(ir,e,[i])&&(t[i]=e[i]);return t}function Nr(e,t){for(;null!==e;){var i=rr(e,t);if(i){if(i.get)return Lr(i.get);if("function"==typeof i.value)return Lr(i.value)}e=sr(e)}return function(e){return console.warn("fallback value for",e),null}}var Dr=ar(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Er=ar(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ir=ar(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Tr=ar(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Mr=ar(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Rr=ar(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ar=ar(["#text"]),Or=ar(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Pr=ar(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Fr=ar(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Br=ar(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Wr=lr(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Vr=lr(/<%[\s\S]*|[\s\S]*%>/gm),Hr=lr(/^data-[\-\w.\u00B7-\uFFFF]/),zr=lr(/^aria-[\-\w]+$/),Kr=lr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ur=lr(/^(?:\w+script|data):/i),jr=lr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function qr(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var Zr=function(){return"undefined"==typeof window?null:window},Gr=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zr(),i=function(t){return e(t)};if(i.version="2.3.1",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;var n=t.document,o=t.document,s=t.DocumentFragment,r=t.HTMLTemplateElement,a=t.Node,l=t.Element,d=t.NodeFilter,h=t.NamedNodeMap,c=void 0===h?t.NamedNodeMap||t.MozNamedAttrMap:h,u=t.Text,g=t.Comment,p=t.DOMParser,m=t.trustedTypes,f=l.prototype,_=Nr(f,"cloneNode"),v=Nr(f,"nextSibling"),b=Nr(f,"childNodes"),C=Nr(f,"parentNode");if("function"==typeof r){var w=o.createElement("template");w.content&&w.content.ownerDocument&&(o=w.content.ownerDocument)}var y=function(e,t){if("object"!==(void 0===e?"undefined":$r(e))||"function"!=typeof e.createPolicy)return null;var i=null,n="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(n)&&(i=t.currentScript.getAttribute(n));var o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(m,n),S=y&&te?y.createHTML(""):"",L=o,x=L.implementation,k=L.createNodeIterator,N=L.createDocumentFragment,D=L.getElementsByTagName,E=n.importNode,I={};try{I=kr(o).documentMode?o.documentMode:{}}catch(e){}var T={};i.isSupported="function"==typeof C&&x&&void 0!==x.createHTMLDocument&&9!==I;var M=Wr,R=Vr,A=Hr,O=zr,P=Ur,F=jr,B=Kr,W=null,V=xr({},[].concat(qr(Dr),qr(Er),qr(Ir),qr(Mr),qr(Ar))),H=null,z=xr({},[].concat(qr(Or),qr(Pr),qr(Fr),qr(Br))),K=null,U=null,j=!0,$=!0,q=!1,Z=!1,G=!1,Q=!1,Y=!1,J=!1,X=!1,ee=!0,te=!1,ie=!0,ne=!0,oe=!1,se={},re=null,ae=xr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),le=null,de=xr({},["audio","video","img","source","image","track"]),he=null,ce=xr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ue="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",me=pe,fe=!1,_e=null,ve=o.createElement("form"),be=function(e){_e&&_e===e||(e&&"object"===(void 0===e?"undefined":$r(e))||(e={}),e=kr(e),W="ALLOWED_TAGS"in e?xr({},e.ALLOWED_TAGS):V,H="ALLOWED_ATTR"in e?xr({},e.ALLOWED_ATTR):z,he="ADD_URI_SAFE_ATTR"in e?xr(kr(ce),e.ADD_URI_SAFE_ATTR):ce,le="ADD_DATA_URI_TAGS"in e?xr(kr(de),e.ADD_DATA_URI_TAGS):de,re="FORBID_CONTENTS"in e?xr({},e.FORBID_CONTENTS):ae,K="FORBID_TAGS"in e?xr({},e.FORBID_TAGS):{},U="FORBID_ATTR"in e?xr({},e.FORBID_ATTR):{},se="USE_PROFILES"in e&&e.USE_PROFILES,j=!1!==e.ALLOW_ARIA_ATTR,$=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=e.SAFE_FOR_TEMPLATES||!1,G=e.WHOLE_DOCUMENT||!1,J=e.RETURN_DOM||!1,X=e.RETURN_DOM_FRAGMENT||!1,ee=!1!==e.RETURN_DOM_IMPORT,te=e.RETURN_TRUSTED_TYPE||!1,Y=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,B=e.ALLOWED_URI_REGEXP||B,me=e.NAMESPACE||pe,Z&&($=!1),X&&(J=!0),se&&(W=xr({},[].concat(qr(Ar))),H=[],!0===se.html&&(xr(W,Dr),xr(H,Or)),!0===se.svg&&(xr(W,Er),xr(H,Pr),xr(H,Br)),!0===se.svgFilters&&(xr(W,Ir),xr(H,Pr),xr(H,Br)),!0===se.mathMl&&(xr(W,Mr),xr(H,Fr),xr(H,Br))),e.ADD_TAGS&&(W===V&&(W=kr(W)),xr(W,e.ADD_TAGS)),e.ADD_ATTR&&(H===z&&(H=kr(H)),xr(H,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&xr(he,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(re===ae&&(re=kr(re)),xr(re,e.FORBID_CONTENTS)),ne&&(W["#text"]=!0),G&&xr(W,["html","head","body"]),W.table&&(xr(W,["tbody"]),delete K.tbody),ar&&ar(e),_e=e)},Ce=xr({},["mi","mo","mn","ms","mtext"]),we=xr({},["foreignobject","desc","title","annotation-xml"]),ye=xr({},Er);xr(ye,Ir),xr(ye,Tr);var Se=xr({},Mr);xr(Se,Rr);var Le=function(e){fr(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=S}catch(t){e.remove()}}},xe=function(e,t){try{fr(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){fr(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!H[e])if(J||X)try{Le(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ke=function(e){var t=void 0,i=void 0;if(Y)e="<remove></remove>"+e;else{var n=vr(e,/^[\r\n\t ]+/);i=n&&n[0]}var s=y?y.createHTML(e):e;if(me===pe)try{t=(new p).parseFromString(s,"text/html")}catch(e){}if(!t||!t.documentElement){t=x.createDocument(me,"template",null);try{t.documentElement.innerHTML=fe?"":s}catch(e){}}var r=t.body||t.documentElement;return e&&i&&r.insertBefore(o.createTextNode(i),r.childNodes[0]||null),me===pe?D.call(t,G?"html":"body")[0]:G?t.documentElement:r},Ne=function(e){return k.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},De=function(e){return"object"===(void 0===a?"undefined":$r(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":$r(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ee=function(e,t,n){T[e]&&pr(T[e],(function(e){e.call(i,t,n,_e)}))},Ie=function(e){var t,n=void 0;if(Ee("beforeSanitizeElements",e,null),!((t=e)instanceof u||t instanceof g||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof c&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI&&"function"==typeof t.insertBefore))return Le(e),!0;if(vr(e.nodeName,/[\u0080-\uFFFF]/))return Le(e),!0;var o=_r(e.nodeName);if(Ee("uponSanitizeElement",e,{tagName:o,allowedTags:W}),!De(e.firstElementChild)&&(!De(e.content)||!De(e.content.firstElementChild))&&yr(/<[/\w]/g,e.innerHTML)&&yr(/<[/\w]/g,e.textContent))return Le(e),!0;if("select"===o&&yr(/<template/i,e.innerHTML))return Le(e),!0;if(!W[o]||K[o]){if(ne&&!re[o]){var s=C(e)||e.parentNode,r=b(e)||e.childNodes;if(r&&s)for(var a=r.length-1;a>=0;--a)s.insertBefore(_(r[a],!0),v(e))}return Le(e),!0}return e instanceof l&&!function(e){var t=C(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var i=_r(e.tagName),n=_r(t.tagName);if(e.namespaceURI===ge)return t.namespaceURI===pe?"svg"===i:t.namespaceURI===ue?"svg"===i&&("annotation-xml"===n||Ce[n]):Boolean(ye[i]);if(e.namespaceURI===ue)return t.namespaceURI===pe?"math"===i:t.namespaceURI===ge?"math"===i&&we[n]:Boolean(Se[i]);if(e.namespaceURI===pe){if(t.namespaceURI===ge&&!we[n])return!1;if(t.namespaceURI===ue&&!Ce[n])return!1;var o=xr({},["title","style","font","a","script"]);return!Se[i]&&(o[i]||!ye[i])}return!1}(e)?(Le(e),!0):"noscript"!==o&&"noembed"!==o||!yr(/<\/no(script|embed)/i,e.innerHTML)?(Z&&3===e.nodeType&&(n=e.textContent,n=br(n,M," "),n=br(n,R," "),e.textContent!==n&&(fr(i.removed,{element:e.cloneNode()}),e.textContent=n)),Ee("afterSanitizeElements",e,null),!1):(Le(e),!0)},Te=function(e,t,i){if(ie&&("id"===t||"name"===t)&&(i in o||i in ve))return!1;if($&&!U[t]&&yr(A,t));else if(j&&yr(O,t));else{if(!H[t]||U[t])return!1;if(he[t]);else if(yr(B,br(i,F,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Cr(i,"data:")||!le[e])if(q&&!yr(P,br(i,F,"")));else if(i)return!1}return!0},Me=function(e){var t=void 0,n=void 0,o=void 0,s=void 0;Ee("beforeSanitizeAttributes",e,null);var r=e.attributes;if(r){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(s=r.length;s--;){var l=t=r[s],d=l.name,h=l.namespaceURI;if(n=wr(t.value),o=_r(d),a.attrName=o,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,Ee("uponSanitizeAttribute",e,a),n=a.attrValue,!a.forceKeepAttr&&(xe(d,e),a.keepAttr))if(yr(/\/>/i,n))xe(d,e);else{Z&&(n=br(n,M," "),n=br(n,R," "));var c=e.nodeName.toLowerCase();if(Te(c,o,n))try{h?e.setAttributeNS(h,d,n):e.setAttribute(d,n),mr(i.removed)}catch(e){}}}Ee("afterSanitizeAttributes",e,null)}},Re=function e(t){var i=void 0,n=Ne(t);for(Ee("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)Ee("uponSanitizeShadowNode",i,null),Ie(i)||(i.content instanceof s&&e(i.content),Me(i));Ee("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e,o){var r=void 0,l=void 0,d=void 0,h=void 0,c=void 0;if((fe=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!De(e)){if("function"!=typeof e.toString)throw Sr("toString is not a function");if("string"!=typeof(e=e.toString()))throw Sr("dirty is not a string, aborting")}if(!i.isSupported){if("object"===$r(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(De(e))return t.toStaticHTML(e.outerHTML)}return e}if(Q||be(o),i.removed=[],"string"==typeof e&&(oe=!1),oe);else if(e instanceof a)1===(l=(r=ke("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?r=l:r.appendChild(l);else{if(!J&&!Z&&!G&&-1===e.indexOf("<"))return y&&te?y.createHTML(e):e;if(!(r=ke(e)))return J?null:S}r&&Y&&Le(r.firstChild);for(var u=Ne(oe?e:r);d=u.nextNode();)3===d.nodeType&&d===h||Ie(d)||(d.content instanceof s&&Re(d.content),Me(d),h=d);if(h=null,oe)return e;if(J){if(X)for(c=N.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return ee&&(c=E.call(n,c,!0)),c}var g=G?r.outerHTML:r.innerHTML;return Z&&(g=br(g,M," "),g=br(g,R," ")),y&&te?y.createHTML(g):g},i.setConfig=function(e){be(e),Q=!0},i.clearConfig=function(){_e=null,Q=!1},i.isValidAttribute=function(e,t,i){_e||be({});var n=_r(e),o=_r(t);return Te(n,o,i)},i.addHook=function(e,t){"function"==typeof t&&(T[e]=T[e]||[],fr(T[e],t))},i.removeHook=function(e){T[e]&&mr(T[e])},i.removeHooks=function(e){T[e]&&(T[e]=[])},i.removeAllHooks=function(){T={}},i}();Gr.version,Gr.isSupported;const Qr=Gr.sanitize,Yr=(Gr.setConfig,Gr.clearConfig,Gr.isValidAttribute,Gr.addHook),Jr=Gr.removeHook;Gr.removeHooks,Gr.removeAllHooks;var Xr=i(74152),ea=i(14271),ta=i(76049),ia=i(32881),na=i(96136),oa=i(32094);function sa(e,t={},i={}){var n;const o=new me.SL;let s=!1;const r=o.add(new Ye.A),a=(0,ea.az)(t),l=function(t){let i;try{i=(0,oa.Q)(decodeURIComponent(t))}catch(e){}return i?(i=(0,rn.rs)(i,(t=>e.uris&&e.uris[t]?nt.o.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},d=function(t,i){const n=e.uris&&e.uris[t];if(!n)return t;let o=nt.o.revive(n);return i?t.startsWith(mo.lg.data+":")?t:mo.Gi.asBrowserUri(o).toString(!0):nt.o.parse(t).toString()===o.toString()?t:(o.query&&(o=o.with({query:l(o.query)})),o.toString())};let h;const c=new Promise((e=>h=e)),u=new na.Th;if(u.image=(e,i,n)=>{let o=[],s=[];if(e){({href:e,dimensions:o}=(0,B.v1)(e)),e=d(e,!0);try{const i=nt.o.parse(e);t.baseUrl&&i.scheme===mo.lg.file&&(e=(0,Jt.i3)(t.baseUrl,e).toString())}catch(e){}s.push(`src="${e}"`)}return n&&s.push(`alt="${n}"`),i&&s.push(`title="${i}"`),o.length&&(s=s.concat(o)),"<img "+s.join(" ")+">"},u.link=(i,n,o)=>(i===o&&(o=(0,B.oR)(o)),i=d(i,!1),t.baseUrl&&(/^\w[\w\d+.-]*:/.test(i)||(i=(0,Jt.i3)(t.baseUrl,i).toString())),n=(0,B.oR)(n),!(i=(0,B.oR)(i))||i.match(/^data:|javascript:/i)||i.match(/^command:/i)&&!e.isTrusted||i.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?o:`<a href="#" data-href="${i=i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}" title="${n||i}">${o}</a>`),u.paragraph=e=>`<p>${e}</p>`,t.codeBlockRenderer&&(u.code=(e,i)=>{const n=t.codeBlockRenderer(i,e),o=gn.a.nextId();return(0,pe.eP)(Promise.all([n,c]),r.token).then((e=>{var i;if(!s&&e){const n=a.querySelector(`div[data-code="${o}"]`);n&&Et.mc(n,e[0]),null===(i=t.asyncRenderCallback)||void 0===i||i.call(t)}})).catch((()=>{})),`<div class="code" data-code="${o}">${(0,Xe.YU)(e)}</div>`}),t.actionHandler){const e=t.actionHandler.disposables.add(new Xr.Y(a,"click")),i=t.actionHandler.disposables.add(new Xr.Y(a,"auxclick"));t.actionHandler.disposables.add(Vt.ju.any(e.event,i.event)((e=>{const i=new ta.n(e);if(!i.leftButton&&!i.middleButton)return;let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{const e=n.dataset.href;e&&t.actionHandler.callback(e,i)}catch(e){(0,it.dL)(e)}finally{i.preventDefault()}})))}e.supportHtml||(i.sanitizer=t=>(e.isTrusted?t.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?t:"",i.sanitize=!0,i.silent=!0),i.renderer=u;let g=null!==(n=e.value)&&void 0!==n?n:"";g.length>1e5&&(g=`${g.substr(0,1e5)}…`),e.supportThemeIcons&&(g=(0,ia.f$)(g));let p=na.Qc(g,i);if(e.supportThemeIcons&&(p=(0,Ri.T)(p).map((e=>"string"==typeof e?e:e.outerHTML)).join("")),a.innerHTML=function(e,t){const{config:i,allowedSchemes:n}=function(e){const t=[mo.lg.http,mo.lg.https,mo.lg.mailto,mo.lg.data,mo.lg.file,mo.lg.vscodeFileResource,mo.lg.vscodeRemote,mo.lg.vscodeRemoteResource];return e.isTrusted&&t.push(mo.lg.command),{config:{ALLOWED_TAGS:["ul","li","p","b","i","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],ALLOWED_ATTR:["href","data-href","target","title","src","alt","class","style","data-code","width","height","align"],ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:t}}(e);Yr("uponSanitizeAttribute",((e,t)=>{if("style"!==t.attrName&&"class"!==t.attrName);else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}}));const o=document.createElement("a");Yr("afterSanitizeAttributes",(e=>{for(const t of["href","src"])e.hasAttribute(t)&&(o.href=e.getAttribute(t),n.includes(o.protocol.replace(/:$/,""))||e.removeAttribute(t))}));try{return Qr(t,Object.assign(Object.assign({},i),{RETURN_TRUSTED_TYPE:!0}))}finally{Jr("uponSanitizeAttribute"),Jr("afterSanitizeAttributes")}}(e,p),h(),t.asyncRenderCallback)for(const e of a.getElementsByTagName("img")){const i=o.add(Et.nm(e,"load",(()=>{i.dispose(),t.asyncRenderCallback()})))}return{element:a,dispose:()=>{s=!0,r.cancel(),o.dispose()}}}var ra,aa=i(49048),la=i(38821),da=i(69836),ha=function(e,t){return function(i,n){t(i,n,e)}};let ca=class e{constructor(e,t,i){this._options=e,this._modeService=t,this._openerService=i,this._onDidRenderAsync=new Vt.Q5,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new me.SL;return{element:n.add(sa(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),i)).element,dispose:()=>n.dispose()}}_getRenderOptions(t,i){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(t,i)=>{return n=this,o=void 0,r=function*(){var n,o,s,r;let a;t?a=this._modeService.getModeIdForLanguageName(t):this._options.editor&&(a=null===(n=this._options.editor.getModel())||void 0===n?void 0:n.getLanguageId()),a||(a="plaintext"),this._modeService.triggerMode(a);const l=null!==(o=yield st.RW.getPromise(a))&&void 0!==o?o:void 0,d=document.createElement("span");if(d.innerHTML=null!==(r=null===(s=e._ttpTokenizer)||void 0===s?void 0:s.createHTML(i,this._modeService.languageIdCodec,l))&&void 0!==r?r:(0,la.C)(i,this._modeService.languageIdCodec,l),this._options.editor){const e=this._options.editor.getOption(43);da.V.applyFontInfoSlow(d,e)}else this._options.codeBlockFontFamily&&(d.style.fontFamily=this._options.codeBlockFontFamily);return d},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,a)}l((r=r.apply(n,o||[])).next())}));var n,o,s,r},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:e=>this._openerService.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:t.isTrusted}).catch(it.dL),disposables:i}}}};function ua(e,t,i){const n=st.xp.ordered(e).map((n=>Promise.resolve(n.provideHover(e,t,i)).then((e=>e&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(e)?e:void 0),(e=>{(0,it.Cp)(e)}))));return Promise.all(n).then(tt.kX)}ca._ttpTokenizer=null===(ra=window.trustedTypes)||void 0===ra?void 0:ra.createPolicy("tokenizeToString",{createHTML:(e,t,i)=>(0,la.C)(e,t,i)}),ca=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ha(1,Zi.h),ha(2,aa.v4)],ca),(0,ee.sb)("_executeHoverProvider",((e,t)=>ua(e,t,Ye.T.None)));var ga=function(e,t){return function(i,n){t(i,n,e)}};const pa=Et.$;class ma{constructor(e,t,i){this.owner=e,this.range=t,this.contents=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let fa=class{constructor(e,t,i,n,o){this._editor=e,this._hover=t,this._modeService=i,this._openerService=n,this._configurationService=o}createLoadingMessage(e){return new ma(this,e.range,[(new B.W5).appendText(ne.N("modesContentHover.loading","Loading..."))])}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),s=[];for(const i of t){const t=i.range.startLineNumber===n?i.range.startColumn:1,r=i.range.endLineNumber===n?i.range.endColumn:o,a=i.options.hoverMessage;if(!a||(0,B.CP)(a))continue;const l=new be.e(e.range.startLineNumber,t,e.range.startLineNumber,r);s.push(new ma(this,l,(0,tt._2)(a)))}const r=i.getLineLength(n),a=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),l=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:a});return"number"==typeof l&&r>=l&&s.push(new ma(this,e.range,[{value:ne.N("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}])),s}computeAsync(e,t,i){return n=this,o=void 0,r=function*(){if(!this._editor.hasModel()||1!==e.type)return Promise.resolve([]);const t=this._editor.getModel();if(!st.xp.has(t))return Promise.resolve([]);const n=yield ua(t,new ve.L(e.range.startLineNumber,e.range.startColumn),i),o=[];for(const t of n){if((0,B.CP)(t.contents))continue;const i=t.range?be.e.lift(t.range):e.range;o.push(new ma(this,i,t.contents))}return o},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,a)}l((r=r.apply(n,o||[])).next())}));var n,o,s,r}renderHoverParts(e,t,i){const n=new me.SL;for(const i of e)for(const e of i.contents){if((0,B.CP)(e))continue;const i=pa("div.hover-row.markdown-hover"),o=Et.R3(i,pa("div.hover-contents")),s=n.add(new ca({editor:this._editor},this._modeService,this._openerService));n.add(s.onDidRenderAsync((()=>{o.className="hover-contents code-hover-contents",this._hover.onContentsChanged()})));const r=n.add(s.render(e));o.appendChild(r.element),t.appendChild(i)}return n}};fa=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ga(2,Zi.h),ga(3,aa.v4),ga(4,ji.Ui)],fa);var _a=i(97064),va=i(87022),ba=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ca=function(e,t){return function(i,n){t(i,n,e)}};class wa{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let ya=class e{constructor(t,i){this._markerService=i,this._onDidChange=new Vt.Q5,this.onDidChange=this._onDidChange.event,this._dispoables=new me.SL,this._markers=[],this._nextIdx=-1,nt.o.isUri(t)?this._resourceFilter=e=>e.toString()===t.toString():t&&(this._resourceFilter=t);const n=()=>{this._markers=this._markerService.read({resource:nt.o.isUri(t)?t:void 0,severities:Gt.ZL.Error|Gt.ZL.Warning|Gt.ZL.Info}),"function"==typeof t&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(e._compareMarker)};n(),this._dispoables.add(i.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(n(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new wa(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,o=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));o<0&&(o=(0,tt.ry)(this._markers,{resource:e.uri},((e,t)=>(0,Xe.qu)(e.resource.toString(),t.resource.toString()))),o<0&&(o=~o));for(let i=o;i<this._markers.length;i++){let o=be.e.lift(this._markers[i]);if(o.isEmpty()){const t=e.getWordAtPosition(o.getStartPosition());t&&(o=new be.e(o.startLineNumber,t.startColumn,o.startLineNumber,t.endColumn))}if(t&&(o.containsPosition(t)||t.isBeforeOrEqual(o.getStartPosition()))){this._nextIdx=i,n=!0;break}if(this._markers[i].resource.toString()!==e.uri.toString())break}n||(this._nextIdx=i?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,i){if(0===this._markers.length)return!1;let n=this._nextIdx;return-1===this._nextIdx?this._initIdx(t,i,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(e,t){let i=this._markers.findIndex((t=>t.resource.toString()===e.toString()));if(!(i<0))for(;i<this._markers.length;i++)if(be.e.containsPosition(this._markers[i],t))return new wa(this._markers[i],i+1,this._markers.length)}static _compareMarker(e,t){let i=(0,Xe.qu)(e.resource.toString(),t.resource.toString());return 0===i&&(i=Gt.ZL.compare(e.severity,t.severity)),0===i&&(i=be.e.compareRangesUsingStarts(e,t)),i}};ya=ba([Ca(1,Gt.lT)],ya);const Sa=(0,Dt.yh)("IMarkerNavigationService");let La=class{constructor(e){this._markerService=e,this._provider=new va.S}getMarkerList(e){for(let t of this._provider){const i=t.getMarkerList(e);if(i)return i}return new ya(e,this._markerService)}};La=ba([Ca(0,Gt.lT)],La),(0,Di.z)(Sa,La,!0);var xa=i(56459),ka=i(46165),Na={};Na.styleTagTransform=Y(),Na.setAttributes=q(),Na.insert=j().bind(null,"head"),Na.domAPI=K(),Na.insertStyleElement=G(),H()(ka.Z,Na),ka.Z&&ka.Z.locals&&ka.Z.locals;var Da,Ea=i(7474);!function(e){e.className=function(e){switch(e){case Ea.Z.Ignore:return"severity-ignore "+Wt.lA.info.classNames;case Ea.Z.Info:return Wt.lA.info.classNames;case Ea.Z.Warning:return Wt.lA.warning.classNames;case Ea.Z.Error:return Wt.lA.error.classNames;default:return""}}}(Da||(Da={})),(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le.Jp);if(i){const e=Wt.lA.error.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.extensions-viewlet > .extensions ${e} {\n\t\t\t\tcolor: ${i};\n\t\t\t}\n\t\t`)}const n=e.getColor(Le.BO);if(n){const e=Wt.lA.warning.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.preferences-editor ${e} {\n\t\t\t\tcolor: ${n};\n\t\t\t}\n\t\t`)}const o=e.getColor(Le.OL);if(o){const e=Wt.lA.info.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${o};\n\t\t\t}\n\t\t`)}}));var Ia=function(e,t){return function(i,n){t(i,n,e)}};class Ta{constructor(e,t,i,n,o){this._openerService=n,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new me.SL,this._editor=t;const s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(Et.mu(this._relatedBlock,"click",(e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new Ms.NB(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{s.style.left=`-${e.scrollLeft}px`,s.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,me.B9)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:o}=e;let s=((null==t?void 0:t.length)||0)+2;o&&(s+="string"==typeof o?o.length:o.value.length);const r=(0,Xe.uq)(i);this._lines=r.length,this._longestLineLength=0;for(const e of r)this._longestLineLength=Math.max(e.length+s,this._longestLineLength);Et.PO(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of r)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||o){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(o)if("string"==typeof o){const t=document.createElement("span");t.innerText=`(${o})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=Et.$("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(o.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},Et.R3(this._codeLink,Et.$("span")).innerText=o.value,e.appendChild(this._codeLink)}if(Et.PO(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,tt.Of)(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(58))}px`,this._lines+=1;for(const t of n){let i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${Lo(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);let o=document.createElement("span");o.innerText=t.message,i.appendChild(n),i.appendChild(o),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(43),d=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:h})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Gt.ZL.Error:t=ne.N("Error","Error");break;case Gt.ZL.Warning:t=ne.N("Warning","Warning");break;case Gt.ZL.Info:t=ne.N("Info","Info");break;case Gt.ZL.Hint:t=ne.N("Hint","Hint")}let i=ne.N("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let Ma=class e extends jn{constructor(e,t,i,n,o,s,r){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=s,this._labelService=r,this._callOnDispose=new me.SL,this._onDidSelectRelatedInformation=new Vt.Q5,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Gt.ZL.Warning,this._backgroundColor=Ki.Il.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(za);let t=Pa,i=Fa;this._severity===Gt.ZL.Warning?(t=Ba,i=Wa):this._severity===Gt.ZL.Info&&(t=Va,i=Ha);const n=e.getColor(t),o=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:o,primaryHeadingColor:e.getColor(qn),secondaryHeadingColor:e.getColor(Zn)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(t){super._fillHead(t),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun((e=>this.editor.focus())));const i=[],n=this._menuService.createMenu(e.TitleMenu,this._contextKeyService);(function(e,t,i,n,o,s,r){const a=e.getActions(t);(function(e,t,i,n=(e=>"navigation"===e),o=Number.MAX_SAFE_INTEGER,s=(()=>!1),r=!1){let a,l;Array.isArray(t)?(a=t,l=t):(a=t.primary,l=t.secondary);const d=new Set;for(const[t,o]of e){let e;n(t)?(e=a,e.length>0&&r&&e.push(new It.Z0)):(e=l,e.length>0&&e.push(new It.Z0));for(let n of o){i&&(n=n instanceof Se.U8&&n.alt?n.alt:n);const o=e.push(n);n instanceof It.wY&&d.add({group:t,action:n,index:o-1})}}for(const{group:e,action:t,index:i}of d){const r=n(e)?a:l,d=t.actions;(d.length<=1||r.length+d.length-2<=o)&&s(t,e,r.length)&&r.splice(i,1,...d)}if(a!==l&&a.length>o){const e=a.splice(o,a.length-o);l.unshift(...e,new It.Z0)}})(a,i,!1,"string"==typeof n?e=>e===n:n,o,s,r),function(e){const t=new me.SL;for(const[,i]of e)for(const e of i)t.add(e)}(a)})(n,void 0,i),this._actionbarWidget.push(i,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=Et.R3(e,Et.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new Ta(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let n=be.e.lift(e);const o=this.editor.getPosition();let s=o&&n.containsPosition(o)?o:n.getStartPosition();super.show(s,this.computeRequiredHeight());const r=this.editor.getModel();if(r){const e=i>1?ne.N("problems","{0} of {1} problems",t,i):ne.N("change","{0} of {1} problem",t,i);this.setTitle((0,Jt.EZ)(r.uri),e)}this._icon.className=`codicon ${Da.className(Gt.ZL.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};Ma.TitleMenu=new Se.eH("gotoErrorTitleMenu"),Ma=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ia(1,xe.XE),Ia(2,aa.v4),Ia(3,Se.co),Ia(4,Dt.TG),Ia(5,oe.i6),Ia(6,ko.e)],Ma);let Ra=(0,Le.kw)(Le.lX,Le.b6),Aa=(0,Le.kw)(Le.uo,Le.pW),Oa=(0,Le.kw)(Le.c6,Le.T8);const Pa=(0,Le.P6)("editorMarkerNavigationError.background",{dark:Ra,light:Ra,hc:Le.lR},ne.N("editorMarkerNavigationError","Editor marker navigation widget error color.")),Fa=(0,Le.P6)("editorMarkerNavigationError.headerBackground",{dark:(0,Le.Zn)(Pa,.1),light:(0,Le.Zn)(Pa,.1),hc:null},ne.N("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),Ba=(0,Le.P6)("editorMarkerNavigationWarning.background",{dark:Aa,light:Aa,hc:Le.lR},ne.N("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Wa=(0,Le.P6)("editorMarkerNavigationWarning.headerBackground",{dark:(0,Le.Zn)(Ba,.1),light:(0,Le.Zn)(Ba,.1),hc:"#0C141F"},ne.N("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),Va=(0,Le.P6)("editorMarkerNavigationInfo.background",{dark:Oa,light:Oa,hc:Le.lR},ne.N("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Ha=(0,Le.P6)("editorMarkerNavigationInfo.headerBackground",{dark:(0,Le.Zn)(Va,.1),light:(0,Le.Zn)(Va,.1),hc:null},ne.N("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),za=(0,Le.P6)("editorMarkerNavigation.background",{dark:Le.cv,light:Le.cv,hc:Le.cv},ne.N("editorMarkerNavigationBackground","Editor marker navigation widget background."));(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le.ur);i&&t.addRule(`.monaco-editor .marker-widget a.code-link span { color: ${i}; }`);const n=e.getColor(Le.sg);n&&t.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${n}; }`)}));var Ka=function(e,t){return function(i,n){t(i,n,e)}},Ua=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let ja=class e{constructor(e,t,i,n,o){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=o,this._sessionDispoables=new me.SL,this._editor=e,this._widgetVisible=Ga.bindTo(this._contextKeyService)}static get(t){return t.getContribution(e.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Ma,this._editor),this._widget.onDidClose((()=>this.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{var t,i,n;(null===(t=this._model)||void 0===t?void 0:t.selected)&&be.e.containsPosition(null===(i=this._model)||void 0===i?void 0:i.selected.marker,e.position)||null===(n=this._model)||void 0===n||n.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:be.e.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new ve.L(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(t,i){return Ua(this,void 0,void 0,(function*(){if(this._editor.hasModel()){const n=this._getOrCreateModel(i?void 0:this._editor.getModel().uri);if(n.move(t,this._editor.getModel(),this._editor.getPosition()),!n.selected)return;if(n.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const o=yield this._editorService.openCodeEditor({resource:n.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:n.selected.marker}},this._editor);o&&(e.get(o).close(),e.get(o).nagivate(t,i))}else this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}}))}};ja.ID="editor.contrib.markerController",ja=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ka(1,Sa),Ka(2,oe.i6),Ka(3,We.$),Ka(4,Dt.TG)],ja);class $a extends ee.R6{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){return Ua(this,void 0,void 0,(function*(){t.hasModel()&&ja.get(t).nagivate(this._next,this._multiFile)}))}}class qa extends $a{constructor(){super(!0,!1,{id:qa.ID,label:qa.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:ie.u.focus,primary:578,weight:100},menuOpts:{menuId:Ma.TitleMenu,title:qa.LABEL,icon:(0,xa.q5)("marker-navigation-next",Wt.lA.arrowDown,ne.N("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}qa.ID="editor.action.marker.next",qa.LABEL=ne.N("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class Za extends $a{constructor(){super(!1,!1,{id:Za.ID,label:Za.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:ie.u.focus,primary:1602,weight:100},menuOpts:{menuId:Ma.TitleMenu,title:qa.LABEL,icon:(0,xa.q5)("marker-navigation-previous",Wt.lA.arrowUp,ne.N("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}Za.ID="editor.action.marker.prev",Za.LABEL=ne.N("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)"),(0,ee._K)(ja.ID,ja),(0,ee.Qr)(qa),(0,ee.Qr)(Za),(0,ee.Qr)(class extends $a{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:ne.N("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:ie.u.focus,primary:66,weight:100},menuOpts:{menuId:Se.eH.MenubarGoMenu,title:ne.N({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}),(0,ee.Qr)(class extends $a{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:ne.N("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:ie.u.focus,primary:1090,weight:100},menuOpts:{menuId:Se.eH.MenubarGoMenu,title:ne.N({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const Ga=new oe.uy("markersNavigationVisible",!1),Qa=ee._l.bindToContribution(ja.get);(0,ee.fK)(new Qa({id:"closeMarkersNavigation",precondition:Ga,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:ie.u.focus,primary:9,secondary:[1033]}}));var Ya=function(e,t){return function(i,n){t(i,n,e)}};const Ja=Et.$;class Xa{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const el={type:1,filter:{include:dt.QuickFix}};let tl=class{constructor(e,t,i,n){this._editor=e,this._hover=t,this._markerDecorationsService=i,this._openerService=n,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),s=[];for(const r of t){const t=r.range.startLineNumber===n?r.range.startColumn:1,a=r.range.endLineNumber===n?r.range.endColumn:o,l=this._markerDecorationsService.getMarker(i.uri,r);if(!l)continue;const d=new be.e(e.range.startLineNumber,t,e.range.startLineNumber,a);s.push(new Xa(this,d,l))}return s}renderHoverParts(e,t,i){if(!e.length)return me.JT.None;const n=new me.SL;e.forEach((e=>t.appendChild(this.renderMarkerHover(e,n))));const o=1===e.length?e[0]:e.sort(((e,t)=>Gt.ZL.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(o,i,n),n}renderMarkerHover(e,t){const i=Ja("div.hover-row"),n=Et.R3(i,Ja("div.marker.hover-contents")),{source:o,message:s,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=Et.R3(n,Ja("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,o||r)if(r&&"string"!=typeof r){const e=Ja("span");o&&(Et.R3(e,Ja("span")).innerText=o);const i=Et.R3(e,Ja("a.code-link"));i.setAttribute("href",r.target.toString()),t.add(Et.nm(i,"click",(e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()}))),Et.R3(i,Ja("span")).innerText=r.value;const s=Et.R3(n,e);s.style.opacity="0.6",s.style.paddingLeft="6px"}else{const e=Et.R3(n,Ja("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&r?`${o}(${r})`:o||`(${r})`}if((0,tt.Of)(a))for(const{message:e,resource:i,startLineNumber:o,startColumn:s}of a){const r=Et.R3(n,Ja("div"));r.style.marginTop="8px";const a=Et.R3(r,Ja("a"));a.innerText=`${(0,Jt.EZ)(i)}(${o}, ${s}): `,a.style.cursor="pointer",t.add(Et.nm(a,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(i,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:o,startColumn:s}}}).catch(it.dL)})));const l=Et.R3(r,Ja("span"));l.innerText=e,this._editor.applyFontInfo(l)}return i}renderMarkerStatusbar(e,t,i){if(e.marker.severity!==Gt.ZL.Error&&e.marker.severity!==Gt.ZL.Warning&&e.marker.severity!==Gt.ZL.Info||t.addAction({label:ne.N("view problem","View Problem"),commandId:qa.ID,run:()=>{this._hover.hide(),ja.get(this._editor).showAtMarker(e.marker),this._editor.focus()}}),!this._editor.getOption(80)){const n=t.append(Ja("div"));this.recentMarkerCodeActionsInfo&&(Gt.H0.makeKey(this.recentMarkerCodeActionsInfo.marker)===Gt.H0.makeKey(e.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=ne.N("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?me.JT.None:i.add((0,pe.Vg)((()=>n.textContent=ne.N("checkingForQuickFixes","Checking for quick fixes...")),200));n.textContent||(n.textContent=String.fromCharCode(160));const s=this.getCodeActions(e.marker);i.add((0,me.OF)((()=>s.cancel()))),s.then((s=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:e.marker,hasCodeActions:s.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return s.dispose(),void(n.textContent=ne.N("noQuickFixes","No quick fixes available"));n.style.display="none";let r=!1;i.add((0,me.OF)((()=>{r||s.dispose()}))),t.addAction({label:ne.N("quick fixes","Quick Fix..."),commandId:ui.Id,run:e=>{r=!0;const t=di.get(this._editor),i=Et.i(e);this._hover.hide(),t.showCodeActions(el,s,{x:i.left+6,y:i.top+i.height+6})}})}),it.dL)}}getCodeActions(e){return(0,pe.PG)((t=>wt(this._editor.getModel(),new be.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),el,lt.E.None,t)))}};tl=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ya(2,_a.i),Ya(3,aa.v4)],tl),(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le.ur);i&&t.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${i}; }`);const n=e.getColor(Le.sg);n&&t.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${n}; }`)}));var il=i(1512);const nl="editor.action.inlineSuggest.commit";var ol=i(14250);class sl{constructor(e,t,i=0){this.lineNumber=e,this.parts=t,this.additionalReservedLineCount=i}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1];return function(e,t){const i=new rl(e),n=t.map((e=>{const t=be.e.lift(e.range);return{startOffset:i.getOffset(t.getStartPosition()),endOffset:i.getOffset(t.getEndPosition()),text:e.text}}));n.sort(((e,t)=>t.startOffset-e.startOffset));for(const t of n)e=e.substring(0,t.startOffset)+t.text+e.substring(t.endOffset);return e}(e.substr(0,t.column-1),this.parts.map((e=>({range:{startLineNumber:1,endLineNumber:1,startColumn:e.column,endColumn:e.column},text:e.lines.join("\n")})))).substring(this.parts[0].column-1)}}class rl{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)"\n"===e.charAt(t)&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}}class al{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}}class ll extends me.JT{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new Vt.Q5,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(105)&&void 0===this._expanded&&this.onDidChangeEmitter.fire()})))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}var dl=i(68081);function hl(e,t,i,n,o=0){if(e.range.startLineNumber!==e.range.endLineNumber)return;const s=t.getLineContent(e.range.startLineNumber),r=Xe.V8(s).length;if(e.range.startColumn-1<=r){const t=Xe.V8(e.text).length,i=s.substring(e.range.startColumn-1,r),n=be.e.fromPositions(e.range.getStartPosition().delta(0,i.length),e.range.getEndPosition()),o=e.text.startsWith(i)?e.text.substring(i.length):e.text.substring(t);e={range:n,text:o,command:e.command}}const a=t.getValueInRange(e.range),l=function(e,t){if((null==cl?void 0:cl.originalValue)===e&&(null==cl?void 0:cl.newValue)===t)return null==cl?void 0:cl.changes;{const i=function(e,t){if(e.length>5e3||t.length>5e3)return;function i(e){let t=0;for(let i=0,n=e.length;i<n;i++){const n=e.charCodeAt(i);n>t&&(t=n)}return t}const n=Math.max(i(e),i(t));function o(e){if(e<0)throw new Error("unexpected");return n+e+1}function s(e){let t=0,i=0;const n=new Int32Array(e.length);for(let s=0,r=e.length;s<r;s++){const r=100*i+t;"("===e[s]?(n[s]=o(2*r),t++):")"===e[s]?(n[s]=o(2*r+1),1===t&&i++,t=Math.max(t-1,0)):n[s]=e.charCodeAt(s)}return n}const r=s(e),a=s(t);return new dl.Hs({getElements:()=>r},{getElements:()=>a}).ComputeDiff(!1).changes}(e,t);return cl={originalValue:e,newValue:t,changes:i},i}}(a,e.text);if(!l)return;const d=e.range.startLineNumber,h=new Array;if("prefix"===i){const e=l.filter((e=>0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==a.length)return}const c=e.text.length-o;for(const t of l){const o=e.range.startColumn+t.originalStart+t.originalLength;if("subwordSmart"===i&&n&&n.lineNumber===e.range.startLineNumber&&o<n.column)return;if(t.originalLength>0)return;if(0===t.modifiedLength)continue;const s=t.modifiedStart+t.modifiedLength,r=Math.max(t.modifiedStart,Math.min(s,c)),a=e.text.substring(t.modifiedStart,r),l=e.text.substring(r,Math.max(t.modifiedStart,s));if(a.length>0){const e=Xe.uq(a);h.push(new al(o,e,!1))}if(l.length>0){const e=Xe.uq(l);h.push(new al(o,e,!0))}}return new sl(d,h,0)}let cl;var ul=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let gl=class extends me.JT{constructor(e,t,i){super(),this.editor=e,this.cache=t,this.commandService=i,this.onDidChangeEmitter=new Vt.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new me.XK),this.active=!1,this.disposed=!1,this._register(i.onDidExecuteCommand((t=>{new Set([ee.n_.id,ee.kz.id,O.wk.Tab.id,O.wk.DeleteLeft.id,O.wk.DeleteRight.id,nl,"acceptSelectedSuggestion"]).has(t.commandId)&&e.hasTextFocus()&&this.handleUserInput()}))),this._register(this.editor.onDidType((e=>{this.handleUserInput()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.session&&!this.session.isValid&&this.hide()}))),this._register((0,me.OF)((()=>{this.disposed=!0}))),this._register(this.editor.onDidBlurEditorWidget((()=>{this.hide()})))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout((()=>{this.disposed||this.startSessionIfTriggered()}),0)}get session(){return this.completionSession.value}get ghostText(){var e;return null===(e=this.session)||void 0===e?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(e){var t;null===(t=this.session)||void 0===t||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&(null===(t=this.session)||void 0===t||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){this.editor.getOption(54).enabled&&(this.session&&this.session.isValid||this.trigger(st.bw.Automatic))}trigger(e){this.completionSession.value?e===st.bw.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext():(this.completionSession.value=new pl(this.editor,this.editor.getPosition(),(()=>this.active),this.commandService,this.cache,e),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange((()=>{this.onDidChangeEmitter.fire()}))))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;null===(e=this.session)||void 0===e||e.commitCurrentCompletion()}showNext(){var e;null===(e=this.session)||void 0===e||e.showNextInlineCompletion()}showPrevious(){var e;null===(e=this.session)||void 0===e||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return ul(this,void 0,void 0,(function*(){const t=yield null===(e=this.session)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};gl=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,at.H)],gl);class pl extends ll{constructor(e,t,i,n,o,s){let r;super(e),this.triggerPosition=t,this.shouldUpdate=i,this.commandService=n,this.cache=o,this.initialTriggerKind=s,this.minReservedLineCount=0,this.updateOperation=this._register(new me.XK),this.updateSoon=this._register(new pe.pY((()=>{let e=this.initialTriggerKind;return this.initialTriggerKind=st.bw.Automatic,this.update(e)}),50)),this.currentlySelectedCompletionId=void 0,this._register(this.onDidChange((()=>{const e=this.currentCompletion;if(e&&e.sourceInlineCompletion!==r){r=e.sourceInlineCompletion;const t=e.sourceProvider;t.handleItemDidShow&&t.handleItemDidShow(e.sourceInlineCompletions,r)}}))),this._register((0,me.OF)((()=>{this.cache.clear()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.cache.value&&this.onDidChangeEmitter.fire()}))),this._register(this.editor.onDidChangeModelContent((e=>{this.scheduleAutomaticUpdate()}))),this._register(st.zu.onDidChange((()=>{this.updateSoon.schedule()}))),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value)return 0;if(0===this.cache.value.completions.length)return 0;const e=this.cache.value.completions.findIndex((e=>e.semanticId===this.currentlySelectedCompletionId));return-1===e?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(this.cache.value)return this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){var e;return ul(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}showPreviousInlineCompletion(){var e;return ul(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+t.length-1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}ensureUpdateWithExplicitContext(){var e;return ul(this,void 0,void 0,(function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===st.bw.Explicit?yield this.updateOperation.value.promise:yield this.update(st.bw.Explicit):(null===(e=this.cache.value)||void 0===e?void 0:e.triggerKind)!==st.bw.Explicit&&(yield this.update(st.bw.Explicit))}))}hasMultipleInlineCompletions(){var e;return ul(this,void 0,void 0,(function*(){return yield this.ensureUpdateWithExplicitContext(),((null===(e=this.cache.value)||void 0===e?void 0:e.completions.length)||0)>1}))}get ghostText(){const e=this.currentCompletion,t=this.editor.getOptions().get(54).mode;return e?hl(e,this.editor.getModel(),t,this.editor.getPosition()):void 0}get currentCompletion(){const e=this.currentCachedCompletion;if(e)return e.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule()}update(e){return ul(this,void 0,void 0,(function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=(0,pe.PG)((i=>ul(this,void 0,void 0,(function*(){let n;try{n=yield vl(t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},i)}catch(e){return void(0,it.dL)(e)}i.isCancellationRequested||(this.cache.setValue(this.editor,n,e),this.onDidChangeEmitter.fire())})))),n=new ml(i,e);this.updateOperation.value=n,yield i,this.updateOperation.value===n&&this.updateOperation.clear()}))}takeOwnership(e){this._register(e)}commitCurrentCompletion(){if(!this.ghostText)return;const e=this.currentCompletion;e&&this.commit(e)}commit(e){const t=this.cache.clearAndLeak();this.editor.executeEdits("inlineSuggestion.accept",[ol.h.replaceMove(e.range,e.text)]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally((()=>{null==t||t.dispose()})).then(void 0,it.Cp):null==t||t.dispose(),this.onDidChangeEmitter.fire()}}class ml{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class fl extends me.JT{constructor(e,t,i,n){super(),this.triggerKind=n;const o=e.deltaDecorations([],t.items.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._register((0,me.OF)((()=>{e.deltaDecorations(o,[])}))),this.completions=t.items.map(((e,t)=>new _l(e,o[t]))),this._register(e.onDidChangeModelContent((()=>{let t=!1;const n=e.getModel();for(const e of this.completions){const i=n.getDecorationRange(e.decorationId);i?e.synchronizedRange.equalsRange(i)||(t=!0,e.synchronizedRange=i):(0,it.dL)(new Error("Decoration has no range"))}t&&i()}))),this._register(t)}}class _l{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}toLiveInlineCompletion(){return{text:this.inlineCompletion.text,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion}}}function vl(e,t,i,n=Ye.T.None){return ul(this,void 0,void 0,(function*(){const o=function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new be.e(e.lineNumber,i.startColumn,e.lineNumber,n):be.e.fromPositions(e,e.with(void 0,n))}(e,t),s=st.zu.all(t),r=yield Promise.all(s.map((o=>ul(this,void 0,void 0,(function*(){const s=yield o.provideInlineCompletions(t,e,i,n);return{completions:s,provider:o,dispose:()=>{s&&o.freeInlineCompletions(s)}}}))))),a=new Map;for(const e of r){const t=e.completions;if(t)for(const i of t.items.map((i=>({text:i.text,range:i.range?be.e.lift(i.range):o,command:i.command,sourceProvider:e.provider,sourceInlineCompletions:t,sourceInlineCompletion:i}))))i.range.startLineNumber===i.range.endLineNumber&&a.set(JSON.stringify({text:i.text,range:i.range}),i)}return{items:[...a.values()],dispose:()=>{for(const e of r)e.dispose()}}}))}function bl(e,t){if(!t)return t;const i=e.getValueInRange(t.range),n=(0,Xe.Mh)(i,t.text),o=e.getOffsetAt(t.range.getStartPosition())+n,s=e.getPositionAt(o),r=i.substr(n),a=(0,Xe.P1)(r,t.text),l=e.getPositionAt(Math.max(o,e.getOffsetAt(t.range.getEndPosition())-a));return{range:be.e.fromPositions(s,l),text:t.text.substr(n,t.text.length-n-a)}}class Cl{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||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,t=this.pos,i=0,n=this.value.charCodeAt(t);if(e=Cl._table[n],"number"==typeof e)return this.pos+=1,{type:e,pos:t,len:1};if(Cl.isDigitCharacter(n)){e=8;do{i+=1,n=this.value.charCodeAt(t+i)}while(Cl.isDigitCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}if(Cl.isVariableCharacter(n)){e=9;do{n=this.value.charCodeAt(t+ ++i)}while(Cl.isVariableCharacter(n)||Cl.isDigitCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}e=10;do{i+=1,n=this.value.charCodeAt(t+i)}while(!isNaN(n)&&void 0===Cl._table[n]&&!Cl.isDigitCharacter(n)&&!Cl.isVariableCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}}Cl._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class wl{constructor(){this._children=[]}appendChild(e){return e instanceof yl&&this._children[this._children.length-1]instanceof yl?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),o=i.children.slice(0);o.splice(n,1,...t),i._children=o,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Il)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class yl extends wl{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new yl(this.value)}}class Sl extends wl{}class Ll extends Sl{constructor(e){super(),this.index=e}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}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof xl?this._children[0]:void 0}clone(){let e=new Ll(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class xl extends wl{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof yl&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new xl;return this.options.forEach(e.appendChild,e),e}}class kl extends wl{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof Nl&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof Nl){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){let e=new kl;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class Nl extends wl{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())).join(""):e}clone(){return new Nl(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class Dl extends Sl{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new yl(t)],!0)}clone(){const e=new Dl(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function El(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class Il extends wl{get placeholderInfo(){if(!this._placeholders){let e,t=[];this.walk((function(i){return i instanceof Ll&&(t.push(i),e=!e||e.index<i.index?i:e),!0})),this._placeholders={all:t,last:e}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk((n=>n===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return El([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof Ll&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof Dl&&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 Il;return this._children=this.children.map((e=>e.clone())),e}walk(e){El(this.children,e)}}class Tl{constructor(){this._scanner=new Cl,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){this._scanner.text(e),this._token=this._scanner.next();const n=new Il;for(;this._parse(n););const o=new Map,s=[];let r=0;n.walk((e=>(e instanceof Ll&&(r+=1,e.isFinalTabstop?o.set(0,void 0):!o.has(e.index)&&e.children.length>0?o.set(e.index,e.children):s.push(e)),!0)));for(const e of s){const t=o.get(e.index);if(t){const i=new Ll(e.index);i.transform=e.transform;for(const e of t)i.appendChild(e.clone());n.replace(e,[i])}}return i||(i=r>0&&t),!o.has(0)&&i&&n.appendChild(new Ll(0)),n}_accept(e,t){if(void 0===e||this._token.type===e){let e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const 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 yl(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Ll(Number(t)):new Dl(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const n=new Ll(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new yl("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))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);{const t=new xl;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new yl(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const n=new Dl(t);if(!this._accept(1))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);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new yl("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){let t=new kl,i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new yl(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);let n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new Nl(Number(n))),!0;if(this._accept(4))return e.appendChild(new Nl(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){let i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new Nl(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){let t=this._until(4);if(t)return e.appendChild(new Nl(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return e.appendChild(new Nl(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let i=this._until(4);if(i)return e.appendChild(new Nl(Number(n),void 0,t,i)),!0}}else{let t=this._until(4);if(t)return e.appendChild(new Nl(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new yl(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}var Ml=i(25165),Rl={};Rl.styleTagTransform=Y(),Rl.setAttributes=q(),Rl.insert=j().bind(null,"head"),Rl.domAPI=K(),Rl.insertStyleElement=G(),H()(Ml.Z,Rl),Ml.Z&&Ml.Z.locals&&Ml.Z.locals;var Al=i(5791),Ol=i(67802);const Pl=new Uint8Array(16),Fl=[];for(let e=0;e<256;e++)Fl.push(e.toString(16).padStart(2,"0"));let Bl;Bl="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(256*Math.random());return e};function Wl(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&nt.o.isUri(t.uri)}class Vl{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){let i=t.resolve(e);if(void 0!==i)return i}}}class Hl{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=this._model.getLineContent(this._selection.startLineNumber),n=(0,Xe.V8)(i,0,this._selection.startColumn-1);let o=n;e.snippet.walk((t=>t!==e&&(t instanceof yl&&(o=(0,Xe.V8)((0,Xe.uq)(t.value).pop())),!0)));const s=(0,Xe.Mh)(o,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${o.substr(s)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):void 0}}class zl{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return Ol.EZ(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=Ol.EZ(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t?"."===Ol.XX(this._model.uri.fsPath)?"":this._labelService.getUriLabel((0,Jt.XX)(this._model.uri)):"TM_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class Kl{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!(0,Xe.m5)(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}class Ul{constructor(e,t){this._model=e,this._selection=t}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=vo.zu.getComments(i);if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}}class jl{constructor(){this._date=new Date}resolve(e){const{name:t}=e;return"CURRENT_YEAR"===t?String(this._date.getFullYear()):"CURRENT_YEAR_SHORT"===t?String(this._date.getFullYear()).slice(-2):"CURRENT_MONTH"===t?String(this._date.getMonth().valueOf()+1).padStart(2,"0"):"CURRENT_DATE"===t?String(this._date.getDate().valueOf()).padStart(2,"0"):"CURRENT_HOUR"===t?String(this._date.getHours().valueOf()).padStart(2,"0"):"CURRENT_MINUTE"===t?String(this._date.getMinutes().valueOf()).padStart(2,"0"):"CURRENT_SECOND"===t?String(this._date.getSeconds().valueOf()).padStart(2,"0"):"CURRENT_DAY_NAME"===t?jl.dayNames[this._date.getDay()]:"CURRENT_DAY_NAME_SHORT"===t?jl.dayNamesShort[this._date.getDay()]:"CURRENT_MONTH_NAME"===t?jl.monthNames[this._date.getMonth()]:"CURRENT_MONTH_NAME_SHORT"===t?jl.monthNamesShort[this._date.getMonth()]:"CURRENT_SECONDS_UNIX"===t?String(Math.floor(this._date.getTime()/1e3)):void 0}}jl.dayNames=[ne.N("Sunday","Sunday"),ne.N("Monday","Monday"),ne.N("Tuesday","Tuesday"),ne.N("Wednesday","Wednesday"),ne.N("Thursday","Thursday"),ne.N("Friday","Friday"),ne.N("Saturday","Saturday")],jl.dayNamesShort=[ne.N("SundayShort","Sun"),ne.N("MondayShort","Mon"),ne.N("TuesdayShort","Tue"),ne.N("WednesdayShort","Wed"),ne.N("ThursdayShort","Thu"),ne.N("FridayShort","Fri"),ne.N("SaturdayShort","Sat")],jl.monthNames=[ne.N("January","January"),ne.N("February","February"),ne.N("March","March"),ne.N("April","April"),ne.N("May","May"),ne.N("June","June"),ne.N("July","July"),ne.N("August","August"),ne.N("September","September"),ne.N("October","October"),ne.N("November","November"),ne.N("December","December")],jl.monthNamesShort=[ne.N("JanuaryShort","Jan"),ne.N("FebruaryShort","Feb"),ne.N("MarchShort","Mar"),ne.N("AprilShort","Apr"),ne.N("MayShort","May"),ne.N("JuneShort","Jun"),ne.N("JulyShort","Jul"),ne.N("AugustShort","Aug"),ne.N("SeptemberShort","Sep"),ne.N("OctoberShort","Oct"),ne.N("NovemberShort","Nov"),ne.N("DecemberShort","Dec")];class $l{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=function(e){return e.configuration?{id:e.id,configPath:e.configuration}:1===e.folders.length?{id:e.id,uri:e.folders[0].uri}:void 0}(this._workspaceService.getWorkspace());return t?"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0:void 0}_resolveWorkspaceName(e){if(Wl(e))return Ol.EZ(e.uri.path);let t=Ol.EZ(e.configPath.path);return t.endsWith("code-workspace")&&(t=t.substr(0,t.length-14-1)),t}_resoveWorkspacePath(e){if(Wl(e))return xo(e.uri.fsPath);let t=Ol.EZ(e.configPath.path),i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?xo(i):"/"}}class ql{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?function(){Bl(Pl),Pl[6]=15&Pl[6]|64,Pl[8]=63&Pl[8]|128;let e=0,t="";return t+=Fl[Pl[e++]],t+=Fl[Pl[e++]],t+=Fl[Pl[e++]],t+=Fl[Pl[e++]],t+="-",t+=Fl[Pl[e++]],t+=Fl[Pl[e++]],t+="-",t+=Fl[Pl[e++]],t+=Fl[Pl[e++]],t+="-",t+=Fl[Pl[e++]],t+=Fl[Pl[e++]],t+="-",t+=Fl[Pl[e++]],t+=Fl[Pl[e++]],t+=Fl[Pl[e++]],t+=Fl[Pl[e++]],t+=Fl[Pl[e++]],t+=Fl[Pl[e++]],t}():void 0}}(0,xe.Ic)(((e,t)=>{function i(t){const i=e.getColor(t);return i?i.toString():"transparent"}t.addRule(`.monaco-editor .snippet-placeholder { background-color: ${i(Le.u2)}; outline-color: ${i(Le.Pk)}; }`),t.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${i(Le.I1)}; outline-color: ${i(Le.U6)}; }`)}));class Zl{constructor(e,t,i,n){this._editor=e,this._snippet=t,this._offset=i,this._snippetLineLeadingWhitespace=n,this._nestingLevel=1,this._placeholderGroups=(0,tt.vM)(t.placeholders,Ll.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),o=this._snippet.fullLen(i),s=be.e.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),r=i.isFinalTabstop?Zl._decor.inactiveFinal:Zl._decor.inactive,a=t.addDecoration(s,r);this._placeholderDecorations.set(i,a)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),o=this._editor.getModel().getValueInRange(n),s=t.transform.resolve(o).split(/\r\n|\r|\n/);for(let e=1;e<s.length;e++)s[e]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+s[e]);e.push(ol.h.replace(n,s.join(this._editor.getModel().getEOL())))}e.length>0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,t=!0):!1===e&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const s=this._placeholderDecorations.get(o),r=this._editor.getModel().getDecorationRange(s);n.push(new te.Y(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),e.changeDecorationOptions(s,o.isFinalTabstop?Zl._decor.activeFinal:Zl._decor.active),i.add(o);for(const t of this._snippet.enclosingPlaceholders(o)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?Zl._decor.activeFinal:Zl._decor.active),i.add(t)}}for(const[t,n]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(n,t.isFinalTabstop?Zl._decor.inactiveFinal:Zl._decor.inactive);return n}));return t?this.move(e):null!=i?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof Ll){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(t);if(!o){e.delete(n.index);break}i.push(o)}}return e}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(!o._placeholderDecorations);const s=o._snippet.placeholderInfo.last.index;for(const e of o._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(s+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,o._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of o._snippet.placeholders){const n=o._snippet.offset(e),s=o._snippet.fullLen(e),r=be.e.fromPositions(t.getPositionAt(o._offset+n),t.getPositionAt(o._offset+n+s)),a=i.addDecoration(r,Zl._decor.inactive);this._placeholderDecorations.set(e,a)}}this._placeholderGroups=(0,tt.vM)(this._snippet.placeholders,Ll.compareByIndex)}))}}Zl._decor={active:we.qx.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:we.qx.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:we.qx.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:we.qx.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const Gl={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class Ql{constructor(e,t,i=Gl){this._templateMerges=[],this._snippets=[],this._editor=e,this._template=t,this._options=i}static adjustWhitespace(e,t,i,n,o){const s=e.getLineContent(t.lineNumber),r=(0,Xe.V8)(s,0,t.column-1);let a;return i.walk((t=>{if(!(t instanceof yl)||t.parent instanceof xl)return!0;const o=t.value.split(/\r\n|\r|\n/);if(n){const n=i.offset(t);if(0===n)o[0]=e.normalizeIndentation(o[0]);else{a=null!=a?a:i.toString();let t=a.charCodeAt(n-1);10!==t&&13!==t||(o[0]=e.normalizeIndentation(r+o[0]))}for(let t=1;t<o.length;t++)o[t]=e.normalizeIndentation(r+o[t])}const s=o.join(e.getEOL());return s!==t.value&&(t.parent.replace(t,[new yl(s)]),a=void 0),!0})),r}static adjustSelection(e,t,i,n){if(0!==i||0!==n){const{positionLineNumber:o,positionColumn:s}=t,r=s-i,a=s+n,l=e.validateRange({startLineNumber:o,startColumn:r,endLineNumber:o,endColumn:a});t=te.Y.createWithDirection(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn,t.getDirection())}return t}static createEditsAndSnippets(e,t,i,n,o,s,r,a){const l=[],d=[];if(!e.hasModel())return{edits:l,snippets:d};const h=e.getModel(),c=e.invokeWithinContext((e=>e.get(Al.ec))),u=e.invokeWithinContext((e=>new zl(e.get(ko.e),h))),g=()=>r;let p=0,m=h.getValueInRange(Ql.adjustSelection(h,e.getSelection(),i,0)),f=h.getValueInRange(Ql.adjustSelection(h,e.getSelection(),0,n)),_=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber);const v=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>be.e.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:r,idx:b}of v){let C=Ql.adjustSelection(h,r,i,0),w=Ql.adjustSelection(h,r,0,n);m!==h.getValueInRange(C)&&(C=r),f!==h.getValueInRange(w)&&(w=r);const y=r.setStartPosition(C.startLineNumber,C.startColumn).setEndPosition(w.endLineNumber,w.endColumn),S=(new Tl).parse(t,!0,o),L=y.getStartPosition(),x=Ql.adjustWhitespace(h,L,S,s||b>0&&_!==h.getLineFirstNonWhitespaceColumn(r.positionLineNumber),!0);S.resolveVariables(new Vl([u,new Kl(g,b,v.length,"spread"===e.getOption(70)),new Hl(h,r,b,a),new Ul(h,r),new jl,new $l(c),new ql]));const k=h.getOffsetAt(L)+p;p+=S.toString().length-h.getValueLengthInRange(y),l[b]=ol.h.replace(y,S.toString()),l[b].identifier={major:b,minor:0},d[b]=new Zl(e,S,k,x)}return{edits:l,snippets:d}}dispose(){(0,me.B9)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=Ql.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>this._snippets[0].hasPlaceholder?this._move(!0):e.filter((e=>!!e.identifier)).map((e=>te.Y.fromPositions(e.range.getEndPosition()))))),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=Gl){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=Ql.createEditsAndSnippets(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer);this._editor.executeEdits("snippet",i,(e=>{for(const e of this._snippets)e.merge(n);return console.assert(0===n.length),this._snippets[0].hasPlaceholder?this._move(void 0):e.filter((e=>!!e.identifier)).map((e=>te.Y.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length<this._snippets.length)return!1;let t=new Map;for(const i of this._snippets){const n=i.computePossibleSelections();if(0===t.size)for(const[i,o]of n){o.sort(be.e.compareRangesUsingStarts);for(const n of e)if(o[0].containsRange(n)){t.set(i,[]);break}}if(0===t.size)return!1;t.forEach(((e,t)=>{e.push(...n.get(t))}))}e.sort(be.e.compareRangesUsingStarts);for(let[i,n]of t)if(n.length===e.length){n.sort(be.e.compareRangesUsingStarts);for(let o=0;o<n.length;o++)n[o].containsRange(e[o])||t.delete(i)}else t.delete(i);return t.size>0}}var Yl=i(82095),Jl=i(42267),Xl=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const ed={Visible:new oe.uy("suggestWidgetVisible",!1,(0,ne.N)("suggestWidgetVisible","Whether suggestion are visible")),DetailsVisible:new oe.uy("suggestWidgetDetailsVisible",!1,(0,ne.N)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new oe.uy("suggestWidgetMultipleSuggestions",!1,(0,ne.N)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new oe.uy("suggestionMakesTextEdit",!0,(0,ne.N)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new oe.uy("acceptSuggestionOnEnter",!0,(0,ne.N)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new oe.uy("suggestionHasInsertAndReplaceRange",!1,(0,ne.N)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new oe.uy("suggestionInsertMode",void 0,{type:"string",description:(0,ne.N)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new oe.uy("suggestionCanResolve",!1,(0,ne.N)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},td=new Se.eH("suggestWidgetStatusBar");class id{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=yo.CL.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:t.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),be.e.isIRange(t.range)?(this.editStart=new ve.L(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new ve.L(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new ve.L(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||be.e.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new ve.L(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new ve.L(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new ve.L(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||be.e.spansMultipleLines(t.range.insert)||be.e.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return Xl(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._isResolved=!1}));this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._isResolved=!0,t.dispose()}),(e=>{(0,it.VV)(e)&&(this._resolveCache=void 0,this._isResolved=!1)}))}return this._resolveCache}))}}class nd{constructor(e=2,t=new Set,i=new Set,n=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.showDeprecated=n}}nd.default=new nd;class od{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function sd(e,t,i=nd.default,n={triggerKind:0},o=Ye.T.None){return Xl(this,void 0,void 0,(function*(){const s=new Jl.G(!0);t=t.clone();const r=e.getWordAtPosition(t),a=r?new be.e(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn):be.e.fromPositions(t),l={replace:a,insert:a.setEndPosition(t.lineNumber,t.column)},d=[],h=new me.SL,c=[];let u=!1;const g=(e,n,o)=>{var s,r,a;if(n){for(let o of n.suggestions)if(!i.kindFilter.has(o.kind)){if(!i.showDeprecated&&(null===(s=null==o?void 0:o.tags)||void 0===s?void 0:s.includes(1)))continue;o.range||(o.range=l),o.sortText||(o.sortText="string"==typeof o.label?o.label:o.label.label),!u&&o.insertTextRules&&4&o.insertTextRules&&(u=Tl.guessNeedsClipboard(o.insertText)),d.push(new id(t,o,n,e))}(0,me.Wf)(n)&&h.add(n),c.push({providerName:null!==(r=e._debugDisplayName)&&void 0!==r?r:"unkown_provider",elapsedProvider:null!==(a=n.duration)&&void 0!==a?a:-1,elapsedOverall:o.elapsed()})}},p=(()=>Xl(this,void 0,void 0,(function*(){})))();for(let s of st.KZ.orderedGroups(e)){let r=d.length;if(yield Promise.all(s.map((s=>Xl(this,void 0,void 0,(function*(){if(!(i.providerFilter.size>0)||i.providerFilter.has(s))try{const i=new Jl.G(!0),r=yield s.provideCompletionItems(e,t,n,o);g(s,r,i)}catch(e){(0,it.Cp)(e)}}))))),r!==d.length||o.isCancellationRequested)break}return yield p,o.isCancellationRequested?(h.dispose(),Promise.reject((0,it.F0)())):new od(d.sort(ld(i.snippetSortOrder)),u,{entries:c,elapsed:s.elapsed()},h)}))}function rd(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLow<t.sortTextLow)return-1;if(e.sortTextLow>t.sortTextLow)return 1}return e.completion.label<t.completion.label?-1:e.completion.label>t.completion.label?1:e.completion.kind-t.completion.kind}const ad=new Map;function ld(e){return ad.get(e)}ad.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return rd(e,t)})),ad.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return rd(e,t)})),ad.set(1,rd),at.P.registerCommand("_executeCompletionItemProvider",((e,...t)=>Xl(void 0,void 0,void 0,(function*(){const[i,n,o,s]=t;(0,yi.p_)(nt.o.isUri(i)),(0,yi.p_)(ve.L.isIPosition(n)),(0,yi.p_)("string"==typeof o||!o),(0,yi.p_)("number"==typeof s||!s);const r=yield e.get(Yi.S).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=yield sd(r.object.textEditorModel,ve.L.lift(n),void 0,{triggerCharacter:o,triggerKind:o?1:0});for(const n of i.items)t.length<(null!=s?s:0)&&t.push(n.resolve(Ye.T.None)),e.incomplete=e.incomplete||n.container.incomplete,e.suggestions.push(n.completion);try{return yield Promise.all(t),e}finally{setTimeout((()=>i.disposable.dispose()),100)}}finally{r.dispose()}}))));const dd=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let e={suggestions:this.onlyOnceSuggestions.slice(0)};return this.onlyOnceSuggestions.length=0,e}};st.KZ.register("*",dd);var hd=i(71481),cd=function(e,t){return function(i,n){t(i,n,e)}};const ud={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let gd=class e{constructor(t,i,n){this._editor=t,this._logService=i,this._snippetListener=new me.SL,this._modelVersionId=-1,this._inSnippet=e.InSnippetMode.bindTo(n),this._hasNextTabstop=e.HasNextTabstop.bindTo(n),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(n)}static get(t){return t.getContribution(e.ID)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?ud:Object.assign(Object.assign({},ud),t))}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,t){this._editor.hasModel()&&(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new Ql(this._editor,e,t),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState()))))}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{choice:e}=this._session;var t,i;if(e){if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map((e=>te.Y.fromPositions(e.getStartPosition()))));const[n]=e.options;t=this._editor,i=e.options.map(((e,t)=>({kind:13,label:e.value,insertText:e.value,sortText:"a".repeat(t+1),range:be.e.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,n.value.length))}))),setTimeout((()=>{dd.onlyOnceSuggestions.push(...i),t.getContribution("editor.contrib.suggestController").triggerSuggest((new Set).add(dd))}),0)}}else this._currentChoice=void 0}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};gd.ID="snippetController2",gd.InSnippetMode=new oe.uy("inSnippetMode",!1,(0,ne.N)("inSnippetMode","Whether the editor in current in snippet mode")),gd.HasNextTabstop=new oe.uy("hasNextTabstop",!1,(0,ne.N)("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),gd.HasPrevTabstop=new oe.uy("hasPrevTabstop",!1,(0,ne.N)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),gd=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([cd(1,hd.VZ),cd(2,oe.i6)],gd),(0,ee._K)(gd.ID,gd);const pd=ee._l.bindToContribution(gd.get);(0,ee.fK)(new pd({id:"jumpToNextSnippetPlaceholder",precondition:oe.Ao.and(gd.InSnippetMode,gd.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:ie.u.editorTextFocus,primary:2}})),(0,ee.fK)(new pd({id:"jumpToPrevSnippetPlaceholder",precondition:oe.Ao.and(gd.InSnippetMode,gd.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:ie.u.editorTextFocus,primary:1026}})),(0,ee.fK)(new pd({id:"leaveSnippet",precondition:gd.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:ie.u.editorTextFocus,primary:9,secondary:[1033]}})),(0,ee.fK)(new pd({id:"acceptSnippet",precondition:gd.InSnippetMode,handler:e=>e.finish()}));var md=function(e,t){return function(i,n){t(i,n,e)}};class fd{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;let n=i[0].score[0];for(let e=0;e<i.length;e++){const{score:t,completion:o}=i[e];if(t[0]!==n)break;if(o.preselect)return e}return 0}}class _d extends fd{constructor(){super("first")}memorize(e,t,i){}toJSON(){}fromJSON(){}}let vd=class e{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new me.SL,this._persistSoon=new pe.pY((()=>this._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===Ei.fk.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(t,i){var n;const o=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:t.getLanguageIdAtPosition(i.lineNumber,i.column),resource:t.uri});if((null===(n=this._strategy)||void 0===n?void 0:n.name)!==o){this._saveState();const t=e._strategyCtors.get(o)||_d;this._strategy=new t;try{const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=this._storageService.get(`${e._storagePrefix}/${o}`,t);i&&this._strategy.fromJSON(JSON.parse(i))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${e._storagePrefix}/${this._strategy.name}`,i,t,1)}}};vd._strategyCtors=new Map([["recentlyUsedByPrefix",class extends fd{constructor(){super("recentlyUsedByPrefix"),this._trie=Ni.Id.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${n}`;this._trie.set(o,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){let{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);let o=`${e.getLanguageId()}/${n}`,s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let e=0;e<i.length;e++){let{kind:t,insertText:n}=i[e].completion;if(t===s.type&&n===s.insertText)return e}return super.select(e,t,i)}toJSON(){let e=[];return this._trie.forEach(((t,i)=>e.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"==typeof i.type?i.type:(0,st.jr)(i.type),this._trie.set(t,i)}}}],["recentlyUsed",class extends fd{constructor(){super("recentlyUsed"),this._cache=new Ni.z6(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageId()}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(0===i.length)return 0;const n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,i);let o=i[0].score[0],s=-1,r=-1;for(let t=0;t<i.length&&i[t].score[0]===o;t++){const n=`${e.getLanguageId()}/${i[t].textLabel}`,o=this._cache.peek(n);if(o&&o.touch>r&&o.type===i[t].completion.kind&&o.insertText===i[t].completion.insertText&&(r=o.touch,s=t),i[t].completion.preselect)return t}return-1!==s?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:(0,st.jr)(i.type),this._cache.set(t,i);this._seq=this._cache.size}}],["first",_d]]),vd._storagePrefix="suggest/memories",vd=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([md(0,Ei.Uy),md(1,ji.Ui)],vd);const bd=(0,Dt.yh)("ISuggestMemories");(0,Di.z)(bd,vd,!0);let Cd=class e{constructor(t,i){this._editor=t,this._enabled=!1,this._ckAtEnd=e.AtEnd.bindTo(i),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(110)&&this._update())),this._update()}dispose(){var e;this._configListener.dispose(),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(110);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};Cd.AtEnd=new oe.uy("atEndOfWord",!1),Cd=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,oe.i6)],Cd);let wd=class e{constructor(t,i){this._editor=t,this._index=0,this._ckOtherSuggestions=e.OtherSuggestions.bindTo(i)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:t,index:i},n){0!==t.items.length&&e._moveIndex(!0,t,i)!==i?(this._acceptNext=n,this._model=t,this._index=i,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(;n=(n+t.items.length+(e?1:-1))%t.items.length,n!==i&&t.items[n].completion.additionalTextEdits;);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(t){if(this._model)try{this._ignore=!0,this._index=e._moveIndex(t,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};wd.OtherSuggestions=new oe.uy("hasOtherSuggestions",!1),wd=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,oe.i6)],wd);var yd=i(89745);class Sd{constructor(e,t,i){this._disposables=new me.SL,this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((n=>{if(this._active&&!t.isFrozen()){const t=n.charCodeAt(n.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&i(this._active.item)}})))}_onItem(e){if(!e||!(0,tt.Of)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new yd.q;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var Ld=i(33930);class xd{provideSelectionRanges(e,t){return i=this,n=void 0,s=function*(){const i=[];for(const n of t){const t=[];i.push(t);const o=new Map;yield new Promise((t=>xd._bracketsRightYield(t,0,e,n,o))),yield new Promise((i=>xd._bracketsLeftYield(i,0,e,n,o,t)))}return i},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(i,n||[])).next())}));var i,n,o,s}static _bracketsRightYield(e,t,i,n,o){const s=new Map,r=Date.now();for(;;){if(t>=xd._maxRounds){e();break}if(!n){e();break}let a=i.findNextBracket(n);if(!a){e();break}if(Date.now()-r>xd._maxDuration){setTimeout((()=>xd._bracketsRightYield(e,t+1,i,n,o)));break}const l=a.close[0];if(a.isOpen){let e=s.has(l)?s.get(l):0;s.set(l,e+1)}else{let e=s.has(l)?s.get(l):0;if(e-=1,s.set(l,Math.max(0,e)),e<0){let e=o.get(l);e||(e=new va.S,o.set(l,e)),e.push(a.range)}}n=a.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,o,s){const r=new Map,a=Date.now();for(;;){if(t>=xd._maxRounds&&0===o.size){e();break}if(!n){e();break}let l=i.findPrevBracket(n);if(!l){e();break}if(Date.now()-a>xd._maxDuration){setTimeout((()=>xd._bracketsLeftYield(e,t+1,i,n,o,s)));break}const d=l.close[0];if(l.isOpen){let e=r.has(d)?r.get(d):0;if(e-=1,r.set(d,Math.max(0,e)),e<0){let e=o.get(d);if(e){let t=e.shift();0===e.size&&o.delete(d);const n=be.e.fromPositions(l.range.getEndPosition(),t.getStartPosition()),r=be.e.fromPositions(l.range.getStartPosition(),t.getEndPosition());s.push({range:n}),s.push({range:r}),xd._addBracketLeading(i,r,s)}}}else{let e=r.has(d)?r.get(d):0;r.set(d,e+1)}n=l.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(n);0!==o&&o!==t.startColumn&&(i.push({range:be.e.fromPositions(new ve.L(n,o),t.getEndPosition())}),i.push({range:be.e.fromPositions(new ve.L(n,1),t.getEndPosition())}));const s=n-1;if(s>0){const n=e.getLineFirstNonWhitespaceColumn(s);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(s)&&(i.push({range:be.e.fromPositions(new ve.L(s,n),t.getEndPosition())}),i.push({range:be.e.fromPositions(new ve.L(s,1),t.getEndPosition())}))}}}xd._maxDuration=30,xd._maxRounds=2;class kd{static create(e,t){return i=this,n=void 0,s=function*(){if(!t.getOption(105).localityBonus)return kd.None;if(!t.hasModel())return kd.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return kd.None;const[o]=yield(new xd).provideSelectionRanges(i,[n]);if(0===o.length)return kd.None;const s=yield e.computeWordRanges(i.uri,o[0].range);if(!s)return kd.None;const r=i.getWordUntilPosition(n);return delete s[r.word],new class extends kd{distance(e,i){if(!n.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;let r="string"==typeof i.label?i.label:i.label.label,a=s[r];if((0,tt.XY)(a))return 2<<20;let l=(0,tt.ry)(a,be.e.fromPositions(e),be.e.compareRangesUsingStarts),d=l>=0?a[l]:a[Math.max(0,~l-1)],h=o.length;for(const e of o){if(!be.e.containsRange(e.range,d))break;h-=1}return h}}},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(i,n||[])).next())}));var i,n,o,s}}kd.None=new class extends kd{distance(){return 0}};class Nd{constructor(e,t,i,n,o,s,r){this.clipboardText=r,this._snippetCompareFn=Nd._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=o,this._refilterKind=1,this._lineContext=i,"top"===s?this._snippetCompareFn=Nd._compareCompletionItemsSnippetsUp:"bottom"===s&&(this._snippetCompareFn=Nd._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const e=new Set;for(let[t,i]of this._providerInfo)i&&e.add(t);return e}adopt(e){let t=[];for(let i=0;i<this._items.length;)e.has(this._items[i].provider)?i++:(t.push(this._items[i]),this._items[i]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,t}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let n="",o="";const s=1===this._refilterKind?this._items:this._filteredItems,r=[],a=!this._options.filterGraceful||s.length>2e3?yo.EW:yo.l7;for(let l=0;l<s.length;l++){const d=s[l];if(d.isInvalid)continue;this._providerInfo.set(d.provider,Boolean(d.container.incomplete));const h=d.position.column-d.editStart.column,c=h+i-(d.position.column-this._column);if(n.length!==c&&(n=0===c?"":t.slice(-c),o=n.toLowerCase()),d.word=n,0===c)d.score=yo.CL.Default;else{let e=0;for(;e<h;){const t=n.charCodeAt(e);if(32!==t&&9!==t)break;e+=1}if(e>=c)d.score=yo.CL.Default;else if("string"==typeof d.completion.filterText){let t=a(n,o,e,d.completion.filterText,d.filterTextLow,0,!1);if(!t)continue;0===(0,Xe.zY)(d.completion.filterText,d.textLabel)?d.score=t:(d.score=(0,yo.jB)(n,o,e,d.textLabel,d.labelLow,0),d.score[0]=t[0])}else{let t=a(n,o,e,d.textLabel,d.labelLow,0,!1);if(!t)continue;d.score=t}}d.idx=l,d.distance=this._wordDistance.distance(d.position,d.completion),r.push(d),e.push(d.textLabel.length)}this._filteredItems=r.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,tt.HW)(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]<t.score[0]?1:e.distance<t.distance?-1:e.distance>t.distance?1:e.idx<t.idx?-1:e.idx>t.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return Nd._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return Nd._compareCompletionItems(e,t)}}var Dd=function(e,t){return function(i,n){t(i,n,e)}};class Ed{constructor(e,t,i,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=i,this.shy=n}static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!!n&&n.endColumn===i.column&&!!isNaN(Number(n.word))}}let Id=class e{constructor(e,t,i,n,o,s,r){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=o,this._contextKeyService=s,this._configurationService=r,this._toDispose=new me.SL,this._quickSuggestDelay=10,this._triggerCharacterListener=new me.SL,this._triggerQuickSuggest=new pe._F,this._state=0,this._completionDisposables=new me.SL,this._onDidCancel=new Vt.Q5,this._onDidTrigger=new Vt.Q5,this._onDidSuggest=new Vt.Q5,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new te.Y(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()}))),this._toDispose.add(st.KZ.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._onCursorChange(e)})));let a=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{a=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{a=!1,this._onCompositionEnd()}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{a||this._refilterCompletionItems()}))),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){(0,me.B9)(this._triggerCharacterListener),(0,me.B9)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(79),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(80)||!this._editor.hasModel()||!this._editor.getOption(108))return;const e=new Map;for(const t of st.KZ.all(this._editor.getModel()))for(const i of t.triggerCharacters||[]){let n=e.get(i);n||(n=new Set,n.add(undefined),e.set(i,n)),n.add(t)}const t=t=>{if(!function(e,t,i){if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const n=i.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters");return void 0!==n&&Boolean(n)}(this._editor,this._contextKeyService,this._configurationService))return;if(Ed.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let i="";(0,Xe.YK)(t.charCodeAt(t.length-1))?(0,Xe.ZG)(t.charCodeAt(t.length-2))&&(i=t.substr(t.length-2)):i=t.charAt(t.length-1);const n=e.get(i);if(n){const e=this._completionModel?{items:this._completionModel.adopt(n),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:i},Boolean(this._completionModel),n,e)}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(t))}get state(){return this._state}cancel(e=!1){var t;0!==this._state&&(this._triggerQuickSuggest.cancel(),null===(t=this._requestToken)||void 0===t||t.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){0!==this._state&&(this._editor.hasModel()&&st.KZ.has(this._editor.getModel())?this.trigger({auto:2===this._state,shy:!1},!0):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source?this.cancel():0===this._state&&0===e.reason?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():0!==this._state&&3===e.reason&&this._refilterCompletionItems()}_onCompositionEnd(){0===this._state?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){!1!==this._editor.getOption(78)&&(this._editor.getOption(105).snippetsPreventQuickSuggestions&&gd.get(this._editor).isInSnippet()||(this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(0!==this._state)return;if(!Ed.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(78);if(!1!==i){if(!0===i);else{e.tokenizeIfCheap(t.lineNumber);const n=e.getLineTokens(t.lineNumber),o=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(!(i.other&&0===o||i.comments&&1===o||i.strings&&2===o))return}(function(e,t,i){if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const n=i.getValue("editor.inlineSuggest.allowQuickSuggestions");return void 0!==n&&Boolean(n)})(this._editor,this._contextKeyService,this._configurationService)&&st.KZ.has(e)&&this.trigger({auto:!0,shy:!1})}}),this._quickSuggestDelay)))}_refilterCompletionItems(){Promise.resolve().then((()=>{if(0===this._state)return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=new Ed(e,t,2===this._state,!1);this._onNewContext(i)}))}trigger(t,i=!1,n,o){var s;if(!this._editor.hasModel())return;const r=this._editor.getModel(),a=t.auto,l=new Ed(r,this._editor.getPosition(),a,t.shy);this.cancel(i),this._state=a?2:1,this._onDidTrigger.fire({auto:a,shy:t.shy,position:this._editor.getPosition()}),this._context=l;let d={triggerKind:null!==(s=t.triggerKind)&&void 0!==s?s:0};t.triggerCharacter&&(d={triggerKind:1,triggerCharacter:t.triggerCharacter}),this._requestToken=new Ye.A;const h=this._editor.getOption(100);let c=1;switch(h){case"top":c=0;break;case"bottom":c=2}const{itemKind:u,showDeprecated:g}=e._createSuggestFilter(this._editor),p=kd.create(this._editorWorkerService,this._editor),m=sd(r,this._editor.getPosition(),new nd(c,u,n,g),d,this._requestToken.token);Promise.all([m,p]).then((([e,i])=>{return n=this,s=void 0,l=function*(){var n;if(null===(n=this._requestToken)||void 0===n||n.dispose(),!this._editor.hasModel())return;let s=null==o?void 0:o.clipboardText;if(!s&&e.needsClipboard&&(s=yield this._clipboardService.readText()),0===this._state)return;const r=this._editor.getModel();let l=e.items;if(o){const e=ld(c);l=l.concat(o.items).sort(e)}const d=new Ed(r,this._editor.getPosition(),a,t.shy);this._completionModel=new Nd(l,this._context.column,{leadingLineContent:d.leadingLineContent,characterCountDelta:d.column-this._context.column},i,this._editor.getOption(105),this._editor.getOption(100),s),this._completionDisposables.add(e.disposable),this._onNewContext(d),this._reportDurationsTelemetry(e.durations)},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{a(l.next(e))}catch(e){t(e)}}function o(e){try{a(l.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,o)}a((l=l.apply(n,s||[])).next())}));var n,s,r,l})).catch(it.dL)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static _createSuggestFilter(e){const t=new Set;"none"===e.getOption(100)&&t.add(27);const i=e.getOption(105);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if((0,Xe.V8)(e.leadingLineContent)===(0,Xe.V8)(this._context.leadingLineContent)){if(e.column<this._context.column)e.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1},!0):this.cancel();else if(this._completionModel)if(0!==e.leadingWord.word.length&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){const e=new Set(st.KZ.all(this._editor.getModel()));for(let t of this._completionModel.allProvider)e.delete(t);const t=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,e,{items:t,clipboardText:this._completionModel.clipboardText})}else if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){const{incomplete:e}=this._completionModel,t=this._completionModel.adopt(e);this.trigger({auto:2===this._state,shy:!1,triggerKind:2},!0,e,{items:t,clipboardText:this._completionModel.clipboardText})}else{let t=this._completionModel.lineContext,i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(Ed.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<e.leadingWord.startColumn)return void this.trigger({auto:this._context.auto,shy:!1},!0);if(this._context.auto)return void this.cancel();if(this._completionModel.lineContext=t,i=this._completionModel.items.length>0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:i})}}else this.cancel();else this.cancel()}};Id=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Dd(1,Ld.p),Dd(2,Ve.p),Dd(3,Yt.b),Dd(4,hd.VZ),Dd(5,oe.i6),Dd(6,ji.Ui)],Id);class Td{constructor(e,t){this._disposables=new me.SL,this._lastOvertyped=[],this._empty=!0,this._disposables.add(e.onWillType((()=>{if(!this._empty)return;if(!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;e<i;e++)if(!t[e].isEmpty()){n=!0;break}if(!n)return;this._lastOvertyped=[];const o=e.getModel();for(let e=0;e<i;e++){const i=t[e];if(o.getValueLengthInRange(i)>Td._maxSelectionLength)return;this._lastOvertyped[e]={value:o.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}this._empty=!1}))),this._disposables.add(t.onDidCancel((e=>{this._empty||e.retrigger||(this._empty=!0)})))}getLastOvertypedInfo(e){if(!this._empty&&e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}}Td._maxSelectionLength=51200,i(25074);var Md=i(14785),Rd=i(43758),Ad=i(62272),Od={};Od.styleTagTransform=Y(),Od.setAttributes=q(),Od.insert=j().bind(null,"head"),Od.domAPI=K(),Od.insertStyleElement=G(),H()(Ad.Z,Od),Ad.Z&&Ad.Z.locals&&Ad.Z.locals;var Pd=function(e,t){return function(i,n){t(i,n,e)}};class Fd extends On{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=(0,ne.N)("ddd","{0} ({1})",this._action.label,Fd.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return null===(t=e.getLabel())||void 0===t?void 0:t.replace(/\benter\b/gi,"⏎")}}let Bd=class{constructor(e,t,i,n){this._menuService=i,this._contextKeyService=n,this._menuDisposables=new me.SL,this.element=Et.R3(e,Et.$(".suggest-status-bar"));const o=e=>e instanceof Se.U8?t.createInstance(Fd,e,void 0):void 0;this._leftActions=new sn.o(this.element,{actionViewItemProvider:o}),this._rightActions=new sn.o(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(td,this._contextKeyService),t=()=>{const t=[],i=[];for(let[n,o]of e.getActions())"left"===n?t.push(...o):i.push(...o);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};Bd=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Pd(1,Dt.TG),Pd(2,Se.co),Pd(3,oe.i6)],Bd);const Wd=(0,Le.P6)("symbolIcon.arrayForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Vd=(0,Le.P6)("symbolIcon.booleanForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Hd=(0,Le.P6)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,ne.N)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),zd=(0,Le.P6)("symbolIcon.colorForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Kd=(0,Le.P6)("symbolIcon.constantForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ud=(0,Le.P6)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,ne.N)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),jd=(0,Le.P6)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,ne.N)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),$d=(0,Le.P6)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,ne.N)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),qd=(0,Le.P6)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,ne.N)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Zd=(0,Le.P6)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,ne.N)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Gd=(0,Le.P6)("symbolIcon.fileForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Qd=(0,Le.P6)("symbolIcon.folderForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Yd=(0,Le.P6)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,ne.N)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Jd=(0,Le.P6)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,ne.N)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Xd=(0,Le.P6)("symbolIcon.keyForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),eh=(0,Le.P6)("symbolIcon.keywordForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),th=(0,Le.P6)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,ne.N)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ih=(0,Le.P6)("symbolIcon.moduleForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),nh=(0,Le.P6)("symbolIcon.namespaceForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),oh=(0,Le.P6)("symbolIcon.nullForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),sh=(0,Le.P6)("symbolIcon.numberForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),rh=(0,Le.P6)("symbolIcon.objectForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ah=(0,Le.P6)("symbolIcon.operatorForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),lh=(0,Le.P6)("symbolIcon.packageForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),dh=(0,Le.P6)("symbolIcon.propertyForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),hh=(0,Le.P6)("symbolIcon.referenceForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ch=(0,Le.P6)("symbolIcon.snippetForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),uh=(0,Le.P6)("symbolIcon.stringForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),gh=(0,Le.P6)("symbolIcon.structForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ph=(0,Le.P6)("symbolIcon.textForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),mh=(0,Le.P6)("symbolIcon.typeParameterForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),fh=(0,Le.P6)("symbolIcon.unitForeground",{dark:Le.dR,light:Le.dR,hc:Le.dR},(0,ne.N)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_h=(0,Le.P6)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,ne.N)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));(0,xe.Ic)(((e,t)=>{const i=e.getColor(Wd);i&&t.addRule(`${Wt.lA.symbolArray.cssSelector} { color: ${i}; }`);const n=e.getColor(Vd);n&&t.addRule(`${Wt.lA.symbolBoolean.cssSelector} { color: ${n}; }`);const o=e.getColor(Hd);o&&t.addRule(`${Wt.lA.symbolClass.cssSelector} { color: ${o}; }`);const s=e.getColor(th);s&&t.addRule(`${Wt.lA.symbolMethod.cssSelector} { color: ${s}; }`);const r=e.getColor(zd);r&&t.addRule(`${Wt.lA.symbolColor.cssSelector} { color: ${r}; }`);const a=e.getColor(Kd);a&&t.addRule(`${Wt.lA.symbolConstant.cssSelector} { color: ${a}; }`);const l=e.getColor(Ud);l&&t.addRule(`${Wt.lA.symbolConstructor.cssSelector} { color: ${l}; }`);const d=e.getColor(jd);d&&t.addRule(`\n\t\t\t${Wt.lA.symbolValue.cssSelector},${Wt.lA.symbolEnum.cssSelector} { color: ${d}; }`);const h=e.getColor($d);h&&t.addRule(`${Wt.lA.symbolEnumMember.cssSelector} { color: ${h}; }`);const c=e.getColor(qd);c&&t.addRule(`${Wt.lA.symbolEvent.cssSelector} { color: ${c}; }`);const u=e.getColor(Zd);u&&t.addRule(`${Wt.lA.symbolField.cssSelector} { color: ${u}; }`);const g=e.getColor(Gd);g&&t.addRule(`${Wt.lA.symbolFile.cssSelector} { color: ${g}; }`);const p=e.getColor(Qd);p&&t.addRule(`${Wt.lA.symbolFolder.cssSelector} { color: ${p}; }`);const m=e.getColor(Yd);m&&t.addRule(`${Wt.lA.symbolFunction.cssSelector} { color: ${m}; }`);const f=e.getColor(Jd);f&&t.addRule(`${Wt.lA.symbolInterface.cssSelector} { color: ${f}; }`);const _=e.getColor(Xd);_&&t.addRule(`${Wt.lA.symbolKey.cssSelector} { color: ${_}; }`);const v=e.getColor(eh);v&&t.addRule(`${Wt.lA.symbolKeyword.cssSelector} { color: ${v}; }`);const b=e.getColor(ih);b&&t.addRule(`${Wt.lA.symbolModule.cssSelector} { color: ${b}; }`);const C=e.getColor(nh);C&&t.addRule(`${Wt.lA.symbolNamespace.cssSelector} { color: ${C}; }`);const w=e.getColor(oh);w&&t.addRule(`${Wt.lA.symbolNull.cssSelector} { color: ${w}; }`);const y=e.getColor(sh);y&&t.addRule(`${Wt.lA.symbolNumber.cssSelector} { color: ${y}; }`);const S=e.getColor(rh);S&&t.addRule(`${Wt.lA.symbolObject.cssSelector} { color: ${S}; }`);const L=e.getColor(ah);L&&t.addRule(`${Wt.lA.symbolOperator.cssSelector} { color: ${L}; }`);const x=e.getColor(lh);x&&t.addRule(`${Wt.lA.symbolPackage.cssSelector} { color: ${x}; }`);const k=e.getColor(dh);k&&t.addRule(`${Wt.lA.symbolProperty.cssSelector} { color: ${k}; }`);const N=e.getColor(hh);N&&t.addRule(`${Wt.lA.symbolReference.cssSelector} { color: ${N}; }`);const D=e.getColor(ch);D&&t.addRule(`${Wt.lA.symbolSnippet.cssSelector} { color: ${D}; }`);const E=e.getColor(uh);E&&t.addRule(`${Wt.lA.symbolString.cssSelector} { color: ${E}; }`);const I=e.getColor(gh);I&&t.addRule(`${Wt.lA.symbolStruct.cssSelector} { color: ${I}; }`);const T=e.getColor(ph);T&&t.addRule(`${Wt.lA.symbolText.cssSelector} { color: ${T}; }`);const M=e.getColor(mh);M&&t.addRule(`${Wt.lA.symbolTypeParameter.cssSelector} { color: ${M}; }`);const R=e.getColor(fh);R&&t.addRule(`${Wt.lA.symbolUnit.cssSelector} { color: ${R}; }`);const A=e.getColor(_h);A&&t.addRule(`${Wt.lA.symbolVariable.cssSelector} { color: ${A}; }`)}));class vh{constructor(){let e;this._onDidWillResize=new Vt.Q5,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new Vt.Q5,this.onDidResize=this._onDidResize.event,this._sashListener=new me.SL,this._size=new Et.Ro(0,0),this._minSize=new Et.Ro(0,0),this._maxSize=new Et.Ro(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new un.g(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new un.g(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new un.g(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:un.l.North}),this._southSash=new un.g(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:un.l.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(Vt.ju.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(Vt.ju.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(Vt.ju.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(Vt.ju.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:o,width:s}=this._maxSize;e=Math.max(i,Math.min(o,e)),t=Math.max(n,Math.min(s,t));const r=new Et.Ro(t,e);Et.Ro.equals(r,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=r,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}function bh(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let Ch=class{constructor(e,t){this._editor=e,this._onDidClose=new Vt.Q5,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new Vt.Q5,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new me.SL,this._renderDisposeable=new me.SL,this._borderWidth=1,this._size=new Et.Ro(330,0),this.domNode=Et.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(ca,{editor:e}),this._body=Et.$(".body"),this._scrollbar=new Ms.s$(this._body,{}),Et.R3(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=Et.R3(this._body,Et.$(".header")),this._close=Et.R3(this._header,Et.$("span"+Wt.lA.close.cssSelector)),this._close.title=ne.N("details.close","Close"),this._type=Et.R3(this._header,Et.$("p.type")),this._docs=Et.R3(this._body,Et.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(43)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(43),i=t.getMassagedFontFamily(Pe.G6?Ci.hL.fontFamily:null),n=e.get(106)||t.fontSize,o=e.get(107)||t.lineHeight,s=t.fontWeight,r=`${n}px`,a=`${o}px`;this.domNode.style.fontSize=r,this.domNode.style.lineHeight=""+o/n,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(107)||this._editor.getOption(43).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=ne.N("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:o,documentation:s}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${null!==(i=e.word)&&void 0!==i?i:"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${null===(n=e.completion.commitCharacters)||void 0===n?void 0:n.join("")}\n`,s=(new B.W5).appendCodeblock("empty",t),o=`Provider: ${e.provider._debugDisplayName}`}if(t||bh(e)){if(this.domNode.classList.remove("no-docs","no-type"),o){const e=o.length>1e5?`${o.substr(0,1e5)}…`:o;this._type.textContent=e,this._type.title=e,Et.$Z(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else Et.PO(this._type),this._type.title="",Et.Cp(this._type),this.domNode.classList.add("no-type");if(Et.PO(this._docs),"string"==typeof s)this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),Et.PO(this._docs);const e=this._markdownRenderer.render(s);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new Et.Ro(e,t);Et.Ro.equals(i,this._size)||(this._size=i,Et.dp(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};Ch=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,Dt.TG)],Ch);class wh{constructor(e,t){let i,n;this.widget=e,this._editor=t,this._disposables=new me.SL,this._added=!1,this._resizable=new vh,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let o=0,s=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(s=n.width-e.dimension.width,t=!0),e.north&&(o=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+o,left:i.left+s})}e.done&&(i=void 0,n=void 0,o=0,s=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{var e;this._anchorBox&&this._placeAtAnchor(this._anchorBox,null!==(e=this._userSize)&&void 0!==e?e:this.widget.size)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e){var t;const i=Et.i(e);this._anchorBox=i,this._placeAtAnchor(this._anchorBox,null!==(t=this._userSize)&&void 0!==t?t:this.widget.size)}_placeAtAnchor(e,t){var i;const n=Et.D6(document.body),o=this.widget.getLayoutInfo(),s=new Et.Ro(220,2*o.lineHeight),r=e.top,a=function(){const i=n.width-(e.left+e.width+o.borderWidth+o.horizontalPadding),a=-o.borderWidth+e.left+e.width,l=new Et.Ro(i,n.height-e.top-o.borderHeight-o.verticalPadding),d=l.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:r,left:a,fit:i-t.width,maxSizeTop:l,maxSizeBottom:d,minSize:s.with(Math.min(i,s.width))}}(),l=[a,function(){const i=e.left-o.borderWidth-o.horizontalPadding,a=Math.max(o.horizontalPadding,e.left-t.width-o.borderWidth),l=new Et.Ro(i,n.height-e.top-o.borderHeight-o.verticalPadding),d=l.with(void 0,e.top+e.height-o.borderHeight-o.verticalPadding);return{top:r,left:a,fit:i-t.width,maxSizeTop:l,maxSizeBottom:d,minSize:s.with(Math.min(i,s.width))}}(),function(){const i=e.left,r=-o.borderWidth+e.top+e.height,a=new Et.Ro(e.width-o.borderHeight,n.height-e.top-e.height-o.verticalPadding);return{top:r,left:i,fit:a.height-t.height,maxSizeBottom:a,maxSizeTop:a,minSize:s.with(a.width)}}()],d=null!==(i=l.find((e=>e.fit>=0)))&&void 0!==i?i:l.sort(((e,t)=>t.fit-e.fit))[0],h=e.top+e.height-o.borderHeight;let c,u=t.height;const g=Math.max(d.maxSizeTop.height,d.maxSizeBottom.height);let p;u>g&&(u=g),u<=d.maxSizeTop.height?(c=!0,p=d.maxSizeTop):(c=!1,p=d.maxSizeBottom),this._applyTopLeft({left:d.left,top:c?d.top:h-u}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!c,d===a,c,d!==a),this._resizable.minSize=d.minSize,this._resizable.maxSize=p,this._resizable.layout(u,Math.min(p.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var yh,Sh=i(86611);function Lh(e,t,i,n){const o=n===yh.ROOT_FOLDER?["rootfolder-icon"]:n===yh.FOLDER?["folder-icon"]:["file-icon"];if(i){let s;if(s=i.scheme===mo.lg.data?Jt.Vb.parseMetaData(i).get(Jt.Vb.META_DATA_LABEL):xh((0,Jt.Hx)(i).toLowerCase()),n===yh.FOLDER)o.push(`${s}-name-folder-icon`);else{if(s){if(o.push(`${s}-name-file-icon`),s.length<=255){const e=s.split(".");for(let t=1;t<e.length;t++)o.push(`${e.slice(t).join(".")}-ext-file-icon`)}o.push("ext-file-icon")}const n=function(e,t,i){if(!i)return null;let n=null;if(i.scheme===mo.lg.data){const e=Jt.Vb.parseMetaData(i).get(Jt.Vb.META_DATA_MIME);e&&(n=t.getModeId(e))}else{const t=e.getModel(i);t&&(n=t.getLanguageId())}return n&&n!==Sh.XT?n:t.getModeIdByFilepathOrFirstLine(i)}(e,t,i);n&&o.push(`${xh(n)}-lang-file-icon`)}}return o}function xh(e){return e.replace(/[\11\12\14\15\40]/g,"/")}!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(yh||(yh={}));var kh,Nh=function(e,t){return function(i,n){t(i,n,e)}};function Dh(e){return`suggest-aria-id:${e}`}const Eh=(0,xa.q5)("suggest-more-info",Wt.lA.chevronRight,ne.N("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),Ih=new((kh=class e{extract(t,i){if(t.textLabel.match(e._regexStrict))return i[0]=t.textLabel,!0;if(t.completion.detail&&t.completion.detail.match(e._regexStrict))return i[0]=t.completion.detail,!0;if("string"==typeof t.completion.documentation){const n=e._regexRelaxed.exec(t.completion.documentation);if(n&&(0===n.index||n.index+n[0].length===t.completion.documentation.length))return i[0]=n[0],!0}return!1}})._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,kh._regexStrict=new RegExp(`^${kh._regexRelaxed.source}$`,"i"),kh);let Th=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._modeService=i,this._themeService=n,this._onDidToggleDetails=new Vt.Q5,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=Object.create(null);t.disposables=new me.SL,t.root=e,t.root.classList.add("show-file-icons"),t.icon=(0,Et.R3)(e,(0,Et.$)(".icon")),t.colorspan=(0,Et.R3)(t.icon,(0,Et.$)("span.colorspan"));const i=(0,Et.R3)(e,(0,Et.$)(".contents")),n=(0,Et.R3)(i,(0,Et.$)(".main"));t.iconContainer=(0,Et.R3)(n,(0,Et.$)(".icon-label.codicon")),t.left=(0,Et.R3)(n,(0,Et.$)("span.left")),t.right=(0,Et.R3)(n,(0,Et.$)("span.right")),t.iconLabel=new wo.g(t.left,{supportHighlights:!0,supportIcons:!0}),t.disposables.add(t.iconLabel),t.parametersLabel=(0,Et.R3)(t.left,(0,Et.$)("span.signature-label")),t.qualifierLabel=(0,Et.R3)(t.left,(0,Et.$)("span.qualifier-label")),t.detailsLabel=(0,Et.R3)(t.right,(0,Et.$)("span.details-label")),t.readMore=(0,Et.R3)(t.right,(0,Et.$)("span.readMore"+xe.kS.asCSSSelector(Eh))),t.readMore.title=ne.N("readMore","Read More");const o=()=>{const e=this._editor.getOptions(),i=e.get(43),o=i.getMassagedFontFamily(Pe.G6?Ci.hL.fontFamily:null),s=i.fontFeatureSettings,r=e.get(106)||i.fontSize,a=e.get(107)||i.lineHeight,l=i.fontWeight,d=`${r}px`,h=`${a}px`;t.root.style.fontSize=d,t.root.style.fontWeight=l,n.style.fontFamily=o,n.style.fontFeatureSettings=s,n.style.lineHeight=h,t.icon.style.height=h,t.icon.style.width=h,t.readMore.style.height=h,t.readMore.style.width=h};return o(),t.disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(43)||e.hasChanged(106)||e.hasChanged(107))&&o()}))),t}renderElement(e,t,i){const{completion:n}=e;i.root.id=Dh(t),i.colorspan.style.backgroundColor="";const o={labelEscapeNewLines:!0,matches:(0,yo.mB)(e.score)};let s=[];if(19===n.kind&&Ih.extract(e,s))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=s[0];else if(20===n.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=Lh(this._modelService,this._modeService,nt.o.from({scheme:"fake",path:e.textLabel}),yh.FILE),s=Lh(this._modelService,this._modeService,nt.o.from({scheme:"fake",path:n.detail}),yh.FILE);o.extraClasses=t.length>s.length?t:s}else 23===n.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",o.extraClasses=(0,tt.xH)([Lh(this._modelService,this._modeService,nt.o.from({scheme:"fake",path:e.textLabel}),yh.FOLDER),Lh(this._modelService,this._modeService,nt.o.from({scheme:"fake",path:n.detail}),yh.FOLDER)])):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...(0,st.Sy)(n.kind).split(" ")));n.tags&&n.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,o),"string"==typeof n.label?(i.parametersLabel.textContent="",i.detailsLabel.textContent=Mh(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=Mh(n.label.detail||""),i.detailsLabel.textContent=Mh(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(105).showInlineDetails?(0,Et.$Z)(i.detailsLabel):(0,Et.Cp)(i.detailsLabel),bh(e)?(i.right.classList.add("can-expand-details"),(0,Et.$Z)(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),(0,Et.Cp)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function Mh(e){return e.replace(/\r\n|\r|\n/g,"")}Th=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Nh(1,rt.q),Nh(2,Zi.h),Nh(3,xe.XE)],Th);var Rh=function(e,t){return function(i,n){t(i,n,e)}};const Ah=(0,Le.P6)("editorSuggestWidget.background",{dark:Le.D0,light:Le.D0,hc:Le.D0},ne.N("editorSuggestWidgetBackground","Background color of the suggest widget.")),Oh=(0,Le.P6)("editorSuggestWidget.border",{dark:Le.D1,light:Le.D1,hc:Le.D1},ne.N("editorSuggestWidgetBorder","Border color of the suggest widget.")),Ph=(0,Le.P6)("editorSuggestWidget.foreground",{dark:Le.NO,light:Le.NO,hc:Le.NO},ne.N("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),Fh=(0,Le.P6)("editorSuggestWidget.selectedForeground",{dark:Le.NP,light:Le.NP,hc:Le.NP},ne.N("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),Bh=(0,Le.P6)("editorSuggestWidget.selectedIconForeground",{dark:Le.cb,light:Le.cb,hc:Le.cb},ne.N("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget.")),Wh=(0,Le.P6)("editorSuggestWidget.selectedBackground",{dark:Le.Vq,light:Le.Vq,hc:Le.Vq},ne.N("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),Vh=(0,Le.P6)("editorSuggestWidget.highlightForeground",{dark:Le.Gw,light:Le.Gw,hc:Le.Gw},ne.N("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),Hh=(0,Le.P6)("editorSuggestWidget.focusHighlightForeground",{dark:Le.PX,light:Le.PX,hc:Le.PX},ne.N("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));class zh{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof cn}`}restore(){var e;const t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{const e=JSON.parse(t);if(Et.Ro.is(e))return Et.Ro.lift(e)}catch(e){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Kh=class e{constructor(e,t,i,n,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new pe._F,this._disposables=new me.SL,this._onDidSelect=new Vt.Q5,this._onDidFocus=new Vt.Q5,this._onDidHide=new Vt.Q5,this._onDidShow=new Vt.Q5,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new Vt.Q5,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new vh,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new Uh(this,e),this._persistedSize=new zh(t,e);class s{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let r;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),r=new s(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{var t,i,n,o;if(this._resize(e.dimension.width,e.dimension.height),r&&(r.persistHeight=r.persistHeight||!!e.north||!!e.south,r.persistWidth=r.persistWidth||!!e.east||!!e.west),e.done){if(r){const{itemHeight:e,defaultSize:s}=this.getLayoutInfo(),a=Math.round(e/2);let{width:l,height:d}=this.element.size;(!r.persistHeight||Math.abs(r.currentSize.height-d)<=a)&&(d=null!==(i=null===(t=r.persistedSize)||void 0===t?void 0:t.height)&&void 0!==i?i:s.height),(!r.persistWidth||Math.abs(r.currentSize.width-l)<=a)&&(l=null!==(o=null===(n=r.persistedSize)||void 0===n?void 0:n.width)&&void 0!==o?o:s.width),this._persistedSize.store(new Et.Ro(l,d))}this._contentWidget.unlockPreference(),r=void 0}}))),this._messageElement=Et.R3(this.element.domNode,Et.$(".message")),this._listElement=Et.R3(this.element.domNode,Et.$(".tree"));const a=o.createInstance(Ch,this.editor);a.onDidClose(this.toggleDetails,this,this._disposables),this._details=new wh(a,this.editor);const l=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(105).showIcons);l();const d=o.createInstance(Th,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new Md.aV("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:e=>{if(e.isResolved&&this._isDetailsVisible()){const{documentation:t,detail:i}=e.completion,n=Xe.WU("{0}{1}",i||"",t?"string"==typeof t?t:t.value:"");return ne.N("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",e.textLabel,n)}return e.textLabel},getWidgetAriaLabel:()=>ne.N("suggest","Suggest"),getWidgetRole:()=>"listbox"}}),this._status=o.createInstance(Bd,this.element.domNode);const h=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(105).showStatusBar);h(),this._disposables.add((0,No.Jl)(this._list,n,{listInactiveFocusBackground:Wh,listInactiveFocusOutline:Le.xL})),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(105)&&(h(),l())}))),this._ctxSuggestWidgetVisible=ed.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=ed.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=ed.MultipleSuggestions.bindTo(i),this._disposables.add(Et.mu(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){const t=e.getColor(Ah);t&&(this.element.domNode.style.backgroundColor=t.toString(),this._messageElement.style.backgroundColor=t.toString(),this._details.widget.domNode.style.backgroundColor=t.toString());const i=e.getColor(Oh);i&&(this.element.domNode.style.borderColor=i.toString(),this._messageElement.style.borderColor=i.toString(),this._status.element.style.borderTopColor=i.toString(),this._details.widget.domNode.style.borderColor=i.toString(),this._detailsBorderColor=i.toString());const n=e.getColor(Le.R8);n&&(this._detailsFocusBorderColor=n.toString()),this._details.widget.borderWidth="hc"===e.type?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),void this.editor.setAriaOptions({activeDescendant:void 0});if(!this._completionModel)return;const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=(0,pe.PG)((e=>{return t=this,n=void 0,s=function*(){const t=(0,pe.Vg)((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250);e.onCancellationRequested((()=>t.dispose()));const n=yield i.resolve(e);return t.dispose(),n},new((o=void 0)||(o=Promise))((function(e,i){function r(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(t,n||[])).next())}));var t,n,o,s})),this._currentSuggestionDetails.then((()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:Dh(n)}))})).catch(it.dL)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(t){if(this._state!==t)switch(this._state=t,this.element.domNode.classList.toggle("frozen",4===t),this.element.domNode.classList.remove("message"),t){case 0:Et.Cp(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.LOADING_MESSAGE,Et.Cp(this._listElement,this._status.element),Et.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,Et.Cp(this._listElement,this._status.element),Et.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:case 4:Et.Cp(this._messageElement),Et.$Z(this._listElement,this._status.element),this._show();break;case 5:Et.Cp(this._messageElement),Et.$Z(this._listElement,this._status.element),this._details.show(),this._show()}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,pe.Vg)((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n){var o,s;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(o=this._loadingTimeout)||void 0===o||o.dispose(),null===(s=this._currentSuggestionDetails)||void 0===s||s.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const r=this._completionModel.items.length,a=0===r;if(this._ctxSuggestWidgetMultipleSuggestions.set(r>1),a)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus([t]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!bh(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.height<i&&this._persistedSize.store(t.with(void 0,i))}isFrozen(){return 4===this._state}_afterRender(e){null!==e?2!==this._state&&1!==this._state&&(this._isDetailsVisible()&&this._details.show(),this._positionDetails()):this._isDetailsVisible()&&this._details.hide()}_layout(e){var t,i,n;if(!this.editor.hasModel())return;if(!this.editor.getDomNode())return;const o=Et.D6(document.body),s=this.getLayoutInfo();e||(e=s.defaultSize);let r=e.height,a=e.width;if(this._status.element.style.lineHeight=`${s.itemHeight}px`,2===this._state||1===this._state)r=s.itemHeight+s.borderHeight,a=s.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new Et.Ro(a,r),this._contentWidget.setPreference(2);else{const l=o.width-s.borderHeight-2*s.horizontalPadding;a>l&&(a=l);const d=this._completionModel?this._completionModel.stats.pLabelLen*s.typicalHalfwidthCharacterWidth:a,h=s.statusBarHeight+this._list.contentHeight+s.borderHeight,c=s.itemHeight+s.statusBarHeight,u=Et.i(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=u.top+g.top+g.height,m=Math.min(o.height-p-s.verticalPadding,h),f=u.top+g.top-s.verticalPadding,_=Math.min(f,h);let v=Math.min(Math.max(_,m)+s.borderHeight,h);r===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(r=this._cappedHeight.wanted),r<c&&(r=c),r>v&&(r=v);const b=150;r>m||this._forceRenderingAbove&&f>b?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),v=_):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),v=m),this.element.preferredSize=new Et.Ro(d,s.defaultSize.height),this.element.maxSize=new Et.Ro(l,v),this.element.minSize=new Et.Ro(220,c),this._cappedHeight=r===h?{wanted:null!==(n=null===(i=this._cappedHeight)||void 0===i?void 0:i.wanted)&&void 0!==n?n:e.height,capped:r}:void 0}this._resize(a,r)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=t-o+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}getLayoutInfo(){const e=this.editor.getOption(43),t=(0,Rd.u)(this.editor.getOption(107)||e.lineHeight,8,1e3),i=this.editor.getOption(105).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,o=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Et.Ro(430,i+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Kh.LOADING_MESSAGE=ne.N("suggestWidget.loading","Loading..."),Kh.NO_SUGGESTIONS_MESSAGE=ne.N("suggestWidget.noSuggestions","No suggestions."),Kh=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Rh(1,Ei.Uy),Rh(2,oe.i6),Rh(3,xe.XE),Rh(4,Dt.TG)],Kh);class Uh{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new Et.Ro(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}(0,xe.Ic)(((e,t)=>{const i=e.getColor(Vh);i&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${i}; }`);const n=e.getColor(Hh);i&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${n}; }`);const o=e.getColor(Ph);o&&t.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${o}; }`);const s=e.getColor(Fh);s&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused { color: ${s}; }`);const r=e.getColor(Bh);r&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon { color: ${r}; }`);const a=e.getColor(Le.ur);a&&t.addRule(`.monaco-editor .suggest-details a { color: ${a}; }`);const l=e.getColor(Le.sg);l&&t.addRule(`.monaco-editor .suggest-details a:hover { color: ${l}; }`);const d=e.getColor(Le.Sw);d&&t.addRule(`.monaco-editor .suggest-details code { background-color: ${d}; }`)}));var jh=function(e,t){return function(i,n){t(i,n,e)}};class $h{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);this._marker=e.deltaDecorations([],[{range:be.e.fromPositions(t,n),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let qh=class e{constructor(e,t,i,n,o,s){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=o,this._logService=s,this._lineSuffix=new me.XK,this._toDispose=new me.SL,this._selectors=new Zh((e=>e.priority)),this.editor=e,this.model=o.createInstance(Id,this.editor);const r=ed.InsertMode.bindTo(n);r.set(e.getOption(105).insertMode),this.model.onDidTrigger((()=>r.set(e.getOption(105).insertMode))),this.widget=this._toDispose.add(new pe.Ue((()=>{const e=this._instantiationService.createInstance(Kh,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new Sd(this.editor,e,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t),this._toDispose.add(this.model.onDidSuggest((e=>{0===e.completionModel.items.length&&t.reset()})));const i=ed.MakesTextEdit.bindTo(this._contextKeyService),n=ed.HasInsertAndReplaceRange.bindTo(this._contextKeyService),o=ed.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,me.OF)((()=>{i.reset(),n.reset(),o.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),s=e.editStart.column,r=t.column;let a=!0;"smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.additionalTextEdits||4&e.completion.insertTextRules||r-s!==e.completion.insertText.length||(a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:s,endLineNumber:t.lineNumber,endColumn:r})!==e.completion.insertText),i.set(a),n.set(!ve.L.equals(e.editInsertEnd,e.editReplaceEnd)),o.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeybinding().equals(new Yl.QC(!0,!1,!1,!1,33))||Fe.dz&&e.toKeybinding().equals(new Yl.QC(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeybinding().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new pe.Ue((()=>this._toDispose.add(new Td(this.editor,this.model))))),this._alternatives=this._toDispose.add(new pe.Ue((()=>this._toDispose.add(new wd(this.editor,this._contextKeyService))))),this._toDispose.add(o.createInstance(Cd,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new $h(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(!e.shy){let t=-1;for(const i of this._selectors.itemsOrderedByPriorityDesc)if(t=i.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items),-1!==t)break;-1===t&&(t=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items)),this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));let a=ed.AcceptSuggestionsOnEnter.bindTo(n),l=()=>{const e=this.editor.getOption(1);a.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>l()))),l()}static get(t){return t.getContribution(e.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=this.editor.getModel(),n=i.getAlternativeVersionId(),{item:o}=e,s=[],r=new Ye.A;1&t||this.editor.pushUndoStop();const a=this.getOverwriteInfo(o,Boolean(8&t));if(this._memoryService.memorize(i,this.editor.getPosition(),o),Array.isArray(o.completion.additionalTextEdits)){const e=ot.ZF.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",o.completion.additionalTextEdits.map((e=>ol.h.replace(be.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!o.isResolved){const e=new Jl.G(!0);let n;const a=i.onDidChangeContent((e=>{if(e.isFlush)return r.cancel(),void a.dispose();for(let t of e.changes){const e=be.e.getEndPosition(t.range);n&&!ve.L.isBefore(e,n)||(n=e)}}));let l=t;t|=2;let d=!1,h=this.editor.onWillType((()=>{h.dispose(),d=!0,2&l||this.editor.pushUndoStop()}));s.push(o.resolve(r.token).then((()=>{if(!o.completion.additionalTextEdits||r.token.isCancellationRequested)return!1;if(n&&o.completion.additionalTextEdits.some((e=>ve.L.isBefore(n,be.e.getStartPosition(e.range)))))return!1;d&&this.editor.pushUndoStop();const e=ot.ZF.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",o.completion.additionalTextEdits.map((e=>ol.h.replace(be.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!d&&2&l||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),a.dispose(),h.dispose()})))}let{insertText:l}=o.completion;4&o.completion.insertTextRules||(l=Tl.escape(l)),gd.get(this.editor).insert(l,{overwriteBefore:a.overwriteBefore,overwriteAfter:a.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&o.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),o.completion.command?o.completion.command.id===Gh.id?this.model.trigger({auto:!0,shy:!1},!0):(s.push(this._commandService.executeCommand(o.completion.command.id,...o.completion.command.arguments?[...o.completion.command.arguments]:[]).catch(it.dL)),this.model.cancel()):this.model.cancel(),4&t&&this._alternatives.value.set(e,(e=>{for(r.cancel();i.canUndo();){n!==i.getAlternativeVersionId()&&i.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(o),Promise.all(s).finally((()=>{this.model.clear(),r.dispose()}))}getOverwriteInfo(e,t){(0,yi.p_)(this.editor.hasModel());let i="replace"===this.editor.getOption(105).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:o+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){if((0,tt.Of)(e.completion.additionalTextEdits)){let t=ne.N("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,F.Z9)(t)}}triggerSuggest(e){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,e),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;return n-i!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};Vt.ju.once(this.model.onDidTrigger)((e=>{let t=[];Vt.ju.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{(0,me.B9)(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if((0,me.B9)(t),0===e.items.length)return void i();const o=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),s=e.items[o];n(s)?(this.editor.pushUndoStop(),this._insertSuggestion({index:o,item:s,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};qh.ID="editor.contrib.suggestController",qh=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([jh(1,bd),jh(2,at.H),jh(3,oe.i6),jh(4,Dt.TG),jh(5,hd.VZ)],qh);class Zh{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(-1!==this._items.indexOf(e))throw new Error("Value is already registered");return this._items.push(e),this._items.sort(((e,t)=>this.prioritySelector(t)-this.prioritySelector(e))),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class Gh extends ee.R6{constructor(){super({id:Gh.id,label:ne.N("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:oe.Ao.and(ie.u.writable,ie.u.hasCompletionItemProvider),kbOpts:{kbExpr:ie.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t){const i=qh.get(t);i&&i.triggerSuggest()}}Gh.id="editor.action.triggerSuggest",(0,ee._K)(qh.ID,qh),(0,ee.Qr)(Gh);const Qh=190,Yh=ee._l.bindToContribution(qh.get);(0,ee.fK)(new Yh({id:"acceptSelectedSuggestion",precondition:ed.Visible,handler(e){e.acceptSelectedSuggestion(!0,!1)}})),ao.W.registerKeybindingRule({id:"acceptSelectedSuggestion",when:oe.Ao.and(ed.Visible,ie.u.textInputFocus),primary:2,weight:Qh}),ao.W.registerKeybindingRule({id:"acceptSelectedSuggestion",when:oe.Ao.and(ed.Visible,ie.u.textInputFocus,ed.AcceptSuggestionsOnEnter,ed.MakesTextEdit),primary:3,weight:Qh}),Se.BH.appendMenuItem(td,{command:{id:"acceptSelectedSuggestion",title:ne.N("accept.insert","Insert")},group:"left",order:1,when:ed.HasInsertAndReplaceRange.toNegated()}),Se.BH.appendMenuItem(td,{command:{id:"acceptSelectedSuggestion",title:ne.N("accept.insert","Insert")},group:"left",order:1,when:oe.Ao.and(ed.HasInsertAndReplaceRange,ed.InsertMode.isEqualTo("insert"))}),Se.BH.appendMenuItem(td,{command:{id:"acceptSelectedSuggestion",title:ne.N("accept.replace","Replace")},group:"left",order:1,when:oe.Ao.and(ed.HasInsertAndReplaceRange,ed.InsertMode.isEqualTo("replace"))}),(0,ee.fK)(new Yh({id:"acceptAlternativeSelectedSuggestion",precondition:oe.Ao.and(ed.Visible,ie.u.textInputFocus),kbOpts:{weight:Qh,kbExpr:ie.u.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:td,group:"left",order:2,when:oe.Ao.and(ed.HasInsertAndReplaceRange,ed.InsertMode.isEqualTo("insert")),title:ne.N("accept.replace","Replace")},{menuId:td,group:"left",order:2,when:oe.Ao.and(ed.HasInsertAndReplaceRange,ed.InsertMode.isEqualTo("replace")),title:ne.N("accept.insert","Insert")}]})),at.P.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,ee.fK)(new Yh({id:"hideSuggestWidget",precondition:ed.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:Qh,kbExpr:ie.u.textInputFocus,primary:9,secondary:[1033]}})),(0,ee.fK)(new Yh({id:"selectNextSuggestion",precondition:oe.Ao.and(ed.Visible,ed.MultipleSuggestions),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:Qh,kbExpr:ie.u.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,ee.fK)(new Yh({id:"selectNextPageSuggestion",precondition:oe.Ao.and(ed.Visible,ed.MultipleSuggestions),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:Qh,kbExpr:ie.u.textInputFocus,primary:12,secondary:[2060]}})),(0,ee.fK)(new Yh({id:"selectLastSuggestion",precondition:oe.Ao.and(ed.Visible,ed.MultipleSuggestions),handler:e=>e.selectLastSuggestion()})),(0,ee.fK)(new Yh({id:"selectPrevSuggestion",precondition:oe.Ao.and(ed.Visible,ed.MultipleSuggestions),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:Qh,kbExpr:ie.u.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,ee.fK)(new Yh({id:"selectPrevPageSuggestion",precondition:oe.Ao.and(ed.Visible,ed.MultipleSuggestions),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:Qh,kbExpr:ie.u.textInputFocus,primary:11,secondary:[2059]}})),(0,ee.fK)(new Yh({id:"selectFirstSuggestion",precondition:oe.Ao.and(ed.Visible,ed.MultipleSuggestions),handler:e=>e.selectFirstSuggestion()})),(0,ee.fK)(new Yh({id:"toggleSuggestionDetails",precondition:ed.Visible,handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:Qh,kbExpr:ie.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:td,group:"right",order:1,when:oe.Ao.and(ed.DetailsVisible,ed.CanResolve),title:ne.N("detail.more","show less")},{menuId:td,group:"right",order:1,when:oe.Ao.and(ed.DetailsVisible.toNegated(),ed.CanResolve),title:ne.N("detail.less","show more")}]})),(0,ee.fK)(new Yh({id:"toggleExplainMode",precondition:ed.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2133}})),(0,ee.fK)(new Yh({id:"toggleSuggestionFocus",precondition:ed.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:Qh,kbExpr:ie.u.textInputFocus,primary:2570,mac:{primary:778}}})),(0,ee.fK)(new Yh({id:"insertBestCompletion",precondition:oe.Ao.and(ie.u.textInputFocus,oe.Ao.equals("config.editor.tabCompletion","on"),Cd.AtEnd,ed.Visible.toNegated(),wd.OtherSuggestions.toNegated(),gd.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest((0,yi.Kn)(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:Qh,primary:2}})),(0,ee.fK)(new Yh({id:"insertNextSuggestion",precondition:oe.Ao.and(ie.u.textInputFocus,oe.Ao.equals("config.editor.tabCompletion","on"),wd.OtherSuggestions,ed.Visible.toNegated(),gd.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:Qh,kbExpr:ie.u.textInputFocus,primary:2}})),(0,ee.fK)(new Yh({id:"insertPrevSuggestion",precondition:oe.Ao.and(ie.u.textInputFocus,oe.Ao.equals("config.editor.tabCompletion","on"),wd.OtherSuggestions,ed.Visible.toNegated(),gd.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:Qh,kbExpr:ie.u.textInputFocus,primary:1026}})),(0,ee.Qr)(class extends ee.R6{constructor(){super({id:"editor.action.resetSuggestSize",label:ne.N("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){qh.get(t).resetWidgetSize()}});class Jh extends me.JT{constructor(e,t){super(),this.editor=e,this.suggestControllerPreselector=t,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentInlineCompletion=void 0,this.onDidChangeEmitter=new Vt.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new pe.pY((()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())}),100)),this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const i=qh.get(this.editor);if(i){this._register(i.registerSelector({priority:100,select:(e,t,n)=>{const o=this.editor.getModel(),s=bl(o,this.suggestControllerPreselector());if(!s)return-1;const r=ve.L.lift(t),a=function(e,t){let i;for(const n of e)(void 0===i||t(n,i)>0)&&(i=n);return i}(n.map(((e,t)=>{const n=Xh(i,r,e,this.isShiftKeyPressed),a=bl(o,n);var l,d;if(a)return{index:t,valid:(l=s.range,d=a.range,l.startLineNumber===d.startLineNumber&&l.startColumn===d.startColumn&&(l.endLineNumber<d.endLineNumber||l.endLineNumber===d.endLineNumber&&l.endColumn<=d.endColumn)&&s.text.startsWith(a.text)),prefixLength:a.text.length,suggestItem:e}})).filter((e=>e&&e.valid)),(l=e=>e.prefixLength,d=(e,t)=>e-t,(e,t)=>d(l(e),l(t))));var l,d;return a?a.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(i.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(i.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)}))),this._register(i.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(Vt.ju.once(i.model.onDidTrigger)((e=>{t()})))}this.update(this._isActive)}get state(){if(this._isActive)return{selectedItemAsInlineCompletion:this._currentInlineCompletion}}update(e){const t=this.getInlineCompletion();let i=!1;var n,o;(n=this._currentInlineCompletion)===(o=t)||n&&o&&n.range.equalsRange(o.range)&&n.text===o.text&&n.command===o.command||(this._currentInlineCompletion=t,i=!0),this._isActive!==e&&(this._isActive=e,i=!0),i&&this.onDidChangeEmitter.fire()}getInlineCompletion(){const e=qh.get(this.editor);if(!e)return;if(!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem();return t?Xh(e,this.editor.getPosition(),t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=qh.get(this.editor);e&&e.stopForceRenderingAbove()}forceRenderingAbove(){const e=qh.get(this.editor);e&&e.forceRenderingAbove()}}function Xh(e,t,i,n){if(Array.isArray(i.completion.additionalTextEdits)&&i.completion.additionalTextEdits.length>0)return{text:"",range:be.e.fromPositions(t,t)};let{insertText:o}=i.completion;if(4&i.completion.insertTextRules){const i=(new Tl).parse(o),n=e.editor.getModel();if(i.children.length>100)return;Ql.adjustWhitespace(n,t,i,!0,!0),o=i.toString()}const s=e.getOverwriteInfo(i,n);return{text:o,range:be.e.fromPositions(t.delta(0,-s.overwriteBefore),t.delta(0,Math.max(s.overwriteAfter,0)))}}var ec=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class tc extends ll{constructor(e,t){super(e),this.cache=t,this.suggestionInlineCompletionSource=this._register(new Jh(this.editor,(()=>{var e,t;return null===(t=null===(e=this.cache.value)||void 0===e?void 0:e.completions[0])||void 0===t?void 0:t.toLiveInlineCompletion()}))),this.updateOperation=this._register(new me.XK),this.updateCacheSoon=this._register(new pe.pY((()=>this.updateCache()),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange((()=>{this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const e=this.ghostText;e&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,e.parts.map((e=>e.lines.length-1)).reduce(((e,t)=>e+t),0))),this.minReservedLineCount>=1&&this.isSuggestionPreviewEnabled()?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()}))),this._register(this.cache.onDidChange((()=>{this.onDidChangeEmitter.fire()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.isSuggestionPreviewEnabled()&&(this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire())}))),this._register((0,me.OF)((()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove())))}get isActive(){return void 0!==this.suggestionInlineCompletionSource.state}isSuggestionPreviewEnabled(){return this.editor.getOption(105).preview}updateCache(){return ec(this,void 0,void 0,(function*(){const e=this.suggestionInlineCompletionSource.state;if(!e||!e.selectedItemAsInlineCompletion)return;const t={text:e.selectedItemAsInlineCompletion.text,range:e.selectedItemAsInlineCompletion.range},i=this.editor.getPosition(),n=(0,pe.PG)((e=>ec(this,void 0,void 0,(function*(){let n;try{n=yield vl(i,this.editor.getModel(),{triggerKind:st.bw.Automatic,selectedSuggestionInfo:t},e)}catch(e){return void(0,it.dL)(e)}e.isCancellationRequested||(this.cache.setValue(this.editor,n,st.bw.Automatic),this.onDidChangeEmitter.fire())})))),o=new ml(n,st.bw.Automatic);this.updateOperation.value=o,yield n,this.updateOperation.value===o&&this.updateOperation.clear()}))}get ghostText(){var e,t;if(!this.isSuggestionPreviewEnabled())return;const i=this.suggestionInlineCompletionSource.state,n=bl(this.editor.getModel(),null==i?void 0:i.selectedItemAsInlineCompletion),o=bl(this.editor.getModel(),null===(t=null===(e=this.cache.value)||void 0===e?void 0:e.completions[0])||void 0===t?void 0:t.toLiveInlineCompletion()),s=o&&n&&o.text.startsWith(n.text)&&o.range.equalsRange(n.range)?o:n||o,r=n?((null==s?void 0:s.text.length)||0)-n.text.length:0;return(e=>{const t=this.editor.getOptions().get(105).previewMode;return e?hl(e,this.editor.getModel(),t,this.editor.getPosition(),r)||new sl(e.range.endLineNumber,[],this.minReservedLineCount):void 0})(s)}}class ic extends me.JT{constructor(){super(...arguments),this.onDidChangeEmitter=new Vt.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new me.XK)}get targetModel(){var e;return null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object}setTargetModel(e){var t,i,n;(null===(t=this.currentModelRef.value)||void 0===t?void 0:t.object)!==e&&(this.currentModelRef.clear(),this.currentModelRef.value=e?(i=e,n=e.onDidChange((()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})),{object:i,dispose:()=>null==n?void 0:n.dispose()}):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var e,t;return this.hasCachedGhostText||(this.cachedGhostText=null===(t=null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object)||void 0===t?void 0:t.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(e){var t;null===(t=this.targetModel)||void 0===t||t.setExpanded(e)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let nc=class extends ic{constructor(e,t){super(),this.editor=e,this.commandService=t,this.sharedCache=this._register(new oc),this.suggestWidgetAdapterModel=this._register(new tc(this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(new gl(this.editor,this.sharedCache,this.commandService)),this._register(this.suggestWidgetAdapterModel.onDidChange((()=>{this.updateModel()}))),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(e){var t;const i=null===(t=this.activeInlineCompletionsModel)||void 0===t?void 0:t.ghostText;return!!i&&i.parts.some((t=>e.containsPosition(new ve.L(i.lineNumber,t.column))))}triggerInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.trigger(st.bw.Explicit)}commitInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.hide()}showNextInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showNext()}showPreviousInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showPrevious()}hasMultipleInlineCompletions(){var e,t,i,n,o;return t=this,i=void 0,o=function*(){const t=yield null===(e=this.activeInlineCompletionsModel)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}))}};nc=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,at.H)],nc);class oc extends me.JT{constructor(){super(...arguments),this.onDidChangeEmitter=new Vt.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new me.XK)}get value(){return this.cache.value}setValue(e,t,i){this.cache.value=new fl(e,t,(()=>this.onDidChangeEmitter.fire()),i)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var sc=i(6401),rc={};rc.styleTagTransform=Y(),rc.setAttributes=q(),rc.insert=j().bind(null,"head"),rc.domAPI=K(),rc.insertStyleElement=G(),H()(sc.Z,rc),sc.Z&&sc.Z.locals&&sc.Z.locals;var ac,lc=i(80919),dc=i(12062),hc=i(25508),cc=i(10626),uc=i(12954),gc=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},pc=function(e,t){return function(i,n){t(i,n,e)}};const mc=null===(ac=window.trustedTypes)||void 0===ac?void 0:ac.createPolicy("editorGhostText",{createHTML:e=>e});let fc=class extends me.JT{constructor(e,t,i,n){super(),this.editor=e,this.model=t,this.instantiationService=i,this.modeService=n,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(_c,this.editor)),this.additionalLinesWidget=this._register(new bc(this.editor,this.modeService.languageIdCodec)),this.viewMoreContentWidget=void 0,this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(29)||e.hasChanged(104)||e.hasChanged(87)||e.hasChanged(82)||e.hasChanged(44)||e.hasChanged(43)||e.hasChanged(58))&&this.update()}))),this._register((0,me.OF)((()=>{var e;this.disposed=!0,this.update(),null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0}))),this._register(t.onDidChange((()=>{this.update()}))),this.update()}shouldShowHoverAtViewZone(e){return this.additionalLinesWidget.viewZoneId===e}update(){var e;const t=this.model.ghostText;if(!this.editor.hasModel()||!t||this.disposed)return this.partsWidget.clear(),void this.additionalLinesWidget.clear();const i=new Array,n=new Array;function o(e,t){if(n.length>0){const i=n[n.length-1];t&&i.decorations.push(new cc.Kp(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)n.push({content:i,decorations:t?[new cc.Kp(1,i.length+1,t,0)]:[]})}const s=this.editor.getModel().getLineContent(t.lineNumber);let r;this.editor.getModel().getLineTokens(t.lineNumber);let a=0;for(const e of t.parts){let t=e.lines;void 0===r?(i.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):o([s.substring(a,e.column-1)],void 0),t.length>0&&(o(t,"ghost-text"),void 0===r&&e.column<=s.length&&(r=e.column)),a=e.column-1}void 0!==r&&o([s.substring(a)],void 0),this.partsWidget.setParts(t.lineNumber,i,void 0!==r?{column:r,length:s.length+1-r}:void 0),this.additionalLinesWidget.updateLines(t.lineNumber,n,t.additionalReservedLineCount),t.parts.some((e=>e.lines.length<0))?this.viewMoreContentWidget=this.renderViewMoreLines(new ve.L(t.lineNumber,this.editor.getModel().getLineMaxColumn(t.lineNumber)),"",0):(null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(e,t,i){const n=this.editor.getOption(43),o=document.createElement("div");o.className="suggest-preview-additional-widget",da.V.applyFontInfoSlow(o,n);const s=document.createElement("span");s.className="content-spacer",s.append(t),o.append(s);const r=document.createElement("span");r.className="content-newline suggest-preview-text",r.append("⏎ "),o.append(r);const a=new me.SL,l=document.createElement("div");return l.className="button suggest-preview-text",l.append(`+${i} lines…`),a.add(Et.mu(l,"mousedown",(e=>{var t;null===(t=this.model)||void 0===t||t.setExpanded(!0),e.preventDefault(),this.editor.focus()}))),o.append(l),new wc(this.editor,e,o,a)}};fc=gc([pc(2,Dt.TG),pc(3,Zi.h)],fc);let _c=class{constructor(e,t,i,n){this.editor=e,this.codeEditorService=t,this.themeService=i,this.contextKeyService=n,this.decorationIds=[],this.disposableStore=new me.SL}dispose(){this.clear(),this.disposableStore.dispose()}clear(){this.editor.deltaDecorations(this.decorationIds,[]),this.disposableStore.clear()}setParts(e,t,i){this.disposableStore.clear();const n=this.themeService.getColorTheme(),o=n.getColor(ye.N5);let s,r;o&&(s=String(o.rgba.a),r=Ki.Il.Format.CSS.format(vc(o)));const a=n.getColor(ye.x3);let l;a&&(l=`2px dashed ${a}`);const d=this.editor.getModel();if(!d)return;const{tabSize:h}=d.getOptions(),c=d.getLineContent(e)||"";let u=0,g="";const p=new Array;i&&p.push({range:be.e.fromPositions(new ve.L(e,i.column),new ve.L(e,i.column+i.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});const m=this.contextKeyService.getContextKeyValue("config.editor.useInjectedText"),f=void 0===m||!!m;this.decorationIds=this.editor.deltaDecorations(this.decorationIds,t.map((t=>{g+=c.substring(u,t.column-1),u=t.column-1;const i=f?t.text:this.renderSingleLineText(t.text,g,h,!1),n=this.disposableStore.add(function(e,t,i,n){const o="0-ghost-text-"+Cc++;return e.registerDecorationType("ghost-text",o,n),{dispose(){e.removeDecorationType(o)},resolve:()=>e.resolveDecorationOptions(o,!0)}}(this.codeEditorService,0,0,{after:{contentText:i,opacity:s,color:r,border:l,fontWeight:t.preview?"bold":"normal"}}));return{range:be.e.fromPositions(new ve.L(e,t.column)),options:f?{description:"ghost-text",after:{content:i,inlineClassName:t.preview?"ghost-text-decoration-preview":"ghost-text-decoration"},showIfCollapsed:!0}:Object.assign({},n.resolve())}})).concat(p))}renderSingleLineText(e,t,i,n){const o=t+e,s=lc.io.visibleColumnsByColumns(o,i);let r="",a=t.length+1;for(const t of e){if("\t"===t){const e=s[a+1]-s[a];if(n){r+="→";for(let t=1;t<e;t++)r+=" "}else for(let t=0;t<e;t++)r+=" "}else r+=" "===t?n?"·":" ":t;a+=1}return r}};function vc(e){const{r:t,b:i,g:n}=e.rgba;return new Ki.Il(new Ki.VS(t,n,i,255))}_c=gc([pc(1,We.$),pc(2,xe.XE),pc(3,oe.i6)],_c);class bc{constructor(e,t){this.editor=e,this.languageIdCodec=t,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:o}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const s=Math.max(t.length,i);if(s>0){const i=document.createElement("div");!function(e,t,i,n,o){const s=n.get(29),r=n.get(104),a=n.get(82),l=n.get(44),d=n.get(43),h=n.get(58),c=(0,hc.l$)(1e4);c.appendASCIIString('<div class="suggest-preview-text">');for(let e=0,n=i.length;e<n;e++){const n=i[e],u=n.content;c.appendASCIIString('<div class="view-line'),c.appendASCIIString('" style="top:'),c.appendASCIIString(String(e*h)),c.appendASCIIString('px;width:1000000px;">');const g=Xe.$i(u),p=Xe.Ut(u),m=dc.A.createEmpty(u,o);(0,uc.d1)(new uc.IJ(d.isMonospace&&!s,d.canUseHalfwidthRightwardsArrow,u,!1,g,p,0,m,n.decorations,t,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,r,"none",a,l!==Ci.n0.OFF,null),c),c.appendASCIIString("</div>")}c.appendASCIIString("</div>"),da.V.applyFontInfoSlow(e,d);const u=c.build(),g=mc?mc.createHTML(u):u;e.innerHTML=g}(i,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:s,domNode:i})}}))}}let Cc=0;class wc extends me.JT{constructor(e,t,i,n){super(),this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(n),this._register((0,me.OF)((()=>{this.editor.removeContentWidget(this)}))),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}(0,xe.Ic)(((e,t)=>{const i=e.getColor(ye.N5);if(i){const e=String(i.rgba.a),n=Ki.Il.Format.CSS.format(vc(i));t.addRule(`.monaco-editor .ghost-text-decoration { opacity: ${e} !important; color: ${n} !important; }`),t.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${i.toString()} !important; }`),t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { opacity: ${e} !important; color: ${n} !important; }`)}const n=e.getColor(ye.x3);n&&(t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${n}; }`),t.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${n}; }`),t.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${n}; }`))}));var yc=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Sc=function(e,t){return function(i,n){t(i,n,e)}},Lc=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let xc=class e extends me.JT{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.triggeredExplicitly=!1,this.activeController=this._register(new me.XK),this._register(this.editor.onDidChangeModel((()=>{this.updateModelController()}))),this._register(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(105)&&this.updateModelController(),e.hasChanged(54)&&this.updateModelController()}))),this.updateModelController()}static get(t){return t.getContribution(e.ID)}get activeModel(){var e;return null===(e=this.activeController.value)||void 0===e?void 0:e.model}updateModelController(){const e=this.editor.getOption(105),t=this.editor.getOption(54);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(Nc,this.editor):void 0}shouldShowHoverAt(e){var t;return(null===(t=this.activeModel)||void 0===t?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){var t,i;return(null===(i=null===(t=this.activeController.value)||void 0===t?void 0:t.widget)||void 0===i?void 0:i.shouldShowHoverAtViewZone(e))||!1}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),null===(e=this.activeModel)||void 0===e||e.triggerInlineCompletion()}commit(){var e;null===(e=this.activeModel)||void 0===e||e.commitInlineCompletion()}hide(){var e;null===(e=this.activeModel)||void 0===e||e.hideInlineCompletion()}showNextInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return Lc(this,void 0,void 0,(function*(){const t=yield null===(e=this.activeModel)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};xc.inlineSuggestionVisible=new oe.uy("inlineSuggestionVisible",!1,ne.N("inlineSuggestionVisible","Whether an inline suggestion is visible")),xc.inlineSuggestionHasIndentation=new oe.uy("inlineSuggestionHasIndentation",!1,ne.N("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),xc.inlineSuggestionHasIndentationLessThanTabSize=new oe.uy("inlineSuggestionHasIndentationLessThanTabSize",!0,ne.N("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),xc.ID="editor.contrib.ghostTextController",xc=yc([Sc(1,Dt.TG)],xc);class kc{constructor(e){this.contextKeyService=e,this.inlineCompletionVisible=xc.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=xc.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=xc.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let Nc=class extends me.JT{constructor(e,t,i){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.contextKeys=new kc(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(nc,this.editor)),this.widget=this._register(this.instantiationService.createInstance(fc,this.editor,this.model)),this._register((0,me.OF)((()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)}))),this._register(this.model.onDidChange((()=>{this.updateContextKeys()}))),this.updateContextKeys()}updateContextKeys(){var e;this.contextKeys.inlineCompletionVisible.set(void 0!==(null===(e=this.model.activeInlineCompletionsModel)||void 0===e?void 0:e.ghostText));let t=!1,i=!0;const n=this.model.inlineCompletionsModel.ghostText;if(this.model.activeInlineCompletionsModel&&n&&n.parts.length>0){const{column:e,lines:o}=n.parts[0],s=o[0];if(e<=this.editor.getModel().getLineIndentColumn(n.lineNumber)){let e=(0,Xe.LC)(s);-1===e&&(e=s.length-1),t=e>0;const n=this.editor.getModel().getOptions().tabSize;i=il.i.visibleColumnFromColumn(s,e+1,n)<n}}this.contextKeys.inlineCompletionSuggestsIndentation.set(t),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(i)}};Nc=yc([Sc(1,Dt.TG),Sc(2,oe.i6)],Nc);const Dc=ee._l.bindToContribution(xc.get),Ec=new Dc({id:nl,precondition:xc.inlineSuggestionVisible,handler(e){e.commit(),e.editor.focus()}});(0,ee.fK)(Ec),ao.W.registerKeybindingRule({primary:2,weight:200,id:Ec.id,when:oe.Ao.and(Ec.precondition,ie.u.tabMovesFocus.toNegated(),xc.inlineSuggestionHasIndentationLessThanTabSize)}),(0,ee.fK)(new Dc({id:"editor.action.inlineSuggest.hide",precondition:xc.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(e){e.hide()}}));class Ic extends ee.R6{constructor(){super({id:Ic.ID,label:ne.N("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:oe.Ao.and(ie.u.writable,xc.inlineSuggestionVisible),kbOpts:{weight:100,primary:601}})}run(e,t){return Lc(this,void 0,void 0,(function*(){const e=xc.get(t);e&&(e.showNextInlineCompletion(),t.focus())}))}}Ic.ID="editor.action.inlineSuggest.showNext";class Tc extends ee.R6{constructor(){super({id:Tc.ID,label:ne.N("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:oe.Ao.and(ie.u.writable,xc.inlineSuggestionVisible),kbOpts:{weight:100,primary:599}})}run(e,t){return Lc(this,void 0,void 0,(function*(){const e=xc.get(t);e&&(e.showPreviousInlineCompletion(),t.focus())}))}}Tc.ID="editor.action.inlineSuggest.showPrevious";class Mc extends ee.R6{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:ne.N("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:ie.u.writable})}run(e,t){return Lc(this,void 0,void 0,(function*(){const e=xc.get(t);e&&e.trigger()}))}}(0,ee._K)(xc.ID,xc),(0,ee.Qr)(Mc),(0,ee.Qr)(Ic),(0,ee.Qr)(Tc);var Rc=function(e,t){return function(i,n){t(i,n,e)}};class Ac{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}}let Oc=class{constructor(e,t,i,n,o,s,r,a){this._editor=e,this._hover=t,this._commandService=i,this._menuService=n,this._contextKeyService=o,this._modeService=s,this._openerService=r,this.accessibilityService=a}suggestHoverAnchor(e){const t=xc.get(this._editor);if(!t)return null;if(8===e.target.type){const i=e.target.detail;if(t.shouldShowHoverAtViewZone(i.viewZoneId))return new tr(1e3,this,be.e.fromPositions(i.positionBefore||i.position,i.positionBefore||i.position))}return 7===e.target.type&&e.target.range&&t.shouldShowHoverAt(e.target.range)||6===e.target.type&&e.target.range&&e.target.detail&&e.target.detail.mightBeForeignElement&&t.shouldShowHoverAt(e.target.range)?new tr(1e3,this,e.target.range):null}computeSync(e,t){const i=xc.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new Ac(this,e.range,i)]:[]}renderHoverParts(e,t,i){const n=new me.SL,o=e[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(o,t,n);const s=n.add(this._menuService.createMenu(Se.eH.InlineCompletionsActions,this._contextKeyService)),r=i.addAction({label:ne.N("showNextInlineSuggestion","Next"),commandId:Ic.ID,run:()=>this._commandService.executeCommand(Ic.ID)}),a=i.addAction({label:ne.N("showPreviousInlineSuggestion","Previous"),commandId:Tc.ID,run:()=>this._commandService.executeCommand(Tc.ID)});i.addAction({label:ne.N("acceptInlineSuggestion","Accept"),commandId:Ec.id,run:()=>this._commandService.executeCommand(Ec.id)});const l=[r,a];for(const e of l)e.setEnabled(!1);o.hasMultipleSuggestions().then((e=>{for(const t of l)t.setEnabled(e)}));for(const[e,t]of s.getActions())for(const e of t)e instanceof Se.U8&&i.addAction({label:e.label,commandId:e.item.id,run:()=>this._commandService.executeCommand(e.item.id)});return n}renderScreenReaderText(e,t,i){var n,o;const s=Et.$,r=s("div.hover-row.markdown-hover"),a=Et.R3(r,s("div.hover-contents")),l=i.add(new ca({editor:this._editor},this._modeService,this._openerService)),d=e=>{i.add(l.onDidRenderAsync((()=>{a.className="hover-contents code-hover-contents",this._hover.onContentsChanged()})));const t=ne.N("inlineSuggestionFollows","Suggestion:"),n=i.add(l.render((new B.W5).appendText(t).appendCodeblock("text",e)));a.replaceChildren(n.element)},h=null===(o=null===(n=e.controller.activeModel)||void 0===n?void 0:n.inlineCompletionsModel)||void 0===o?void 0:o.ghostText;if(h){const e=this._editor.getModel().getLineContent(h.lineNumber);d(h.renderForScreenReader(e))}t.appendChild(r)}};Oc=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Rc(2,at.H),Rc(3,Se.co),Rc(4,oe.i6),Rc(5,Zi.h),Rc(6,aa.v4),Rc(7,dn.F)],Oc);var Pc=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Fc=function(e,t){return function(i,n){t(i,n,e)}},Bc=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Wc=Et.$;let Vc=class extends me.JT{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=Wc("div.hover-row.status-bar"),this.actionsElement=Et.R3(this.hoverElement,Wc("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(Fs.render(this.actionsElement,e,i))}append(e){const t=Et.R3(this.actionsElement,e);return this._hasContent=!0,t}};Vc=Pc([Fc(0,Mt.d)],Vc);class Hc{constructor(e,t){this._participants=t,this._editor=e,this._result=[],this._anchor=null}setAnchor(e){this._anchor=e,this._result=[]}clearResult(){this._result=[]}static _getLineDecorations(e,t){if(1!==t.type)return[];const i=e.getModel(),n=t.range.startLineNumber,o=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,s=e.range.endLineNumber===n?e.range.endColumn:o;return!(i>t.range.startColumn||t.range.endColumn>s)}))}computeAsync(e){return Bc(this,void 0,void 0,(function*(){const t=this._anchor;if(!this._editor.hasModel()||!t)return Promise.resolve([]);const i=Hc._getLineDecorations(this._editor,t),n=yield Promise.all(this._participants.map((n=>this._computeAsync(n,i,t,e))));return(0,tt.xH)(n)}))}_computeAsync(e,t,i,n){return Bc(this,void 0,void 0,(function*(){return e.computeAsync?e.computeAsync(i,t,n):[]}))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Hc._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,tt.kX)(t)}onResult(e,t){this._result=t?e.concat(this._result):this._result.concat(e)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){if(this._anchor)for(const e of this._participants)if(e.createLoadingMessage){const t=e.createLoadingMessage(this._anchor);if(t)return this._result.slice(0).concat([t])}return this._result.slice(0)}}let zc=class e extends Bs.${constructor(e,t,i,n,o){super(),this._hoverVisibleKey=t,this._keybindingService=n,this._contextKeyService=o,this.allowEditorOverflow=!0,this._participants=[i.createInstance(Js,e,this),i.createInstance(fa,e,this),i.createInstance(Oc,e,this),i.createInstance(tl,e,this)],this._editor=e,this._isVisible=!1,this._stoleFocus=!1,this._renderDisposable=null,this._hover=this._register(new Ps),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this.onkeydown(this._hover.containerDomNode,(e=>{e.equals(9)&&this.hide()})),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(43)&&this._updateFont()}))),this._editor.onDidLayoutChange((()=>this.layout())),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1,this._messages=[],this._lastAnchor=null,this._computer=new Hc(this._editor,this._participants),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._preferAbove=this._editor.getOption(52).above,this._hoverOperation=new Xs(this._computer,(e=>this._withResult(e,!0)),null,(e=>this._withResult(e,!1)),this._editor.getOption(52).delay),this._register(Et.mu(this.getDomNode(),Et.tw.FOCUS,(()=>{this._colorPicker&&this.getDomNode().classList.add("colorpicker-hover")}))),this._register(Et.mu(this.getDomNode(),Et.tw.BLUR,(()=>{this.getDomNode().classList.remove("colorpicker-hover")}))),this._register(e.onDidChangeConfiguration((()=>{this._hoverOperation.setHoverTime(this._editor.getOption(52).delay),this._preferAbove=this._editor.getOption(52).above}))),this._register(st.RW.onDidChange((()=>{this._isVisible&&this._lastAnchor&&this._messages.length>0&&(this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastAnchor,this._messages))})))}dispose(){this._hoverOperation.cancel(),this._editor.removeContentWidget(this),super.dispose()}getId(){return e.ID}getDomNode(){return this._hover.containerDomNode}_shouldShowAt(e){const t=e.target.type;if(6===t)return!0;if(7===t){const t=this._editor.getOption(43).typicalHalfwidthCharacterWidth/2,i=e.target.detail;if(i&&!i.isAfterLines&&"number"==typeof i.horizontalDistanceToText&&i.horizontalDistanceToText<t)return!0}return!1}maybeShowAt(e){var t;const i=[];for(const t of this._participants)if("function"==typeof t.suggestHoverAnchor){const n=t.suggestHoverAnchor(e);n&&i.push(n)}if(this._shouldShowAt(e)&&e.target.range){const n=[...(null===(t=e.target.element)||void 0===t?void 0:t.classList.values())||[]].find((e=>e.startsWith("ced-colorBox")))&&e.target.range.endColumn-e.target.range.startColumn==1?new be.e(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1):e.target.range;i.push(new er(0,n))}return 0!==i.length&&(i.sort(((e,t)=>t.priority-e.priority)),this._startShowingAt(i[0],0,!1),!0)}_showAt(e,t,i){this._showAtPosition=e,this._showAtRange=t,this._hoverVisibleKey.set(!0),this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=i,i&&this._hover.containerDomNode.focus()}getPosition(){if(this._isVisible){let e=this._preferAbove;return!e&&this._contextKeyService.getContextKeyValue(ed.Visible.key)&&(e=!0),{position:this._showAtPosition,range:this._showAtRange,preference:e?[1,2]:[2,1]}}return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(43);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=""+i/t,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(.66*this._editor.getLayoutInfo().width,500)}px`}onModelDecorationsChanged(){this._isChangingDecorations||this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAtRange(e,t,i){this._startShowingAt(new er(0,e),t,i)}_startShowingAt(e,t,i){if(!this._lastAnchor||!this._lastAnchor.equals(e)){if(this._hoverOperation.cancel(),this._isVisible)if(this._showAtPosition&&this._lastAnchor&&e.canAdoptVisibleHover(this._lastAnchor,this._showAtPosition)){const t=this._messages.filter((t=>t.isValidForHoverAnchor(e)));if(0===t.length)this.hide();else{if(t.length===this._messages.length)return;this._renderMessages(e,t)}}else this.hide();this._lastAnchor=e,this._computer.setAnchor(e),this._shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._lastAnchor=null,this._hoverOperation.cancel(),this._isVisible&&(setTimeout((()=>{this._isVisible||this._hoverVisibleKey.set(!1)}),0),this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus()),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null}isColorPickerVisible(){return!!this._colorPicker}setColorPicker(e){this._colorPicker=e}onContentsChanged(){this._hover.onContentsChanged()}_withResult(e,t){this._messages=e,this._lastAnchor&&this._messages.length>0?this._renderMessages(this._lastAnchor,this._messages):t&&this.hide()}_renderMessages(t,i){this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null;let n=1073741824,o=i[0].range,s=null,r=document.createDocumentFragment();const a=new me.SL,l=new Map;for(const e of i)n=Math.min(n,e.range.startColumn),o=be.e.plusRange(o,e.range),e.forceShowAtRange&&(s=e.range),l.has(e.owner)||l.set(e.owner,[]),l.get(e.owner).push(e);const d=a.add(new Vc(this._keybindingService));for(const[e,t]of l)a.add(e.renderHoverParts(t,r,d));d.hasContent&&r.appendChild(d.hoverElement),this._renderDisposable=a,r.hasChildNodes()&&(s?this._showAt(s.getStartPosition(),s,this._shouldFocus):this._showAt(new ve.L(t.range.startLineNumber,n),o,this._shouldFocus),this._updateContents(r)),this._colorPicker&&this._colorPicker.layout(),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,o?[{range:o,options:e._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}};zc.ID="editor.contrib.modesContentHoverWidget",zc._DECORATION_OPTIONS=we.qx.register({description:"content-hover-highlight",className:"hoverHighlight"}),zc=Pc([Fc(2,Dt.TG),Fc(3,Mt.d),Fc(4,oe.i6)],zc);const Kc=Et.$;class Uc{constructor(e){this._editor=e,this._lineNumber=-1,this._result=[]}setLineNumber(e){this._lineNumber=e,this._result=[]}clearResult(){this._result=[]}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const t=n.options.glyphMarginHoverMessage;t&&!(0,B.CP)(t)&&i.push(...(0,tt._2)(t).map(e))}return i}onResult(e,t){this._result=this._result.concat(e)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class jc extends Bs.${constructor(e,t,i=aa.SW){super(),this._renderDisposeables=this._register(new me.SL),this._editor=e,this._isVisible=!1,this._messages=[],this._lastLineNumber=-1,this._hover=this._register(new Ps),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new ca({editor:this._editor},t,i)),this._computer=new Uc(this._editor),this._hoverOperation=new Xs(this._computer,(e=>this._withResult(e)),void 0,(e=>this._withResult(e)),300),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(43)&&this._updateFont()}))),this._editor.addOverlayWidget(this)}dispose(){this._hoverOperation.cancel(),this._editor.removeOverlayWidget(this),super.dispose()}getId(){return jc.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),o=this._editor.getOption(58),s=i-n-(this._hover.containerDomNode.clientHeight-o)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(s),0)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start(0))}hide(){this._lastLineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const e of t){const t=Kc("div.hover-row.markdown-hover"),n=Et.R3(t,Kc("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(e.value));n.appendChild(o.element),i.appendChild(t)}this._updateContents(i),this._showAt(e)}}jc.ID="editor.contrib.modesGlyphHoverWidget";var $c=function(e,t){return function(i,n){t(i,n,e)}};let qc=class e{constructor(e,t,i,n,o){this._editor=e,this._instantiationService=t,this._openerService=i,this._modeService=n,this._toUnhook=new me.SL,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((e=>{e.hasChanged(52)&&(this._unhookEvents(),this._hookEvents())})),this._hoverVisibleKey=ie.u.hoverVisible.bindTo(o)}static get(t){return t.getContribution(e.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(52);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._toUnhook.add(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e)))),this._toUnhook.add(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged())))):(this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._toUnhook.add(this._editor.onMouseLeave(e)),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){var e,t;null===(e=this._contentWidget)||void 0===e||e.onModelDecorationsChanged(),null===(t=this._glyphWidget)||void 0===t||t.onModelDecorationsChanged()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target.type;9!==t||e.target.detail!==zc.ID?12===t&&e.target.detail===jc.ID||(12!==t&&e.target.detail!==jc.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseMove(e){var t,i,n,o,s;let r=e.target.type;if((!this._isMouseDown||!this._hoverClicked)&&(!this._isHoverSticky||9!==r||e.target.detail!==zc.ID)&&(!this._isHoverSticky||(null===(i=null===(t=e.event.browserEvent.view)||void 0===t?void 0:t.getSelection())||void 0===i?void 0:i.isCollapsed))&&(this._isHoverSticky||9!==r||e.target.detail!==zc.ID||!(null===(n=this._contentWidget)||void 0===n?void 0:n.isColorPickerVisible()))&&(!this._isHoverSticky||12!==r||e.target.detail!==jc.ID)){if(this._isHoverEnabled)return this._getOrCreateContentWidget().maybeShowAt(e)?void(null===(o=this._glyphWidget)||void 0===o||o.hide()):2===r&&e.target.position?(null===(s=this._contentWidget)||void 0===s||s.hide(),this._glyphWidget||(this._glyphWidget=new jc(this._editor,this._modeService,this._openerService)),void this._glyphWidget.startShowingAt(e.target.position.lineNumber)):void this._hideWidgets();this._hideWidgets()}}_onKeyDown(e){5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||(this._hoverClicked=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(i=this._contentWidget)||void 0===i||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(zc,this._editor,this._hoverVisibleKey)),this._contentWidget}isColorPickerVisible(){var e;return(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i){this._getOrCreateContentWidget().startShowingAtRange(e,t,i)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};qc.ID="editor.contrib.hover",qc=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([$c(1,Dt.TG),$c(2,aa.v4),$c(3,Zi.h),$c(4,oe.i6)],qc);class Zc extends ee.R6{constructor(){super({id:"editor.action.showHover",label:ne.N({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2087),weight:100}})}run(e,t){if(!t.hasModel())return;let i=qc.get(t);if(!i)return;const n=t.getPosition(),o=new be.e(n.lineNumber,n.column,n.lineNumber,n.column),s=2===t.getOption(2);i.showContentHover(o,1,s)}}class Gc extends ee.R6{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:ne.N({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){let i=qc.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const o=new be.e(n.lineNumber,n.column,n.lineNumber,n.column);Ts.get(t).startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(o,1,!0)}))}}(0,ee._K)(qc.ID,qc),(0,ee.Qr)(Zc),(0,ee.Qr)(Gc),(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le.pt);i&&t.addRule(`.monaco-editor .hoverHighlight { background-color: ${i}; }`);const n=e.getColor(Le.yJ);n&&t.addRule(`.monaco-editor .monaco-hover { background-color: ${n}; }`);const o=e.getColor(Le.CN);o&&(t.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${o}; }`),t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${o.transparent(.5)}; }`));const s=e.getColor(Le.ur);s&&t.addRule(`.monaco-editor .monaco-hover a { color: ${s}; }`);const r=e.getColor(Le.sg);r&&t.addRule(`.monaco-editor .monaco-hover a:hover { color: ${r}; }`);const a=e.getColor(Le.Sb);a&&t.addRule(`.monaco-editor .monaco-hover { color: ${a}; }`);const l=e.getColor(Le.Lo);l&&t.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${l}; }`);const d=e.getColor(Le.Sw);d&&t.addRule(`.monaco-editor .monaco-hover code { background-color: ${d}; }`)}));class Qc extends me.JT{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){var t;if(6!==e.target.type)return;if(![...(null===(t=e.target.element)||void 0===t?void 0:t.classList.values())||[]].find((e=>e.startsWith("ced-colorBox"))))return;if(!e.target.range)return;const i=this._editor.getContribution(qc.ID);if(!i.isColorPickerVisible()){const t=new be.e(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1);i.showContentHover(t,0,!1)}}}Qc.ID="editor.contrib.colorContribution",(0,ee._K)(Qc.ID,Qc);class Yc{constructor(e,t){this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length;if(i+n>e.length)return!1;for(let o=0;o<n;o++){const n=e.charCodeAt(i+o),s=t.charCodeAt(o);if(n!==s&&!(n>=65&&n<=90&&n+32===s||s>=65&&s<=90&&s+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,o,s){const r=e.startLineNumber,a=e.startColumn,l=e.endLineNumber,d=e.endColumn,h=o.getLineContent(r),c=o.getLineContent(l);let u,g=h.lastIndexOf(t,a-1+t.length),p=c.indexOf(i,d-1-i.length);if(-1!==g&&-1!==p)if(r===l)h.substring(g+t.length,p).indexOf(i)>=0&&(g=-1,p=-1);else{const e=h.substring(g+t.length),n=c.substring(0,p);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(g=-1,p=-1)}-1!==g&&-1!==p?(n&&g+t.length<h.length&&32===h.charCodeAt(g+t.length)&&(t+=" "),n&&p>0&&32===c.charCodeAt(p-1)&&(i=" "+i,p-=1),u=Yc._createRemoveBlockCommentOperations(new be.e(r,g+t.length+1,l,p+1),t,i)):(u=Yc._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===u.length?i:null);for(const e of u)s.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,i){let n=[];return be.e.isEmpty(e)?n.push(ol.h.delete(new be.e(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(ol.h.delete(new be.e(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(ol.h.delete(new be.e(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){let o=[];return be.e.isEmpty(e)?o.push(ol.h.replace(new be.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(ol.h.insert(new ve.L(e.startLineNumber,e.startColumn),t+(n?" ":""))),o.push(ol.h.insert(new ve.L(e.endLineNumber,e.endColumn),(n?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,n),s=vo.zu.getComments(o);s&&s.blockCommentStartToken&&s.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new te.Y(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new te.Y(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}class Jc{constructor(e,t,i,n,o,s){this._selection=e,this._tabSize=t,this._type=i,this._insertSpace=n,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o,this._ignoreFirstLine=s||!1}static _gatherPreflightCommentStrings(e,t,i){e.tokenizeIfCheap(t);const n=e.getLanguageIdAtPosition(t,1),o=vo.zu.getComments(n),s=o?o.lineCommentToken:null;if(!s)return null;let r=[];for(let e=0,n=i-t+1;e<n;e++)r[e]={ignore:!1,commentStr:s,commentStrOffset:0,commentStrLength:s.length};return r}static _analyzeLines(e,t,i,n,o,s,r){let a,l=!0;a=0===e||1!==e;for(let d=0,h=n.length;d<h;d++){const h=n[d],c=o+d;if(c===o&&r){h.ignore=!0;continue}const u=i.getLineContent(c),g=Xe.LC(u);if(-1!==g){if(l=!1,h.ignore=!1,h.commentStrOffset=g,a&&!Yc._haystackHasNeedleAtOffset(u,h.commentStr,g)&&(0===e?a=!1:1===e||(h.ignore=!0)),a&&t){const e=g+h.commentStrLength;e<u.length&&32===u.charCodeAt(e)&&(h.commentStrLength+=1)}}else h.ignore=s,h.commentStrOffset=u.length}if(0===e&&l){a=!1;for(let e=0,t=n.length;e<t;e++)n[e].ignore=!1}return{supported:!0,shouldRemoveComments:a,lines:n}}static _gatherPreflightData(e,t,i,n,o,s,r){const a=Jc._gatherPreflightCommentStrings(i,n,o);return null===a?{supported:!1}:Jc._analyzeLines(e,t,i,a,n,s,r)}_executeLineComments(e,t,i,n){let o;i.shouldRemoveComments?o=Jc._createRemoveLineCommentsOperations(i.lines,n.startLineNumber):(Jc._normalizeInsertionPoint(e,i.lines,n.startLineNumber,this._tabSize),o=this._createAddLineCommentsOperations(i.lines,n.startLineNumber));const s=new ve.L(n.positionLineNumber,n.positionColumn);for(let i=0,n=o.length;i<n;i++)t.addEditOperation(o[i].range,o[i].text),be.e.isEmpty(o[i].range)&&be.e.getStartPosition(o[i].range).equals(s)&&e.getLineContent(s.lineNumber).length+1===s.column&&(this._deltaColumn=(o[i].text||"").length);this._selectionId=t.trackSelection(n)}_attemptRemoveBlockComment(e,t,i,n){let o=t.startLineNumber,s=t.endLineNumber,r=n.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn),a=e.getLineContent(o).lastIndexOf(i,r-1),l=e.getLineContent(s).indexOf(n,t.endColumn-1-i.length);return-1!==a&&-1===l&&(l=e.getLineContent(o).indexOf(n,a+i.length),s=o),-1===a&&-1!==l&&(a=e.getLineContent(s).lastIndexOf(i,l),o=s),!t.isEmpty()||-1!==a&&-1!==l||(a=e.getLineContent(o).indexOf(i),-1!==a&&(l=e.getLineContent(o).indexOf(n,a+i.length))),-1!==a&&32===e.getLineContent(o).charCodeAt(a+i.length)&&(i+=" "),-1!==l&&32===e.getLineContent(s).charCodeAt(l-1)&&(n=" "+n,l-=1),-1!==a&&-1!==l?Yc._createRemoveBlockCommentOperations(new be.e(o,a+i.length+1,s,l+1),i,n):null}_executeBlockComment(e,t,i){e.tokenizeIfCheap(i.startLineNumber);let n=e.getLanguageIdAtPosition(i.startLineNumber,1),o=vo.zu.getComments(n);if(!o||!o.blockCommentStartToken||!o.blockCommentEndToken)return;const s=o.blockCommentStartToken,r=o.blockCommentEndToken;let a=this._attemptRemoveBlockComment(e,i,s,r);if(!a){if(i.isEmpty()){const t=e.getLineContent(i.startLineNumber);let n=Xe.LC(t);-1===n&&(n=t.length),a=Yc._createAddBlockCommentOperations(new be.e(i.startLineNumber,n+1,i.startLineNumber,t.length+1),s,r,this._insertSpace)}else a=Yc._createAddBlockCommentOperations(new be.e(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),s,r,this._insertSpace);1===a.length&&(this._deltaColumn=s.length+1)}this._selectionId=t.trackSelection(i);for(const e of a)t.addEditOperation(e.range,e.text)}getEditOperations(e,t){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine)return t.addEditOperation(new be.e(i.startLineNumber,e.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===e.getLineCount()?"":"\n"),void(this._selectionId=t.trackSelection(i));i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=Jc._gatherPreflightData(this._type,this._insertSpace,e,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine);return n.supported?this._executeLineComments(e,t,n,i):this._executeBlockComment(e,t,i)}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new te.Y(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){let i=[];for(let n=0,o=e.length;n<o;n++){const o=e[n];o.ignore||i.push(ol.h.delete(new be.e(t+n,o.commentStrOffset+1,t+n,o.commentStrOffset+o.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){let i=[];const n=this._insertSpace?" ":"";for(let o=0,s=e.length;o<s;o++){const s=e[o];s.ignore||i.push(ol.h.insert(new ve.L(t+o,s.commentStrOffset+1),s.commentStr+n))}return i}static nextVisibleColumn(e,t,i,n){return i?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,i,n){let o,s,r=1073741824;for(let o=0,s=t.length;o<s;o++){if(t[o].ignore)continue;const s=e.getLineContent(i+o);let a=0;for(let e=0,i=t[o].commentStrOffset;a<r&&e<i;e++)a=Jc.nextVisibleColumn(a,n,9===s.charCodeAt(e),1);a<r&&(r=a)}r=Math.floor(r/n)*n;for(let a=0,l=t.length;a<l;a++){if(t[a].ignore)continue;const l=e.getLineContent(i+a);let d=0;for(o=0,s=t[a].commentStrOffset;d<r&&o<s;o++)d=Jc.nextVisibleColumn(d,n,9===l.charCodeAt(o),1);t[a].commentStrOffset=d>r?o-1:o}}}class Xc extends ee.R6{constructor(e,t){super(t),this._type=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getModel().getOptions(),o=t.getOption(19),s=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));s.sort(((e,t)=>be.e.compareRangesUsingStarts(e.selection,t.selection)));let r=s[0];for(let e=1;e<s.length;e++){const t=s[e];r.selection.endLineNumber===t.selection.startLineNumber&&(r.index<t.index?t.ignoreFirstLine=!0:(r.ignoreFirstLine=!0,r=t))}for(const e of s)i.push(new Jc(e.selection,n.tabSize,this._type,o.insertSpace,o.ignoreEmptyLines,e.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class eu extends ee.R6{constructor(){super({id:"editor.action.blockComment",label:ne.N("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:Se.eH.MenubarEditMenu,group:"5_insert",title:ne.N({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){if(!t.hasModel())return;const i=t.getOption(19),n=[],o=t.getSelections();for(const e of o)n.push(new Yc(e,i.insertSpace));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}(0,ee.Qr)(class extends Xc{constructor(){super(0,{id:"editor.action.commentLine",label:ne.N("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:Se.eH.MenubarEditMenu,group:"5_insert",title:ne.N({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}),(0,ee.Qr)(class extends Xc{constructor(){super(1,{id:"editor.action.addCommentLine",label:ne.N("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2081),weight:100}})}}),(0,ee.Qr)(class extends Xc{constructor(){super(2,{id:"editor.action.removeCommentLine",label:ne.N("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2099),weight:100}})}}),(0,ee.Qr)(eu);var tu=function(e,t){return function(i,n){t(i,n,e)}};let iu=class e{constructor(e,t,i,n,o,s){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=o,this._menuService=s,this._toDispose=new me.SL,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&Et.Ay(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}static get(t){return t.getContribution(e.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(20))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(e.event.preventDefault(),e.event.stopPropagation(),6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(20))return;if(!this._editor.hasModel())return;if(!this._contextMenuService)return void this._editor.focus();const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?Se.eH.SimpleEditorContext:Se.eH.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),o=n.getActions({arg:e.uri});n.dispose();for(let t of o){const[,n]=t;let o=0;for(const t of n)if(t instanceof Se.NZ){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new It.wY(t.id,t.label,n)),o++)}else i.push(t),o++;o&&i.push(new It.Z0)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(52);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),i=Et.i(this._editor.getDomNode()),n=i.left+e.left,o=i.top+e.top+e.height;t={x:n,y:o}}const n=this._editor.getOption(113)&&!Fe.gn;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:n?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new Sn.g(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new Sn.g(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:i})}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};iu.ID="editor.contrib.contextmenu",iu=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([tu(1,Tt.i),tu(2,Tt.u),tu(3,oe.i6),tu(4,Mt.d),tu(5,Se.co)],iu);class nu extends ee.R6{constructor(){super({id:"editor.action.showContextMenu",label:ne.N("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:ie.u.textInputFocus,primary:1092,weight:100}})}run(e,t){iu.get(t).showContextMenu()}}(0,ee._K)(iu.ID,iu),(0,ee.Qr)(nu);class ou{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i<t;i++)if(!this.selections[i].equalsSelection(e.selections[i]))return!1;return!0}}class su{constructor(e,t,i){this.cursorState=e,this.scrollTop=t,this.scrollLeft=i}}class ru extends me.JT{constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new ou(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new su(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}static get(e){return e.getContribution(ru.ID)}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new su(new ou(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new su(new ou(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}ru.ID="editor.contrib.cursorUndoRedoController";class au extends ee.R6{constructor(){super({id:"cursorUndo",label:ne.N("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:ie.u.textInputFocus,primary:2099,weight:100}})}run(e,t,i){ru.get(t).cursorUndo()}}class lu extends ee.R6{constructor(){super({id:"cursorRedo",label:ne.N("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){ru.get(t).cursorRedo()}}(0,ee._K)(ru.ID,ru),(0,ee.Qr)(au),(0,ee.Qr)(lu);var du=i(19844),hu={};hu.styleTagTransform=Y(),hu.setAttributes=q(),hu.insert=j().bind(null,"head"),hu.domAPI=K(),hu.insertStyleElement=G(),H()(du.Z,hu),du.Z&&du.Z.locals&&du.Z.locals;class cu{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){let i=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new be.e(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new te.Y(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new te.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber<this.selection.endLineNumber?this.targetSelection=new te.Y(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new te.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,(this.selection.startLineNumber,this.selection.endLineNumber,this.targetPosition.column-this.selection.endColumn+this.selection.startColumn),this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new te.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn):this.targetSelection=this.selection}computeCursorState(e,t){return this.targetSelection}}function uu(e){return Fe.dz?e.altKey:e.ctrlKey}class gu extends me.JT{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(31)&&!this._editor.getOption(18)&&(uu(e)&&(this._modifierPressed=!0),this._mouseDown&&uu(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(31)&&!this._editor.getOption(18)&&(uu(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===gu.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(null===this._dragSelection){let e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}uu(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new ve.L(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){let e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:o}=e;i=[new te.Y(n,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new te.Y(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(uu(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(gu.ID,new cu(this._dragSelection,t,uu(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){let t=[{range:new be.e(e.lineNumber,e.column,e.lineNumber,e.column),options:gu._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,t),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}gu.ID="editor.contrib.dragAndDrop",gu.TRIGGER_KEY_VALUE=Fe.dz?6:5,gu._DECORATION_OPTIONS=we.qx.register({description:"dnd-target",className:"dnd-target"}),(0,ee._K)(gu.ID,gu);var pu=i(44993);class mu{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(const e of t){const t=e.options;if(t===mu._FIND_MATCH_DECORATION||t===mu._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(e.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,o=this._decorations.length;n<o;n++){let o=this._editor.getModel().getDecorationRange(this._decorations[n]);if(e.equalsRange(o)){t=this._decorations[n],i=n+1;break}}return null===this._highlightedDecorationId&&null===t||this._editor.changeDecorations((e=>{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,mu._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,mu._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){let e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new be.e(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,mu._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=mu._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){n=mu._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,s=Math.max(2,Math.ceil(3/i));let r=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,i=e.length;t<i;t++){const i=e[t].range;a+s>=i.startLineNumber?i.endLineNumber>a&&(a=i.endLineNumber):(o.push({range:new be.e(r,1,a,1),options:mu._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),r=i.startLineNumber,a=i.endLineNumber)}o.push({range:new be.e(r,1,a,1),options:mu._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let s=new Array(e.length);for(let t=0,i=e.length;t<i;t++)s[t]={range:e[t].range,options:n};this._decorations=i.deltaDecorations(this._decorations,s),this._overviewRulerApproximateDecorations=i.deltaDecorations(this._overviewRulerApproximateDecorations,o),this._rangeHighlightDecorationId&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach((e=>i.removeDecoration(e))),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,mu._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){let i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumber<e.lineNumber)return n;if(!(n.endColumn>e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;t<i;t++){let i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.startLineNumber<e.lineNumber)){if(n.startLineNumber>e.lineNumber)return n;if(!(n.startColumn<e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}}mu._CURRENT_FIND_MATCH_DECORATION=we.qx.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,xe.EN)(Le.Fm),position:Ce.sh.Center},minimap:{color:(0,xe.EN)(Le.KT),position:Ce.F5.Inline}}),mu._FIND_MATCH_DECORATION=we.qx.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,xe.EN)(Le.Fm),position:Ce.sh.Center},minimap:{color:(0,xe.EN)(Le.KT),position:Ce.F5.Inline}}),mu._FIND_MATCH_NO_OVERVIEW_DECORATION=we.qx.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),mu._FIND_MATCH_ONLY_OVERVIEW_DECORATION=we.qx.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,xe.EN)(Le.Fm),position:Ce.sh.Center}}),mu._RANGE_HIGHLIGHT_DECORATION=we.qx.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),mu._FIND_SCOPE_DECORATION=we.qx.register({description:"find-scope",className:"findScope",isWholeLine:!0});class fu{constructor(e,t,i){this._editorSelection=e,this._ranges=t,this._replaceStrings=i,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let e=[];for(let t=0;t<this._ranges.length;t++)e.push({range:this._ranges[t],text:this._replaceStrings[t]});e.sort(((e,t)=>be.e.compareRangesUsingStarts(e.range,t.range)));let i=[],n=e[0];for(let t=1;t<e.length;t++)n.range.endLineNumber===e[t].range.startLineNumber&&n.range.endColumn===e[t].range.startColumn?(n.range=n.range.plusRange(e[t].range),n.text=n.text+e[t].text):(i.push(n),n=e[t]);i.push(n);for(const e of i)t.addEditOperation(e.range,e.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}function _u(e,t){if(e&&""!==e[0]){const i=vu(e,t,"-"),n=vu(e,t,"_");return i&&!n?bu(e,t,"-"):!i&&n?bu(e,t,"_"):e[0].toUpperCase()===e[0]?t.toUpperCase():e[0].toLowerCase()===e[0]?t.toLowerCase():Xe.Kw(e[0][0])&&t.length>0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function vu(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function bu(e,t,i){const n=t.split(i),o=e[0].split(i);let s="";return n.forEach(((e,t)=>{s+=_u([o[t]],e)+i})),s.slice(0,-1)}class Cu{constructor(e){this.staticValue=e,this.kind=0}}class wu{constructor(e){this.pieces=e,this.kind=1}}class yu{constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new Cu(e[0].staticValue):this._state=new wu(e):this._state=new Cu("")}static fromStaticValue(e){return new yu([Su.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}buildReplaceString(e,t){if(0===this._state.kind)return t?_u(e,this._state.staticValue):this._state.staticValue;let i="";for(let t=0,n=this._state.pieces.length;t<n;t++){let n=this._state.pieces[t];if(null!==n.staticValue){i+=n.staticValue;continue}let o=yu._substitute(n.matchIndex,e);if(null!==n.caseOps&&n.caseOps.length>0){let e=[],t=n.caseOps.length,i=0;for(let s=0,r=o.length;s<r;s++){if(i>=t){e.push(o.slice(s));break}switch(n.caseOps[i]){case"U":e.push(o[s].toUpperCase());break;case"u":e.push(o[s].toUpperCase()),i++;break;case"L":e.push(o[s].toLowerCase());break;case"l":e.push(o[s].toLowerCase()),i++;break;default:e.push(o[s])}}o=e.join("")}i+=o}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(e<t.length)return(t[e]||"")+i;i=String(e%10)+i,e=Math.floor(e/10)}return"$"+i}}class Su{constructor(e,t,i){this.staticValue=e,this.matchIndex=t,i&&0!==i.length?this.caseOps=i.slice(0):this.caseOps=null}static staticValue(e){return new Su(e,-1,null)}static caseOps(e,t){return new Su(null,e,t)}}class Lu{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){0!==e.length&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,i){0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=Su.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=Su.caseOps(e,i),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=Su.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new yu(this._result)}}const xu=new oe.uy("findWidgetVisible",!1),ku=new oe.uy("findInputFocussed",!1),Nu=new oe.uy("replaceInputFocussed",!1),Du={primary:545,mac:{primary:2593}},Eu={primary:565,mac:{primary:2613}},Iu={primary:560,mac:{primary:2608}},Tu={primary:554,mac:{primary:2602}},Mu={primary:558,mac:{primary:2606}},Ru="editor.action.nextMatchFindAction",Au="editor.action.previousMatchFindAction",Ou="closeFindWidget",Pu="toggleFindCaseSensitive",Fu="toggleFindWholeWord",Bu="toggleFindRegex",Wu="toggleFindInSelection",Vu="togglePreserveCase",Hu="editor.action.replaceOne",zu="editor.action.replaceAll",Ku=19999;class Uu{constructor(e,t){this._toDispose=new me.SL,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new pe._F,this._decorations=new mu(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new pe.pY((()=>this.research(!1)),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,me.B9)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new be.e(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));let n=this._findMatches(i,!1,Ku);this._decorations.set(n,i);const o=this._editor.getSelection();let s=this._decorations.getCurrentMatchesPosition(o);if(0===s&&n.length>0){const e=(0,tt.lG)(n.map((e=>e.range)),(e=>be.e.compareRangesUsingStarts(e,o)>=0));s=e>0?e-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(35).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,o=this._editor.getModel();return t||1===n?(1===i?i=o.getLineCount():i--,n=o.getLineMaxColumn(i)):n--,new ve.L(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()<Ku){let t=this._decorations.matchBeforePosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),t=this._decorations.matchBeforePosition(e)),void(t&&this._setCurrentFindMatch(t))}if(this._cannotFind())return;let i=this._decorations.getFindScope(),n=Uu._getSearchRange(this._editor.getModel(),i);n.getEndPosition().isBefore(e)&&(e=n.getEndPosition()),e.isBefore(n.getStartPosition())&&(e=n.getEndPosition());let{lineNumber:o,column:s}=e,r=this._editor.getModel(),a=new ve.L(o,s),l=r.findPreviousMatch(this._state.searchString,a,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1);return l&&l.range.isEmpty()&&l.range.getStartPosition().equals(a)&&(a=this._prevSearchPosition(a),l=r.findPreviousMatch(this._state.searchString,a,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1)),l?t||n.containsRange(l.range)?void this._setCurrentFindMatch(l.range):this._moveToPrevMatch(l.range.getStartPosition(),!0):void 0}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,o=this._editor.getModel();return t||n===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,n=1):n++,new ve.L(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()<Ku){let t=this._decorations.matchAfterPosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),t=this._decorations.matchAfterPosition(e)),void(t&&this._setCurrentFindMatch(t))}let t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)}_getNextMatch(e,t,i,n=!1){if(this._cannotFind())return null;let o=this._decorations.getFindScope(),s=Uu._getSearchRange(this._editor.getModel(),o);s.getEndPosition().isBefore(e)&&(e=s.getStartPosition()),e.isBefore(s.getStartPosition())&&(e=s.getStartPosition());let{lineNumber:r,column:a}=e,l=this._editor.getModel(),d=new ve.L(r,a),h=l.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,t);return i&&h&&h.range.isEmpty()&&h.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),h=l.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,t)),h?n||s.containsRange(h.range)?h:this._getNextMatch(h.range.getEndPosition(),t,i,!0):null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?function(e){if(!e||0===e.length)return new yu(null);let t=[],i=new Lu(e);for(let n=0,o=e.length;n<o;n++){let s=e.charCodeAt(n);if(92!==s){if(36===s){if(n++,n>=o)break;let s=e.charCodeAt(n);if(36===s){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===s||38===s){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=s&&s<=57){let r=s-48;if(n+1<o){let o=e.charCodeAt(n+1);if(48<=o&&o<=57){n++,r=10*r+(o-48),i.emitUnchanged(n-2),i.emitMatchIndex(r,n+1,t),t.length=0;continue}}i.emitUnchanged(n-1),i.emitMatchIndex(r,n+1,t),t.length=0;continue}}}else{if(n++,n>=o)break;let s=e.charCodeAt(n);switch(s){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(s))}}}return i.finalize()}(this._state.replaceString):yu.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){let n=e.buildReplaceString(i.matches,this._state.preserveCase),o=new Re.T4(t,n);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new ve.L(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>Uu._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=Ku?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new pu.bc(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),o=i.getFullModelRange(),s=this._getReplacePattern();let r;const a=this._state.preserveCase;r=s.hasReplacementPatterns||a?n.replace(t,(function(){return s.buildReplaceString(arguments,a)})):n.replace(t,s.buildReplaceString(null,a));let l=new Re.hP(o,r,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern();let i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,o=i.length;e<o;e++)n[e]=t.buildReplaceString(i[e].matches,this._state.preserveCase);let o=new fu(this._editor.getSelection(),i.map((e=>e.range)),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),t=this._findMatches(e,!1,1073741824).map((e=>new te.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))),i=this._editor.getSelection();for(let e=0,n=t.length;e<n;e++)if(t[e].equalsRange(i)){t=[i].concat(t.slice(0,e)).concat(t.slice(e+1));break}this._editor.setSelections(t)}_executeEditorCommand(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}var ju=i(25876),$u={};$u.styleTagTransform=Y(),$u.setAttributes=q(),$u.insert=j().bind(null,"head"),$u.domAPI=K(),$u.insertStyleElement=G(),H()(ju.Z,$u),ju.Z&&ju.Z.locals&&ju.Z.locals;const qu={inputActiveOptionBorder:Ki.Il.fromHex("#007ACC00"),inputActiveOptionForeground:Ki.Il.fromHex("#FFFFFF"),inputActiveOptionBackground:Ki.Il.fromHex("#0E639C50")};class Zu extends Bs.${constructor(e){super(),this._onChange=this._register(new Vt.Q5),this.onChange=this._onChange.event,this._onKeyDown=this._register(new Vt.Q5),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},qu),e),this._checked=this._opts.isChecked;const t=["monaco-custom-checkbox"];this._opts.icon&&t.push(...Wt.dT.asClassNameArray(this._opts.icon)),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault()})),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),void e.preventDefault();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const Gu=ne.N("caseDescription","Match Case"),Qu=ne.N("wordsDescription","Match Whole Word"),Yu=ne.N("regexDescription","Use Regular Expression");class Ju extends Zu{constructor(e){super({icon:Wt.lA.caseSensitive,title:Gu+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Xu extends Zu{constructor(e){super({icon:Wt.lA.wholeWord,title:Qu+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class eg extends Zu{constructor(e){super({icon:Wt.lA.regex,title:Yu+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class tg extends Bs.${constructor(e,t,i,n){super(),this._hideSoon=this._register(new pe.pY((()=>this._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const o=n.getColorTheme().getColor(Le.PR),s=n.getColorTheme().getColor(Le.Pv),r=n.getColorTheme().getColor(Le.XE);this.caseSensitive=this._register(new Ju({appendTitle:this._keybindingLabelFor(Pu),isChecked:this._state.matchCase,inputActiveOptionBorder:o,inputActiveOptionForeground:s,inputActiveOptionBackground:r})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new Xu({appendTitle:this._keybindingLabelFor(Fu),isChecked:this._state.wholeWord,inputActiveOptionBorder:o,inputActiveOptionForeground:s,inputActiveOptionBackground:r})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new eg({appendTitle:this._keybindingLabelFor(Bu),isChecked:this._state.isRegex,inputActiveOptionBorder:o,inputActiveOptionForeground:s,inputActiveOptionBackground:r})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(Et.j_(this._domNode,(e=>this._onMouseOut()))),this._register(Et.nm(this._domNode,"mouseover",(e=>this._onMouseOver()))),this._applyTheme(n.getColorTheme()),this._register(n.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return tg.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(Le.PR),inputActiveOptionForeground:e.getColor(Le.Pv),inputActiveOptionBackground:e.getColor(Le.XE)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}function ig(e,t){return 1===e||2!==e&&t}tg.ID="editor.contrib.findOptionsWidget",(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le.D0);i&&t.addRule(`.monaco-editor .findOptionsWidget { background-color: ${i}; }`);const n=e.getColor(Le.Hf);n&&t.addRule(`.monaco-editor .findOptionsWidget { color: ${n}; }`);const o=e.getColor(Le.rh);o&&t.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${o}; }`);const s=e.getColor(Le.lR);s&&t.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${s}; }`)}));class ng extends me.JT{constructor(){super(),this._onFindReplaceStateChange=this._register(new Vt.Q5),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return ig(this._isRegexOverride,this._isRegex)}get wholeWord(){return ig(this._wholeWordOverride,this._wholeWord)}get matchCase(){return ig(this._matchCaseOverride,this._matchCase)}get preserveCase(){return ig(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(e,t,i){let n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},o=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,o=!0),void 0!==i&&(be.e.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;let o={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},s=!1;const r=this.isRegex,a=this.wholeWord,l=this.matchCase,d=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,s=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,s=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,s=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,s=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some((t=>!be.e.equalsRange(t,e)))})))||(this._searchScope=e.searchScope,o.searchScope=!0,s=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,s=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,r!==this.isRegex&&(s=!0,o.isRegex=!0),a!==this.wholeWord&&(s=!0,o.wholeWord=!0),l!==this.matchCase&&(s=!0,o.matchCase=!0),d!==this.preserveCase&&(s=!0,o.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=Ku}}var og=i(84233),sg={};sg.styleTagTransform=Y(),sg.setAttributes=q(),sg.insert=j().bind(null,"head"),sg.domAPI=K(),sg.insertStyleElement=G(),H()(og.Z,sg),og.Z&&og.Z.locals&&og.Z.locals;var rg=i(97691),ag=i(19498),lg={};lg.styleTagTransform=Y(),lg.setAttributes=q(),lg.insert=j().bind(null,"head"),lg.domAPI=K(),lg.insertStyleElement=G(),H()(ag.Z,lg),ag.Z&&ag.Z.locals&&ag.Z.locals;const dg=ne.N("defaultLabel","input");class hg extends Bs.${constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new Vt.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Vt.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Vt.Q5),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new Vt.Q5),this._onKeyUp=this._register(new Vt.Q5),this._onCaseSensitiveKeyDown=this._register(new Vt.Q5),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new Vt.Q5),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||dg,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const o=n.appendCaseSensitiveLabel||"",s=n.appendWholeWordsLabel||"",r=n.appendRegexLabel||"",a=n.history||[],l=!!n.flexibleHeight,d=!!n.flexibleWidth,h=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new rg.p(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:d,flexibleMaxHeight:h})),this.regex=this._register(new eg({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new Xu({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new Ju({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)}))),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let c=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=c.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%c.length:e.equals(15)&&(i=0===t?c.length-1:t-1),e.equals(9)?(c[t].blur(),this.inputBox.focus()):i>=0&&c[i].focus(),Et.zB.stop(e,!0)}}}));let u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.caseSensitive.domNode),u.appendChild(this.wholeWords.domNode),u.appendChild(this.regex.domNode),this.domNode.appendChild(u),e&&e.appendChild(this.domNode),this._register(Et.nm(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(Et.nm(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}const cg=ne.N("defaultLabel","input"),ug=ne.N("label.preserveCaseCheckbox","Preserve Case");class gg extends Zu{constructor(e){super({icon:Wt.lA.preserveCase,title:ug+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class pg extends Bs.${constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new Vt.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Vt.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Vt.Q5),this._onInput=this._register(new Vt.Q5),this._onKeyUp=this._register(new Vt.Q5),this._onPreserveCaseKeyDown=this._register(new Vt.Q5),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||cg,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const o=n.appendPreserveCaseLabel||"",s=n.history||[],r=!!n.flexibleHeight,a=!!n.flexibleWidth,l=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new rg.p(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:s,showHistoryHint:n.showHistoryHint,flexibleHeight:r,flexibleWidth:a,flexibleMaxHeight:l})),this.preserveCase=this._register(new gg({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let d=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=d.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%d.length:e.equals(15)&&(i=0===t?d.length-1:t-1),e.equals(9)?(d[t].blur(),this.inputBox.focus()):i>=0&&d[i].focus(),Et.zB.stop(e,!0)}}}));let h=document.createElement("div");h.className="controls",h.style.display=this._showOptionButtons?"block":"none",h.appendChild(this.preserveCase.domNode),this.domNode.appendChild(h),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var mg=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},fg=function(e,t){return function(i,n){t(i,n,e)}};const _g="historyNavigationWidget",vg="historyNavigationForwardsEnabled",bg="historyNavigationBackwardsEnabled";function Cg(e,t){return e.getContext(document.activeElement).getValue(t)}function wg(e,t){const i=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,i){new oe.uy(i,t).bindTo(e)}(i,t,_g),{scopedContextKeyService:i,historyNavigationForwardsEnablement:new oe.uy(vg,!0).bindTo(i),historyNavigationBackwardsEnablement:new oe.uy(bg,!0).bindTo(i)}}let yg=class extends hg{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(wg(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};yg=mg([fg(3,oe.i6)],yg);let Sg=class extends pg{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(wg(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};function Lg(e){var t,i;return"Up"===(null===(t=e.lookupKeybinding("history.showPrevious"))||void 0===t?void 0:t.getElectronAccelerator())&&"Down"===(null===(i=e.lookupKeybinding("history.showNext"))||void 0===i?void 0:i.getElectronAccelerator())}Sg=mg([fg(3,oe.i6)],Sg),ao.W.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:oe.Ao.and(oe.Ao.has(_g),oe.Ao.equals(bg,!0),ed.Visible.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{const t=Cg(e.get(oe.i6),_g);t&&t.historyNavigator.showPreviousValue()}}),ao.W.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:oe.Ao.and(oe.Ao.has(_g),oe.Ao.equals(vg,!0),ed.Visible.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{const t=Cg(e.get(oe.i6),_g);t&&t.historyNavigator.showNextValue()}});const xg=(0,xa.q5)("find-selection",Wt.lA.selection,ne.N("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),kg=(0,xa.q5)("find-collapsed",Wt.lA.chevronRight,ne.N("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Ng=(0,xa.q5)("find-expanded",Wt.lA.chevronDown,ne.N("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Dg=(0,xa.q5)("find-replace",Wt.lA.replace,ne.N("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Eg=(0,xa.q5)("find-replace-all",Wt.lA.replaceAll,ne.N("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Ig=(0,xa.q5)("find-previous-match",Wt.lA.arrowUp,ne.N("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Tg=(0,xa.q5)("find-next-match",Wt.lA.arrowDown,ne.N("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Mg=ne.N("label.find","Find"),Rg=ne.N("placeholder.find","Find"),Ag=ne.N("label.previousMatchButton","Previous Match"),Og=ne.N("label.nextMatchButton","Next Match"),Pg=ne.N("label.toggleSelectionFind","Find in Selection"),Fg=ne.N("label.closeButton","Close"),Bg=ne.N("label.replace","Replace"),Wg=ne.N("placeholder.replace","Replace"),Vg=ne.N("label.replaceButton","Replace"),Hg=ne.N("label.replaceAllButton","Replace All"),zg=ne.N("label.toggleReplaceButton","Toggle Replace"),Kg=ne.N("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Ku),Ug=ne.N("label.matchesLocation","{0} of {1}"),jg=ne.N("label.noResults","No results"),$g=419;let qg=69;const Zg="ctrlEnterReplaceAll.windows.donotask",Gg=Fe.dz?256:2048;class Qg{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function Yg(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function Jg(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEnd<i.value.length&&e.stopPropagation()}class Xg extends Bs.${constructor(e,t,i,n,o,s,r,a,l){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=i,this._contextViewProvider=n,this._keybindingService=o,this._contextKeyService=s,this._storageService=a,this._notificationService=l,this._ctrlEnterReplaceAllWarningPrompted=!!a.getBoolean(Zg,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new pe.vp(500),this._register((0,me.OF)((()=>this._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(80)&&(this._codeEditor.getOption(80)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(129)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(35)){const e=this._codeEditor.getOption(35).addExtraSpaceOnTop;e&&!this._viewZone&&(this._viewZone=new Qg(0),this._showViewZone()),!e&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((()=>{return e=this,t=void 0,n=function*(){if(this._isVisible){let e=yield this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}))),this._findInputFocused=ku.bindTo(s),this._findFocusTracker=this._register(Et.go(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=Nu.bindTo(s),this._replaceFocusTracker=this._register(Et.go(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(35).addExtraSpaceOnTop&&(this._viewZone=new Qg(0)),this._applyTheme(r.getColorTheme()),this._register(r.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return Xg.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(80)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=Et.w(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,it.dL)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=qg+"px",this._state.matchesCount>=Ku?this._matchesCount.title=Kg:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Ku&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=Xe.WU(Ug,i,t)}else e=jg;this._matchesCount.appendChild(document.createTextNode(e)),(0,F.Z9)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),qg=Math.max(qg,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===jg)return""===i?ne.N("ariaSearchNoResultEmpty","{0} found",e):ne.N("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=ne.N("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${n}`:n}return ne.N("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let i=!this._codeEditor.getOption(80);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(35).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(35).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Et.i(i),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=n.left+(o?o.left:0),r=o?o.top:0;if(this._viewZone&&r<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(t=!1);const i=Et.xQ(this._domNode).left;s>i&&(t=!1);const o=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(o?o.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(35).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(35).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new Qg(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;let o=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(74).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(Le.PR),inputActiveOptionBackground:e.getColor(Le.XE),inputActiveOptionForeground:e.getColor(Le.Pv),inputBackground:e.getColor(Le.sE),inputForeground:e.getColor(Le.zJ),inputBorder:e.getColor(Le.dt),inputValidationInfoBackground:e.getColor(Le._l),inputValidationInfoForeground:e.getColor(Le.YI),inputValidationInfoBorder:e.getColor(Le.EP),inputValidationWarningBackground:e.getColor(Le.RV),inputValidationWarningForeground:e.getColor(Le.SU),inputValidationWarningBorder:e.getColor(Le.C3),inputValidationErrorBackground:e.getColor(Le.p),inputValidationErrorForeground:e.getColor(Le._t),inputValidationErrorBorder:e.getColor(Le.OZ)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!Et.Uw(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,o=!1,s=!1;if(this._resized&&Et.w(this._domNode)>$g)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=Et.w(this._findInput.domNode));if(447+i>=t&&(o=!0),447+i-qg>=t&&(s=!0),447+i-qg>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",s),this._domNode.classList.toggle("reduced-find-widget",o),s||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._resized){this._findInput.inputBox.layout();let e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=Et.w(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||be.e.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|Gg)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Yg(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?Jg(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|Gg)?(this._keybindingService.dispatchEvent(e,e.target)||(Fe.ED&&Fe.tY&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(ne.N("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(Zg,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Yg(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?Jg(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new yg(null,this._contextViewProvider,{width:221,label:Mg,placeholder:Rg,appendCaseSensitiveLabel:this._keybindingLabelFor(Pu),appendWholeWordsLabel:this._keybindingLabelFor(Fu),appendRegexLabel:this._keybindingLabelFor(Bu),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>Lg(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),Fe.IJ&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new ep({label:Ag+this._keybindingLabelFor(Au),icon:Ig,onTrigger:()=>{this._codeEditor.getAction(Au).run().then(void 0,it.dL)}})),this._nextBtn=this._register(new ep({label:Og+this._keybindingLabelFor(Ru),icon:Tg,onTrigger:()=>{this._codeEditor.getAction(Ru).run().then(void 0,it.dL)}}));let e=document.createElement("div");e.className="find-part",e.appendChild(this._findInput.domNode);const t=document.createElement("div");t.className="find-actions",e.appendChild(t),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Zu({icon:xg,title:Pg+this._keybindingLabelFor(Wu),isChecked:!1})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),t.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new ep({label:Fg+this._keybindingLabelFor(Ou),icon:xa.s_,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),t.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new Sg(null,void 0,{label:Bg,placeholder:Wg,appendPreserveCaseLabel:this._keybindingLabelFor(Vu),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>Lg(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())}))),this._replaceBtn=this._register(new ep({label:Vg+this._keybindingLabelFor(Hu),icon:Dg,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new ep({label:Hg+this._keybindingLabelFor(zu),icon:Eg,onTrigger:()=>{this._controller.replaceAll()}}));let i=document.createElement("div");i.className="replace-part",i.appendChild(this._replaceInput.domNode);const n=document.createElement("div");n.className="replace-actions",i.appendChild(n),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new ep({label:zg,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Et.w(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(e),this._domNode.appendChild(i),this._resizeSash=new un.g(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let o=$g;this._register(this._resizeSash.onDidStart((()=>{o=Et.w(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;let t=o+e.startX-e.currentX;t<$g||t>(parseFloat(Et.Dx(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Et.w(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=Et.w(this._domNode);if(e<$g)return;let t=$g;if(!this._resized||e===$g){const e=this._codeEditor.getLayoutInfo();t=e.width-28-e.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Et.w(this._findInput.domNode)),this._findInput.inputBox.layout()})))}updateAccessibilitySupport(){const e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(2!==e)}}Xg.ID="editor.contrib.findWidget";class ep extends Bs.${constructor(e){super(),this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+xe.kS.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=t,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,(e=>{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown&&this._opts.onKeyDown(e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...xe.kS.asClassNameArray(kg)),this._domNode.classList.add(...xe.kS.asClassNameArray(Ng))):(this._domNode.classList.remove(...xe.kS.asClassNameArray(Ng)),this._domNode.classList.add(...xe.kS.asClassNameArray(kg)))}}(0,xe.Ic)(((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".findMatch",e.getColor(Le.MU)),i(".currentFindMatch",e.getColor(Le.ny)),i(".findScope",e.getColor(Le.jU)),i(".find-widget",e.getColor(Le.D0));const n=e.getColor(Le.rh);n&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const o=e.getColor(Le.Ei);o&&t.addRule(`.monaco-editor .findMatch { border: 1px ${"hc"===e.type?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const s=e.getColor(Le.pn);s&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${s}; padding: 1px; box-sizing: border-box; }`);const r=e.getColor(Le.gk);r&&t.addRule(`.monaco-editor .findScope { border: 1px ${"hc"===e.type?"dashed":"solid"} ${r}; }`);const a=e.getColor(Le.lR);a&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${a}; }`);const l=e.getColor(Le.Hf);l&&t.addRule(`.monaco-editor .find-widget { color: ${l}; }`);const d=e.getColor(Le.Id);d&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${d}; }`);const h=e.getColor(Le.Ng);if(h)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{const i=e.getColor(Le.D1);i&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${i}; }`)}const c=e.getColor(Le.lU);c&&t.addRule(`\n\t\t.monaco-editor .find-widget .button:not(.disabled):hover,\n\t\t.monaco-editor .find-widget .codicon-find-selection:hover {\n\t\t\tbackground-color: ${c} !important;\n\t\t}\n\t`);const u=e.getColor(Le.R8);u&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${u}; }`)}));var tp=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ip=function(e,t){return function(i,n){t(i,n,e)}},np=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function op(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)<524288)return e.getModel().getValueInRange(n);return null}let sp=class e extends me.JT{constructor(e,t,i,n){super(),this._editor=e,this._findWidgetVisible=xu.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._updateHistoryDelayer=new pe.vp(500),this._state=this._register(new ng),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{let e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(35).loop})})))}get editor(){return this._editor}static get(t){return t.getContribution(e.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!ku.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Xe.ec(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e){return np(this,void 0,void 0,(function*(){if(this.disposeModel(),!this._editor.hasModel())return;let t={isRevealed:!0};if("single"===e.seedSearchStringFromSelection){let i=op(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);i&&(this._state.isRegex?t.searchString=Xe.ec(i):t.searchString=i)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){let i=op(this._editor,e.seedSearchStringFromSelection);i&&(t.searchString=i)}if(!t.searchString&&e.seedSearchStringFromGlobalClipboard){let e=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(t.searchString=e)}if(e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),e.updateSearchScope){let e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(t.searchScope=e)}t.loop=e.loop,this._state.change(t,!1),this._model||(this._model=new Uu(this._editor,this._state))}))}start(e){return this._start(e)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._model.replaceAll(),!0)}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}getGlobalBufferTerm(){return np(this,void 0,void 0,(function*(){return this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}))}setGlobalBufferTerm(e){this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};sp.ID="editor.contrib.findController",sp=tp([ip(1,oe.i6),ip(2,Ei.Uy),ip(3,Ve.p)],sp);let rp=class extends sp{constructor(e,t,i,n,o,s,r,a){super(e,i,r,a),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._notificationService=s,this._widget=null,this._findOptionsWidget=null}_start(e){const t=Object.create(null,{_start:{get:()=>super._start}});return np(this,void 0,void 0,(function*(){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(35).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":n=!!i&&i.startLineNumber!==i.endLineNumber}e.updateSearchScope=n,yield t._start.call(this,e),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}))}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new Xg(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new tg(this._editor,this._state,this._keybindingService,this._themeService))}};rp=tp([ip(1,Tt.u),ip(2,oe.i6),ip(3,Mt.d),ip(4,xe.XE),ip(5,Qt.lT),ip(6,Ei.Uy),ip(7,Ve.p)],rp),(0,ee.rn)(new ee.jY({id:"actions.find",label:ne.N("startFindAction","Find"),alias:"Find",precondition:oe.Ao.or(ie.u.focus,oe.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Se.eH.MenubarEditMenu,group:"3_find",title:ne.N({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})).addImplementation(0,((e,t,i)=>{const n=sp.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(35).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(35).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(35).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop})}));class ap extends ee.R6{constructor(){super({id:"actions.findWithSelection",label:ne.N("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return np(this,void 0,void 0,(function*(){let e=sp.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),e.setGlobalBufferTerm(e.getState().searchString))}))}}class lp extends ee.R6{run(e,t){return np(this,void 0,void 0,(function*(){let e=sp.get(t);e&&!this._run(e)&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(35).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(35).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),this._run(e))}))}}class dp extends ee.R6{run(e,t){return np(this,void 0,void 0,(function*(){let e=sp.get(t);if(!e)return;const i="selection"===t.getOption(35).seedSearchStringFromSelection;let n=null;"never"!==t.getOption(35).seedSearchStringFromSelection&&(n=op(t,"single",i)),n&&e.setSearchString(n),this._run(e)||(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(35).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:i,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),this._run(e))}))}}(0,ee.rn)(new ee.jY({id:"editor.action.startFindReplaceAction",label:ne.N("startReplace","Replace"),alias:"Replace",precondition:oe.Ao.or(ie.u.focus,oe.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Se.eH.MenubarEditMenu,group:"3_find",title:ne.N({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})).addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(80))return!1;const n=sp.get(t);if(!n)return!1;const o=t.getSelection(),s=n.isFindInputFocused(),r=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&"never"!==t.getOption(35).seedSearchStringFromSelection&&!s,a=s||r?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(35).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(35).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop})})),(0,ee._K)(sp.ID,rp),(0,ee.Qr)(ap),(0,ee.Qr)(class extends lp{constructor(){super({id:Ru,label:ne.N("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:ie.u.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:oe.Ao.and(ie.u.focus,ku),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}),(0,ee.Qr)(class extends lp{constructor(){super({id:Au,label:ne.N("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:ie.u.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:oe.Ao.and(ie.u.focus,ku),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}),(0,ee.Qr)(class extends dp{constructor(){super({id:"editor.action.nextSelectionMatchFindAction",label:ne.N("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:ie.u.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}),(0,ee.Qr)(class extends dp{constructor(){super({id:"editor.action.previousSelectionMatchFindAction",label:ne.N("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:ie.u.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}});const hp=ee._l.bindToContribution(sp.get);(0,ee.fK)(new hp({id:Ou,precondition:xu,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:oe.Ao.and(ie.u.focus,oe.Ao.not("isComposing")),primary:9,secondary:[1033]}})),(0,ee.fK)(new hp({id:Pu,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:ie.u.focus,primary:Du.primary,mac:Du.mac,win:Du.win,linux:Du.linux}})),(0,ee.fK)(new hp({id:Fu,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:ie.u.focus,primary:Eu.primary,mac:Eu.mac,win:Eu.win,linux:Eu.linux}})),(0,ee.fK)(new hp({id:Bu,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:ie.u.focus,primary:Iu.primary,mac:Iu.mac,win:Iu.win,linux:Iu.linux}})),(0,ee.fK)(new hp({id:Wu,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:ie.u.focus,primary:Tu.primary,mac:Tu.mac,win:Tu.win,linux:Tu.linux}})),(0,ee.fK)(new hp({id:Vu,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:ie.u.focus,primary:Mu.primary,mac:Mu.mac,win:Mu.win,linux:Mu.linux}})),(0,ee.fK)(new hp({id:Hu,precondition:xu,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:ie.u.focus,primary:3094}})),(0,ee.fK)(new hp({id:Hu,precondition:xu,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:oe.Ao.and(ie.u.focus,Nu),primary:3}})),(0,ee.fK)(new hp({id:zu,precondition:xu,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:ie.u.focus,primary:2563}})),(0,ee.fK)(new hp({id:zu,precondition:xu,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:oe.Ao.and(ie.u.focus,Nu),primary:void 0,mac:{primary:2051}}})),(0,ee.fK)(new hp({id:"editor.action.selectAllMatches",precondition:xu,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:ie.u.focus,primary:515}}));var cp=i(82488),up={};up.styleTagTransform=Y(),up.setAttributes=q(),up.insert=j().bind(null,"head"),up.domAPI=K(),up.insertStyleElement=G(),H()(cp.Z,up),cp.Z&&cp.Z.locals&&cp.Z.locals;const gp=16777215,pp=4278190080;class mp{constructor(e,t,i){if(e.length!==t.length||e.length>65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(t,i)=>{let n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;i<n;i++){let n=this._startIndexes[i],o=this._endIndexes[i];if(n>gp||o>gp)throw new Error("startLineNumber or endLineNumber must not exceed "+gp);for(;e.length>0&&!t(n,o);)e.pop();let s=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&s)<<24),this._endIndexes[i]=o+((65280&s)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&gp}getEndLineNumber(e){return this._endIndexes[e]&gp}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){let t=e/32|0,i=e%32;return 0!=(this._collapseStates[t]&1<<i)}setCollapsed(e,t){let i=e/32|0,n=e%32,o=this._collapseStates[i];this._collapseStates[i]=t?o|1<<n:o&~(1<<n)}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n<this._types.length;n++)this._types[n]===e&&(this.setCollapsed(n,t),i=!0);return i}toRegion(e){return new fp(this,e)}getParentIndex(e){this.ensureParentIndices();let t=((this._startIndexes[e]&pp)>>>24)+((this._endIndexes[e]&pp)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t<i;){let n=Math.floor((t+i)/2);e<this.getStartLineNumber(n)?i=n:t=n+1}return t-1}findRange(e){let t=this.findIndex(e);if(t>=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t<this.length;t++)e[t]=`[${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;return e.join(", ")}}class fp{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class _p{constructor(e,t){this._updateEventEmitter=new Vt.Q5,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new mp(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,o=-1,s=-1;const r=e=>{for(;n<e;){const e=this._regions.getEndLineNumber(n),t=this._regions.isCollapsed(n);e<=o&&i.changeDecorationOptions(this._editorDecorationIds[n],this._decorationProvider.getDecorationOption(t,e<=s)),t&&e>s&&(s=e),n++}};for(let i of e){let e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,r(e);let i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),o=Math.max(o,this._regions.getEndLineNumber(e))}}r(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}update(e,t=[]){let i=[],n=-1,o=(o,s)=>{const r=e.getStartLineNumber(o),a=e.getEndLineNumber(o);s||(s=e.isCollapsed(o)),s&&((e,i)=>{for(let n of t)if(e<n&&n<=i)return!0;return!1})(r,a)&&(s=!1),e.setCollapsed(o,s);const l=this._textModel.getLineMaxColumn(r),d={startLineNumber:r,startColumn:Math.max(l-1,1),endLineNumber:r,endColumn:l};i.push({range:d,options:this._decorationProvider.getDecorationOption(s,a<=n)}),s&&a>n&&(n=a)},s=0,r=()=>{for(;s<this._regions.length;){let e=this._regions.isCollapsed(s);if(s++,e)return s-1}return-1},a=0,l=r();for(;-1!==l&&a<e.length;){let t=this._textModel.getDecorationRange(this._editorDecorationIds[l]);if(t){let i=t.startLineNumber;if(t.startColumn===Math.max(t.endColumn-1,1)&&this._textModel.getLineMaxColumn(i)===t.endColumn)for(;a<e.length;){let t=e.getStartLineNumber(a);if(!(i>=t))break;o(a,i===t),a++}}l=r()}for(;a<e.length;)o(a,!1),a++;this._editorDecorationIds=this._decorationProvider.deltaDecorations(this._editorDecorationIds,i),this._regions=e,this._isInitialized=!0,this._updateEventEmitter.fire({model:this})}getMemento(){let e=[];for(let t=0;t<this._regions.length;t++)if(this._regions.isCollapsed(t)){let i=this._textModel.getDecorationRange(this._editorDecorationIds[t]);if(i){let n=i.startLineNumber,o=i.endLineNumber+this._regions.getEndLineNumber(t)-this._regions.getStartLineNumber(t);e.push({startLineNumber:n,endLineNumber:o})}}if(e.length>0)return e}applyMemento(e){if(!Array.isArray(e))return;let t=[];for(let i of e){let e=this.getRegionAtLine(i.startLineNumber);e&&!e.isCollapsed&&t.push(e)}this.toggleCollapseState(t)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(e,t){let i=[];if(this._regions){let n=this._regions.findRange(e),o=1;for(;n>=0;){let e=this._regions.toRegion(n);t&&!t(e,o)||i.push(e),o++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let i=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let s=n,r=this._regions.length;s<r;s++){let n=this._regions.toRegion(s);if(!(this._regions.getStartLineNumber(s)<o))break;for(;e.length>0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,s=this._regions.length;e<s;e++){let n=this._regions.toRegion(e);if(!(this._regions.getStartLineNumber(e)<o))break;t&&!t(n)||i.push(n)}return i}}function vp(e,t,i=Number.MAX_VALUE,n){let o=[];if(n&&n.length>0)for(let s of n){let n=e.getRegionAtLine(s);if(n&&(n.isCollapsed!==t&&o.push(n),i>1)){let s=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&n<i));o.push(...s)}}else{let n=e.getRegionsInside(null,((e,n)=>e.isCollapsed!==t&&n<i));o.push(...n)}e.toggleCollapseState(o)}function bp(e,t,i,n){let o=[];for(let s of n){let n=e.getAllRegionsAtLine(s,((e,n)=>e.isCollapsed!==t&&n<=i));o.push(...n)}e.toggleCollapseState(o)}function Cp(e,t,i){let n=[];for(let t of i)n.push(e.getAllRegionsAtLine(t,void 0)[0]);let o=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(o)}function wp(e,t,i){let n=e.textModel,o=e.regions,s=[];for(let e=o.length-1;e>=0;e--)if(i!==o.isCollapsed(e)){let i=o.getStartLineNumber(e);t.test(n.getLineContent(i))&&s.push(o.toRegion(e))}e.toggleCollapseState(s)}function yp(e,t,i){let n=e.regions,o=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&o.push(n.toRegion(e));e.toggleCollapseState(o)}class Sp{constructor(e){this._updateEventEmitter=new Vt.Q5,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let e=!1,t=[],i=0,n=0,o=Number.MAX_VALUE,s=-1,r=this._foldingModel.regions;for(;i<r.length;i++){if(!r.isCollapsed(i))continue;let a=r.getStartLineNumber(i)+1,l=r.getEndLineNumber(i);o<=a&&l<=s||(!e&&n<this._hiddenRanges.length&&this._hiddenRanges[n].startLineNumber===a&&this._hiddenRanges[n].endLineNumber===l?(t.push(this._hiddenRanges[n]),n++):(e=!0,t.push(new be.e(a,1,l,1))),o=a,s=l)}(e||n<this._hiddenRanges.length)&&this.applyHiddenRanges(t)}applyMemento(e){if(!Array.isArray(e)||0===e.length)return!1;let t=[];for(let i of e){if(!i.startLineNumber||!i.endLineNumber)return!1;t.push(new be.e(i.startLineNumber+1,1,i.endLineNumber,1))}return this.applyHiddenRanges(t),!0}getMemento(){return this._hiddenRanges.map((e=>({startLineNumber:e.startLineNumber-1,endLineNumber:e.endLineNumber})))}applyHiddenRanges(e){this._hiddenRanges=e,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return null!==Lp(this._hiddenRanges,e)}adjustSelections(e){let t=!1,i=this._foldingModel.textModel,n=null,o=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=Lp(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,s=e.length;n<s;n++){let s=e[n],r=o(s.startLineNumber);r&&(s=s.setStartPosition(r,i.getLineMaxColumn(r)),t=!0);let a=o(s.endLineNumber);a&&(s=s.setEndPosition(a,i.getLineMaxColumn(a)),t=!0),e[n]=s}return t}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function Lp(e,t){let i=(0,tt.lG)(e,(e=>t<e.startLineNumber))-1;return i>=0&&e[i].endLineNumber>=t?e[i]:null}class xp{constructor(e){this.editorModel=e,this.id="indent"}dispose(){}compute(e){let t=vo.zu.getFoldingRules(this.editorModel.getLanguageId()),i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(function(e,t,i,n=5e3){const o=e.getOptions().tabSize;let s,r=new kp(n);i&&(s=new RegExp(`(${i.start.source})|(?:${i.end.source})`));let a=[],l=e.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let i=e.getLineCount();i>0;i--){let n,l=e.getLineContent(i),d=we.yO.computeIndentLevel(l,o),h=a[a.length-1];if(-1!==d){if(s&&(n=l.match(s))){if(!n[1]){a.push({indent:-2,endAbove:i,line:i});continue}{let e=a.length-1;for(;e>0&&-2!==a[e].indent;)e--;if(e>0){a.length=e+1,h=a[e],r.insertFirst(i,h.line,d),h.line=i,h.indent=d,h.endAbove=i;continue}}}if(h.indent>d){do{a.pop(),h=a[a.length-1]}while(h.indent>d);let e=h.endAbove-1;e-i>=1&&r.insertFirst(i,e,d)}h.indent===d?h.endAbove=i:a.push({indent:d,endAbove:i,line:i})}else t&&(h.endAbove=i)}return r.toIndentRanges(e)}(this.editorModel,i,n))}}class kp{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>gp||t>gp)return;let n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new mp(e,t)}{let t=0,i=this._indentOccurrences.length;for(let e=0;e<this._indentOccurrences.length;e++){let n=this._indentOccurrences[e];if(n){if(n+t>this._foldingRangesLimit){i=e;break}t+=n}}const n=e.getOptions().tabSize;let o=new Uint32Array(this._foldingRangesLimit),s=new Uint32Array(this._foldingRangesLimit);for(let r=this._length-1,a=0;r>=0;r--){let l=this._startIndexes[r],d=e.getLineContent(l),h=we.yO.computeIndentLevel(d,n);(h<i||h===i&&t++<this._foldingRangesLimit)&&(o[a]=l,s[a]=this._endIndexes[r],a++)}return new mp(o,s)}}}const Np={},Dp="syntax";class Ep{constructor(e,t,i,n=5e3){this.editorModel=e,this.providers=t,this.limit=n,this.id=Dp;for(const e of t)"function"==typeof e.onDidChange&&(this.disposables||(this.disposables=new me.SL),this.disposables.add(e.onDidChange(i)))}compute(e){return function(e,t,i){let n=null,o=e.map(((e,o)=>Promise.resolve(e.provideFoldingRanges(t,Np,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(n)||(n=[]);let i=t.getLineCount();for(let t of e)t.start>0&&t.end>t.start&&t.end<=i&&n.push({start:t.start,end:t.end,rank:o,kind:t.kind})}}),it.Cp)));return Promise.all(o).then((e=>n))}(this.providers,this.editorModel,e).then((e=>e?Tp(e,this.limit):null))}dispose(){var e;null===(e=this.disposables)||void 0===e||e.dispose()}}class Ip{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>gp||t>gp)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=n,this._types[o]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;i<this._length;i++)e[i]=this._startIndexes[i],t[i]=this._endIndexes[i];return new mp(e,t,this._types)}{let e=0,t=this._nestingLevelCounts.length;for(let i=0;i<this._nestingLevelCounts.length;i++){let n=this._nestingLevelCounts[i];if(n){if(n+e>this._foldingRangesLimit){t=i;break}e+=n}}let i=new Uint32Array(this._foldingRangesLimit),n=new Uint32Array(this._foldingRangesLimit),o=[];for(let s=0,r=0;s<this._length;s++){let a=this._nestingLevels[s];(a<t||a===t&&e++<this._foldingRangesLimit)&&(i[r]=this._startIndexes[s],n[r]=this._endIndexes[s],o[r]=this._types[s],r++)}return new mp(i,n,o)}}}function Tp(e,t){let i,n=e.sort(((e,t)=>{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),o=new Ip(t),s=[];for(let e of n)if(i){if(e.start>i.start)if(e.end<=i.end)s.push(i),i=e,o.add(e.start,e.end,e.kind&&e.kind.value,s.length);else{if(e.start>i.end){do{i=s.pop()}while(i&&e.start>i.end);i&&s.push(i),i=e}o.add(e.start,e.end,e.kind&&e.kind.value,s.length)}}else i=e,o.add(e.start,e.end,e.kind&&e.kind.value,s.length);return o.toIndentRanges()}const Mp="init";class Rp{constructor(e,t,i,n){if(this.editorModel=e,this.id=Mp,t.length){let o=t=>({range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=e.deltaDecorations([],t.map(o)),this.timeout=setTimeout(i,n)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(e){let t=[];if(this.decorationIds)for(let e of this.decorationIds){let i=this.editorModel.getDecorationRange(e);i&&t.push({start:i.startLineNumber,end:i.endLineNumber,rank:1})}return Promise.resolve(Tp(t,Number.MAX_VALUE))}}const Ap=(0,xa.q5)("folding-expanded",Wt.lA.chevronDown,(0,ne.N)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),Op=(0,xa.q5)("folding-collapsed",Wt.lA.chevronRight,(0,ne.N)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin."));class Pp{constructor(e){this.editor=e,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(e,t){return t?Pp.HIDDEN_RANGE_DECORATION:e?this.showFoldingHighlights?Pp.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:Pp.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?Pp.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:Pp.EXPANDED_VISUAL_DECORATION}deltaDecorations(e,t){return this.editor.deltaDecorations(e,t)}changeDecorations(e){return this.editor.changeDecorations(e)}}Pp.COLLAPSED_VISUAL_DECORATION=we.qx.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:xe.kS.asClassName(Op)}),Pp.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=we.qx.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:xe.kS.asClassName(Op)}),Pp.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=we.qx.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:xe.kS.asClassName(Ap)}),Pp.EXPANDED_VISUAL_DECORATION=we.qx.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+xe.kS.asClassName(Ap)}),Pp.HIDDEN_RANGE_DECORATION=we.qx.register({description:"folding-hidden-range-decoration",stickiness:1});const Fp=new oe.uy("foldingEnabled",!1);let Bp=class e extends me.JT{constructor(e,t){super(),this.contextKeyService=t,this.localToDispose=this._register(new me.SL),this.editor=e;const i=this.editor.getOptions();this._isEnabled=i.get(37),this._useFoldingProviders="indentation"!==i.get(38),this._unfoldOnClickAfterEndOfLine=i.get(41),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=i.get(40),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new Pp(e),this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===i.get(98),this.foldingDecorationProvider.showFoldingHighlights=i.get(39),this.foldingEnabled=Fp.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(37)&&(this._isEnabled=this.editor.getOptions().get(37),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(98)||e.hasChanged(39)){const e=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===e.get(98),this.foldingDecorationProvider.showFoldingHighlights=e.get(39),this.onModelContentChanged()}e.hasChanged(38)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(38),this.onFoldingStrategyChanged()),e.hasChanged(41)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(41)),e.hasChanged(40)&&(this._foldingImportsByDefault=this.editor.getOptions().get(40))}))),this.onModelChanged()}static get(t){return t.getContribution(e.ID)}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)return;if(!e||e.lineCount!==t.getLineCount())return;if(this._currentModelHasFoldedImports=!!e.foldedImports,!e.collapsedRegions)return;e.provider!==Dp&&e.provider!==Mp||(this.foldingStateMemento=e);const i=e.collapsedRegions;if(this.hiddenRangeModel.applyMemento(i)){const e=this.getFoldingModel();e&&e.then((e=>{if(e){this._restoringViewState=!0;try{e.applyMemento(i)}finally{this._restoringViewState=!1}}})).then(void 0,it.dL)}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new _p(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new Sp(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new pe.vp(200),this.cursorChangedScheduler=new pe.pY((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(st.aC.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((()=>this.onModelContentChanged()))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new xp(e),this._useFoldingProviders&&this.foldingModel){let t=st.aC.ordered(this.foldingModel.textModel);if(0===t.length&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new Rp(e,this.foldingStateMemento.collapsedRegions,(()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()}),3e4);t.length>0&&(this.rangeProvider=new Ep(e,t,(()=>this.onModelContentChanged())))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=this.getRangeProvider(e.textModel);let i=this.foldingRegionPromise=(0,pe.PG)((e=>t.compute(e)));return i.then((t=>{if(t&&i===this.foldingRegionPromise){let i;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=t.setCollapsedAllOfType(st.AD.Imports.value,!0);e&&(i=ot.ZF.capture(this.editor),this._currentModelHasFoldedImports=e)}let n=this.editor.getSelections(),o=n?n.map((e=>e.startLineNumber)):[];e.update(t,o),i&&i.restore(this.editor)}return e}))})).then(void 0,(e=>((0,it.dL)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){let t=this.editor.getSelections();if(t&&t.length>0){let i=[];for(let n of t){let t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,it.dL)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:const n=e.target.detail,o=e.target.element.offsetLeft;if(n.offsetX-o<5)return;i=!0;break;case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){let e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.getFoldingModel();if(!t||!this.mouseDownInfo||!e.target)return;let i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(o&&o.startLineNumber===i){if(n){if(4!==e.target.type)return}else{let e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(i))return}t.then((t=>{if(t){let o=t.getRegionAtLine(i);if(o&&o.startLineNumber===i){let s=o.isCollapsed;if(n||s){let n=[];if(e.event.altKey){let e=e=>!e.containedBy(o)&&!o.containedBy(e),i=t.getRegionsInside(null,e);for(const e of i)e.isCollapsed&&n.push(e);0===n.length&&(n=i)}else{let i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(o))e.isCollapsed===s&&n.push(e);!s&&i&&0!==n.length||n.push(o)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}})).then(void 0,it.dL)}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};Bp.ID="editor.contrib.folding",Bp=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,oe.i6)],Bp);class Wp extends ee.R6{runEditorCommand(e,t,i){let n=Bp.get(t);if(!n)return;let o=n.getFoldingModel();return o?(this.reportTelemetry(e,t),o.then((e=>{if(e){this.invoke(n,e,t,i);const o=t.getSelection();o&&n.reveal(o.getStartPosition())}}))):void 0}getSelectedLines(e){let t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function Vp(e){if(!yi.o8(e)){if(!yi.Kn(e))return!1;const t=e;if(!yi.o8(t.levels)&&!yi.hj(t.levels))return!1;if(!yi.o8(t.direction)&&!yi.HD(t.direction))return!1;if(!(yi.o8(t.selectionLines)||yi.kJ(t.selectionLines)&&t.selectionLines.every(yi.hj)))return!1}return!0}class Hp extends Wp{getFoldingLevel(){return parseInt(this.id.substr(Hp.ID_PREFIX.length))}invoke(e,t,i){!function(e,t,i,n){let o=e.getRegionsInside(null,((e,i)=>i===t&&true!==e.isCollapsed&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(o)}(t,this.getFoldingLevel(),0,this.getSelectedLines(i))}}Hp.ID_PREFIX="editor.foldLevel",Hp.ID=e=>Hp.ID_PREFIX+e,(0,ee._K)(Bp.ID,Bp),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.unfold",label:ne.N("unfoldAction.label","Unfold"),alias:"Unfold",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:3161,mac:{primary:2649},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:Vp,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let o=n&&n.levels||1,s=this.getLineNumbers(n,i);n&&"up"===n.direction?bp(t,!1,o,s):vp(t,!1,o,s)}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.unfoldRecursively",label:ne.N("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2137),weight:100}})}invoke(e,t,i,n){vp(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.fold",label:ne.N("foldAction.label","Fold"),alias:"Fold",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:Vp,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let o=this.getLineNumbers(n,i);const s=n&&n.levels,r=n&&n.direction;"number"!=typeof s&&"string"!=typeof r?function(e,t,i){let n=[];for(let t of i){let i=e.getAllRegionsAtLine(t,(e=>true!==e.isCollapsed));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}(t,0,o):"up"===r?bp(t,!0,s||1,o):vp(t,!0,s||1,o)}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.foldRecursively",label:ne.N("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2135),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);vp(t,!0,Number.MAX_VALUE,n)}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.foldAll",label:ne.N("foldAllAction.label","Fold All"),alias:"Fold All",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2069),weight:100}})}invoke(e,t,i){vp(t,!0)}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.unfoldAll",label:ne.N("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2088),weight:100}})}invoke(e,t,i){vp(t,!1)}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.foldAllBlockComments",label:ne.N("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2133),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())yp(t,st.AD.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=vo.zu.getComments(e.getLanguageId());n&&n.blockCommentStartToken&&wp(t,new RegExp("^\\s*"+(0,Xe.ec)(n.blockCommentStartToken)),!0)}}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.foldAllMarkerRegions",label:ne.N("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2077),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())yp(t,st.AD.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=vo.zu.getFoldingRules(e.getLanguageId());n&&n.markers&&n.markers.start&&wp(t,new RegExp(n.markers.start),!0)}}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:ne.N("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2078),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())yp(t,st.AD.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=vo.zu.getFoldingRules(e.getLanguageId());n&&n.markers&&n.markers.start&&wp(t,new RegExp(n.markers.start),!1)}}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.foldAllExcept",label:ne.N("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2131),weight:100}})}invoke(e,t,i){Cp(t,!0,this.getSelectedLines(i))}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.unfoldAllExcept",label:ne.N("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2129),weight:100}})}invoke(e,t,i){Cp(t,!1,this.getSelectedLines(i))}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.toggleFold",label:ne.N("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2090),weight:100}})}invoke(e,t,i){!function(e,t,i){let n=[];for(let t of i){let i=e.getRegionAtLine(t);if(i){i.isCollapsed;n.push(i),0}}e.toggleCollapseState(n)}(t,0,this.getSelectedLines(i))}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.gotoParentFold",label:ne.N("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let e=function(e,t){let i=null,n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){let e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.gotoPreviousFold",label:ne.N("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{let e=i.parentIndex,n=0;for(-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));null!==i;){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0)for(i=t.regions.toRegion(t.regions.length-1);null!==i;){if(i.startLineNumber<e)return i.startLineNumber;i=i.regionIndex>0?t.regions.toRegion(i.regionIndex-1):null}return null}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,ee.Qr)(class extends Wp{constructor(){super({id:"editor.gotoNextFold",label:ne.N("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){let e=i.parentIndex,n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}for(;null!==i;){if(!(i.regionIndex<t.regions.length))return null;if(i=t.regions.toRegion(i.regionIndex+1),i.startLineNumber>=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0)for(i=t.regions.toRegion(0);null!==i;){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndex<t.regions.length?t.regions.toRegion(i.regionIndex+1):null}return null}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}});for(let e=1;e<=7;e++)(0,ee.QG)(new Hp({id:Hp.ID(e),label:ne.N("foldLevelAction.label","Fold Level {0}",e),alias:`Fold Level ${e}`,precondition:Fp,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2048|21+e),weight:100}}));const zp=(0,Le.P6)("editor.foldBackground",{light:(0,Le.Zn)(Le.hE,.3),dark:(0,Le.Zn)(Le.hE,.3),hc:null},ne.N("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0),Kp=(0,Le.P6)("editorGutter.foldingControlForeground",{dark:Le.XZ,light:Le.XZ,hc:Le.XZ},ne.N("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));(0,xe.Ic)(((e,t)=>{const i=e.getColor(zp);i&&t.addRule(`.monaco-editor .folded-background { background-color: ${i}; }`);const n=e.getColor(Kp);n&&t.addRule(`\n\t\t.monaco-editor .cldr${xe.kS.asCSSSelector(Ap)},\n\t\t.monaco-editor .cldr${xe.kS.asCSSSelector(Op)} {\n\t\t\tcolor: ${n} !important;\n\t\t}\n\t\t`)}));var Up=i(69731);class jp extends ee.R6{constructor(){super({id:"editor.action.fontZoomIn",label:ne.N("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){Up.C.setZoomLevel(Up.C.getZoomLevel()+1)}}class $p extends ee.R6{constructor(){super({id:"editor.action.fontZoomOut",label:ne.N("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){Up.C.setZoomLevel(Up.C.getZoomLevel()-1)}}class qp extends ee.R6{constructor(){super({id:"editor.action.fontZoomReset",label:ne.N("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){Up.C.setZoomLevel(0)}}(0,ee.Qr)(jp),(0,ee.Qr)($p),(0,ee.Qr)(qp);var Zp=i(52603),Gp=i(1967),Qp=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Yp=function(e,t){return function(i,n){t(i,n,e)}},Jp=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Xp=class{constructor(e,t){this._workerService=t,this._callOnDispose=new me.SL,this._callOnModel=new me.SL,this._editor=e,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(st.ln.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this._editor.getOption(48))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=st.ln.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let i=new yd.q;for(let e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._callOnModel.add(this._editor.onDidType((e=>{let t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition();let n=!1;const o=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return n=!0,void o.dispose();for(let t=0,s=e.changes.length;t<s;t++)if(e.changes[t].range.endLineNumber<=i.lineNumber)return n=!0,void o.dispose()}));(0,Zp.Qs)(this._workerService,t,i,e,t.getFormattingOptions()).then((e=>{o.dispose(),n||(0,tt.Of)(e)&&(Gp.V.execute(this._editor,e,!0),(0,Zp.Zg)(e))}),(e=>{throw o.dispose(),e}))}};Xp.ID="editor.contrib.autoFormat",Xp=Qp([Yp(1,Ld.p)],Xp);let em=class{constructor(e,t){this.editor=e,this._instantiationService=t,this._callOnDispose=new me.SL,this._callOnModel=new me.SL,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(st.vN.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(47)&&this.editor.hasModel()&&st.vN.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(Zp.x$,this.editor,e,2,lt.E.None,Ye.T.None).catch(it.dL))}};em.ID="editor.contrib.formatOnPaste",em=Qp([Yp(1,Dt.TG)],em);class tm extends ee.R6{constructor(){super({id:"editor.action.formatDocument",label:ne.N("formatDocument.label","Format Document"),alias:"Format Document",precondition:oe.Ao.and(ie.u.notInCompositeEditor,ie.u.writable,ie.u.hasDocumentFormattingProvider),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return Jp(this,void 0,void 0,(function*(){if(t.hasModel()){const i=e.get(Dt.TG),n=e.get(lt.e);yield n.showWhile(i.invokeFunction(Zp.Qq,t,1,lt.E.None,Ye.T.None),250)}}))}}class im extends ee.R6{constructor(){super({id:"editor.action.formatSelection",label:ne.N("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:oe.Ao.and(ie.u.writable,ie.u.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2084),weight:100},contextMenuOpts:{when:ie.u.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return Jp(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(Dt.TG),n=t.getModel(),o=t.getSelections().map((e=>e.isEmpty()?new be.e(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),s=e.get(lt.e);yield s.showWhile(i.invokeFunction(Zp.x$,t,o,1,lt.E.None,Ye.T.None),250)}))}}(0,ee._K)(Xp.ID,Xp),(0,ee._K)(em.ID,em),(0,ee.Qr)(tm),(0,ee.Qr)(im),at.P.registerCommand("editor.action.format",(e=>Jp(void 0,void 0,void 0,(function*(){const t=e.get(We.$).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(at.H);t.getSelection().isEmpty()?yield i.executeCommand("editor.action.formatDocument"):yield i.executeCommand("editor.action.formatSelection")}))));var nm=i(59842);class om{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class sm extends om{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class rm extends om{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class am extends om{constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(e,t){let i=this._keys.for(e,!0),n=am._requests.get(i);if(!n){let t=new Ye.A;n={promiseCnt:0,source:t,promise:am._create(e,t.token),model:void 0},am._requests.set(i,n);const o=Date.now();n.promise.then((()=>{this._requestDurations.update(e,Date.now()-o)}))}return n.model?Promise.resolve(n.model):(n.promiseCnt+=1,t.onCancellationRequested((()=>{0==--n.promiseCnt&&(n.source.cancel(),am._requests.delete(i))})),new Promise(((e,t)=>{n.promise.then((t=>{n.model=t,e(t)}),(e=>{am._requests.delete(i),t(e)}))})))}static _create(e,t){const i=new Ye.A(t),n=new am(e.uri),o=st.vJ.ordered(e),s=o.map(((t,o)=>{var s;let r=om.findId(`provider_${o}`,n),a=new rm(r,n,null!==(s=t.displayName)&&void 0!==s?s:"Unknown Outline Provider",o);return Promise.resolve(t.provideDocumentSymbols(e,i.token)).then((e=>{for(const t of e||[])am._makeOutlineElement(t,a);return a}),(e=>((0,it.Cp)(e),a))).then((e=>{om.empty(e)?e.remove():n._groups.set(r,e)}))})),r=st.vJ.onDidChange((()=>{const t=st.vJ.ordered(e);(0,tt.fS)(t,o)||i.cancel()}));return Promise.all(s).then((()=>i.token.isCancellationRequested&&!t.isCancellationRequested?am._create(e,t):n._compact())).finally((()=>{r.dispose()}))}static _makeOutlineElement(e,t){let i=om.findId(e,t),n=new sm(i,t,e);if(e.children)for(const t of e.children)am._makeOutlineElement(t,n);t.children.set(n.id,n)}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{let e=nm.$.first(this._groups.values());for(let[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof sm?e.push(t.symbol):e.push(...nm.$.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>be.e.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return am._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>be.e.compareRangesUsingStarts(e.range,t.range)))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&am._flattenDocumentSymbols(e,n.children,n.name)}}am._requestDurations=new wi.Y(st.vJ,350),am._requests=new Ni.z6(9,.75),am._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(e,t){return`${e.id}/${t?e.getVersionId():""}/${this._hash(st.vJ.all(e))}`}_hash(e){let t="";for(const i of e){let e=this._data.get(i);void 0===e&&(e=this._counter++,this._data.set(i,e)),t+=e}return t}};var lm=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function dm(e,t,i){return lm(this,void 0,void 0,(function*(){const n=yield am.create(e,i);return t?n.asListOfDocumentSymbols():n.getTopLevelSymbols()}))}at.P.registerCommand("_executeDocumentSymbolProvider",(function(e,...t){return lm(this,void 0,void 0,(function*(){const[i]=t;(0,yi.p_)(nt.o.isUri(i));const n=e.get(rt.q).getModel(i);if(n)return dm(n,!1,Ye.T.None);const o=yield e.get(Yi.S).createModelReference(i);try{return yield dm(o.object.textEditorModel,!1,Ye.T.None)}finally{o.dispose()}}))}));var hm=i(33048);function cm(e,t){let i=0;for(let n=0;n<e.length;n++)"\t"===e.charAt(n)?i+=t:i++;return i}function um(e,t,i){e=e<0?0:e;let n="";if(!i){let i=Math.floor(e/t);e%=t;for(let e=0;e<i;e++)n+="\t"}for(let t=0;t<e;t++)n+=" ";return n}function gm(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const o=vo.zu.getIndentationRules(e.getLanguageId());if(!o)return[];for(i=Math.min(i,e.getLineCount());t<=i&&o.unIndentedLinePattern;){let i=e.getLineContent(t);if(!o.unIndentedLinePattern.test(i))break;t++}if(t>i-1)return[];const{tabSize:s,indentSize:r,insertSpaces:a}=e.getOptions(),l=(e,t)=>(t=t||1,hm.U.shiftIndent(e,e.length+t,s,r,a)),d=(e,t)=>(t=t||1,hm.U.unshiftIndent(e,e.length+t,s,r,a));let h,c=[],u=e.getLineContent(t),g=u;if(null!=n){h=n;let e=Xe.V8(u);g=h+u.substring(e.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(g)&&(h=d(h),g=h+u.substring(e.length)),u!==g&&c.push(ol.h.replaceMove(new te.Y(t,1,t,e.length+1),we.yO.normalizeIndentation(h,r,a)))}else h=Xe.V8(u);let p=h;o.increaseIndentPattern&&o.increaseIndentPattern.test(g)?(p=l(p),h=l(h)):o.indentNextLinePattern&&o.indentNextLinePattern.test(g)&&(p=l(p));for(let n=++t;n<=i;n++){let t=e.getLineContent(n),i=Xe.V8(t),s=p+t.substring(i.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(s)&&(p=d(p),h=d(h)),i!==p&&c.push(ol.h.replaceMove(new te.Y(n,1,n,i.length+1),we.yO.normalizeIndentation(p,r,a))),o.unIndentedLinePattern&&o.unIndentedLinePattern.test(t)||(o.increaseIndentPattern&&o.increaseIndentPattern.test(s)?(h=l(h),p=h):p=o.indentNextLinePattern&&o.indentNextLinePattern.test(s)?l(p):h)}return c}class pm extends ee.R6{constructor(){super({id:pm.ID,label:ne.N("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:ie.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new xm(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}pm.ID="editor.action.indentationToSpaces";class mm extends ee.R6{constructor(){super({id:mm.ID,label:ne.N("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:ie.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new km(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}mm.ID="editor.action.indentationToTabs";class fm extends ee.R6{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const i=e.get(Vi.eJ),n=e.get(rt.q);let o=t.getModel();if(!o)return;const s=n.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),r=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize?ne.N("configuredTabSize","Configured Tab Size"):void 0}))),a=Math.min(o.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(r,{placeHolder:ne.N({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:r[a]}).then((e=>{e&&o&&!o.isDisposed()&&o.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:this.insertSpaces})}))}),50)}}class _m extends fm{constructor(){super(!1,{id:_m.ID,label:ne.N("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}_m.ID="editor.action.indentUsingTabs";class vm extends fm{constructor(){super(!0,{id:vm.ID,label:ne.N("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}vm.ID="editor.action.indentUsingSpaces";class bm extends ee.R6{constructor(){super({id:bm.ID,label:ne.N("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(rt.q);let n=t.getModel();if(!n)return;const o=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}}bm.ID="editor.action.detectIndentation";class Cm extends ee.R6{constructor(){super({id:"editor.action.reindentlines",label:ne.N("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:ie.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=gm(i,1,i.getLineCount());n.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,n),t.pushUndoStop())}}class wm extends ee.R6{constructor(){super({id:"editor.action.reindentselectedlines",label:ne.N("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:ie.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=t.getSelections();if(null===n)return;let o=[];for(let e of n){let t=e.startLineNumber,n=e.endLineNumber;if(t!==n&&1===e.endColumn&&n--,1===t){if(t===n)continue}else t--;let s=gm(i,t,n);o.push(...s)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class ym{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(let e of this._edits)t.addEditOperation(be.e.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class Sm{constructor(e){this.callOnDispose=new me.SL,this.callOnModel=new me.SL,this.editor=e,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.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:e})=>{this.trigger(e)})))}trigger(e){let t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(!i.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(9),{tabSize:o,indentSize:s,insertSpaces:r}=i.getOptions();let a=[],l={shiftIndent:e=>hm.U.shiftIndent(e,e.length+1,o,s,r),unshiftIndent:e=>hm.U.unshiftIndent(e,e.length+1,o,s,r)},d=e.startLineNumber;for(;d<=e.endLineNumber&&this.shouldIgnoreLine(i,d);)d++;if(d>e.endLineNumber)return;let h=i.getLineContent(d);if(!/\S/.test(h.substring(0,e.startColumn-1))){const e=vo.zu.getGoodIndentForLine(n,i,i.getLanguageId(),d,l);if(null!==e){let t=Xe.V8(h),n=cm(e,o);if(n!==cm(t,o)){let e=um(n,o,r);a.push({range:new be.e(d,1,d,t.length+1),text:e}),h=e+h.substr(t.length)}else{let e=vo.zu.getIndentMetadata(i,d);if(0===e||8===e)return}}}const c=d;for(;d<e.endLineNumber&&!/\S/.test(i.getLineContent(d+1));)d++;if(d!==e.endLineNumber){let t={getLineTokens:e=>i.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t),getLineContent:e=>e===c?h:i.getLineContent(e)},s=vo.zu.getGoodIndentForLine(n,t,i.getLanguageId(),d+1,l);if(null!==s){let t=cm(s,o),n=cm(Xe.V8(i.getLineContent(d+1)),o);if(t!==n){let s=t-n;for(let t=d+1;t<=e.endLineNumber;t++){let e=i.getLineContent(t),n=Xe.V8(e),l=um(cm(n,o)+s,o,r);l!==n&&a.push({range:new be.e(t,1,t,n.length+1),text:l})}}}}if(a.length>0){this.editor.pushUndoStop();let e=new ym(a,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.forceTokenization(t);let i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;let n=e.getLineTokens(t);if(n.getCount()>0){let e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}function Lm(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let e=0;e<i;e++)o+=" ";let s=new RegExp(o,"gi");for(let i=1,r=e.getLineCount();i<=r;i++){let r=e.getLineFirstNonWhitespaceColumn(i);if(0===r&&(r=e.getLineMaxColumn(i)),1===r)continue;const a=new be.e(i,1,i,r),l=e.getValueInRange(a),d=n?l.replace(/\t/gi,o):l.replace(s,"\t");t.addEditOperation(a,d)}}Sm.ID="editor.contrib.autoIndentOnPaste";class xm{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),Lm(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class km{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),Lm(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,ee._K)(Sm.ID,Sm),(0,ee.Qr)(pm),(0,ee.Qr)(mm),(0,ee.Qr)(_m),(0,ee.Qr)(vm),(0,ee.Qr)(bm),(0,ee.Qr)(Cm),(0,ee.Qr)(wm);var Nm=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Dm{constructor(){this._data=new Ni.Y9}push(e,t){const i=this._data.get(e.uri);void 0===i?this._data.set(e.uri,new Set([t])):i.add(t)}pop(e,t){const i=this._data.get(e.uri);i&&(i.delete(t),0===i.size&&this._data.delete(e.uri))}has(e,t){var i;return Boolean(null===(i=this._data.get(e.uri))||void 0===i?void 0:i.has(t))}}function Em(e,t,i,n){return Nm(this,void 0,void 0,(function*(){const o=[],s=st.mX.ordered(e).reverse().map((s=>t.map((t=>Nm(this,void 0,void 0,(function*(){try{i.push(e,s);const r=yield s.provideInlayHints(e,t,n);(null==r?void 0:r.length)&&o.push(r.filter((e=>t.containsPosition(e.position))))}catch(e){(0,it.Cp)(e)}finally{i.pop(e,s)}}))))));return yield Promise.all(s.flat()),o.flat().sort(((e,t)=>ve.L.compare(e.position,t.position)))}))}class Im{constructor(){this._entries=new Ni.z6(50)}get(e){const t=Im._key(e);return this._entries.get(t)}set(e,t){const i=Im._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}let Tm=class e{constructor(t,i){this._editor=t,this._codeEditorService=i,this._decorationOwnerId=++e._decorationOwnerIdPool,this._disposables=new me.SL,this._sessionDisposables=new me.SL,this._getInlayHintsDelays=new wi.Y(st.mX,25,500),this._cache=new Im,this._decorations=new Map,this._disposables.add(st.mX.onDidChange((()=>this._update()))),this._disposables.add(t.onDidChangeModel((()=>this._update()))),this._disposables.add(t.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(t.onDidChangeConfiguration((e=>{e.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 e=this._editor.getModel();if(!e||!st.mX.has(e))return;const t=this._cache.get(e);t&&this._updateHintsDecorators([e.getFullModelRange()],t);const i=new Dm,n=new pe.pY((()=>Nm(this,void 0,void 0,(function*(){const t=Date.now(),o=new Ye.A;this._sessionDisposables.add((0,me.OF)((()=>o.dispose(!0))));const s=this._getHintsRanges(),r=yield Em(e,s,i,o.token);n.delay=this._getInlayHintsDelays.update(e,Date.now()-t),o.token.isCancellationRequested||(this._updateHintsDecorators(s,r),this._cache.set(e,Array.from(this._decorations.values()).map((e=>e.hint))))}))),this._getInlayHintsDelays.get(e));this._sessionDisposables.add(n),this._sessionDisposables.add(this._editor.onDidChangeModelContent((()=>n.schedule()))),this._disposables.add(this._editor.onDidScrollChange((()=>n.schedule()))),n.schedule();const o=new me.SL;this._sessionDisposables.add(o);for(const t of st.mX.all(e))"function"==typeof t.onDidChangeInlayHints&&o.add(t.onDidChangeInlayHints((()=>{i.has(e,t)||n.schedule()})))}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const n of t.sort(be.e.compareRangesUsingStarts)){const t=e.validateRange(new be.e(n.startLineNumber-30,n.startColumn,n.endLineNumber+30,n.endColumn));0!==i.length&&be.e.areIntersectingOrTouching(i[i.length-1],t)?i[i.length-1]=be.e.plusRange(i[i.length-1],t):i.push(t)}return i}_updateHintsDecorators(e,t){const{fontSize:i,fontFamily:n}=this._getLayoutInfo(),o=this._editor.getModel(),s=[],r=[],a="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(a,n);for(const e of t){const{text:t,position:n,whitespaceBefore:d,whitespaceAfter:h}=e,c=d?i/3|0:0,u=h?i/3|0:0,g={contentText:(l=t,l.replace(/[ \t]/g," ")),fontSize:`${i}px`,margin:`0px ${u}px 0px ${c}px`,fontFamily:`var(${a}), ${Ci.hL.fontFamily}`,padding:`1px ${0|Math.max(1,i/4)}px`,borderRadius:(i/4|0)+"px",verticalAlign:"middle",backgroundColor:(0,xe.EN)(Le.Pp),color:(0,xe.EN)(Le.VV)};e.kind===st.gl.Parameter?(g.backgroundColor=(0,xe.EN)(Le.ph),g.color=(0,xe.EN)(Le.HC)):e.kind===st.gl.Type&&(g.backgroundColor=(0,xe.EN)(Le.bK),g.color=(0,xe.EN)(Le.hX));let p={beforeInjectedText:Object.assign(Object.assign({},g),{affectsLetterSpacing:!0})},m=be.e.fromPositions(n),f=o.getWordAtPosition(n),_=!1;f&&(f.endColumn===n.column?(p.afterInjectedText=p.beforeInjectedText,p.beforeInjectedText=void 0,_=!0,m=Mm(f,n.lineNumber)):f.startColumn===n.column&&(_=!0,m=Mm(f,n.lineNumber)));const v="inlayHints-"+(0,bi.vp)(p).toString(16);if(this._codeEditorService.registerDecorationType("inlay-hints-controller",v,p,void 0,this._editor),s.push(v),r.push({range:m,options:Object.assign(Object.assign({},this._codeEditorService.resolveDecorationOptions(v,!0)),{showIfCollapsed:!_,stickiness:0})})>1500)break}var l;const d=[];for(const t of e)for(const{id:e}of o.getDecorationsInRange(t,this._decorationOwnerId,!0)){const t=this._decorations.get(e);t&&(d.push(e),this._codeEditorService.removeDecorationType(t.decorationTypeId),this._decorations.delete(e))}const h=o.deltaDecorations(d,r,this._decorationOwnerId);for(let e=0;e<h.length;e++)this._decorations.set(h[e],{hint:t[e],decorationTypeId:s[e]})}_getLayoutInfo(){const e=this._editor.getOption(125),t=this._editor.getOption(45);let i=e.fontSize;return(!i||i<5||i>t)&&(i=.9*t|0),{fontSize:i,fontFamily:e.fontFamily||this._editor.getOption(42)}}_removeAllDecorations(){this._editor.deltaDecorations(Array.from(this._decorations.keys()),[]);for(let e of this._decorations.values())this._codeEditorService.removeDecorationType(e.decorationTypeId);this._decorations.clear()}};function Mm(e,t){return new be.e(t,e.startColumn,t,e.endColumn)}Tm.ID="editor.contrib.InlayHints",Tm._decorationOwnerIdPool=0,Tm=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,We.$)],Tm),(0,ee._K)(Tm.ID,Tm),at.P.registerCommand("_executeInlayHintProvider",((e,...t)=>Nm(void 0,void 0,void 0,(function*(){const[i,n]=t;(0,yi.p_)(nt.o.isUri(i)),(0,yi.p_)(be.e.isIRange(n));const o=yield e.get(Yi.S).createModelReference(i);try{return yield Em(o.object.textEditorModel,[be.e.lift(n)],new Dm,Ye.T.None)}finally{o.dispose()}}))));class Rm{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new te.Y(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new te.Y(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}let Am=class e{constructor(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}static get(t){return t.getContribution(e.ID)}dispose(){}run(t,i){this.currentRequest&&this.currentRequest.cancel();const n=this.editor.getSelection(),o=this.editor.getModel();if(!o||!n)return;let s=n;if(s.startLineNumber!==s.endLineNumber)return;const r=new ot.yy(this.editor,5),a=o.uri;return this.editorWorkerService.canNavigateValueSet(a)?(this.currentRequest=(0,pe.PG)((e=>this.editorWorkerService.navigateValueSet(a,s,i))),this.currentRequest.then((i=>{if(!i||!i.range||!i.value)return;if(!r.validate(this.editor))return;let n=be.e.lift(i.range),o=i.range,a=i.value.length-(s.endColumn-s.startColumn);o={startLineNumber:o.startLineNumber,startColumn:o.startColumn,endLineNumber:o.endLineNumber,endColumn:o.startColumn+i.value.length},a>1&&(s=new te.Y(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+a-1));const l=new Rm(n,s,i.value);this.editor.pushUndoStop(),this.editor.executeCommand(t,l),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:o,options:e.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=(0,pe.Vs)(350),this.decorationRemover.then((()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[]))).catch(it.dL)})).catch(it.dL)):Promise.resolve(void 0)}};Am.ID="editor.contrib.inPlaceReplaceController",Am.DECORATION=we.qx.register({description:"in-place-replace",className:"valueSetReplacement"}),Am=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,Ld.p)],Am);class Om extends ee.R6{constructor(){super({id:"editor.action.inPlaceReplace.up",label:ne.N("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:3154,weight:100}})}run(e,t){const i=Am.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class Pm extends ee.R6{constructor(){super({id:"editor.action.inPlaceReplace.down",label:ne.N("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:3156,weight:100}})}run(e,t){const i=Am.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}(0,ee._K)(Am.ID,Am),(0,ee.Qr)(Om),(0,ee.Qr)(Pm),(0,xe.Ic)(((e,t)=>{const i=e.getColor(ye.Dl);i&&t.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${i}; }`)}));class Fm{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let i=function(e,t){t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);let i=[],n=0,o=0,s=t.length;for(let r=1,a=e.getLineCount();r<=a;r++){let a=e.getLineContent(r),l=a.length+1,d=0;if(o<s&&t[o].lineNumber===r&&(d=t[o].column,o++,d===l))continue;if(0===a.length)continue;let h=Xe.ow(a),c=0;if(-1===h)c=1;else{if(h===a.length-1)continue;c=h+2}c=Math.max(d,c),i[n++]=ol.h.delete(new be.e(r,c,r,l))}return i}(e,this._cursors);for(let e=0,n=i.length;e<n;e++){let n=i[e];t.addEditOperation(n.range,n.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}var Bm=i(44884);class Wm{constructor(e,t,i){this._selection=e,this._isCopyingDown=t,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));let n=[];for(let t=i.startLineNumber;t<=i.endLineNumber;t++)n.push(e.getLineContent(t));const o=n.join("\n");""===o&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new be.e(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":"\n"):this._isCopyingDown?t.addEditOperation(new be.e(i.startLineNumber,1,i.startLineNumber,1),o+"\n"):t.addEditOperation(new be.e(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+o),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(0!==this._startLineNumberDelta||0!==this._endLineNumberDelta){let e=i.startLineNumber,t=i.startColumn,n=i.endLineNumber,o=i.endColumn;0!==this._startLineNumberDelta&&(e+=this._startLineNumberDelta,t=1),0!==this._endLineNumberDelta&&(n+=this._endLineNumberDelta,o=1),i=te.Y.createWithDirection(e,t,n,o,this._selectionDirection)}return i}}var Vm=i(1189);class Hm{constructor(e,t,i){this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumber<n.endLineNumber&&1===n.endColumn&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const{tabSize:o,indentSize:s,insertSpaces:r}=e.getOptions();let a=this.buildIndentConverter(o,s,r),l={getLineTokens:t=>e.getLineTokens(t),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i),getLineContent:null};if(n.startLineNumber===n.endLineNumber&&1===e.getLineMaxColumn(n.startLineNumber)){let i=n.startLineNumber,o=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(o)?t.addEditOperation(new be.e(1,1,1,1),null):(t.addEditOperation(new be.e(i,1,i,1),e.getLineContent(o)),t.addEditOperation(new be.e(o,1,o,e.getLineMaxColumn(o)),null)),n=new te.Y(o,1,o,1)}else{let i,s;if(this._isMovingDown){i=n.endLineNumber+1,s=e.getLineContent(i),t.addEditOperation(new be.e(i-1,e.getLineMaxColumn(i-1),i,e.getLineMaxColumn(i)),null);let d=s;if(this.shouldAutoIndent(e,n)){let h=this.matchEnterRule(e,a,o,i,n.startLineNumber-1);if(null!==h){let t=um(h+cm(Xe.V8(e.getLineContent(i)),o),o,r);d=t+this.trimLeft(s)}else{l.getLineContent=t=>t===n.startLineNumber?e.getLineContent(i):e.getLineContent(t);let t=vo.zu.getGoodIndentForLine(this._autoIndent,l,e.getLanguageIdAtPosition(i,1),n.startLineNumber,a);if(null!==t){let n=Xe.V8(e.getLineContent(i)),a=cm(t,o);if(a!==cm(n,o)){let e=um(a,o,r);d=e+this.trimLeft(s)}}}t.addEditOperation(new be.e(n.startLineNumber,1,n.startLineNumber,1),d+"\n");let c=this.matchEnterRuleMovingDown(e,a,o,n.startLineNumber,i,d);if(null!==c)0!==c&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,c);else{l.getLineContent=t=>t===n.startLineNumber?d:t>=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);let s=vo.zu.getGoodIndentForLine(this._autoIndent,l,e.getLanguageIdAtPosition(i,1),n.startLineNumber+1,a);if(null!==s){const i=Xe.V8(e.getLineContent(n.startLineNumber)),a=cm(s,o),l=cm(i,o);if(a!==l){const i=a-l;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}else t.addEditOperation(new be.e(n.startLineNumber,1,n.startLineNumber,1),d+"\n")}else if(i=n.startLineNumber-1,s=e.getLineContent(i),t.addEditOperation(new be.e(i,1,i+1,1),null),t.addEditOperation(new be.e(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+s),this.shouldAutoIndent(e,n)){l.getLineContent=t=>t===i?e.getLineContent(n.startLineNumber):e.getLineContent(t);let s=this.matchEnterRule(e,a,o,n.startLineNumber,n.startLineNumber-2);if(null!==s)0!==s&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,s);else{let s=vo.zu.getGoodIndentForLine(this._autoIndent,l,e.getLanguageIdAtPosition(n.startLineNumber,1),i,a);if(null!==s){let i=Xe.V8(e.getLineContent(n.startLineNumber)),a=cm(s,o),l=cm(i,o);if(a!==l){let i=a-l;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>hm.U.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>hm.U.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let s=o.indentation;o.indentAction===Vm.wU.None||o.indentAction===Vm.wU.Indent?s=o.indentation+o.appendText:o.indentAction===Vm.wU.IndentOutdent?s=o.indentation:o.indentAction===Vm.wU.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);let r=e.getLineContent(n);if(this.trimLeft(r).indexOf(this.trimLeft(s))>=0){let o=Xe.V8(e.getLineContent(n)),r=Xe.V8(s),a=vo.zu.getIndentMetadata(e,n);return null!==a&&2&a&&(r=t.unshiftIndent(r)),cm(r,i)-cm(o,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,o,s){if(Xe.ow(s)>=0){let s=e.getLineMaxColumn(o),r=vo.zu.getEnterAction(this._autoIndent,e,new be.e(o,s,o,s));return this.parseEnterResult(e,t,i,n,r)}{let o=n-1;for(;o>=1;){let t=e.getLineContent(o);if(Xe.ow(t)>=0)break;o--}if(o<1||n>e.getLineCount())return null;let s=e.getLineMaxColumn(o),r=vo.zu.getEnterAction(this._autoIndent,e,new be.e(o,s,o,s));return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,o,s){let r=o;for(;r>=1;){let t;if(t=r===o&&void 0!==s?s:e.getLineContent(r),Xe.ow(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;let a=e.getLineMaxColumn(r),l=vo.zu.getEnterAction(this._autoIndent,e,new be.e(r,a,r,a));return this.parseEnterResult(e,t,i,n,l)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;let i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==vo.zu.getIndentRulesSupport(i)}getIndentEditsOfMovingBlock(e,t,i,n,o,s){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){let a=e.getLineContent(r),l=Xe.V8(a),d=um(cm(l,n)+s,n,o);d!==l&&(t.addEditOperation(new be.e(r,1,r,l.length+1),d),r===i.endLineNumber&&i.endColumn<=l.length+1&&""===d&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}}class zm{constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}static getCollator(){return zm._COLLATOR||(zm._COLLATOR=new Intl.Collator),zm._COLLATOR}getEditOperations(e,t){let i=function(e,t,i){let n=Km(e,t,i);return n?ol.h.replace(new be.e(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;let n=Km(e,t,i);if(!n)return!1;for(let e=0,t=n.before.length;e<t;e++)if(n.before[e]!==n.after[e])return!0;return!1}}function Km(e,t,i){let n=t.startLineNumber,o=t.endLineNumber;if(1===t.endColumn&&o--,n>=o)return null;let s=[];for(let t=n;t<=o;t++)s.push(e.getLineContent(t));let r=s.slice(0);return r.sort(zm.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:o,before:s,after:r}}zm._COLLATOR=null;class Um extends ee.R6{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>be.e.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let e=1;e<i.length;e++){const t=i[e];n.selection.endLineNumber===t.selection.startLineNumber&&(n.index<t.index?t.ignore=!0:(n.ignore=!0,n=t))}const o=[];for(const e of i)o.push(new Wm(e.selection,this.down,e.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class jm extends ee.R6{constructor(){super({id:"editor.action.duplicateSelection",label:ne.N("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:ie.u.writable,menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"2_line",title:ne.N({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],o=t.getSelections(),s=t.getModel();for(const e of o)if(e.isEmpty())n.push(new Wm(e,!0));else{const t=new te.Y(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn);n.push(new Re.OY(t,s.getValueInRange(e)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class $m extends ee.R6{constructor(e,t){super(t),this.down=e}run(e,t){let i=[],n=t.getSelections()||[];const o=t.getOption(9);for(const e of n)i.push(new Hm(e,this.down,o));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class qm extends ee.R6{constructor(e,t){super(t),this.descending=e}run(e,t){const i=t.getSelections()||[];for(const e of i)if(!zm.canRun(t.getModel(),e,this.descending))return;let n=[];for(let e=0,t=i.length;e<t;e++)n[e]=new zm(i[e],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class Zm extends ee.R6{constructor(){super({id:"editor.action.removeDuplicateLines",label:ne.N("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:ie.u.writable})}run(e,t){if(!t.hasModel())return;let i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;let n=[],o=[],s=0;for(let e of t.getSelections()){let t=new Set,r=[];for(let n=e.startLineNumber;n<=e.endLineNumber;n++){let e=i.getLineContent(n);t.has(e)||(r.push(e),t.add(e))}let a=new te.Y(e.startLineNumber,1,e.endLineNumber,i.getLineMaxColumn(e.endLineNumber)),l=e.startLineNumber-s,d=new te.Y(l,1,l+r.length-1,r[r.length-1].length);n.push(ol.h.replace(a,r.join("\n"))),o.push(d),s+=e.endLineNumber-e.startLineNumber+1-r.length}t.pushUndoStop(),t.executeEdits(this.id,n,o),t.pushUndoStop()}}class Gm extends ee.R6{constructor(){super({id:Gm.ID,label:ne.N("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:(0,W.gx)(2089,2102),weight:100}})}run(e,t,i){let n=[];"auto-save"===i.reason&&(n=(t.getSelections()||[]).map((e=>new ve.L(e.positionLineNumber,e.positionColumn))));let o=t.getSelection();if(null===o)return;let s=new Fm(o,n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}}Gm.ID="editor.action.trimTrailingWhitespace";class Qm extends ee.R6{constructor(){super({id:"editor.action.deleteLines",label:ne.N("lines.delete","Delete Line"),alias:"Delete Line",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0,s=[],r=[];for(let e=0,t=i.length;e<t;e++){const t=i[e];let a=t.startLineNumber,l=t.endLineNumber,d=1,h=n.getLineMaxColumn(l);l<n.getLineCount()?(l+=1,h=1):a>1&&(a-=1,d=n.getLineMaxColumn(a)),s.push(ol.h.replace(new te.Y(a,d,l,h),"")),r.push(new te.Y(a-o,t.positionColumn,a-o,t.positionColumn)),o+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumber<e.endLineNumber&&1===e.endColumn&&(t-=1),{startLineNumber:e.startLineNumber,selectionStartColumn:e.selectionStartColumn,endLineNumber:t,positionColumn:e.positionColumn}}));t.sort(((e,t)=>e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));let i=[],n=t[0];for(let e=1;e<t.length;e++)n.endLineNumber+1>=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class Ym extends ee.R6{constructor(){super({id:"editor.action.indentLines",label:ne.N("lines.indent","Indent Line"),alias:"Indent Line",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Bm.u.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class Jm extends ee.R6{constructor(){super({id:"editor.action.outdentLines",label:ne.N("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:2135,weight:100}})}run(e,t){O.wk.Outdent.runEditorCommand(e,t,null)}}class Xm extends ee.R6{constructor(){super({id:"editor.action.insertLineBefore",label:ne.N("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Bm.u.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class ef extends ee.R6{constructor(){super({id:"editor.action.insertLineAfter",label:ne.N("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,Bm.u.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class tf extends ee.R6{run(e,t){if(!t.hasModel())return;const i=t.getSelection();let n=this._getRangesToDelete(t),o=[];for(let e=0,t=n.length-1;e<t;e++){let t=n[e],i=n[e+1];null===be.e.intersectRanges(t,i)?o.push(t):n[e+1]=be.e.plusRange(t,i)}o.push(n[n.length-1]);let s=this._getEndCursorState(i,o),r=o.map((e=>ol.h.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}}class nf extends ee.R6{constructor(){super({id:"editor.action.joinLines",label:ne.N("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(be.e.compareRangesUsingStarts);let o=[],s=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new te.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new te.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));o.push(s);let r=t.getModel();if(null===r)return;let a=[],l=[],d=n,h=0;for(let e=0,t=o.length;e<t;e++){let t,i,s=o[e],c=s.startLineNumber,u=1,g=0,p=r.getLineContent(s.endLineNumber).length-s.endColumn;if(s.isEmpty()||s.startLineNumber===s.endLineNumber){let e=s.getStartPosition();e.lineNumber<r.getLineCount()?(t=c+1,i=r.getLineMaxColumn(t)):(t=e.lineNumber,i=r.getLineMaxColumn(e.lineNumber))}else t=s.endLineNumber,i=r.getLineMaxColumn(t);let m=r.getLineContent(c);for(let e=c+1;e<=t;e++){let t=r.getLineContent(e),i=r.getLineFirstNonWhitespaceColumn(e);if(i>=1){let e=!0;""===m&&(e=!1),!e||" "!==m.charAt(m.length-1)&&"\t"!==m.charAt(m.length-1)||(e=!1,m=m.replace(/[\s\uFEFF\xA0]+$/g," "));let n=t.substr(i-1);m+=(e?" ":"")+n,g=e?n.length+1:n.length}else g=0}let f=new be.e(c,u,t,i);if(!f.isEmpty()){let e;s.isEmpty()?(a.push(ol.h.replace(f,m)),e=new te.Y(f.startLineNumber-h,m.length-g+1,c-h,m.length-g+1)):s.startLineNumber===s.endLineNumber?(a.push(ol.h.replace(f,m)),e=new te.Y(s.startLineNumber-h,s.startColumn,s.endLineNumber-h,s.endColumn)):(a.push(ol.h.replace(f,m)),e=new te.Y(s.startLineNumber-h,s.startColumn,s.startLineNumber-h,m.length-p)),null!==be.e.intersectRanges(f,n)?d=e:l.push(e)}h+=f.endLineNumber-f.startLineNumber}l.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}class of extends ee.R6{constructor(){super({id:"editor.action.transpose",label:ne.N("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:ie.u.writable})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let o=[];for(let e=0,t=i.length;e<t;e++){let t=i[e];if(!t.isEmpty())continue;let s=t.getStartPosition(),r=n.getLineMaxColumn(s.lineNumber);if(s.column>=r){if(s.lineNumber===n.getLineCount())continue;let e=new be.e(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new Re.T4(new te.Y(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t))}else{let e=new be.e(s.lineNumber,Math.max(1,s.column-1),s.lineNumber,s.column+1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new Re.hP(e,t,new te.Y(s.lineNumber,s.column+1,s.lineNumber,s.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class sf extends ee.R6{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=t.getOption(115),s=[];for(const e of i)if(e.isEmpty()){const i=e.getStartPosition(),r=t.getConfiguredWordAtPosition(i);if(!r)continue;const a=new be.e(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),l=n.getValueInRange(a);s.push(ol.h.replace(a,this._modifyText(l,o)))}else{const t=n.getValueInRange(e);s.push(ol.h.replace(e,this._modifyText(t,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}}class rf{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class af extends sf{constructor(){super({id:"editor.action.transformToTitlecase",label:ne.N("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:ie.u.writable})}_modifyText(e,t){const i=af.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}af.titleBoundary=new rf("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class lf extends sf{constructor(){super({id:"editor.action.transformToSnakecase",label:ne.N("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:ie.u.writable})}_modifyText(e,t){const i=lf.caseBoundary.get(),n=lf.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}lf.caseBoundary=new rf("(\\p{Ll})(\\p{Lu})","gmu"),lf.singleLetters=new rf("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu"),(0,ee.Qr)(class extends Um{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:ne.N("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"2_line",title:ne.N({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),(0,ee.Qr)(class extends Um{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:ne.N("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"2_line",title:ne.N({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),(0,ee.Qr)(jm),(0,ee.Qr)(class extends $m{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:ne.N("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"2_line",title:ne.N({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),(0,ee.Qr)(class extends $m{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:ne.N("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"2_line",title:ne.N({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),(0,ee.Qr)(class extends qm{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:ne.N("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:ie.u.writable})}}),(0,ee.Qr)(class extends qm{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:ne.N("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:ie.u.writable})}}),(0,ee.Qr)(Zm),(0,ee.Qr)(Gm),(0,ee.Qr)(Qm),(0,ee.Qr)(Ym),(0,ee.Qr)(Jm),(0,ee.Qr)(Xm),(0,ee.Qr)(ef),(0,ee.Qr)(class extends tf{constructor(){super({id:"deleteAllLeft",label:ne.N("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null,n=[],o=0;return t.forEach((t=>{let s;if(1===t.endColumn&&o>0){let e=t.startLineNumber-o;s=new te.Y(e,t.startColumn,e,t.startColumn)}else s=new te.Y(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=s:n.push(s)})),i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getSelections();if(null===t)return[];let i=t,n=e.getModel();return null===n?[]:(i.sort(be.e.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){let t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new be.e(t,i,e.startLineNumber,1)}return new be.e(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new be.e(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}),(0,ee.Qr)(class extends tf{constructor(){super({id:"deleteAllRight",label:ne.N("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null,n=[];for(let o=0,s=t.length,r=0;o<s;o++){let s=t[o],a=new te.Y(s.startLineNumber-r,s.startColumn,s.startLineNumber-r,s.startColumn);s.intersectRanges(e)?i=a:n.push(a)}return i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getModel();if(null===t)return[];let i=e.getSelections();if(null===i)return[];let n=i.map((e=>{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new be.e(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new be.e(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(be.e.compareRangesUsingStarts),n}}),(0,ee.Qr)(nf),(0,ee.Qr)(of),(0,ee.Qr)(class extends sf{constructor(){super({id:"editor.action.transformToUppercase",label:ne.N("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:ie.u.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}),(0,ee.Qr)(class extends sf{constructor(){super({id:"editor.action.transformToLowercase",label:ne.N("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:ie.u.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}),lf.caseBoundary.isSupported()&&lf.singleLetters.isSupported()&&(0,ee.Qr)(lf),af.titleBoundary.isSupported()&&(0,ee.Qr)(af);var df=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const hf=new oe.uy("LinkedEditingInputVisible",!1),cf="linked-editing-decoration";let uf=class e extends me.JT{constructor(e,t){super(),this._debounceDuration=200,this._localToDispose=this._register(new me.SL),this._editor=e,this._enabled=!1,this._visibleContextKey=hf.bindTo(t),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new me.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((e=>{(e.hasChanged(61)||e.hasChanged(81))&&this.reinitialize(!1)}))),this._register(st.id.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}static get(t){return t.getContribution(e.ID)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(61)||this._editor.getOption(81))&&st.id.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._languageWordPattern=vo.zu.getWordDefinition(t.getLanguageId()),this._localToDispose.add(t.onDidChangeLanguageConfiguration((()=>{this._languageWordPattern=vo.zu.getWordDefinition(t.getLanguageId())})));const n=new pe.vp(this._debounceDuration),o=()=>{this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),this._debounceDuration)},s=new pe.vp(0),r=e=>{this._rangeSyncTriggerPromise=s.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{o()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const i=t.getDecorationRange(this._currentDecorations[0]);if(i&&e.changes.every((e=>i.intersectRanges(e.range))))return void r(this._currentDecorations)}o()}))),this._localToDispose.add({dispose:()=>{n.cancel(),s.cancel()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._currentDecorations||0===e.length)return;const t=this._editor.getModel(),i=t.getDecorationRange(e[0]);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}let o=[];for(let i=1,s=e.length;i<s;i++){const s=t.getDecorationRange(e[i]);if(s)if(s.startLineNumber!==s.endLineNumber)o.push({range:s,text:n});else{let e=t.getValueInRange(s),i=n,r=s.startColumn,a=s.endColumn;const l=Xe.Mh(e,i);r+=l,e=e.substr(l),i=i.substr(l);const d=Xe.P1(e,i);a-=d,e=e.substr(0,e.length-d),i=i.substr(0,i.length-d),r===a&&0===i.length||o.push({range:new be.e(s.startLineNumber,r,s.endLineNumber,a),text:i})}}if(0!==o.length)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const e=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(e)}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(t=!1){return df(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return void this.clearRanges();const i=this._editor.getPosition();if(!this._enabled&&!t||this._editor.getSelections().length>1)return void this.clearRanges();const n=this._editor.getModel(),o=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===o){if(i.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const e=n.getDecorationRange(this._currentDecorations[0]);if(e&&e.containsPosition(i))return}}this._currentRequestPosition=i,this._currentRequestModelVersion=o;const s=(0,pe.PG)((t=>df(this,void 0,void 0,(function*(){try{const r=yield mf(n,i,t);if(s!==this._currentRequest)return;if(this._currentRequest=null,o!==n.getVersionId())return;let a=[];(null==r?void 0:r.ranges)&&(a=r.ranges),this._currentWordPattern=(null==r?void 0:r.wordPattern)||this._languageWordPattern;let l=!1;for(let e=0,t=a.length;e<t;e++)if(be.e.containsPosition(a[e],i)){if(l=!0,0!==e){const t=a[e];a.splice(e,1),a.unshift(t)}break}if(!l)return void this.clearRanges();const d=a.map((t=>({range:t,options:e.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,d)}catch(e){(0,it.VV)(e)||(0,it.dL)(e),this._currentRequest!==s&&this._currentRequest||this.clearRanges()}}))));return this._currentRequest=s,s}))}};uf.ID="editor.contrib.linkedEditing",uf.DECORATION=we.qx.register({description:"linked-editing",stickiness:0,className:cf}),uf=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,oe.i6)],uf);class gf extends ee.R6{constructor(){super({id:"editor.action.linkedEditing",label:ne.N("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:oe.Ao.and(ie.u.writable,ie.u.hasRenameProvider),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(We.$),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return nt.o.isUri(n)&&ve.L.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),it.dL):super.runCommand(e,t)}run(e,t){const i=uf.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const pf=ee._l.bindToContribution(uf.get);function mf(e,t,i){const n=st.id.ordered(e);return(0,pe.Ps)(n.map((n=>()=>df(this,void 0,void 0,(function*(){try{return yield n.provideLinkedEditingRanges(e,t,i)}catch(e){return void(0,it.Cp)(e)}})))),(e=>!!e&&tt.Of(null==e?void 0:e.ranges)))}(0,ee.fK)(new pf({id:"cancelLinkedEditingInput",precondition:hf,handler:e=>e.clearRanges(),kbOpts:{kbExpr:ie.u.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));const ff=(0,Le.P6)("editor.linkedEditingBackground",{dark:Ki.Il.fromHex("#f00").transparent(.3),light:Ki.Il.fromHex("#f00").transparent(.3),hc:Ki.Il.fromHex("#f00").transparent(.3)},ne.N("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,xe.Ic)(((e,t)=>{const i=e.getColor(ff);i&&t.addRule(`.monaco-editor .${cf} { background: ${i}; border-left-color: ${i}; }`)})),(0,ee.sb)("_executeLinkedEditingProvider",((e,t)=>mf(e,t,Ye.T.None))),(0,ee._K)(uf.ID,uf),(0,ee.Qr)(gf);var _f=i(27263),vf={};vf.styleTagTransform=Y(),vf.setAttributes=q(),vf.insert=j().bind(null,"head"),vf.domAPI=K(),vf.insertStyleElement=G(),H()(_f.Z,vf),_f.Z&&_f.Z.locals&&_f.Z.locals;var bf=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Cf{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return bf(this,void 0,void 0,(function*(){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}))}}class wf{constructor(e){this._disposables=new me.SL;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new Cf(e,n)));t=wf._union(t,e),(0,me.Wf)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let i,n,o,s,r=[];for(i=0,o=0,n=e.length,s=t.length;i<n&&o<s;){const n=e[i],s=t[o];be.e.areIntersectingOrTouching(n.range,s.range)?i++:be.e.compareRangesUsingStarts(n.range,s.range)<0?(r.push(n),i++):(r.push(s),o++)}for(;i<n;i++)r.push(e[i]);for(;o<s;o++)r.push(t[o]);return r}}function yf(e,t){const i=[],n=st.pM.ordered(e).reverse().map(((n,o)=>Promise.resolve(n.provideLinks(e,t)).then((e=>{e&&(i[o]=[e,n])}),it.Cp)));return Promise.all(n).then((()=>{const e=new wf((0,tt.kX)(i));return t.isCancellationRequested?(e.dispose(),new wf([])):e}))}at.P.registerCommand("_executeLinkProvider",((e,...t)=>bf(void 0,void 0,void 0,(function*(){let[i,n]=t;(0,yi.p_)(i instanceof nt.o),"number"!=typeof n&&(n=0);const o=e.get(rt.q).getModel(i);if(!o)return[];const s=yield yf(o,Ye.T.None);if(!s)return[];for(let e=0;e<Math.min(n,s.links.length);e++)yield s.links[e].resolve(Ye.T.None);const r=s.links.slice(0);return s.dispose(),r}))));var Sf=function(e,t){return function(i,n){t(i,n,e)}};const Lf={general:we.qx.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:we.qx.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class xf{constructor(e,t){this.link=e,this.decorationId=t}static decoration(e,t){return{range:e.range,options:xf._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n=Object.assign({},i?Lf.active:Lf.general);return n.hoverMessage=function(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?ne.N("links.navigate.executeCmd","Execute command"):ne.N("links.navigate.follow","Follow link"),o=t?Fe.dz?ne.N("links.navigate.kb.meta.mac","cmd + click"):ne.N("links.navigate.kb.meta","ctrl + click"):Fe.dz?ne.N("links.navigate.kb.alt.mac","option + click"):ne.N("links.navigate.kb.alt","alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){const e=i[1];t=` "${ne.N("tooltip.explanation","Execute command {0}",e)}"`}}return new B.W5("",!0).appendMarkdown(`[${n}](${e.url.toString(!0).replace(/ /g,"%20")}${t}) (${o})`)}return(new B.W5).appendText(`${n} (${o})`)}(e,t),n}activate(e,t){e.changeDecorationOptions(this.decorationId,xf._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,xf._getOptions(this.link,t,!1))}}let kf=class e{constructor(e,t,i){this.listenersToRemove=new me.SL,this.editor=e,this.openerService=t,this.notificationService=i;let n=new on(e);this.listenersToRemove.add(n),this.listenersToRemove.add(n.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this.listenersToRemove.add(n.onExecute((e=>{this.onEditorMouseUp(e)}))),this.listenersToRemove.add(n.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this.enabled=e.getOption(62),this.listenersToRemove.add(e.onDidChangeConfiguration((t=>{const i=e.getOption(62);this.enabled!==i&&(this.enabled=i,this.updateDecorations([]),this.stop(),this.beginCompute())}))),this.listenersToRemove.add(e.onDidChangeModelContent((e=>this.onChange()))),this.listenersToRemove.add(e.onDidChangeModel((e=>this.onModelChanged()))),this.listenersToRemove.add(e.onDidChangeModelLanguage((e=>this.onModelModeChanged()))),this.listenersToRemove.add(st.pM.onDidChange((e=>this.onModelModeChanged()))),this.timeout=new pe._F,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(t){return t.getContribution(e.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet((()=>this.beginCompute()),e.RECOMPUTE_TIME)}beginCompute(){return e=this,t=void 0,n=function*(){if(!this.editor.hasModel()||!this.enabled)return;const e=this.editor.getModel();if(st.pM.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=pe.PG((t=>yf(e,t)));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(e){(0,it.dL)(e)}finally{this.computePromise=null}}},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}updateDecorations(e){const t="altKey"===this.editor.getOption(69);let i=[],n=Object.keys(this.currentOccurrences);for(let e=0,t=n.length;e<t;e++){let t=n[e],o=this.currentOccurrences[t];i.push(o.decorationId)}let o=[];if(e)for(const i of e)o.push(xf.decoration(i,t));let s=this.editor.deltaDecorations(i,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=s.length;t<i;t++){let i=new xf(e[t],s[t]);this.currentOccurrences[i.decorationId]=i}}_onEditorMouseMove(e,t){const i="altKey"===this.editor.getOption(69);if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();const t=this.getLinkOccurrence(e.target.position);t&&this.editor.changeDecorations((e=>{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(69);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(Ye.T.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===mo.lg.file&&e.startsWith(`${mo.lg.file}:`)){const i=nt.o.parse(e);if(i.scheme===mo.lg.file){const n=Jt.z_(i);let o=null;n.startsWith("/./")?o=`.${n.substr(1)}`:n.startsWith("//./")&&(o=`.${n.substr(2)}`),o&&(e=Jt.Vo(t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(ne.N("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(ne.N("missing.url","Failed to open this link because its target is missing.")):(0,it.dL)(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.timeout.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};kf.ID="editor.linkDetector",kf.RECOMPUTE_TIME=1e3,kf=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Sf(1,aa.v4),Sf(2,Qt.lT)],kf);class Nf extends ee.R6{constructor(){super({id:"editor.action.openLink",label:ne.N("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let i=kf.get(t);if(!i)return;if(!t.hasModel())return;let n=t.getSelections();for(let e of n){let t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,ee._K)(kf.ID,kf),(0,ee.Qr)(Nf),(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le._Y);i&&t.addRule(`.monaco-editor .detected-link-active { color: ${i} !important; }`)}));var Df=i(11090);function Ef(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", "),t=1===i.length?ne.N("cursorAdded","Cursor added: {0}",e):ne.N("cursorsAdded","Cursors added: {0}",e);(0,F.i7)(t)}}class If extends ee.R6{constructor(){super({id:"editor.action.insertCursorAbove",label:ne.N("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"3_multi",title:ne.N({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,Df.P.addCursorUp(o,s,n)),o.revealTopMostCursor(i.source),Ef(s,o.getCursorStates())}}class Tf extends ee.R6{constructor(){super({id:"editor.action.insertCursorBelow",label:ne.N("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"3_multi",title:ne.N({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,Df.P.addCursorDown(o,s,n)),o.revealBottomMostCursor(i.source),Ef(s,o.getCursorStates())}}class Mf extends ee.R6{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:ne.N("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"3_multi",title:ne.N({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n<e.endLineNumber;n++){let e=t.getLineMaxColumn(n);i.push(new te.Y(n,e,n,e))}e.endColumn>1&&i.push(new te.Y(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates();let r=[];n.forEach((e=>this.getCursorsForSelection(e,i,r))),r.length>0&&t.setSelections(r),Ef(s,o.getCursorStates())}}class Rf extends ee.R6{constructor(){super({id:"editor.action.addCursorsToBottom",label:ne.N("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount();let o=[];for(let e=i[0].startLineNumber;e<=n;e++)o.push(new te.Y(e,i[0].startColumn,e,i[0].endColumn));const s=t._getViewModel(),r=s.getCursorStates();o.length>0&&t.setSelections(o),Ef(r,s.getCursorStates())}}class Af extends ee.R6{constructor(){super({id:"editor.action.addCursorsToTop",label:ne.N("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections();let n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new te.Y(e,i[0].startColumn,e,i[0].endColumn));const o=t._getViewModel(),s=o.getCursorStates();n.length>0&&t.setSelections(n),Ef(s,o.getCursorStates())}}class Of{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class Pf{constructor(e,t,i,n,o,s,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=o,this.matchCase=s,this.currentMatch=r}static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new Pf(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,o,s=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(s=!0,n=!0,o=!0):(n=i.wholeWord,o=i.matchCase);const a=e.getSelection();let l,d=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,d=new te.Y(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new Pf(e,t,s,l,n,o,d)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new Of(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new Of(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1);return i?new te.Y(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new Of(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new Of(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1);return i?new te.Y(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1,1073741824)):[]}}class Ff extends me.JT{constructor(e){super(),this._sessionDispose=this._register(new me.SL),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}static get(e){return e.getContribution(Ff.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=Pf.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new te.Y(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!Hf(this._editor.getModel(),t,i)){const e=this._editor.getModel();let i=[];for(let n=0,o=t.length;n<o;n++)i[n]=this._expandEmptyToWord(e,t[n]);return void this._editor.setSelections(i)}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null;const i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex)t=this._editor.getModel().findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(115):null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(i.searchScope){const e=i.searchScope;let n=[];t.forEach((t=>{e.forEach((e=>{t.range.endLineNumber<=e.endLineNumber&&t.range.startLineNumber>=e.startLineNumber&&n.push(t)}))})),t=n}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;i<n;i++){const n=t[i];if(n.range.intersectRanges(e)){t[i]=t[0],t[0]=n;break}}this._setSelections(t.map((e=>new te.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}Ff.ID="editor.contrib.multiCursorController";class Bf extends ee.R6{run(e,t){const i=Ff.get(t);if(!i)return;const n=sp.get(t);if(!n)return;const o=t._getViewModel();if(o){const e=o.getCursorStates();this._run(i,n),Ef(e,o.getCursorStates())}}}class Wf{constructor(e,t,i,n){this.searchText=e,this.matchCase=t,this.wordSeparators=i,this.modelVersionId=n}static softEquals(e,t){return!e&&!t||!(!e||!t)&&e.searchText===t.searchText&&e.matchCase===t.matchCase&&e.wordSeparators===t.wordSeparators&&e.modelVersionId===t.modelVersionId}}class Vf extends me.JT{constructor(e){super(),this.editor=e,this._isEnabled=e.getOption(96),this.decorations=[],this.updateSoon=this._register(new pe.pY((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(96)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()}))),this._register(sp.get(e).getState().onFindReplaceStateChange((e=>{this._update()})))}_update(){this._setState(Vf._createState(this._isEnabled,this.editor))}static _createState(e,t){if(!e)return null;if(!t.hasModel())return null;const i=t.getSelection();if(i.startLineNumber!==i.endLineNumber)return null;const n=Ff.get(t);if(!n)return null;const o=sp.get(t);if(!o)return null;let s=n.getSession(o);if(!s){const e=t.getSelections();if(e.length>1){const i=o.getState().matchCase;if(!Hf(t.getModel(),e,i))return null}s=Pf.create(t,o)}if(!s)return null;if(s.currentMatch)return null;if(/^[ \t]+$/.test(s.searchText))return null;if(s.searchText.length>200)return null;const r=o.getState(),a=r.matchCase;if(r.isRevealed){let e=r.searchString;a||(e=e.toLowerCase());let t=s.searchText;if(a||(t=t.toLowerCase()),e===t&&s.matchCase===r.matchCase&&s.wholeWord===r.wholeWord&&!r.isRegex)return null}return new Wf(s.searchText,s.matchCase,s.wholeWord?t.getOption(115):null,t.getModel().getVersionId())}_setState(e){if(Wf.softEquals(this.state,e))return void(this.state=e);if(this.state=e,!this.state)return void(this.decorations=this.editor.deltaDecorations(this.decorations,[]));if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=st.vH.has(t)&&this.editor.getOption(71);let n=t.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map((e=>e.range));n.sort(be.e.compareRangesUsingStarts);let o=this.editor.getSelections();o.sort(be.e.compareRangesUsingStarts);let s=[];for(let e=0,t=0,i=n.length,r=o.length;e<i;){const i=n[e];if(t>=r)s.push(i),e++;else{const n=be.e.compareRangesUsingStarts(i,o[t]);n<0?(!o[t].isEmpty()&&be.e.areIntersecting(i,o[t])||s.push(i),e++):(n>0||e++,t++)}}const r=s.map((e=>({range:e,options:i?Vf._SELECTION_HIGHLIGHT:Vf._SELECTION_HIGHLIGHT_OVERVIEW})));this.decorations=this.editor.deltaDecorations(this.decorations,r)}dispose(){this._setState(null),super.dispose()}}function Hf(e,t,i){const n=zf(e,t[0],!i);for(let o=1,s=t.length;o<s;o++){const s=t[o];if(s.isEmpty())return!1;if(n!==zf(e,s,!i))return!1}return!0}function zf(e,t,i){const n=e.getValueInRange(t);return i?n.toLowerCase():n}Vf.ID="editor.contrib.selectionHighlighter",Vf._SELECTION_HIGHLIGHT_OVERVIEW=we.qx.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",minimap:{color:(0,xe.EN)(Le.IY),position:Ce.F5.Inline},overviewRuler:{color:(0,xe.EN)(Le.SP),position:Ce.sh.Center}}),Vf._SELECTION_HIGHLIGHT=we.qx.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),(0,ee._K)(Ff.ID,Ff),(0,ee._K)(Vf.ID,Vf),(0,ee.Qr)(If),(0,ee.Qr)(Tf),(0,ee.Qr)(Mf),(0,ee.Qr)(class extends Bf{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:ne.N("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:ie.u.focus,primary:2082,weight:100},menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"3_multi",title:ne.N({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}),(0,ee.Qr)(class extends Bf{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:ne.N("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"3_multi",title:ne.N({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}),(0,ee.Qr)(class extends Bf{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:ne.N("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:ie.u.focus,primary:(0,W.gx)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}),(0,ee.Qr)(class extends Bf{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:ne.N("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}),(0,ee.Qr)(class extends Bf{constructor(){super({id:"editor.action.selectHighlights",label:ne.N("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:ie.u.focus,primary:3114,weight:100},menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"3_multi",title:ne.N({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}),(0,ee.Qr)(class extends Bf{constructor(){super({id:"editor.action.changeAll",label:ne.N("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:oe.Ao.and(ie.u.writable,ie.u.editorTextFocus),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}),(0,ee.Qr)(Rf),(0,ee.Qr)(Af);var Kf=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Uf={Visible:new oe.uy("parameterHintsVisible",!1),MultipleSignatures:new oe.uy("parameterHintsMultipleSignatures",!1)};function jf(e,t,i,n){return Kf(this,void 0,void 0,(function*(){const o=st.nD.ordered(e);for(const s of o)try{const o=yield s.provideSignatureHelp(e,t,n,i);if(o)return o}catch(e){(0,it.Cp)(e)}}))}at.P.registerCommand("_executeSignatureHelpProvider",((e,...t)=>Kf(void 0,void 0,void 0,(function*(){const[i,n,o]=t;(0,yi.p_)(nt.o.isUri(i)),(0,yi.p_)(ve.L.isIPosition(n)),(0,yi.p_)("string"==typeof o||!o);const s=yield e.get(Yi.S).createModelReference(i);try{const e=yield jf(s.object.textEditorModel,ve.L.lift(n),{triggerKind:st.WW.Invoke,isRetrigger:!1,triggerCharacter:o},Ye.T.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{s.dispose()}}))));var $f=i(19499),qf={};qf.styleTagTransform=Y(),qf.setAttributes=q(),qf.insert=j().bind(null,"head"),qf.domAPI=K(),qf.insertStyleElement=G(),H()($f.Z,qf),$f.Z&&$f.Z.locals&&$f.Z.locals;var Zf;!function(e){e.Default={type:0},e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}},e.Active=class{constructor(e){this.hints=e,this.type=1}}}(Zf||(Zf={}));class Gf extends me.JT{constructor(e,t=Gf.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new Vt.Q5),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=Zf.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new me.XK),this.triggerChars=new yd.q,this.retriggerChars=new yd.q,this.triggerId=0,this.editor=e,this.throttledDelayer=new pe.vp(t),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(st.nD.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=Zf.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!st.nD.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(it.dL)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(75).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(75).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new Zf.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return t=this,i=void 0,o=function*(){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(Qf);this._pendingTriggers=[];const o={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const s=this.editor.getModel(),r=this.editor.getPosition();this.state=new Zf.Pending((0,pe.PG)((e=>jf(s,r,o,e))),i);try{const t=yield this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new Zf.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=Zf.Default),(0,it.dL)(t),!1}},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new yd.q,this.retriggerChars=new yd.q;const e=this.editor.getModel();if(e)for(const t of st.nD.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])this.triggerChars.add(e.charCodeAt(0)),this.retriggerChars.add(e.charCodeAt(0));for(const e of t.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:st.WW.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:st.WW.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:st.WW.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(75).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function Qf(e,t){switch(t.triggerKind){case st.WW.Invoke:return t;case st.WW.ContentChange:return e;case st.WW.TriggerCharacter:default:return t}}Gf.DEFAULT_DELAY=120;var Yf=function(e,t){return function(i,n){t(i,n,e)}};const Jf=Et.$,Xf=(0,xa.q5)("parameter-hints-next",Wt.lA.chevronDown,ne.N("parameterHintsNextIcon","Icon for show next parameter hint.")),e_=(0,xa.q5)("parameter-hints-previous",Wt.lA.chevronUp,ne.N("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let t_=class e extends me.JT{constructor(e,t,i,n){super(),this.editor=e,this.renderDisposeables=this._register(new me.SL),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new ca({editor:e},n,i)),this.model=this._register(new Gf(e)),this.keyVisible=Uf.Visible.bindTo(t),this.keyMultipleSignatures=Uf.MultipleSignatures.bindTo(t),this._register(this.model.onChangedHints((e=>{e?(this.show(),this.render(e)):this.hide()})))}createParameterHintDOMNodes(){const e=Jf(".editor-widget.parameter-hints-widget"),t=Et.R3(e,Jf(".phwrapper"));t.tabIndex=-1;const i=Et.R3(t,Jf(".controls")),n=Et.R3(i,Jf(".button"+xe.kS.asCSSSelector(e_))),o=Et.R3(i,Jf(".overloads")),s=Et.R3(i,Jf(".button"+xe.kS.asCSSSelector(Xf)));this._register(Et.nm(n,"click",(e=>{Et.zB.stop(e),this.previous()}))),this._register(Et.nm(s,"click",(e=>{Et.zB.stop(e),this.next()})));const r=Jf(".body"),a=new Ms.s$(r,{});this._register(a),t.appendChild(a.getDomNode());const l=Et.R3(r,Jf(".signature")),d=Et.R3(r,Jf(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:o,docs:d,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const h=()=>{if(!this.domNodes)return;const e=this.editor.getOption(43);this.domNodes.element.style.fontSize=`${e.fontSize}px`,this.domNodes.element.style.lineHeight=""+e.lineHeight/e.fontSize};h(),this._register(Vt.ju.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((e=>e.hasChanged(43))).on(h,null)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{this.domNodes&&this.domNodes.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const o=Et.R3(this.domNodes.signature,Jf(".code")),s=this.editor.getOption(43);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;const r=n.parameters.length>0,a=null!==(t=n.activeParameter)&&void 0!==t?t:e.activeParameter;r?this.renderParameters(o,n,a):Et.R3(o,Jf("span")).textContent=n.label;const l=n.parameters[a];if(null==l?void 0:l.documentation){const e=Jf("span.documentation");if("string"==typeof l.documentation)e.textContent=l.documentation;else{const t=this.renderMarkdownDocs(l.documentation);e.appendChild(t.element)}Et.R3(this.domNodes.docs,Jf("p",{},e))}if(void 0===n.documentation);else if("string"==typeof n.documentation)Et.R3(this.domNodes.docs,Jf("p",{},n.documentation));else{const e=this.renderMarkdownDocs(n.documentation);Et.R3(this.domNodes.docs,e.element)}const d=this.hasDocs(n,l);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,l){let e="";const t=n.parameters[a];e=Array.isArray(t.label)?n.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),n.documentation&&(e+="string"==typeof n.documentation?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==e&&(F.Z9(ne.N("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var e;null===(e=this.domNodes)||void 0===e||e.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&(0,yi.cW)(t.documentation).length>0||t&&"object"==typeof t.documentation&&(0,yi.cW)(t.documentation).value.length>0||e.documentation&&"string"==typeof e.documentation&&(0,yi.cW)(e.documentation).length>0||e.documentation&&"object"==typeof e.documentation&&(0,yi.cW)(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,o]=this.getParameterLabelOffsets(t,i),s=document.createElement("span");s.textContent=t.label.substring(0,n);const r=document.createElement("span");r.textContent=t.label.substring(n,o),r.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(o),Et.R3(e,s,r,a)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${(0,Xe.ec)(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return e.ID}trigger(e){this.model.trigger(e,0)}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};t_.ID="editor.widget.parameterHintsWidget",t_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Yf(1,oe.i6),Yf(2,aa.v4),Yf(3,Zi.h)],t_);const i_=(0,Le.P6)("editorHoverWidget.highlightForeground",{dark:Le.Gw,light:Le.Gw,hc:Le.Gw},ne.N("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le.CN);if(i){const n=e.type===Lt.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .parameter-hints-widget { border: ${n}px solid ${i}; }`),t.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${i.transparent(.5)}; }`)}const n=e.getColor(Le.yJ);n&&t.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${n}; }`);const o=e.getColor(Le.ur);o&&t.addRule(`.monaco-editor .parameter-hints-widget a { color: ${o}; }`);const s=e.getColor(Le.sg);s&&t.addRule(`.monaco-editor .parameter-hints-widget a:hover { color: ${s}; }`);const r=e.getColor(Le.Sb);r&&t.addRule(`.monaco-editor .parameter-hints-widget { color: ${r}; }`);const a=e.getColor(Le.Sw);a&&t.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${a}; }`);const l=e.getColor(i_);l&&t.addRule(`.monaco-editor .parameter-hints-widget .parameter.active { color: ${l}}`)}));let n_=class e extends me.JT{constructor(e,t){super(),this.editor=e,this.widget=this._register(t.createInstance(t_,this.editor))}static get(t){return t.getContribution(e.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(e){this.widget.trigger(e)}};n_.ID="editor.controller.parameterHints",n_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,Dt.TG)],n_);class o_ extends ee.R6{constructor(){super({id:"editor.action.triggerParameterHints",label:ne.N("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:ie.u.hasSignatureHelpProvider,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=n_.get(t);i&&i.trigger({triggerKind:st.WW.Invoke})}}(0,ee._K)(n_.ID,n_),(0,ee.Qr)(o_);const s_=ee._l.bindToContribution(n_.get);(0,ee.fK)(new s_({id:"closeParameterHints",precondition:Uf.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:ie.u.focus,primary:9,secondary:[1033]}})),(0,ee.fK)(new s_({id:"showPrevParameterHint",precondition:oe.Ao.and(Uf.Visible,Uf.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:ie.u.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,ee.fK)(new s_({id:"showNextParameterHint",precondition:oe.Ao.and(Uf.Visible,Uf.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:ie.u.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var r_=i(4849),a_=i(69868),l_=i(95954),d_=i(93287),h_={};h_.styleTagTransform=Y(),h_.setAttributes=q(),h_.insert=j().bind(null,"head"),h_.domAPI=K(),h_.insertStyleElement=G(),H()(d_.Z,h_),d_.Z&&d_.Z.locals&&d_.Z.locals;var c_=function(e,t){return function(i,n){t(i,n,e)}};const u_=new oe.uy("renameInputVisible",!1,(0,ne.N)("renameInputVisible","Whether the rename input widget is visible"));let g_=class{constructor(e,t,i,n,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new me.SL,this.allowEditorOverflow=!0,this._visibleContextKey=u_.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(43)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,ne.N)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const e=()=>{var e,t;const[i,n]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(i),this._label.innerText=(0,ne.N)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",null===(e=this._keybindingService.lookupKeybinding(i))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(n))||void 0===t?void 0:t.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,i,n,o;if(!this._input||!this._domNode)return;const s=e.getColor(Le.rh);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(Le.D0))&&void 0!==t?t:""),this._domNode.style.boxShadow=s?` 0 0 8px 2px ${s}`:"",this._domNode.style.color=String(null!==(i=e.getColor(Le.zJ))&&void 0!==i?i:""),this._input.style.backgroundColor=String(null!==(n=e.getColor(Le.sE))&&void 0!==n?n:"");const r=e.getColor(Le.dt);this._input.style.borderWidth=r?"1px":"0px",this._input.style.borderStyle=r?"solid":"none",this._input.style.borderColor=null!==(o=null==r?void 0:r.toString())&&void 0!==o?o:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(43);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=.8*e.fontSize+"px"}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){this._currentAcceptInput&&this._currentAcceptInput(e)}cancelInput(e){this._currentCancelInput&&this._currentCancelInput(e)}getInput(e,t,i,n,o,s){this._domNode.classList.toggle("preview",o),this._position=new ve.L(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);const r=new me.SL;return new Promise((e=>{this._currentCancelInput=t=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e(t),!0),this._currentAcceptInput=i=>{0!==this._input.value.trim().length&&this._input.value!==t?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e({newName:this._input.value,wantsPreview:o&&i})):this.cancelInput(!0)},s.onCancellationRequested((()=>this.cancelInput(!0))),r.add(this._editor.onDidBlurEditorWidget((()=>this.cancelInput(!1)))),this._show()})).finally((()=>{r.dispose(),this._hide()}))}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))}),100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};g_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([c_(2,xe.XE),c_(3,Mt.d),c_(4,oe.i6)],g_);var p_=function(e,t){return function(i,n){t(i,n,e)}},m_=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class f_{constructor(e,t){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=st.G0.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return m_(this,void 0,void 0,(function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const i=this._providers[this._providerRenameIdx];if(!i.resolveRenameLocation)break;let n=yield i.resolveRenameLocation(this.model,this.position,e);if(n){if(!n.rejectReason)return n;t.push(n.rejectReason)}}const i=this.model.getWordAtPosition(this.position);return i?{range:new be.e(this.position.lineNumber,i.startColumn,this.position.lineNumber,i.endColumn),text:i.word,rejectReason:t.length>0?t.join("\n"):void 0}:{range:be.e.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}))}provideRenameEdits(e,t){return m_(this,void 0,void 0,(function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}))}_provideRenameEdits(e,t,i,n){return m_(this,void 0,void 0,(function*(){const o=this._providers[t];if(!o)return{edits:[],rejectReason:i.join("\n")};const s=yield o.provideRenameEdits(this.model,this.position,e,n);return s?s.rejectReason?this._provideRenameEdits(e,t+1,i.concat(s.rejectReason),n):s:this._provideRenameEdits(e,t+1,i.concat(ne.N("no result","No result.")),n)}))}}let __=class e{constructor(e,t,i,n,o,s,r){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=s,this._configService=r,this._dispoableStore=new me.SL,this._cts=new Ye.A,this._renameInputField=this._dispoableStore.add(new pe.Ue((()=>this._dispoableStore.add(this._instaService.createInstance(g_,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"])))))}static get(t){return t.getContribution(e.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return m_(this,void 0,void 0,(function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const e=this.editor.getPosition(),t=new f_(this.editor.getModel(),e);if(!t.hasProvider())return;let i;this._cts=new ot.Dl(this.editor,5);try{const e=t.resolveRenameLocation(this._cts.token);this._progressService.showWhile(e,250),i=yield e}catch(t){return void xt.get(this.editor).showMessage(t||ne.N("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),e)}if(!i)return;if(i.rejectReason)return void xt.get(this.editor).showMessage(i.rejectReason,e);if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new ot.Dl(this.editor,5,i.range);let n=this.editor.getSelection(),o=0,s=i.text.length;be.e.isEmpty(n)||be.e.spansMultipleLines(n)||!be.e.containsRange(i.range,n)||(o=Math.max(0,n.startColumn-i.range.startColumn),s=Math.min(i.range.endColumn,n.endColumn)-i.range.startColumn);const r=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),a=yield this._renameInputField.value.getInput(i.range,i.text,o,s,r,this._cts.token);if("boolean"==typeof a)return void(a&&this.editor.focus());this.editor.focus();const l=(0,pe.eP)(t.provideRenameEdits(a.newName,this._cts.token),this._cts.token).then((e=>m_(this,void 0,void 0,(function*(){e&&this.editor.hasModel()&&(e.rejectReason?this._notificationService.info(e.rejectReason):(this.editor.setSelection(be.e.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(et.fo.convert(e),{editor:this.editor,showPreview:a.wantsPreview,label:ne.N("label","Renaming '{0}'",null==i?void 0:i.text),quotableLabel:ne.N("quotableLabel","Renaming {0}",null==i?void 0:i.text)}).then((e=>{e.ariaSummary&&(0,F.Z9)(ne.N("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",i.text,a.newName,e.ariaSummary))})).catch((e=>{this._notificationService.error(ne.N("rename.failedApply","Rename failed to apply edits")),this._logService.error(e)}))))}))),(e=>{this._notificationService.error(ne.N("rename.failed","Rename failed to compute edits")),this._logService.error(e)}));return this._progressService.showWhile(l,250),l}))}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};__.ID="editor.contrib.renameController",__=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([p_(1,Dt.TG),p_(2,Qt.lT),p_(3,et.vu),p_(4,lt.e),p_(5,hd.VZ),p_(6,r_.V)],__);class v_ extends ee.R6{constructor(){super({id:"editor.action.rename",label:ne.N("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:oe.Ao.and(ie.u.writable,ie.u.hasRenameProvider),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(We.$),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return nt.o.isUri(n)&&ve.L.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),it.dL):super.runCommand(e,t)}run(e,t){const i=__.get(t);return i?i.run():Promise.resolve()}}(0,ee._K)(__.ID,__),(0,ee.Qr)(v_);const b_=ee._l.bindToContribution(__.get);(0,ee.fK)(new b_({id:"acceptRenameInput",precondition:u_,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:ie.u.focus,primary:3}})),(0,ee.fK)(new b_({id:"acceptRenameInputWithPreview",precondition:oe.Ao.and(u_,oe.Ao.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:ie.u.focus,primary:1027}})),(0,ee.fK)(new b_({id:"cancelRenameInput",precondition:u_,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:ie.u.focus,primary:9,secondary:[1033]}})),(0,ee.sb)("_executeDocumentRenameProvider",(function(e,t,...i){const[n]=i;return(0,yi.p_)("string"==typeof n),function(e,t,i){return m_(this,void 0,void 0,(function*(){const n=new f_(e,t),o=yield n.resolveRenameLocation(Ye.T.None);return(null==o?void 0:o.rejectReason)?{edits:[],rejectReason:o.rejectReason}:n.provideRenameEdits(i,Ye.T.None)}))}(e,t,n)})),(0,ee.sb)("_executePrepareRename",(function(e,t){return m_(this,void 0,void 0,(function*(){const i=new f_(e,t),n=yield i.resolveRenameLocation(Ye.T.None);if(null==n?void 0:n.rejectReason)throw new Error(n.rejectReason);return n}))})),l_.B.as(a_.IP.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:ne.N("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var C_=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class w_{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new w_(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}class y_{constructor(e){this._editor=e,this._ignoreSelection=!1}static get(e){return e.getContribution(y_.ID)}dispose(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}run(e){return C_(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(!st.AC.has(i))return;if(this._state||(yield L_(i,t.map((e=>e.getPosition())),this._editor.getOption(101),Ye.T.None).then((e=>{var i;if(tt.Of(e)&&e.length===t.length&&this._editor.hasModel()&&tt.fS(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;i<e.length;i++)e[i]=e[i].filter((e=>e.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new w_(0,e))),null===(i=this._selectionListener)||void 0===i||i.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{var e;this._ignoreSelection||(null===(e=this._selectionListener)||void 0===e||e.dispose(),this._state=void 0)}))}}))),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const n=this._state.map((e=>te.Y.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}}))}}y_.ID="editor.contrib.smartSelectController";class S_ extends ee.R6{constructor(e,t){super(t),this._forward=e}run(e,t){return C_(this,void 0,void 0,(function*(){let e=y_.get(t);e&&(yield e.run(this._forward))}))}}function L_(e,t,i,n){return C_(this,void 0,void 0,(function*(){const o=st.AC.all(e);1===o.length&&o.unshift(new xd);let s=[],r=[];for(const i of o)s.push(Promise.resolve(i.provideSelectionRanges(e,t,n)).then((e=>{if(tt.Of(e)&&e.length===t.length)for(let i=0;i<t.length;i++){r[i]||(r[i]=[]);for(const n of e[i])be.e.isIRange(n.range)&&be.e.containsPosition(n.range,t[i])&&r[i].push(be.e.lift(n.range))}}),it.Cp));return yield Promise.all(s),r.map((t=>{if(0===t.length)return[];t.sort(((e,t)=>ve.L.isBefore(e.getStartPosition(),t.getStartPosition())?1:ve.L.isBefore(t.getStartPosition(),e.getStartPosition())||ve.L.isBefore(e.getEndPosition(),t.getEndPosition())?-1:ve.L.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));let n,o=[];for(const e of t)(!n||be.e.containsRange(e,n)&&!be.e.equalsRange(e,n))&&(o.push(e),n=e);if(!i.selectLeadingAndTrailingWhitespace)return o;let s=[o[0]];for(let t=1;t<o.length;t++){const i=o[t-1],n=o[t];if(n.startLineNumber!==i.startLineNumber||n.endLineNumber!==i.endLineNumber){const t=new be.e(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineLastNonWhitespaceColumn(i.endLineNumber));t.containsRange(i)&&!t.equalsRange(i)&&n.containsRange(t)&&!n.equalsRange(t)&&s.push(t);const o=new be.e(i.startLineNumber,1,i.endLineNumber,e.getLineMaxColumn(i.endLineNumber));o.containsRange(i)&&!o.equalsRange(t)&&n.containsRange(o)&&!n.equalsRange(o)&&s.push(o)}s.push(n)}return s}))}))}at.P.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand"),(0,ee._K)(y_.ID,y_),(0,ee.Qr)(class extends S_{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:ne.N("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"1_basic",title:ne.N({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}),(0,ee.Qr)(class extends S_{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:ne.N("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:Se.eH.MenubarSelectionMenu,group:"1_basic",title:ne.N({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}),st.AC.register("*",new class{provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;let{word:o,startColumn:s}=n,r=i.column-s,a=r,l=r,d=0;for(;a>=0;a--){let e=o.charCodeAt(a);if(a!==r&&(95===e||45===e))break;if((0,Xe.mK)(e)&&(0,Xe.df)(d))break;d=e}for(a+=1;l<o.length;l++){let e=o.charCodeAt(l);if((0,Xe.df)(e)&&(0,Xe.mK)(d))break;if(95===e||45===e)break;d=e}a<l&&e.push({range:new be.e(i.lineNumber,s+a,i.lineNumber,s+l)})}_addWordRanges(e,t,i){const n=t.getWordAtPosition(i);n&&e.push({range:new be.e(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new be.e(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}),(0,ee.f)("_executeSelectionRangeProvider",(function(e,...t){const[i]=t;return L_(e,i,{selectLeadingAndTrailingWhitespace:!0},Ye.T.None)}));class x_ extends ee.R6{constructor(){super({id:"editor.action.forceRetokenize",label:ne.N("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.resetTokenization();const n=new Jl.G(!0);i.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}(0,ee.Qr)(x_);var k_=i(38701);class N_ extends ee.R6{constructor(){super({id:N_.ID,label:ne.N({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const i=!k_.nG.getTabFocusMode();k_.nG.setTabFocusMode(i),i?(0,F.Z9)(ne.N("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,F.Z9)(ne.N("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}N_.ID="editor.action.toggleTabFocusMode",(0,ee.Qr)(N_);var D_=i(73444),E_=function(e,t){return function(i,n){t(i,n,e)}};const I_="ignoreUnusualLineTerminators";let T_=class extends me.JT{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._config=this._editor.getOption(112),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(112)&&(this._config=this._editor.getOption(112),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()})))}_checkForUnusualLineTerminators(){return e=this,t=void 0,n=function*(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=function(e,t){return e.getModelProperty(t.uri,I_)}(this._codeEditorService,e);!0!==t&&(this._editor.getOption(80)||("auto"!==this._config?(yield this._dialogService.confirm({title:ne.N("unusualLineTerminators.title","Unusual Line Terminators"),message:ne.N("unusualLineTerminators.message","Detected unusual line terminators"),detail:ne.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,Jt.EZ)(e.uri)),primaryButton:ne.N("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:ne.N("unusualLineTerminators.ignore","Ignore")})).confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,i){e.setModelProperty(t.uri,I_,!0)}(this._codeEditorService,e):e.removeUnusualLineTerminators(this._editor.getSelections())))},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}};T_.ID="editor.contrib.unusualLineTerminatorsDetector",T_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([E_(1,D_.S),E_(2,We.$)],T_),(0,ee._K)(T_.ID,T_);var M_=i(94848),R_=i(14634),A_=i(14281),O_=function(e,t){return function(i,n){t(i,n,e)}};let P_=class extends me.JT{constructor(e,t,i,n){super(),this._modelService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._tokenizeViewport=new pe.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((e=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(st.K7.onDidChange((()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(R_.e3)&&(this._cancelAll(),this._tokenizeViewport.schedule())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),this._tokenizeViewport.schedule()})))}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e)return void this._outstandingRequests.splice(t,1)}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.hasCompleteSemanticTokens())return;if(!(0,R_.tw)(e,this._themeService,this._configurationService))return void(e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1));if(!(0,M_.KO)(e))return void(e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1));const t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map((t=>this._requestRange(e,t))))}_requestRange(e,t){const i=e.getVersionId(),n=(0,pe.PG)((i=>Promise.resolve((0,M_.OG)(e,t,i))));return n.then((n=>{if(!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:o,tokens:s}=n,r=this._modelService.getSemanticTokensProviderStyling(o);e.setPartialSemanticTokens(t,(0,A_.h)(s,r,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(n)),(()=>this._removeOutstandingRequest(n))),n}};P_.ID="editor.contrib.viewportSemanticTokens",P_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([O_(1,rt.q),O_(2,xe.XE),O_(3,ji.Ui)],P_),(0,ee._K)(P_.ID,P_);const F_=(0,Le.P6)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},ne.N("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),B_=(0,Le.P6)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},ne.N("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),W_=(0,Le.P6)("editor.wordHighlightBorder",{light:null,dark:null,hc:Le.xL},ne.N("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),V_=(0,Le.P6)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:Le.xL},ne.N("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),H_=(0,Le.P6)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},ne.N("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),z_=(0,Le.P6)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},ne.N("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),K_=new oe.uy("hasWordHighlights",!1);function U_(e,t,i){const n=st.vH.ordered(e);return(0,pe.Ps)(n.map((n=>()=>Promise.resolve(n.provideDocumentHighlights(e,t,i)).then(void 0,it.Cp))),tt.Of)}class j_{constructor(e,t,i){this._wordRange=this._getCurrentWordRange(e,t),this.result=(0,pe.PG)((n=>this._compute(e,t,i,n)))}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new be.e(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,s=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let t=0,r=i.length;!a&&t<r;t++){let r=e.getDecorationRange(i[t]);r&&r.startLineNumber===n&&r.startColumn<=o&&r.endColumn>=s&&(a=!0)}return a}cancel(){this.result.cancel()}}class $_ extends j_{_compute(e,t,i,n){return U_(e,t.getPosition(),n).then((e=>e||[]))}}class q_ extends j_{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return(0,pe.Vs)(250,n).then((()=>{if(!t.isEmpty())return[];const n=e.getWordAtPosition(t.getPosition());return!n||n.word.length>1e3?[]:e.findMatches(n.word,!0,!1,!0,i,!1).map((e=>({range:e.range,kind:st.MY.Text})))}))}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty===n&&super.isValid(e,t,i)}}(0,ee.sb)("_executeDocumentHighlights",((e,t)=>U_(e,t,Ye.T.None)));class Z_{constructor(e,t){this.toUnhook=new me.SL,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=K_.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(71),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(e)}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{this._stopAll()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{let t=this.editor.getOption(71);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())}))),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return tt.kX(this._decorationIds.map((e=>this.model.getDecorationRange(e))).sort(be.e.compareRangesUsingStarts))}moveNext(){let e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const o=this.editor.getModel().getLineContent(i.startLineNumber);(0,F.Z9)(`${o}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const o=this.editor.getModel().getLineContent(i.startLineNumber);(0,F.Z9)(`${o}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber)return void this._stopAll();let t=e.startColumn,i=e.endColumn;const n=this._getWord();if(!n||n.startColumn>t||n.endColumn<i)return void this._stopAll();const o=this.workerRequest&&this.workerRequest.isValid(this.model,e,this._decorationIds);if(this.lastCursorPositionChangeTime=(new Date).getTime(),o)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let e=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=function(e,t,i){return st.vH.has(e)?new $_(e,t,i):new q_(e,t,i)}(this.model,this.editor.getSelection(),this.editor.getOption(115)),this.workerRequest.result.then((t=>{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=t||[],this._beginRenderDecorations())}),it.dL)}}_beginRenderDecorations(){let e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:Z_._getDecorationOptions(t.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===st.MY.Write?this._WRITE_OPTIONS:e===st.MY.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}Z_._WRITE_OPTIONS=we.qx.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,xe.EN)(z_),position:Ce.sh.Center},minimap:{color:(0,xe.EN)(Le.IY),position:Ce.F5.Inline}}),Z_._TEXT_OPTIONS=we.qx.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,xe.EN)(Le.SP),position:Ce.sh.Center},minimap:{color:(0,xe.EN)(Le.IY),position:Ce.F5.Inline}}),Z_._REGULAR_OPTIONS=we.qx.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,xe.EN)(H_),position:Ce.sh.Center},minimap:{color:(0,xe.EN)(Le.IY),position:Ce.F5.Inline}});let G_=class e extends me.JT{constructor(e,t){super(),this.wordHighlighter=null;const i=()=>{e.hasModel()&&(this.wordHighlighter=new Z_(e,t))};this._register(e.onDidChangeModel((e=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),i()}))),i()}static get(t){return t.getContribution(e.ID)}saveViewState(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};G_.ID="editor.contrib.wordHighlighter",G_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,oe.i6)],G_);class Q_ extends ee.R6{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=G_.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class Y_ extends ee.R6{constructor(){super({id:"editor.action.wordHighlight.trigger",label:ne.N("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:K_.toNegated(),kbOpts:{kbExpr:ie.u.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=G_.get(t);n&&n.restoreViewState(!0)}}(0,ee._K)(G_.ID,G_),(0,ee.Qr)(class extends Q_{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:ne.N("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:K_,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:65,weight:100}})}}),(0,ee.Qr)(class extends Q_{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:ne.N("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:K_,kbOpts:{kbExpr:ie.u.editorTextFocus,primary:1089,weight:100}})}}),(0,ee.Qr)(Y_),(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le.Rz);i&&(t.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${i}; }`),t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`));const n=e.getColor(F_);n&&t.addRule(`.monaco-editor .wordHighlight { background-color: ${n}; }`);const o=e.getColor(B_);o&&t.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${o}; }`);const s=e.getColor(Le.g_);s&&t.addRule(`.monaco-editor .selectionHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const r=e.getColor(W_);r&&t.addRule(`.monaco-editor .wordHighlight { border: 1px ${"hc"===e.type?"dashed":"solid"} ${r}; box-sizing: border-box; }`);const a=e.getColor(V_);a&&t.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${"hc"===e.type?"dashed":"solid"} ${a}; box-sizing: border-box; }`)}));var J_=i(91093),X_=i(20904),ev=i(53551);class tv extends ee._l{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,X_.u)(t.getOption(115)),o=t.getModel(),s=t.getSelections().map((e=>{const t=new ve.L(e.positionLineNumber,e.positionColumn),i=this._move(n,o,t,this._wordNavigationType);return this._moveTo(e,i,this._inSelectionMode)}));if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,s.map((e=>lc.Vi.fromModelSelection(e)))),1===s.length){const e=new ve.L(s[0].positionLineNumber,s[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new te.Y(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new te.Y(t.lineNumber,t.column,t.lineNumber,t.column)}}class iv extends tv{_move(e,t,i,n){return J_.w.moveWordLeft(e,t,i,n)}}class nv extends tv{_move(e,t,i,n){return J_.w.moveWordRight(e,t,i,n)}}class ov extends ee._l{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,X_.u)(t.getOption(115)),o=t.getModel(),s=t.getSelections(),r=t.getOption(5),a=t.getOption(8),l=vo.zu.getAutoClosingPairs(o.getLanguageId()),d=t._getViewModel(),h=s.map((e=>{const i=this._delete({wordSeparators:n,model:o,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:r,autoClosingQuotes:a,autoClosingPairs:l,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Re.T4(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}}class sv extends ov{_delete(e,t){return J_.w.deleteWordLeft(e,t)||new be.e(1,1,1,1)}}class rv extends ov{_delete(e,t){let i=J_.w.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new be.e(n,o,n,o)}}class av extends ee.R6{constructor(){super({id:"deleteInsideWord",precondition:ie.u.writable,label:ne.N("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=(0,X_.u)(t.getOption(115)),o=t.getModel(),s=t.getSelections().map((e=>{const t=J_.w.deleteInsideWord(n,o,e);return new Re.T4(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}(0,ee.fK)(new class extends iv{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}),(0,ee.fK)(new class extends iv{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}),(0,ee.fK)(new class extends iv{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:oe.Ao.and(ie.u.textInputFocus,null===(e=oe.Ao.and(dn.U,ev.c))||void 0===e?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}),(0,ee.fK)(new class extends iv{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}),(0,ee.fK)(new class extends iv{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}),(0,ee.fK)(new class extends iv{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:oe.Ao.and(ie.u.textInputFocus,null===(e=oe.Ao.and(dn.U,ev.c))||void 0===e?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}),(0,ee.fK)(new class extends nv{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}),(0,ee.fK)(new class extends nv{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:oe.Ao.and(ie.u.textInputFocus,null===(e=oe.Ao.and(dn.U,ev.c))||void 0===e?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}),(0,ee.fK)(new class extends nv{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}),(0,ee.fK)(new class extends nv{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}),(0,ee.fK)(new class extends nv{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:oe.Ao.and(ie.u.textInputFocus,null===(e=oe.Ao.and(dn.U,ev.c))||void 0===e?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}),(0,ee.fK)(new class extends nv{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}),(0,ee.fK)(new class extends iv{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move((0,X_.u)(Ci.BH.wordSeparators.defaultValue),t,i,n)}}),(0,ee.fK)(new class extends iv{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,X_.u)(Ci.BH.wordSeparators.defaultValue),t,i,n)}}),(0,ee.fK)(new class extends nv{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move((0,X_.u)(Ci.BH.wordSeparators.defaultValue),t,i,n)}}),(0,ee.fK)(new class extends nv{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,X_.u)(Ci.BH.wordSeparators.defaultValue),t,i,n)}}),(0,ee.fK)(new class extends sv{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:ie.u.writable})}}),(0,ee.fK)(new class extends sv{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:ie.u.writable})}}),(0,ee.fK)(new class extends sv{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}),(0,ee.fK)(new class extends rv{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:ie.u.writable})}}),(0,ee.fK)(new class extends rv{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:ie.u.writable})}}),(0,ee.fK)(new class extends rv{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}),(0,ee.Qr)(av);class lv extends tv{_move(e,t,i,n){return J_.L.moveWordPartLeft(e,t,i)}}at.P.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft"),at.P.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class dv extends tv{_move(e,t,i,n){return J_.L.moveWordPartRight(e,t,i)}}(0,ee.fK)(new class extends ov{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){return J_.L.deleteWordPartLeft(e)||new be.e(1,1,1,1)}}),(0,ee.fK)(new class extends ov{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:ie.u.writable,kbOpts:{kbExpr:ie.u.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let i=J_.L.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new be.e(n,o,n,o)}}),(0,ee.fK)(new class extends lv{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:ie.u.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}),(0,ee.fK)(new class extends lv{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:ie.u.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}),(0,ee.fK)(new class extends dv{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:ie.u.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}),(0,ee.fK)(new class extends dv{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:ie.u.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}});var hv=i(17799),cv=i(85081),uv={};uv.styleTagTransform=Y(),uv.setAttributes=q(),uv.insert=j().bind(null,"head"),uv.domAPI=K(),uv.insertStyleElement=G(),H()(cv.Z,uv),cv.Z&&cv.Z.locals&&cv.Z.locals;var gv=i(82704),pv=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},mv=function(e,t){return function(i,n){t(i,n,e)}};const fv=new oe.uy("accessibilityHelpWidgetVisible",!1);let _v=class e extends me.JT{constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(vv,this._editor))}static get(t){return t.getContribution(e.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};_v.ID="editor.contrib.accessibilityHelpController",_v=pv([mv(1,Dt.TG)],_v);let vv=class e extends Bs.${constructor(e,t,i,n){super(),this._contextKeyService=t,this._keybindingService=i,this._openerService=n,this._editor=e,this._isVisibleKey=fv.bindTo(this._contextKeyService),this._domNode=(0,gv.X)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=(0,gv.X)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange((()=>{this._isVisible&&this._layout()}))),this._register(Et.mu(this._contentDomNode.domNode,"keydown",(e=>{if(this._isVisible&&(e.equals(2083)&&((0,F.Z9)(hv.Oe.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),Et.PO(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){(0,F.Z9)(hv.Oe.openingDocs);let t=this._editor.getRawOptions().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(nt.o.parse(t)),e.preventDefault(),e.stopPropagation()}}))),this.onblur(this._contentDomNode.domNode,(()=>{this.hide()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return e.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,i){let n=this._keybindingService.lookupKeybinding(e);return n?Xe.WU(t,n.getAriaLabel()):Xe.WU(i,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let i=0;if(t){const e=this._editor.getModel();e&&t.forEach((t=>{i+=e.getValueLengthInRange(t)}))}let n=function(e,t){return e&&0!==e.length?1===e.length?t?Xe.WU(hv.Oe.singleSelectionRange,e[0].positionLineNumber,e[0].positionColumn,t):Xe.WU(hv.Oe.singleSelection,e[0].positionLineNumber,e[0].positionColumn):t?Xe.WU(hv.Oe.multiSelectionRange,e.length,t):e.length>0?Xe.WU(hv.Oe.multiSelection,e.length):"":hv.Oe.noSelection}(t,i);e.get(53)?e.get(80)?n+=hv.Oe.readonlyDiffEditor:n+=hv.Oe.editableDiffEditor:e.get(80)?n+=hv.Oe.readonlyEditor:n+=hv.Oe.editableEditor;const o=Fe.dz?hv.Oe.changeConfigToOnMac:hv.Oe.changeConfigToOnWinLinux;switch(e.get(2)){case 0:n+="\n\n - "+o;break;case 2:n+="\n\n - "+hv.Oe.auto_on;break;case 1:n+="\n\n - "+hv.Oe.auto_off,n+=" "+o}e.get(128)?n+="\n\n - "+this._descriptionForCommand(N_.ID,hv.Oe.tabFocusModeOnMsg,hv.Oe.tabFocusModeOnMsgNoKb):n+="\n\n - "+this._descriptionForCommand(N_.ID,hv.Oe.tabFocusModeOffMsg,hv.Oe.tabFocusModeOffMsgNoKb),n+="\n\n - "+(Fe.dz?hv.Oe.openDocMac:hv.Oe.openDocWinLinux),n+="\n\n"+hv.Oe.outroMsg,this._contentDomNode.domNode.appendChild((0,ea.BO)(n)),this._contentDomNode.domNode.setAttribute("aria-label",n)}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,Et.PO(this._contentDomNode.domNode),this._editor.focus())}_layout(){let t=this._editor.getLayoutInfo(),i=Math.max(5,Math.min(e.WIDTH,t.width-40)),n=Math.max(5,Math.min(e.HEIGHT,t.height-40));this._domNode.setWidth(i),this._domNode.setHeight(n);let o=Math.round((t.height-n)/2);this._domNode.setTop(o);let s=Math.round((t.width-i)/2);this._domNode.setLeft(s)}};vv.ID="editor.contrib.accessibilityHelpWidget",vv.WIDTH=500,vv.HEIGHT=300,vv=pv([mv(1,oe.i6),mv(2,Mt.d),mv(3,aa.v4)],vv);class bv extends ee.R6{constructor(){super({id:"editor.action.showAccessibilityHelp",label:hv.Oe.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let i=_v.get(t);i&&i.show()}}(0,ee._K)(_v.ID,_v),(0,ee.Qr)(bv);const Cv=ee._l.bindToContribution(_v.get);(0,ee.fK)(new Cv({id:"closeAccessibilityHelp",precondition:fv,handler:e=>e.hide(),kbOpts:{weight:200,kbExpr:ie.u.focus,primary:9,secondary:[1033]}})),(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le.D0);i&&t.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${i}; }`);const n=e.getColor(Le.Hf);n&&t.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${n}; }`);const o=e.getColor(Le.rh);o&&t.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${o}; }`);const s=e.getColor(Le.lR);s&&t.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${s}; }`)}));var wv=i(30412),yv={};yv.styleTagTransform=Y(),yv.setAttributes=q(),yv.insert=j().bind(null,"head"),yv.domAPI=K(),yv.insertStyleElement=G(),H()(wv.Z,yv),wv.Z&&wv.Z.locals&&wv.Z.locals;class Sv extends me.JT{constructor(e){super(),this.editor=e,this.widget=null,Fe.gn&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(80);!this.widget&&e?this.widget=new Lv(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}Sv.ID="editor.contrib.iPadShowKeyboard";class Lv extends me.JT{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(Et.nm(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(Et.nm(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return Lv.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}Lv.ID="editor.contrib.ShowKeyboardWidget",(0,ee._K)(Sv.ID,Sv);var xv=i(38351),kv={};kv.styleTagTransform=Y(),kv.setAttributes=q(),kv.insert=j().bind(null,"head"),kv.domAPI=K(),kv.insertStyleElement=G(),H()(xv.Z,kv),xv.Z&&xv.Z.locals&&xv.Z.locals;var Nv=i(63866),Dv=i(25899),Ev=function(e,t){return function(i,n){t(i,n,e)}};let Iv=class e extends me.JT{constructor(e,t,i){super(),this._editor=e,this._modeService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(st.RW.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}static get(t){return t.getContribution(e.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new Mv(this._editor,this._modeService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Iv.ID="editor.contrib.inspectTokens",Iv=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ev(1,Dv.Z),Ev(2,Zi.h)],Iv);class Tv extends ee.R6{constructor(){super({id:"editor.action.inspectTokens",label:hv.ug.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let i=Iv.get(t);i&&i.launch()}}class Mv extends me.JT{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._modeService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=function(e,t){const i=st.RW.get(t);if(i)return i;const n=e.encodeLanguageId(t);return{getInitialState:()=>Nv.nO,tokenize:(e,i,n,o)=>(0,Nv.Ri)(t,e,n,o),tokenize2:(e,t,i,o)=>(0,Nv.mh)(n,e,i,o)}}(this._modeService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return Mv._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),i=0;for(let n=t.tokens1.length-1;n>=0;n--){let o=t.tokens1[n];if(e.column-1>=o.offset){i=n;break}}let n=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){n=i;break}let o=this._model.getLineContent(e.lineNumber),s="";if(i<t.tokens1.length){let e=t.tokens1[i].offset,n=i+1<t.tokens1.length?t.tokens1[i+1].offset:o.length;s=o.substring(e,n)}(0,Et.mc)(this._domNode,(0,Et.$)("h2.tm-token",void 0,function(e){let t="";for(let i=0,n=e.length;i<n;i++){let n=e.charCodeAt(i);switch(n){case 9:t+="→";break;case 32:t+="·";break;default:t+=String.fromCharCode(n)}}return t}(s),(0,Et.$)("span.tm-token-length",void 0,`${s.length} ${1===s.length?"char":"chars"}`))),(0,Et.R3)(this._domNode,(0,Et.$)("hr.tokens-inspect-separator",{style:"clear:both"}));const r=1+(n<<1)<t.tokens2.length?this._decodeMetadata(t.tokens2[1+(n<<1)]):null;(0,Et.R3)(this._domNode,(0,Et.$)("table.tm-metadata-table",void 0,(0,Et.$)("tbody",void 0,(0,Et.$)("tr",void 0,(0,Et.$)("td.tm-metadata-key",void 0,"language"),(0,Et.$)("td.tm-metadata-value",void 0,`${r?r.languageId:"-?-"}`)),(0,Et.$)("tr",void 0,(0,Et.$)("td.tm-metadata-key",void 0,"token type"),(0,Et.$)("td.tm-metadata-value",void 0,`${r?this._tokenTypeToString(r.tokenType):"-?-"}`)),(0,Et.$)("tr",void 0,(0,Et.$)("td.tm-metadata-key",void 0,"font style"),(0,Et.$)("td.tm-metadata-value",void 0,`${r?this._fontStyleToString(r.fontStyle):"-?-"}`)),(0,Et.$)("tr",void 0,(0,Et.$)("td.tm-metadata-key",void 0,"foreground"),(0,Et.$)("td.tm-metadata-value",void 0,`${r?Ki.Il.Format.CSS.formatHex(r.foreground):"-?-"}`)),(0,Et.$)("tr",void 0,(0,Et.$)("td.tm-metadata-key",void 0,"background"),(0,Et.$)("td.tm-metadata-value",void 0,`${r?Ki.Il.Format.CSS.formatHex(r.background):"-?-"}`))))),(0,Et.R3)(this._domNode,(0,Et.$)("hr.tokens-inspect-separator")),i<t.tokens1.length&&(0,Et.R3)(this._domNode,(0,Et.$)("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){let t=st.RW.getColorMap(),i=st.NX.getLanguageId(e),n=st.NX.getTokenType(e),o=st.NX.getFontStyle(e),s=st.NX.getForeground(e),r=st.NX.getBackground(e);return{languageId:this._modeService.languageIdCodec.decodeLanguageId(i),tokenType:n,fontStyle:o,foreground:t[s],background:t[r]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),0===t.length&&(t="---"),t}_getTokensAtLine(e){let t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t,0),n=this._tokenizationSupport.tokenize2(this._model.getLineContent(e),!0,t,0);return{startState:t,tokens1:i.tokens,tokens2:n.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t,0).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}Mv._ID="editor.contrib.inspectTokensWidget",(0,ee._K)(Iv.ID,Iv),(0,ee.Qr)(Tv),(0,xe.Ic)(((e,t)=>{const i=e.getColor(Le.CN);if(i){let n=e.type===Lt.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .tokens-inspect-widget { border: ${n}px solid ${i}; }`),t.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${i}; }`)}const n=e.getColor(Le.yJ);n&&t.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${n}; }`);const o=e.getColor(Le.Sb);o&&t.addRule(`.monaco-editor .tokens-inspect-widget { color: ${o}; }`)}));var Rv=i(65757);let Av=class e{constructor(e){this.quickInputService=e,this.registry=l_.B.as(Rv.IP.Quickaccess)}provide(t){const i=new me.SL;i.add(t.onDidAccept((()=>{const[e]=t.selectedItems;e&&this.quickInputService.quickAccess.show(e.prefix,{preserveValue:!0})}))),i.add(t.onDidChangeValue((t=>{const i=this.registry.getQuickAccessProvider(t.substr(e.PREFIX.length));i&&i.prefix&&i.prefix!==e.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})));const{editorProviders:n,globalProviders:o}=this.getQuickAccessProviders();return t.items=0===n.length||0===o.length?[...0===n.length?o:n]:[{label:(0,ne.N)("globalCommands","global commands"),type:"separator"},...o,{label:(0,ne.N)("editorCommands","editor commands"),type:"separator"},...n],i}getQuickAccessProviders(){const t=[],i=[];for(const n of this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))))if(n.prefix!==e.PREFIX)for(const e of n.helpEntries){const o=e.prefix||n.prefix,s=o||"…";(e.needsEditor?i:t).push({prefix:o,label:s,ariaLabel:(0,ne.N)("helpPickAriaLabel","{0}, {1}",s,e.description),description:e.description})}return{editorProviders:i,globalProviders:t}}};Av.PREFIX="?",Av=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,Vi.eJ)],Av),l_.B.as(Rv.IP.Quickaccess).registerQuickAccessProvider({ctor:Av,prefix:"",helpEntries:[{description:hv.ld.helpQuickAccessActionLabel,needsEditor:!0}]});class Ov{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new me.SL;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=n.add(new me.XK);return o.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange((()=>{o.value=void 0,o.value=this.doProvide(e,t)}))),n}doProvide(e,t){const i=new me.SL,n=this.activeTextEditorControl;if(n&&this.canProvideWithTextEditor(n)){const o={editor:n},s=(0,ro.Pi)(n);if(s){let e=(0,yi.f6)(n.saveViewState());i.add(s.onDidChangeCursorPosition((()=>{e=(0,yi.f6)(n.saveViewState())}))),o.restoreViewState=()=>{e&&n===this.activeTextEditorControl&&n.restoreViewState(e)},i.add((0,ki.I)(t.onCancellationRequested)((()=>{var e;return null===(e=o.restoreViewState)||void 0===e?void 0:e.call(o)})))}i.add((0,me.OF)((()=>this.clearDecorations(n)))),i.add(this.provideWithTextEditor(o,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}getModel(e){var t;return(0,ro.QI)(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,xe.EN)(ye.m9),position:Ce.sh.Full}}}],[o,s]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:s}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}class Pv extends Ov{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,ne.N)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,me.JT.None}provideWithTextEditor(e,t,i){const n=e.editor,o=new me.SL;o.add(t.onDidAccept((i=>{const[o]=t.selectedItems;if(o){if(!this.isValidLineNumber(n,o.lineNumber))return;this.gotoLocation(e,{range:this.toRange(o.lineNumber,o.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const s=()=>{const e=this.parsePosition(n,t.value.trim().substr(Pv.PREFIX.length)),i=this.getPickLabel(n,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(n,e.lineNumber))return void this.clearDecorations(n);const o=this.toRange(e.lineNumber,e.column);n.revealRangeInCenter(o,0),this.addDecorations(n,o)};s(),o.add(t.onDidChangeValue((()=>s())));const r=(0,ro.Pi)(n);return r&&2===r.getOptions().get(59).renderType&&(r.updateOptions({lineNumbers:"on"}),o.add((0,me.OF)((()=>r.updateOptions({lineNumbers:"relative"}))))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,ne.N)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):(0,ne.N)("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?(0,ne.N)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,o):(0,ne.N)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const o={lineNumber:t,column:i};return n.validatePosition(o).equals(o)}lineCount(e){var t,i;return null!==(i=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==i?i:0}}Pv.PREFIX=":";let Fv=class extends Pv{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Vt.ju.None}get activeTextEditorControl(){return(0,yi.f6)(this.editorService.getFocusedCodeEditor())}};Fv=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,We.$)],Fv),l_.B.as(Rv.IP.Quickaccess).registerQuickAccessProvider({ctor:Fv,prefix:Fv.PREFIX,helpEntries:[{description:hv.qq.gotoLineActionLabel,needsEditor:!0}]});class Bv extends ee.R6{constructor(){super({id:"editor.action.gotoLine",label:hv.qq.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:ie.u.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(Vi.eJ).quickAccess.show(Fv.PREFIX)}}(0,ee.Qr)(Bv);const Wv=[void 0,[]];function Vv(e,t,i=0,n=0){const o=t;return o.values&&o.values.length>1?function(e,t,i,n){let o=0;const s=[];for(const r of t){const[t,a]=Hv(e,r,i,n);if("number"!=typeof t)return Wv;o+=t,s.push(...a)}return[o,zv(s)]}(e,o.values,i,n):Hv(e,t,i,n)}function Hv(e,t,i,n){const o=(0,yo.EW)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,!0);return o?[o[0],(0,yo.mB)(o)]:Wv}function zv(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const e of t)!n||(s=e,(o=n).end<s.start||s.end<o.start)?(n=e,i.push(e)):(n.start=Math.min(n.start,e.start),n.end=Math.max(n.end,e.end));var o,s;return i}function Kv(e){return e.startsWith('"')&&e.endsWith('"')}const Uv=" ";function jv(e){"string"!=typeof e&&(e="");const t=e.toLowerCase(),{pathNormalized:i,normalized:n,normalizedLowercase:o}=$v(e),s=i.indexOf(Ol.ir)>=0,r=Kv(e);let a;const l=e.split(Uv);if(l.length>1)for(const e of l){const t=Kv(e),{pathNormalized:i,normalized:n,normalizedLowercase:o}=$v(e);n&&(a||(a=[]),a.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:i,normalized:n,normalizedLowercase:o,expectContiguousMatch:t}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:o,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function $v(e){let t;t=Fe.ED?e.replace(/\//g,Ol.ir):e.replace(/\\/g,Ol.ir);const i=(0,Xe.R1)(t).replace(/\s|"/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function qv(e){return Array.isArray(e)?jv(e.map((e=>e.original)).join(Uv)):jv(e.original)}var Zv=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Gv extends Ov{constructor(e=Object.create(null)){super(e),this.options=e,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,ne.N)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),me.JT.None}provideWithTextEditor(e,t,i){const n=e.editor,o=this.getModel(n);return o?st.vJ.has(o)?this.doProvideWithEditorSymbols(e,o,t,i):this.doProvideWithoutEditorSymbols(e,o,t,i):me.JT.None}doProvideWithoutEditorSymbols(e,t,i,n){const o=new me.SL;return this.provideLabelPick(i,(0,ne.N)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(()=>{Zv(this,void 0,void 0,(function*(){(yield this.waitForLanguageSymbolRegistry(t,o))&&!n.isCancellationRequested&&o.add(this.doProvideWithEditorSymbols(e,t,i,n))}))})(),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return Zv(this,void 0,void 0,(function*(){if(st.vJ.has(e))return!0;let i;const n=new Promise((e=>i=e)),o=t.add(st.vJ.onDidChange((()=>{st.vJ.has(e)&&(o.dispose(),i(!0))})));return t.add((0,me.OF)((()=>i(!1)))),n}))}doProvideWithEditorSymbols(e,t,i,n){const o=e.editor,s=new me.SL;s.add(i.onDidAccept((t=>{const[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),t.inBackground||i.hide())}))),s.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const r=this.getDocumentSymbols(t,n);let a;const l=()=>Zv(this,void 0,void 0,(function*(){null==a||a.dispose(!0),i.busy=!1,a=new Ye.A(n),i.busy=!0;try{const e=jv(i.value.substr(Gv.PREFIX.length).trim()),t=yield this.doGetSymbolPicks(r,e,void 0,a.token);if(n.isCancellationRequested)return;t.length>0?i.items=t:e.original.length>0?this.provideLabelPick(i,(0,ne.N)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,(0,ne.N)("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}}));s.add(i.onDidChangeValue((()=>l()))),l();let d=!0;return s.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;if(e&&e.range){if(d)return void(d=!1);o.revealRangeInCenter(e.range.selection,0),this.addDecorations(o,e.range.decoration)}}))),s}doGetSymbolPicks(e,t,i,n){return Zv(this,void 0,void 0,(function*(){const o=yield e;if(n.isCancellationRequested)return[];const s=0===t.original.indexOf(Gv.SCOPE_PREFIX),r=s?1:0;let a,l;t.values&&t.values.length>1?(a=qv(t.values[0]),l=qv(t.values.slice(1))):a=t;const d=[];for(let u=0;u<o.length;u++){const g=o[u],p=(0,Xe.fy)(g.name),m=`$(symbol-${st.uZ.toString(g.kind)||"property"}) ${p}`,f=m.length-p.length;let _,v,b,C,w=g.containerName;if((null==i?void 0:i.extraContainerLabel)&&(w=w?`${i.extraContainerLabel} • ${w}`:i.extraContainerLabel),t.original.length>r){let S=!1;if(a!==t&&([_,v]=Vv(m,Object.assign(Object.assign({},t),{values:void 0}),r,f),"number"==typeof _&&(S=!0)),"number"!=typeof _&&([_,v]=Vv(m,a,r,f),"number"!=typeof _))continue;if(!S&&l){if(w&&l.original.length>0&&([b,C]=Vv(w,l)),"number"!=typeof b)continue;"number"==typeof _&&(_+=b)}}const y=g.tags&&g.tags.indexOf(1)>=0;d.push({index:u,kind:g.kind,score:_,label:m,ariaLabel:p,description:w,highlights:y?void 0:{label:v,description:C},range:{selection:be.e.collapseToStart(g.selectionRange),decoration:g.range},strikethrough:y,buttons:(()=>{var e,t;const i=(null===(e=this.options)||void 0===e?void 0:e.openSideBySideDirection)?null===(t=this.options)||void 0===t?void 0:t.openSideBySideDirection():void 0;if(i)return[{iconClass:"right"===i?Wt.lA.splitHorizontal.classNames:Wt.lA.splitVertical.classNames,tooltip:"right"===i?(0,ne.N)("openToSide","Open to the Side"):(0,ne.N)("openToBottom","Open to the Bottom")}]})()})}const h=d.sort(((e,t)=>s?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let c=[];if(s){let L,x,k=0;function N(){x&&"number"==typeof L&&k>0&&(x.label=(0,Xe.WU)(Yv[L]||Qv,k))}for(const D of h)L!==D.kind?(N(),L=D.kind,k=1,x={type:"separator"},c.push(x)):k++,c.push(D);N()}else h.length>0&&(c=[{label:(0,ne.N)("symbols","symbols ({0})",d.length),type:"separator"},...h]);return c}))}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){const i=Yv[e.kind]||Qv,n=Yv[t.kind]||Qv,o=i.localeCompare(n);return 0===o?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return Zv(this,void 0,void 0,(function*(){const i=yield am.create(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}))}}Gv.PREFIX="@",Gv.SCOPE_PREFIX=":",Gv.PREFIX_BY_CATEGORY=`${Gv.PREFIX}${Gv.SCOPE_PREFIX}`;const Qv=(0,ne.N)("property","properties ({0})"),Yv={5:(0,ne.N)("method","methods ({0})"),11:(0,ne.N)("function","functions ({0})"),8:(0,ne.N)("_constructor","constructors ({0})"),12:(0,ne.N)("variable","variables ({0})"),4:(0,ne.N)("class","classes ({0})"),22:(0,ne.N)("struct","structs ({0})"),23:(0,ne.N)("event","events ({0})"),24:(0,ne.N)("operator","operators ({0})"),10:(0,ne.N)("interface","interfaces ({0})"),2:(0,ne.N)("namespace","namespaces ({0})"),3:(0,ne.N)("package","packages ({0})"),25:(0,ne.N)("typeParameter","type parameters ({0})"),1:(0,ne.N)("modules","modules ({0})"),6:(0,ne.N)("property","properties ({0})"),9:(0,ne.N)("enum","enumerations ({0})"),21:(0,ne.N)("enumMember","enumeration members ({0})"),14:(0,ne.N)("string","strings ({0})"),0:(0,ne.N)("file","files ({0})"),17:(0,ne.N)("array","arrays ({0})"),15:(0,ne.N)("number","numbers ({0})"),16:(0,ne.N)("boolean","booleans ({0})"),18:(0,ne.N)("object","objects ({0})"),19:(0,ne.N)("key","keys ({0})"),7:(0,ne.N)("field","fields ({0})"),13:(0,ne.N)("constant","constants ({0})")};let Jv=class extends Gv{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Vt.ju.None}get activeTextEditorControl(){return(0,yi.f6)(this.editorService.getFocusedCodeEditor())}};Jv=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,We.$)],Jv),l_.B.as(Rv.IP.Quickaccess).registerQuickAccessProvider({ctor:Jv,prefix:Gv.PREFIX,helpEntries:[{description:hv.aq.quickOutlineActionLabel,prefix:Gv.PREFIX,needsEditor:!0},{description:hv.aq.quickOutlineByCategoryActionLabel,prefix:Gv.PREFIX_BY_CATEGORY,needsEditor:!0}]});class Xv extends ee.R6{constructor(){super({id:"editor.action.quickOutline",label:hv.aq.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:ie.u.hasDocumentSymbolProvider,kbOpts:{kbExpr:ie.u.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(Vi.eJ).quickAccess.show(Gv.PREFIX)}}function eb(e,t){return t&&(e.stack||e.stacktrace)?ne.N("stackTrace.format","{0}: {1}",ib(e),tb(e.stack)||tb(e.stacktrace)):ib(e)}function tb(e){return Array.isArray(e)?e.join("\n"):e}function ib(e){return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?ne.N("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||ne.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function nb(e=null,t=!1){if(!e)return ne.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const i=tt.kX(e),n=nb(i[0],t);return i.length>1?ne.N("error.moreErrors","{0} ({1} errors in total)",n,i.length):n}if(yi.HD(e))return e;if(e.detail){const i=e.detail;if(i.error)return eb(i.error,t);if(i.exception)return eb(i.exception,t)}return e.stack?eb(e,t):e.message?e.message:ne.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}(0,ee.Qr)(Xv);var ob,sb=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function rb(e){const t=e;return Array.isArray(t.items)}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(ob||(ob={}));class ab extends me.JT{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t){var i;const n=new me.SL;let o;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new me.XK),r=()=>sb(this,void 0,void 0,(function*(){const i=s.value=new me.SL;null==o||o.dispose(!0),e.busy=!1,o=new Ye.A(t);const n=o.token,r=e.value.substr(this.prefix.length).trim(),a=this._getPicks(r,i,n),l=(t,i)=>{var n;let o,s;if(rb(t)?(o=t.items,s=t.active):o=t,0===o.length){if(i)return!1;r.length>0&&(null===(n=this.options)||void 0===n?void 0:n.noResultsPick)&&(o=[this.options.noResultsPick])}return e.items=o,s&&(e.activeItems=[s]),!0};if(null===a);else if(function(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}(a)){let t=!1,i=!1;yield Promise.all([(()=>sb(this,void 0,void 0,(function*(){yield(0,pe.Vs)(ab.FAST_PICKS_RACE_DELAY),n.isCancellationRequested||i||(t=l(a.picks,!0))})))(),(()=>sb(this,void 0,void 0,(function*(){e.busy=!0;try{const i=yield a.additionalPicks;if(n.isCancellationRequested)return;let o,s,r,d;if(rb(a.picks)?(o=a.picks.items,s=a.picks.active):o=a.picks,rb(i)?(r=i.items,d=i.active):r=i,r.length>0||!t){let t;if(!s&&!d){const i=e.activeItems[0];i&&-1!==o.indexOf(i)&&(t=i)}l({items:[...o,...r],active:s||d||t})}}finally{n.isCancellationRequested||(e.busy=!1),i=!0}})))()])}else if(a instanceof Promise){e.busy=!0;try{const e=yield a;if(n.isCancellationRequested)return;l(e)}finally{n.isCancellationRequested||(e.busy=!1)}}else l(a)}));return n.add(e.onDidChangeValue((()=>r()))),r(),n.add(e.onDidAccept((t=>{const[i]=e.selectedItems;"function"==typeof(null==i?void 0:i.accept)&&(t.inBackground||e.hide(),i.accept(e.keyMods,t))}))),n.add(e.onDidTriggerItemButton((({button:i,item:n})=>sb(this,void 0,void 0,(function*(){var o,s;if("function"==typeof n.trigger){const a=null!==(s=null===(o=n.buttons)||void 0===o?void 0:o.indexOf(i))&&void 0!==s?s:-1;if(a>=0){const i=n.trigger(a,e.keyMods),o="number"==typeof i?i:yield i;if(t.isCancellationRequested)return;switch(o){case ob.NO_ACTION:break;case ob.CLOSE_PICKER:e.hide();break;case ob.REFRESH_PICKER:r();break;case ob.REMOVE_ITEM:const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice(),n=i.splice(t,1),o=e.activeItems.filter((e=>e!==n[0])),s=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,o&&(e.activeItems=o),e.keepScrollPosition=s}}}}}))))),n}}ab.FAST_PICKS_RACE_DELAY=200;var lb=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},db=function(e,t){return function(i,n){t(i,n,e)}},hb=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let cb=class e extends ab{constructor(t,i,n,o,s,r){super(e.PREFIX,t),this.instantiationService=i,this.keybindingService=n,this.commandService=o,this.telemetryService=s,this.dialogService=r,this.commandsHistory=this._register(this.instantiationService.createInstance(ub)),this.options=t}_getPicks(t,i,n){return hb(this,void 0,void 0,(function*(){const o=yield this.getCommandPicks(i,n);if(n.isCancellationRequested)return[];const s=[];for(const i of o){const n=(0,yi.f6)(e.WORD_FILTER(t,i.label)),o=i.commandAlias?(0,yi.f6)(e.WORD_FILTER(t,i.commandAlias)):void 0;n||o?(i.highlights={label:n,detail:this.options.showAlias?o:void 0},s.push(i)):t===i.commandId&&s.push(i)}const r=new Map;for(const e of s){const t=r.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):r.set(e.label,e)}s.sort(((e,t)=>{const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);return i&&n?i>n?-1:1:i?-1:n?1:e.label.localeCompare(t.label)}));const a=[];let l=!1;for(let e=0;e<s.length;e++){const t=s[e],i=this.keybindingService.lookupKeybinding(t.commandId),n=i?(0,ne.N)("commandPickAriaLabelWithKeybinding","{0}, {1}",t.label,i.getAriaLabel()):t.label;0===e&&this.commandsHistory.peek(t.commandId)&&(a.push({type:"separator",label:(0,ne.N)("recentlyUsed","recently used")}),l=!0),0!==e&&l&&!this.commandsHistory.peek(t.commandId)&&(a.push({type:"separator",label:(0,ne.N)("morecCommands","other commands")}),l=!1),a.push(Object.assign(Object.assign({},t),{ariaLabel:n,detail:this.options.showAlias&&t.commandAlias!==t.label?t.commandAlias:void 0,keybinding:i,accept:()=>hb(this,void 0,void 0,(function*(){this.commandsHistory.push(t.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.commandId,from:"quick open"});try{yield this.commandService.executeCommand(t.commandId)}catch(e){(0,it.VV)(e)||this.dialogService.show(Ea.Z.Error,(0,ne.N)("canNotRun","Command '{0}' resulted in an error ({1})",t.label,nb(e)))}}))}))}return a}))}};cb.PREFIX=">",cb.WORD_FILTER=(0,yo.or)(yo.Ji,yo.KZ,yo.ir),cb=lb([db(1,Dt.TG),db(2,Mt.d),db(3,at.H),db(4,Yt.b),db(5,D_.S)],cb);let ub=class e extends me.JT{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((()=>this.updateConfiguration())))}updateConfiguration(){this.configuredCommandsHistoryLength=e.getConfiguredCommandHistoryLength(this.configurationService),e.cache&&e.cache.limit!==this.configuredCommandsHistoryLength&&(e.cache.limit=this.configuredCommandsHistoryLength,e.saveState(this.storageService))}load(){const t=this.storageService.get(e.PREF_KEY_CACHE,0);let i;if(t)try{i=JSON.parse(t)}catch(e){}const n=e.cache=new Ni.z6(this.configuredCommandsHistoryLength,1);if(i){let e;e=i.usesLRU?i.entries:i.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>n.set(e.key,e.value)))}e.counter=this.storageService.getNumber(e.PREF_KEY_COUNTER,0,e.counter)}push(t){e.cache&&(e.cache.set(t,e.counter++),e.saveState(this.storageService))}peek(t){var i;return null===(i=e.cache)||void 0===i?void 0:i.peek(t)}static saveState(t){if(!e.cache)return;const i={usesLRU:!0,entries:[]};e.cache.forEach(((e,t)=>i.entries.push({key:t,value:e}))),t.store(e.PREF_KEY_CACHE,JSON.stringify(i),0,0),t.store(e.PREF_KEY_COUNTER,e.counter,0,0)}static getConfiguredCommandHistoryLength(t){var i,n;const o=null===(n=null===(i=t.getValue().workbench)||void 0===i?void 0:i.commandPalette)||void 0===n?void 0:n.history;return"number"==typeof o?o:e.DEFAULT_COMMANDS_HISTORY_LENGTH}};ub.DEFAULT_COMMANDS_HISTORY_LENGTH=50,ub.PREF_KEY_CACHE="commandPalette.mru.cache",ub.PREF_KEY_COUNTER="commandPalette.mru.counter",ub.counter=1,ub=lb([db(0,Ei.Uy),db(1,ji.Ui)],ub);class gb extends cb{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:(0,ia.x$)(i.label)||i.id});return t}}var pb=function(e,t){return function(i,n){t(i,n,e)}};let mb=class extends gb{constructor(e,t,i,n,o,s){super({showAlias:!1},e,i,n,o,s),this.codeEditorService=t}get activeTextEditorControl(){return(0,yi.f6)(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return e=this,t=void 0,n=function*(){return this.getCodeEditorCommandPicks()},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}};mb=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([pb(0,Dt.TG),pb(1,We.$),pb(2,Mt.d),pb(3,at.H),pb(4,Yt.b),pb(5,D_.S)],mb),l_.B.as(Rv.IP.Quickaccess).registerQuickAccessProvider({ctor:mb,prefix:mb.PREFIX,helpEntries:[{description:hv.UX.quickCommandHelp,needsEditor:!0}]});class fb extends ee.R6{constructor(){super({id:"editor.action.quickCommand",label:hv.UX.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:ie.u.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Vi.eJ).quickAccess.show(mb.PREFIX)}}(0,ee.Qr)(fb);var _b=function(e,t){return function(i,n){t(i,n,e)}};let vb=class extends Go{constructor(e,t,i,n,o,s,r){super(!0,e,t,i,n,o,s,r)}};vb=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([_b(1,oe.i6),_b(2,We.$),_b(3,Qt.lT),_b(4,Dt.TG),_b(5,Ei.Uy),_b(6,ji.Ui)],vb),(0,ee._K)(Go.ID,vb);class bb extends ee.R6{constructor(){super({id:"editor.action.toggleHighContrast",label:hv.xi.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Dv.Z);this._originalThemeName?(i.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=i.getColorTheme().themeName,i.setTheme("hc-black"))}}var Cb;(0,ee.Qr)(bb),i(29126),i(89808),i(13598),i(52042),i(50497),i(11336),i(76334),i(30253),i(47940),i(18162),i(79556),i(56292),i(40605),i(30282),i(42429),i(24129),i(88765),i(43814),i(45067),i(21589),i(97820),i(40927),i(26220),i(1526),i(64091),i(40902),i(68423),i(17476),i(16745),i(43763),i(72323),i(46595),i(36831),i(66079),i(90158),i(38698),i(82665),i(51944),i(77365),i(37562),i(6595),i(75769),i(51714),i(86935),i(62893),i(27616),i(83335),i(46266),i(89723),i(55788),i(48746),i(94992),i(16563),i(57296),i(85098),i(83187),i(12026),i(76194),i(5566),i(26254),i(5734),i(40191),i(93127),i(34483),i(40840),i(37266),i(2375),i(96461),i(76628),i(40185),i(27776),i(28118),i(96337),i(87530),i(25929),i(17918),i(6205),i(46837),i(88307),i(39585),i(58203),i(67077),i(81905),i(94199),self.MonacoEnvironment=(Cb={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"},{globalAPI:!1,getWorkerUrl:function(e,t){var n=i.p,o=(n?n.replace(/\/$/,"")+"/":"")+Cb[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(o)){var s=String(window.location),r=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(o.substring(0,r.length)!==r){/^(\/\/)/.test(o)&&(o=window.location.protocol+o);var a=new Blob(["/*"+t+'*/importScripts("'+o+'");'],{type:"application/javascript"});return URL.createObjectURL(a)}}return o}});const wb=n},91902:(e,t,i)=>{i.r(t),i.d(t,{CancellationTokenSource:()=>Bd,Emitter:()=>Wd,KeyCode:()=>Vd,KeyMod:()=>Hd,MarkerSeverity:()=>$d,MarkerTag:()=>qd,Position:()=>zd,Range:()=>Kd,Selection:()=>Ud,SelectionDirection:()=>jd,Token:()=>Gd,Uri:()=>Zd,default:()=>eh,editor:()=>Qd,languages:()=>Yd});var n={};i.r(n),i.d(n,{CancellationTokenSource:()=>Bd,Emitter:()=>Wd,KeyCode:()=>Vd,KeyMod:()=>Hd,MarkerSeverity:()=>$d,MarkerTag:()=>qd,Position:()=>zd,Range:()=>Kd,Selection:()=>Ud,SelectionDirection:()=>jd,Token:()=>Gd,Uri:()=>Zd,editor:()=>Qd,languages:()=>Yd}),i(43017),i(4215),i(69317),i(54367),i(72102),i(55833),i(51925),i(38593),i(46838),i(2719),i(23365),i(93740),i(41895),i(54555),i(76917),i(55015),i(63218),i(96962),i(63737),i(44125),i(61097),i(40832),i(43588),i(60628),i(53385),i(74271),i(41321),i(810),i(84602),i(66348),i(50865),i(52165),i(95733),i(97615),i(50995),i(52293),i(34540),i(93519),i(77061),i(55584),i(38956),i(78944),i(48766),i(73945),i(45048),i(43448),i(61168),i(89995),i(102),i(98762),i(90165),i(25463),i(88088),i(15662),i(64662),i(52614),i(84677),i(79607),i(70943),i(37181),i(86709);var o=i(64141),s=i(20927),r=i(93379),a=i.n(r),l=i(7795),d=i.n(l),h=i(90569),c=i.n(h),u=i(3565),g=i.n(u),p=i(19216),m=i.n(p),f=i(44589),_=i.n(f),v=i(70643),b={};b.styleTagTransform=_(),b.setAttributes=g(),b.insert=c().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m(),a()(v.Z,b),v.Z&&v.Z.locals&&v.Z.locals;var C=i(5976),w=i(97295),y=i(70666),S=i(27231),L=i(17122),x=i(35146),k=i(4669),N=i(36248),D=i(24314),E=i(69149),I=i(31106),T=function(e,t){return function(i,n){t(i,n,e)}};const M={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0,findResultLoop:!0};let R=class extends C.JT{constructor(e,t={},i,n,o){super(),this._audioCueService=i,this._codeEditorService=n,this._accessibilityService=o,this._onDidUpdate=this._register(new k.Q5),this._editor=e,this._options=N.jB(t,M,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidUpdateDiff((()=>this._onDiffUpdated()))),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e=>{this.ignoreSelectionChange||(this._updateAccessibilityState(e.position.lineNumber),this.nextIdx=-1)}))),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach((e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((e=>{this.ranges.push({rhs:!0,range:new D.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):0===e.modifiedEndLineNumber?this.ranges.push({rhs:!0,range:new D.e(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new D.e(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber+1,1)})})),this.ranges.sort(((e,t)=>D.e.compareRangesUsingStarts(e.range,t.range))),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1;const i=this._editor.getPosition();if(i){for(let n=0,o=this.ranges.length;n<o&&!t;n++){const o=this.ranges[n].range;i.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=n+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}else this.nextIdx=0}_move(e,t){if(x.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;-1===this.nextIdx?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealRangeInCenter(i.range,t),this._updateAccessibilityState(e.lineNumber,!0)}finally{this.ignoreSelectionChange=!1}}_updateAccessibilityState(e,t){var i;const n=null===(i=this._editor.getModel())||void 0===i?void 0:i.modified;if(!n)return;const o=n.getLineDecorations(e).find((e=>"line-insert"===e.options.className));if(o)this._audioCueService.playAudioCue(E.y$.diffLineModified,{allowManyInParallel:!0});else{if(!t)return;this._audioCueService.playAudioCue(E.y$.diffLineDeleted,{allowManyInParallel:!0})}const s=this._codeEditorService.getActiveCodeEditor();t&&s&&o&&this._accessibilityService.isScreenReaderOptimized()&&(s.setSelection({startLineNumber:e,startColumn:0,endLineNumber:e,endColumn:Number.MAX_VALUE}),s.writeScreenReaderContent("diff-navigation"))}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this.canNavigateNext()&&this._move(!0,e)}previous(e=0){this.canNavigatePrevious()&&this._move(!1,e)}canNavigateNext(){return this.canNavigateLoop()||this.nextIdx<this.ranges.length-1}canNavigatePrevious(){return this.canNavigateLoop()||0!==this.nextIdx}canNavigateLoop(){return Boolean(this._options.findResultLoop)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}};R=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([T(2,E.e7),T(3,L.$),T(4,I.F)],R);var A=i(27374),O=i(96518),P=i(84973),F=i(96887),B=i(51381),W=i(276),V=i(72042),H=i(73733),z=i(35034);class K extends z.Q8{constructor(e,t,i){super(e,i.keepIdleModels||!1,i.label,t),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?(0,N.$E)(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o={};for(const e of t)o[e]=n(e,i);return o}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then((e=>this.getProxy()))}}var U=i(70902),j=i(77514),$=i(77378),q=i(91557),Z=i(1118);function G(e){return"string"==typeof e}function Q(e){return!G(e)}function Y(e){return!e}function J(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function X(e){return e.replace(/[&<>'"_]/g,"-")}function ee(e,t){return new Error(`${e.languageId}: ${t}`)}function te(e,t,i,n,o){let s=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,r,a,l,d,h,c,u,g){return Y(a)?Y(l)?!Y(d)&&d<n.length?J(e,n[d]):!Y(c)&&e&&"string"==typeof e[c]?e[c]:(null===s&&(s=o.split("."),s.unshift(o)),!Y(h)&&h<s.length?J(e,s[h]):""):J(e,i):"$"}))}function ie(e,t){let i=t;for(;i&&i.length>0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}var ne,oe=i(33108);class se{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new re(e,t);let i=re.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new re(e,t),this._entries[i]=n,n)}}se._INSTANCE=new se(5);class re{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return re._equals(this,e)}push(e){return se.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return se.create(this.parent,e)}}class ae{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new ae(this.languageId,this.state)}}class le{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==t)return new de(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new de(e,t);const i=re.getStackElementId(e);let n=this._entries[i];return n||(n=new de(e,null),this._entries[i]=n,n)}}le._INSTANCE=new le(5);class de{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:le.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof de&&!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData))}}class he{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new F.WU(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=F.RW.get(o);if(!r)return this.enterLanguage(o),this.emit(n,""),s;const a=r.tokenize(e,t,s);if(0!==n)for(const e of a.tokens)this._tokens.push(new F.WU(e.offset+n,e.type,e.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new F.hG(this._tokens,e)}}class ce{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=1024|this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=null!==e?e.length:0,o=t.length,s=null!==i?i.length:0;if(0===n&&0===o&&0===s)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===s)return e;const r=new Uint32Array(n+o+s);null!==e&&r.set(e);for(let e=0;e<o;e++)r[n+e]=t[e];return null!==i&&r.set(i,n+o),r}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=F.RW.get(o);if(!r)return this.enterLanguage(o),this.emit(n,""),s;const a=r.tokenizeEncoded(e,t,s);if(0!==n)for(let e=0,t=a.tokens.length;e<t;e+=2)a.tokens[e]+=n;return this._prependTokens=ce._merge(this._prependTokens,this._tokens,a.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,a.endState}finalize(e){return new F.DI(ce._merge(this._prependTokens,this._tokens,null),e)}}let ue=ne=class{constructor(e,t,i,n,o){this._configurationService=o,this._languageService=e,this._standaloneThemeService=t,this._languageId=i,this._lexer=n,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let s=!1;this._tokenizationRegistryListener=F.RW.onDidChange((e=>{if(s)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i<n;i++){const n=e.changedLanguages[i];if(this._embeddedLanguages[n]){t=!0;break}}t&&(s=!0,F.RW.handleChange([this._languageId]),s=!1)})),this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}),this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=F.RW.get(t);if(i){if(i instanceof ne){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}}else F.RW.isResolved(t)||e.push(F.RW.getOrCreate(t))}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then((e=>{}))}}getInitialState(){const e=se.create(null,this._lexer.start);return le.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,W.Ri)(this._languageId,i);const n=new he,o=this._tokenize(e,t,i,n);return n.finalize(o)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,W.Dy)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new ce(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,i,n);return n.finalize(o)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=ie(this._lexer,t.stack.state),!i))throw ee(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const t of i){if(!Q(t.action)||"@pop"!==t.action.nextEmbedded)continue;o=!0;let i=t.regex;const s=t.regex.source;if("^(?:"===s.substr(0,4)&&")"===s.substr(s.length-1,1)){const e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(s.substr(4,s.length-5),e)}const r=e.search(i);-1===r||0!==r&&t.matchOnlyAtLineStart||(-1===n||r<n)&&(n=r)}if(!o)throw ee(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state);return n}_nestedTokenize(e,t,i,n,o){const s=this._findLeavingNestedLanguageOffset(e,i);if(-1===s){const s=o.nestedLanguageTokenize(e,t,i.embeddedLanguageData,n);return le.create(i.stack,new ae(i.embeddedLanguageData.languageId,s))}const r=e.substring(0,s);r.length>0&&o.nestedLanguageTokenize(r,!1,i.embeddedLanguageData,n);const a=e.substring(s);return this._myTokenize(a,t,i,n+s,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,o){o.enterLanguage(this._languageId);const s=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedLanguageData,d=i.stack,h=0,c=null,u=!0;for(;u||h<a;){const i=h,m=d.depth,f=c?c.groups.length:0,_=d.state;let v=null,b=null,C=null,w=null,y=null;if(c){v=c.matches;const e=c.groups.shift();b=e.matched,C=e.action,w=c.rule,0===c.groups.length&&(c=null)}else{if(!u&&h>=a)break;u=!1;let e=this._lexer.tokenizer[_];if(!e&&(e=ie(this._lexer,_),!e))throw ee(this._lexer,"tokenizer state is not defined: "+_);const t=r.substr(h);for(const i of e)if((0===h||!i.matchOnlyAtLineStart)&&(v=t.match(i.regex),v)){b=v[0],C=i.action;break}}if(v||(v=[""],b=""),C||(h<a&&(v=[r.charAt(h)],b=v[0]),C=this._lexer.defaultToken),null===b)break;for(h+=b.length;!function(e){return Array.isArray(e)}(C)&&Q(C)&&C.test;)C=C.test(b,v,_,h===a);let S=null;if("string"==typeof C||Array.isArray(C))S=C;else if(C.group)S=C.group;else if(null!==C.token&&void 0!==C.token){if(S=C.tokenSubst?te(this._lexer,C.token,b,v,_):C.token,C.nextEmbedded)if("@pop"===C.nextEmbedded){if(!l)throw ee(this._lexer,"cannot pop embedded language if not inside one");l=null}else{if(l)throw ee(this._lexer,"cannot enter embedded language from within an embedded language");y=te(this._lexer,C.nextEmbedded,b,v,_)}if(C.goBack&&(h=Math.max(0,h-C.goBack)),C.switchTo&&"string"==typeof C.switchTo){let e=te(this._lexer,C.switchTo,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!ie(this._lexer,e))throw ee(this._lexer,"trying to switch to a state '"+e+"' that is undefined in rule: "+this._safeRuleName(w));d=d.switchTo(e)}else{if(C.transform&&"function"==typeof C.transform)throw ee(this._lexer,"action.transform not supported");if(C.next)if("@push"===C.next){if(d.depth>=this._lexer.maxStack)throw ee(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(_)}else if("@pop"===C.next){if(d.depth<=1)throw ee(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(w));d=d.pop()}else if("@popall"===C.next)d=d.popall();else{let e=te(this._lexer,C.next,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!ie(this._lexer,e))throw ee(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(w));d=d.push(e)}}C.log&&"string"==typeof C.log&&(g=this._lexer,p=this._lexer.languageId+": "+te(this._lexer,C.log,b,v,_),console.log(`${g.languageId}: ${p}`))}if(null===S)throw ee(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(w));const L=i=>{const s=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(s);if(h<a){const i=e.substr(h);return this._nestedTokenize(i,t,le.create(d,r),n+h,o)}return le.create(d,r)};if(Array.isArray(S)){if(c&&c.groups.length>0)throw ee(this._lexer,"groups cannot be nested: "+this._safeRuleName(w));if(v.length!==S.length+1)throw ee(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(w));let e=0;for(let t=1;t<v.length;t++)e+=v[t].length;if(e!==b.length)throw ee(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(w));c={rule:w,matches:v,groups:[]};for(let e=0;e<S.length;e++)c.groups[e]={action:S[e],matched:v[e+1]};h-=b.length}else{{if("@rematch"===S&&(h-=b.length,b="",v=null,S="",null!==y))return L(y);if(0===b.length){if(0===a||m!==d.depth||_!==d.state||(c?c.groups.length:0)!==f)continue;throw ee(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(w))}let e=null;if(G(S)&&0===S.indexOf("@brackets")){const t=S.substr(9),i=ge(this._lexer,b);if(!i)throw ee(this._lexer,"@brackets token returned but no bracket defined as: "+b);e=X(i.token+t)}else e=X(""===S?"":S+this._lexer.tokenPostfix);i<s&&o.emit(i+n,e)}if(null!==y)return L(y)}}var g,p;return le.create(d,l)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new ae(e,W.TJ);e!==this._languageId&&(this._languageService.requestBasicLanguageFeatures(e),F.RW.getOrCreate(e),this._embeddedLanguages[e]=!0);const t=F.RW.get(e);return new ae(e,t?t.getInitialState():W.TJ)}};function ge(e,t){if(!t)return null;t=J(e,t);const i=e.brackets;for(const e of i){if(e.open===t)return{token:e.token,bracketType:1};if(e.close===t)return{token:e.token,bracketType:-1}}return null}var pe,me;ue=ne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(pe=4,me=oe.Ui,function(e,t){me(e,t,pe)})],ue);const fe=(0,j.Z)("standaloneColorizer",{createHTML:e=>e});class _e{static colorizeElement(e,t,i,n){const o=(n=n||{}).theme||"vs",s=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();const r=t.getLanguageIdByMimeType(s)||s;e.setTheme(o);const a=i.firstChild?i.firstChild.nodeValue:"";return i.className+=" "+o,this.colorize(t,a||"",r,n).then((e=>{var t;const n=null!==(t=null==fe?void 0:fe.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>console.error(e)))}static colorize(e,t,i,n){return o=this,s=void 0,a=function*(){const o=e.languageIdCodec;let s=4;n&&"number"==typeof n.tabSize&&(s=n.tabSize),w.uS(t)&&(t=t.substr(1));const r=w.uq(t);if(!e.isRegisteredLanguageId(i))return ve(r,s,o);const a=yield F.RW.getOrCreate(i);return a?function(e,t,i,n){return new Promise(((o,s)=>{const r=()=>{const a=function(e,t,i,n){let o=[],s=i.getInitialState();for(let r=0,a=e.length;r<a;r++){const a=e[r],l=i.tokenizeEncoded(a,!0,s);$.A.convertToEndOffset(l.tokens,a.length);const d=new $.A(l.tokens,a,n),h=Z.wA.isBasicASCII(a,!0),c=Z.wA.containsRTL(a,h,!0),u=(0,q.tF)(new q.IJ(!1,!0,a,!1,h,c,0,d.inflate(),[],t,0,0,0,0,-1,"none",!1,!1,null));o=o.concat(u.html),o.push("<br/>"),s=l.endState}return o.join("")}(e,t,i,n);if(i instanceof ue){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,s)}o(a)};r()}))}(r,s,a,o):ve(r,s,o)},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function n(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,n)}l((a=a.apply(o,s||[])).next())}));var o,s,r,a}static colorizeLine(e,t,i,n,o=4){const s=Z.wA.isBasicASCII(e,t),r=Z.wA.containsRTL(e,s,i);return(0,q.tF)(new q.IJ(!1,!0,e,!1,s,r,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const o=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function ve(e,t,i){let n=[];const o=new Uint32Array(2);o[0]=0,o[1]=33587200;for(let s=0,r=e.length;s<r;s++){const r=e[s];o[0]=r.length;const a=new $.A(o,r,i),l=Z.wA.isBasicASCII(r,!0),d=Z.wA.containsRTL(r,l,!0),h=(0,q.tF)(new q.IJ(!1,!0,r,!1,l,d,0,a,[],t,0,0,0,0,-1,"none",!1,!1,null));n=n.concat(h.html),n.push("<br/>")}return n.join("")}var be=i(56346),Ce=i(42095),we=i(65321),ye=i(38626),Se=i(31185),Le=i(63841),xe=i(15393),ke=i(71050),Ne=i(73046),De=i(17301),Ee=i(59365),Ie=i(25670),Te=i(22360),Me={};Me.styleTagTransform=_(),Me.setAttributes=g(),Me.insert=c().bind(null,"head"),Me.domAPI=d(),Me.insertStyleElement=m(),a()(Te.Z,Me),Te.Z&&Te.Z.locals&&Te.Z.locals;var Re=i(52136),Ae=i(54534),Oe=i(16830),Pe=i(43407),Fe=i(90317),Be=i(64117),We=i(74741),Ve=i(34504),He={};He.styleTagTransform=_(),He.setAttributes=g(),He.insert=c().bind(null,"head"),He.domAPI=d(),He.insertStyleElement=m(),a()(Ve.Z,He),Ve.Z&&Ve.Z.locals&&Ve.Z.locals;var ze,Ke=i(50187),Ue=i(63580),je=i(59554),$e=function(e,t){return function(i,n){t(i,n,e)}};class qe{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class Ze{constructor(e){this.entries=e}}const Ge=(0,je.q5)("diff-review-insert",Ne.l.add,Ue.NC("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),Qe=(0,je.q5)("diff-review-remove",Ne.l.remove,Ue.NC("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),Ye=(0,je.q5)("diff-review-close",Ne.l.close,Ue.NC("diffReviewCloseIcon","Icon for 'Close' in diff review."));let Je=ze=class extends C.JT{constructor(e,t,i,n){super(),this._languageService=t,this._audioCueService=i,this._configurationService=n,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=(0,ye.X)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,ye.X)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new Fe.o(this.actionBarContainer.domNode)),this._actionBar.push(new We.aU("diffreview.close",Ue.NC("label.close","Close"),"close-diff-review "+Ie.k.asClassName(Ye),!0,(()=>{return e=this,t=void 0,n=function*(){return this.hide()},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n})),{label:!1,icon:!0}),this.domNode=(0,ye.X)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,ye.X)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new Be.s$(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff((()=>{this._isVisible&&(this._diffs=this._compute(),this._render())}))),this._register(e.getModifiedEditor().onDidChangeCursorPosition((()=>{this._isVisible&&this._render()}))),this._register(we.mu(this.domNode.domNode,"click",(e=>{e.preventDefault();const t=we.Fx(e.target,"diff-review-row");t&&this._goToRow(t)}))),this._register(we.mu(this.domNode.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow(),"next")),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow(),"previous")),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033)||e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("accessibility.verbosity.diffEditor")&&this._diffEditor.updateOptions({accessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.diffEditor")})}))),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=this._diffs.length+t-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new Ke.L(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getPrevRow(),"previous")}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=t+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new Ke.L(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow(),"next")}accept(){let e=-1;const t=this._getCurrentFocusedRow();if(t){const i=parseInt(t.getAttribute("data-line"),10);isNaN(i)||(e=i)}this.hide(),-1!==e&&(this._diffEditor.setPosition(new Ke.L(e,1)),this._diffEditor.revealPosition(new Ke.L(e,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){const e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()}_getNextRow(){const e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){const e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null}_goToRow(e,t){const i=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),i&&i!==e&&(i.tabIndex=-1);const n=t?"next"===t?null==i?void 0:i.nextElementSibling:null==i?void 0:i.previousElementSibling:i;(null==n?void 0:n.classList.contains("line-insert"))?this._audioCueService.playAudioCue(E.y$.diffLineInserted,{allowManyInParallel:!0}):(null==n?void 0:n.classList.contains("line-delete"))&&this._audioCueService.playAudioCue(E.y$.diffLineDeleted,{allowManyInParallel:!0}),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(e,t,i){this._width=t,this.shadow.setTop(e-6),this.shadow.setWidth(t),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(t),this.domNode.setHeight(i),this._content.setHeight(i),this._content.setWidth(t),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const e=this._diffEditor.getLineChanges();if(!e||0===e.length)return[];const t=this._diffEditor.getOriginalEditor().getModel(),i=this._diffEditor.getModifiedEditor().getModel();return t&&i?ze._mergeAdjacent(e,t.getLineCount(),i.getLineCount()):[]}static _mergeAdjacent(e,t,i){if(!e||0===e.length)return[];const n=[];let o=0;for(let s=0,r=e.length;s<r;s++){const a=e[s],l=a.originalStartLineNumber,d=a.originalEndLineNumber,h=a.modifiedStartLineNumber,c=a.modifiedEndLineNumber,u=[];let g=0;{const t=0===d?l:l-1,i=0===c?h:h-1;let n=1,o=1;if(s>0){const t=e[s-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let r=t-3+1,a=i-3+1;if(r<n){const e=n-r;r+=e,a+=e}if(a<o){const e=o-a;r+=e,a+=e}u[g++]=new qe(r,t,a,i)}0!==d&&(u[g++]=new qe(l,d,0,0)),0!==c&&(u[g++]=new qe(0,0,h,c));{const n=0===d?l+1:d+1,o=0===c?h+1:c+1;let a=t,p=i;if(s+1<r){const t=e[s+1];a=0===t.originalEndLineNumber?t.originalStartLineNumber:t.originalStartLineNumber-1,p=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber:t.modifiedStartLineNumber-1}let m=n+3-1,f=o+3-1;if(m>a){const e=a-m;m+=e,f+=e}if(f>p){const e=p-f;m+=e,f+=e}u[g++]=new qe(n,m,o,f)}n[o++]=new Ze(u)}let s=n[0].entries;const r=[];let a=0;for(let e=1,t=n.length;e<t;e++){const t=n[e].entries,i=s[s.length-1],o=t[0];0===i.getType()&&0===o.getType()&&o.originalLineStart<=i.originalLineEnd?(s[s.length-1]=new qe(i.originalLineStart,o.originalLineEnd,i.modifiedLineStart,o.modifiedLineEnd),s=s.concat(t.slice(1))):(r[a++]=new Ze(s),s=t)}return r[a++]=new Ze(s),r}_findDiffIndex(e){const t=e.lineNumber;for(let e=0,i=this._diffs.length;e<i;e++){const i=this._diffs[e].entries;if(t<=i[i.length-1].modifiedLineEnd)return e}return 0}_render(){const e=this._diffEditor.getOriginalEditor().getOptions(),t=this._diffEditor.getModifiedEditor().getOptions(),i=this._diffEditor.getOriginalEditor().getModel(),n=this._diffEditor.getModifiedEditor().getModel(),o=i.getOptions(),s=n.getOptions();if(!this._isVisible||!i||!n)return we.PO(this._content.domNode),this._currentDiff=null,void this.scrollbar.scanDomNode();this._diffEditor.updateOptions({readOnly:!0});const r=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[r]===this._currentDiff)return;this._currentDiff=this._diffs[r];const a=this._diffs[r].entries,l=document.createElement("div");l.className="diff-review-table",l.setAttribute("role","list"),l.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),(0,Re.N)(l,t.get(49));let d=0,h=0,c=0,u=0;for(let e=0,t=a.length;e<t;e++){const t=a[e],i=t.originalLineStart,n=t.originalLineEnd,o=t.modifiedLineStart,s=t.modifiedLineEnd;0!==i&&(0===d||i<d)&&(d=i),0!==n&&(0===h||n>h)&&(h=n),0!==o&&(0===c||o<c)&&(c=o),0!==s&&(0===u||s>u)&&(u=s)}const g=document.createElement("div");g.className="diff-review-row";const p=document.createElement("div");p.className="diff-review-cell diff-review-summary";const m=h-d+1,f=u-c+1;p.appendChild(document.createTextNode(`${r+1}/${this._diffs.length}: @@ -${d},${m} +${c},${f} @@`)),g.setAttribute("data-line",String(c));const _=e=>0===e?Ue.NC("no_lines_changed","no lines changed"):1===e?Ue.NC("one_line_changed","1 line changed"):Ue.NC("more_lines_changed","{0} lines changed",e),v=_(m),b=_(f);g.setAttribute("aria-label",Ue.NC({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",r+1,this._diffs.length,d,v,c,b)),g.appendChild(p),g.setAttribute("role","listitem"),l.appendChild(g);const C=t.get(65);let w=c;for(let r=0,d=a.length;r<d;r++){const d=a[r];ze._renderSection(l,d,w,C,this._width,e,i,o,t,n,s,this._languageService.languageIdCodec),0!==d.modifiedLineStart&&(w=d.modifiedLineEnd)}we.PO(this._content.domNode),this._content.domNode.appendChild(l),this.scrollbar.scanDomNode()}static _renderSection(e,t,i,n,o,s,r,a,l,d,h,c){const u=t.getType();let g="diff-review-row",p="",m=null;switch(u){case 1:g="diff-review-row line-insert",p=" char-insert",m=Ge;break;case 2:g="diff-review-row line-delete",p=" char-delete",m=Qe}const f=t.originalLineStart,_=t.originalLineEnd,v=t.modifiedLineStart,b=t.modifiedLineEnd,C=Math.max(b-v,_-f),w=s.get(142),y=w.glyphMarginWidth+w.lineNumbersWidth,S=l.get(142),L=10+S.glyphMarginWidth+S.lineNumbersWidth;for(let t=0;t<=C;t++){const _=0===f?0:f+t,b=0===v?0:v+t,C=document.createElement("div");C.style.minWidth=o+"px",C.className=g,C.setAttribute("role","listitem"),0!==b&&(i=b),C.setAttribute("data-line",String(i));const w=document.createElement("div");w.className="diff-review-cell",w.style.height=`${n}px`,C.appendChild(w);const S=document.createElement("span");S.style.width=y+"px",S.style.minWidth=y+"px",S.className="diff-review-line-number"+p,0!==_?S.appendChild(document.createTextNode(String(_))):S.innerText=" ",w.appendChild(S);const x=document.createElement("span");x.style.width=L+"px",x.style.minWidth=L+"px",x.style.paddingRight="10px",x.className="diff-review-line-number"+p,0!==b?x.appendChild(document.createTextNode(String(b))):x.innerText=" ",w.appendChild(x);const k=document.createElement("span");if(k.className="diff-review-spacer",m){const e=document.createElement("span");e.className=Ie.k.asClassName(m),e.innerText="  ",k.appendChild(e)}else k.innerText="  ";let N;if(w.appendChild(k),0!==b){let e=this._renderLine(d,l,h.tabSize,b,c);ze._ttPolicy&&(e=ze._ttPolicy.createHTML(e)),w.insertAdjacentHTML("beforeend",e),N=d.getLineContent(b)}else{let e=this._renderLine(r,s,a.tabSize,_,c);ze._ttPolicy&&(e=ze._ttPolicy.createHTML(e)),w.insertAdjacentHTML("beforeend",e),N=r.getLineContent(_)}0===N.length&&(N=Ue.NC("blankLine","blank"));let D="";switch(u){case 0:D=_===b?Ue.NC({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",N,_):Ue.NC("equalLine","{0} original line {1} modified line {2}",N,_,b);break;case 1:D=Ue.NC("insertLine","+ {0} modified line {1}",N,b);break;case 2:D=Ue.NC("deleteLine","- {0} original line {1}",N,_)}C.setAttribute("aria-label",D),e.appendChild(C)}}static _renderLine(e,t,i,n,s){const r=e.getLineContent(n),a=t.get(49),l=$.A.createEmpty(r,s),d=Z.wA.isBasicASCII(r,e.mightContainNonBasicASCII()),h=Z.wA.containsRTL(r,d,e.mightContainRTL());return(0,q.tF)(new q.IJ(a.isMonospace&&!t.get(32),a.canUseHalfwidthRightwardsArrow,r,!1,d,h,0,l,[],i,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(115),t.get(97),t.get(92),t.get(50)!==o.n0.OFF,null)).html}};Je._ttPolicy=(0,j.Z)("diffReview",{createHTML:e=>e}),Je=ze=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([$e(1,V.O),$e(2,E.e7),$e(3,oe.Ui)],Je);var Xe=i(1432),et=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class tt extends C.JT{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,t,i,n,o,s){super(),this._viewZoneId=e,this._marginDomNode=t,this.editor=i,this.diff=n,this._contextMenuService=o,this._clipboardService=s,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=Ie.k.asClassName(Ne.l.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const r=i.getOption(65),a=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${r}px`,this._diffActions.style.lineHeight=`${r}px`,this._marginDomNode.appendChild(this._diffActions);const l=[],d=0===n.modifiedEndLineNumber;l.push(new We.aU("diff.clipboard.copyDeletedContent",d?n.originalEndLineNumber>n.modifiedStartLineNumber?Ue.NC("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):Ue.NC("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):n.originalEndLineNumber>n.modifiedStartLineNumber?Ue.NC("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):Ue.NC("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,(()=>et(this,void 0,void 0,(function*(){const e=new D.e(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),t=n.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)})))));let h,c=0;n.originalEndLineNumber>n.modifiedStartLineNumber&&(h=new We.aU("diff.clipboard.copyDeletedLineContent",d?Ue.NC("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber):Ue.NC("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber),void 0,!0,(()=>et(this,void 0,void 0,(function*(){const e=n.originalModel.getLineContent(n.originalStartLineNumber+c);if(""===e){const e=n.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(0===e?"\n":"\r\n")}else yield this._clipboardService.writeText(e)})))),l.push(h)),i.getOption(89)||l.push(new We.aU("diff.inline.revertChange",Ue.NC("diff.inline.revertChange.label","Revert this change"),void 0,!0,(()=>et(this,void 0,void 0,(function*(){const e=new D.e(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),t=n.originalModel.getValueInRange(e);if(0===n.modifiedEndLineNumber){const e=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new D.e(n.modifiedStartLineNumber,e,n.modifiedStartLineNumber,e),text:a+t}])}else{const e=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new D.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,e),text:t}])}})))));const u=i.getOption(125)&&!Xe.gn,g=(e,t)=>{var o;this._contextMenuService.showContextMenu({domForShadowRoot:u&&null!==(o=i.getDomNode())&&void 0!==o?o:void 0,getAnchor:()=>({x:e,y:t}),getActions:()=>(h&&(h.label=d?Ue.NC("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+c):Ue.NC("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber+c)),l),autoSelectFirstItem:!0})};this._register(we.mu(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=we.i(this._diffActions),n=Math.floor(r/3);e.preventDefault(),g(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{(8===e.target.type||5===e.target.type)&&e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,c=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r)):this.visibility=!1}))),this._register(i.onMouseDown((e=>{!e.event.rightButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),c=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r),g(e.event.posx,e.event.posy+r))})))}_updateLightBulbPosition(e,t,i){const{top:n}=we.i(e),o=t-n,s=Math.floor(o/i),r=s*i;if(this._diffActions.style.top=`${r}px`,this.diff.viewLineCounts){let e=0;for(let t=0;t<this.diff.viewLineCounts.length;t++)if(e+=this.diff.viewLineCounts[t],s<e)return t}return s}}var it,nt=i(84013),ot=i(45463),st=i(60652),rt=i(85215),at=i(10829),lt=function(e,t){return function(i,n){t(i,n,e)}};let dt=it=class{constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new k.Q5,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;null===(e=this.diffAlgorithmOnDidChangeSubscription)||void 0===e||e.dispose()}computeDiff(e,t,i,n){var o,s,r,a,l,d;return r=this,a=void 0,d=function*(){if("string"!=typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,n);if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new st.f0(new ot.z(1,2),new ot.z(1,t.getLineCount()+1),[new st.iy(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const r=JSON.stringify([e.uri.toString(),t.uri.toString()]),a=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),l=it.diffCache.get(r);if(l&&l.context===a)return l.result;const d=nt.G.create(),h=yield this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),c=d.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:c,timedOut:null===(o=null==h?void 0:h.quitEarly)||void 0===o||o,detectedMoves:i.computeMoves?null!==(s=null==h?void 0:h.moves.length)&&void 0!==s?s:0:-1}),n.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!h)throw new Error("no diff result available");return it.diffCache.size>10&&it.diffCache.delete(it.diffCache.keys().next().value),it.diffCache.set(r,{result:h,context:a}),h},new((l=void 0)||(l=Promise))((function(e,t){function i(e){try{o(d.next(e))}catch(e){t(e)}}function n(e){try{o(d.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof l?o:new l((function(e){e(o)}))).then(i,n)}o((d=d.apply(r,a||[])).next())}))}setOptions(e){var t;let i=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(null===(t=this.diffAlgorithmOnDidChangeSubscription)||void 0===t||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!=typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange((()=>this.onDidChangeEventEmitter.fire()))),i=!0),i&&this.onDidChangeEventEmitter.fire()}};dt.diffCache=new Map,dt=it=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([lt(1,rt.p),lt(2,at.b)],dt);var ht,ct=i(50072),ut=i(29102),gt=i(13961),pt=i(92550),mt=i(30665),ft=i(84972),_t=i(93983),vt=i(5606),bt=i(72065),Ct=i(60972),wt=i(59422),yt=i(90535),St=i(73910),Lt=i(97781),xt=function(e,t){return function(i,n){t(i,n,e)}};class kt{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter((e=>!this._zonesMap[String(e.id)]))}clean(e){this._zones.length>0&&e.changeViewZones((e=>{for(const t of this._zones)e.removeZone(t)})),this._zones=[],this._zonesMap={},e.changeDecorations((e=>{this._decorations=e.deltaDecorations(this._decorations,[])}))}apply(e,t,i,n){const o=n?Pe.Z.capture(e):null;e.changeViewZones((t=>{var n;for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let o=0,s=i.zones.length;o<s;o++){const s=i.zones[o];s.suppressMouseDown=!0,s.showInHiddenAreas=!0;const r=t.addZone(s);this._zones.push(r),this._zonesMap[String(r)]=!0,i.zones[o].diff&&s.marginDomNode&&(s.suppressMouseDown=!1,0!==(null===(n=i.zones[o].diff)||void 0===n?void 0:n.originalModel.getValueLength())&&this._inlineDiffMargins.push(new tt(r,s.marginDomNode,e,i.zones[o].diff,this._contextMenuService,this._clipboardService)))}})),null==o||o.restore(e),e.changeDecorations((e=>{this._decorations=e.deltaDecorations(this._decorations,i.decorations)})),null==t||t.setZones(i.overviewZones)}}let Nt=0;const Dt=(0,je.q5)("diff-insert",Ne.l.add,Ue.NC("diffInsertIcon","Line decoration for inserts in the diff editor.")),Et=(0,je.q5)("diff-remove",Ne.l.remove,Ue.NC("diffRemoveIcon","Line decoration for removals in the diff editor.")),It=(0,j.Z)("diffEditorWidget",{createHTML:e=>e}),Tt=Ue.NC("diff-aria-navigation-tip"," use Shift + F7 to navigate changes");let Mt=ht=class extends C.JT{constructor(e,t,i,n,o,s,r,a,l,d,h){super(),this._editorProgressService=h,this._onDidDispose=this._register(new k.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModel=this._register(new k.Q5),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidUpdateDiff=this._register(new k.Q5),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new k.Q5),this._lastOriginalWarning=null,this._lastModifiedWarning=null,r.willCreateDiffEditor(),this._documentDiffProvider=this._register(s.createInstance(dt,t)),this._register(this._documentDiffProvider.onDidChange((e=>this._beginUpdateDecorationsSoon()))),this._codeEditorService=r,this._contextKeyService=this._register(o.createScoped(e)),this._instantiationService=s.createChild(new Ct.y([_t.i6,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=a,this._notificationService=l,this._id=++Nt,this._state=0,this._updatingDiffProgress=null,this._domElement=e,t=t||{},this._options=Gt(t,{enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showEmptyDecorations:!1,showMoves:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:0,minimumLineCount:0,revealLineCount:0},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:0,useInlineViewWhenSpaceIsLimited:!1}),this.isEmbeddedDiffEditorKey=ut.u.isEmbeddedDiffEditor.bindTo(this._contextKeyService),this.isEmbeddedDiffEditorKey.set(void 0!==t.isInEmbeddedEditor&&t.isInEmbeddedEditor),this._updateDecorationsRunner=this._register(new xe.pY((()=>this._updateDecorations()),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=ht._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,ye.X)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(we.mu(this._overviewDomElement,we.tw.POINTER_DOWN,(e=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(e)}))),this._register(we.nm(this._overviewDomElement,we.tw.MOUSE_WHEEL,(e=>{this._modifiedEditor.delegateScrollFromMouseWheelEvent(e)}),{passive:!1})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new kt(d,n),this._modifiedEditorState=new kt(d,n),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new Ae.I(this._containerDomElement,t.dimension)),this._register(this._elementSizeObserver.onDidChange((()=>this._onDidContainerSizeChanged()))),t.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(t,i.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(t,i.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=s.createInstance(Je,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new Bt(this._createDataSource(),this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio)):this._setStrategy(new Vt(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(a.onDidColorThemeChange((e=>{this._strategy&&this._strategy.applyColors(e)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=ht._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)})));const c=Oe.Uc.getDiffEditorContributions();for(const e of c)try{this._register(s.createInstance(e.ctor,this))}catch(e){(0,De.dL)(e)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}accessibleDiffViewerNext(){this._reviewPane.next()}accessibleDiffViewerPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=(0,Lt.m6)(e.type),i}_disposeOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose(),this._originalOverviewRuler=null),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose(),this._modifiedOverviewRuler=null)}_createOverviewRulers(){this._options.renderOverviewRuler&&(x.ok(!this._originalOverviewRuler&&!this._modifiedOverviewRuler),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(e,t){const i=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(e),t);this._register(i.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(i.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(i.onDidChangeConfiguration((e=>{i.getModel()&&(e.hasChanged(49)&&this._updateDecorationsRunner.schedule(),e.hasChanged(143)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(i.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(i.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})));const n=this._contextKeyService.createKey("isInDiffLeftEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget((()=>n.set(!0)))),this._register(i.onDidBlurEditorWidget((()=>n.set(!1)))),this._register(i.onDidContentSizeChange((e=>{const t=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+ht.ONE_OVERVIEW_WIDTH,i=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),i}_createRightHandSideEditor(e,t){const i=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e),t);this._register(i.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(i.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(i.onDidChangeConfiguration((e=>{i.getModel()&&(e.hasChanged(49)&&this._updateDecorationsRunner.schedule(),e.hasChanged(143)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(i.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(i.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}))),this._register(i.onDidChangeModelOptions((e=>{e.tabSize&&this._updateDecorationsRunner.schedule()})));const n=this._contextKeyService.createKey("isInDiffRightEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget((()=>n.set(!0)))),this._register(i.onDidBlurEditorWidget((()=>n.set(!1)))),this._register(i.onDidContentSizeChange((e=>{const t=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+ht.ONE_OVERVIEW_WIDTH,i=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),this._register(i.onMouseDown((e=>{var t,i;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("arrow-revert-change"))){const t=e.target.position.lineNumber,n=e.target,o=null===(i=this._diffComputationResult)||void 0===i?void 0:i.changes.find((e=>(null==n?void 0:n.detail.afterLineNumber)===e.modifiedStartLineNumber||e.modifiedEndLineNumber>0&&e.modifiedStartLineNumber===t));return o&&this.revertChange(o),e.event.stopPropagation(),void this._updateDecorations()}}))),i}revertChange(e){const t=this._modifiedEditor,i=this._originalEditor.getModel(),n=this._modifiedEditor.getModel();if(!i||!n||!t)return;const o=e.originalEndLineNumber>0?new D.e(e.originalStartLineNumber,1,e.originalEndLineNumber,i.getLineMaxColumn(e.originalEndLineNumber)):null,s=o?i.getValueInRange(o):null,r=e.modifiedEndLineNumber>0?new D.e(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,n.getLineMaxColumn(e.modifiedEndLineNumber)):null,a=n.getEOL();if(0===e.originalEndLineNumber&&r){let i=r;e.modifiedStartLineNumber>1?i=r.setStartPosition(e.modifiedStartLineNumber-1,n.getLineMaxColumn(e.modifiedStartLineNumber-1)):e.modifiedEndLineNumber<n.getLineCount()&&(i=r.setEndPosition(e.modifiedEndLineNumber+1,1)),t.executeEdits("diffEditor",[{range:i,text:""}])}else if(0===e.modifiedEndLineNumber&&null!==s){const i=e.modifiedStartLineNumber<n.getLineCount()?new Ke.L(e.modifiedStartLineNumber+1,1):new Ke.L(e.modifiedStartLineNumber,n.getLineMaxColumn(e.modifiedStartLineNumber));t.executeEdits("diffEditor",[{range:D.e.fromPositions(i,i),text:e.modifiedStartLineNumber<n.getLineCount()?s+a:a+s}])}else r&&null!==s&&t.executeEdits("diffEditor",[{range:r,text:s}])}_createInnerEditor(e,t,i,n){return e.createInstance(Ce.Gm,t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return O.g.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(e){const t=Gt(e,this._options),i=(o=t,{enableSplitViewResizing:(n=this._options).enableSplitViewResizing!==o.enableSplitViewResizing,renderSideBySide:n.renderSideBySide!==o.renderSideBySide,renderMarginRevertIcon:n.renderMarginRevertIcon!==o.renderMarginRevertIcon,maxComputationTime:n.maxComputationTime!==o.maxComputationTime,maxFileSize:n.maxFileSize!==o.maxFileSize,ignoreTrimWhitespace:n.ignoreTrimWhitespace!==o.ignoreTrimWhitespace,renderIndicators:n.renderIndicators!==o.renderIndicators,originalEditable:n.originalEditable!==o.originalEditable,diffCodeLens:n.diffCodeLens!==o.diffCodeLens,renderOverviewRuler:n.renderOverviewRuler!==o.renderOverviewRuler,diffWordWrap:n.diffWordWrap!==o.diffWordWrap,diffAlgorithm:n.diffAlgorithm!==o.diffAlgorithm,accessibilityVerbose:n.accessibilityVerbose!==o.accessibilityVerbose});var n,o;this._options=t,this.isEmbeddedDiffEditorKey.set(void 0!==e.isInEmbeddedEditor&&e.isInEmbeddedEditor);const s=i.ignoreTrimWhitespace||i.renderIndicators||i.renderMarginRevertIcon,r=this._isVisible&&(i.maxComputationTime||i.maxFileSize);this._documentDiffProvider.setOptions(t),s?this._beginUpdateDecorations():r&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio),i.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new Bt(this._createDataSource(),this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio)):this._setStrategy(new Vt(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=ht._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),i.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}createViewModel(e){return{model:e,waitForDiff(){return e=this,t=void 0,n=function*(){},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}}}setModel(e){if(e&&"model"in e&&(e=e.model),e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._disposeOverviewRulers(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._createOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport(),this._onDidChangeModel.fire(),this._diffNavigator=this._register(this._instantiationService.createInstance(R,this,{alwaysRevealFirst:!1,findResultLoop:this.getModifiedEditor().getOption(40).loop}))}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e,t="api"){this._modifiedEditor.setPosition(e,t)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e,t="api"){this._modifiedEditor.setSelection(e,t)}setSelections(e,t="api"){this._modifiedEditor.setSelections(e,t)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}focus(){this._modifiedEditor.focus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._modifiedEditor.createDecorationsCollection(e)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}saveViewState(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const e=this._elementSizeObserver.getHeight(),t=this._getReviewHeight(),i=ht.ENTIRE_DIFF_OVERVIEW_WIDTH-2*ht.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:ht.ONE_OVERVIEW_WIDTH,right:i+ht.ONE_OVERVIEW_WIDTH,height:e-t}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:ht.ONE_OVERVIEW_WIDTH,height:e-t}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((()=>this._beginUpdateDecorations()),ht.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1);const e=this._originalEditor.getModel(),t=this._modifiedEditor.getModel();if(!e||!t)return;this._diffComputationToken++;const i=this._diffComputationToken,n=1024*this._options.maxFileSize*1024,o=e=>{const t=e.getValueLength();return 0===n||t<=n};o(e)&&o(t)?(this._setState(1),this._documentDiffProvider.computeDiff(e,t,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace,maxComputationTimeMs:this._options.maxComputationTime,computeMoves:!1},ke.T.None).then((n=>{i===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult={identical:n.identical,quitEarly:n.quitEarly,changes2:n.changes,changes:n.changes.map((e=>{let t,i,n,o,s=e.innerChanges;return e.originalRange.isEmpty?(t=e.originalRange.startLineNumber-1,i=0,s=void 0):(t=e.originalRange.startLineNumber,i=e.originalRange.endLineNumberExclusive-1),e.modifiedRange.isEmpty?(n=e.modifiedRange.startLineNumber-1,o=0,s=void 0):(n=e.modifiedRange.startLineNumber,o=e.modifiedRange.endLineNumberExclusive-1),{originalStartLineNumber:t,originalEndLineNumber:i,modifiedStartLineNumber:n,modifiedEndLineNumber:o,charChanges:null==s?void 0:s.map((e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn})))}}))},this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())}),(n=>{i===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())}))):ht._equals(e.uri,this._lastOriginalWarning)&&ht._equals(t.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=e.uri,this._lastModifiedWarning=t.uri,this._notificationService.warn(Ue.NC("diff.tooLarge","Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._options.renderMarginRevertIcon&&!this._modifiedEditor.getOption(89),o=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,n,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,o.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,o.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:(t.wordWrapOverride1="off",t.wordWrapOverride2="off",t.stickyScroll={enabled:!1}),e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),this._updateAriaLabel(t),t.readOnly=!this._options.originalEditable,t.dropIntoEditor={enabled:!t.readOnly},t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_updateAriaLabel(e){var t;let i=null!==(t=e.ariaLabel)&&void 0!==t?t:"";this._options.accessibilityVerbose?i+=Tt:i&&(i=i.replaceAll(Tt,"")),e.ariaLabel=i}_adjustOptionsForRightHandSide(e){const t=this._adjustOptionsForSubEditor(e);return e.modifiedAriaLabel&&(t.ariaLabel=e.modifiedAriaLabel),this._updateAriaLabel(t),t.wordWrapOverride1=this._options.diffWordWrap,t.revealHorizontalRightPadding=o.BH.revealHorizontalRightPadding.defaultValue+ht.ENTIRE_DIFF_OVERVIEW_WIDTH,t.scrollbar.verticalHasArrows=!1,t.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const e=this._elementSizeObserver.getWidth(),t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=this._strategy.layout();this._originalDomNode.style.width=n+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=e-n-ht.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._modifiedDomNode.style.left=n+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=t-i+"px",this._overviewDomElement.style.width=ht.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=e-ht.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(ht.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:n,height:t-i}),this._modifiedEditor.layout({width:e-n-(this._options.renderOverviewRuler?ht.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:t-i}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(t-i,e,i),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),o=Math.max(0,n-0),s=i>0?o/i:0;return{height:Math.max(0,Math.floor(e.height*s)),top:Math.floor(t*s)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){var t;null===(t=this._strategy)||void 0===t||t.dispose(),this._strategy=e,this._boundarySashes&&e.setBoundarySashes(this._boundarySashes),e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}};Mt.ONE_OVERVIEW_WIDTH=15,Mt.ENTIRE_DIFF_OVERVIEW_WIDTH=30,Mt.UPDATE_DIFF_DECORATIONS_DELAY=200,Mt=ht=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([xt(3,ft.p),xt(4,_t.i6),xt(5,bt.TG),xt(6,L.$),xt(7,Lt.XE),xt(8,wt.lT),xt(9,vt.i),xt(10,yt.ek)],Mt);class Rt extends C.JT{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=e.getColor(St.P6Y)||(e.getColor(St.ypS)||St.CzK).transparent(2),i=e.getColor(St.F9q)||(e.getColor(St.P4M)||St.keg).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,o,s){s=s.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber)),o=o.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber));const r=this._getViewZones(e,o,s,i),a=this._getOriginalEditorDecorations(r,e,t,i),l=this._getModifiedEditorDecorations(r,e,t,i,n);return{original:{decorations:a.decorations,overviewZones:a.overviewZones,zones:r.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:r.modified}}}setBoundarySashes(e){}}class At{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class Ot{constructor(e,t,i,n,o){this._lineChanges=e,this._originalForeignVZ=t,this._modifiedForeignVZ=i,this._originalEditor=n,this._modifiedEditor=o}static _getViewLineCount(e,t,i){const n=e.getModel(),o=e._getViewModel();if(n&&o){const e=Zt(n,o,t,i);return e.endLineNumber-e.startLineNumber+1}return i-t+1}getViewZones(){const e=this._originalEditor.getOption(65),t=this._modifiedEditor.getOption(65),i=-1!==this._originalEditor.getOption(143).wrappingColumn,n=-1!==this._modifiedEditor.getOption(143).wrappingColumn,o=i||n,s=this._originalEditor.getModel(),r=this._originalEditor._getViewModel().coordinatesConverter,a=this._modifiedEditor._getViewModel().coordinatesConverter,l=[],d=[];let h=0,c=0,u=0,g=0,p=0,m=0;const f=(e,t)=>e.afterLineNumber-t.afterLineNumber,_=(e,t)=>{if(null===t.domNode&&e.length>0){const i=e[e.length-1];if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},v=new At(this._modifiedForeignVZ),b=new At(this._originalForeignVZ);let C=1,w=1;for(let i=0,n=this._lineChanges.length;i<=n;i++){const y=i<n?this._lineChanges[i]:null;null!==y?(u=y.originalStartLineNumber+(y.originalEndLineNumber>0?-1:0),g=y.modifiedStartLineNumber+(y.modifiedEndLineNumber>0?-1:0),c=y.originalEndLineNumber>0?Ot._getViewLineCount(this._originalEditor,y.originalStartLineNumber,y.originalEndLineNumber):0,h=y.modifiedEndLineNumber>0?Ot._getViewLineCount(this._modifiedEditor,y.modifiedStartLineNumber,y.modifiedEndLineNumber):0,p=Math.max(y.originalStartLineNumber,y.originalEndLineNumber),m=Math.max(y.modifiedStartLineNumber,y.modifiedEndLineNumber)):(u+=1e7+c,g+=1e7+h,p=u,m=g);let S=[],L=[];if(o){let e;e=y?y.originalEndLineNumber>0?y.originalStartLineNumber-C:y.modifiedStartLineNumber-w:s.getLineCount()-C+1;for(let t=0;t<e;t++){const e=C+t,i=w+t,n=r.getModelLineViewLineCount(e),o=a.getModelLineViewLineCount(i);n<o?S.push({afterLineNumber:e,heightInLines:o-n,domNode:null,marginDomNode:null}):n>o&&L.push({afterLineNumber:i,heightInLines:n-o,domNode:null,marginDomNode:null})}y&&(C=(y.originalEndLineNumber>0?y.originalEndLineNumber:y.originalStartLineNumber)+1,w=(y.modifiedEndLineNumber>0?y.modifiedEndLineNumber:y.modifiedStartLineNumber)+1)}for(;v.current&&v.current.afterLineNumber<=m;){let e;e=v.current.afterLineNumber<=g?u-g+v.current.afterLineNumber:p;let i=null;y&&y.modifiedStartLineNumber<=v.current.afterLineNumber&&v.current.afterLineNumber<=y.modifiedEndLineNumber&&(i=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),S.push({afterLineNumber:e,heightInLines:v.current.height/t,domNode:null,marginDomNode:i}),v.advance()}for(;b.current&&b.current.afterLineNumber<=p;){let t;t=b.current.afterLineNumber<=u?g-u+b.current.afterLineNumber:m,L.push({afterLineNumber:t,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(null!==y&&zt(y)){const e=this._produceOriginalFromDiff(y,c,h);e&&S.push(e)}if(null!==y&&Kt(y)){const e=this._produceModifiedFromDiff(y,c,h);e&&L.push(e)}let x=0,k=0;for(S=S.sort(f),L=L.sort(f);x<S.length&&k<L.length;){const e=S[x],t=L[k],i=e.afterLineNumber-u,n=t.afterLineNumber-g;i<n?(_(l,e),x++):n<i?(_(d,t),k++):e.shouldNotShrink?(_(l,e),x++):t.shouldNotShrink?(_(d,t),k++):e.heightInLines>=t.heightInLines?(e.heightInLines-=t.heightInLines,k++):(t.heightInLines-=e.heightInLines,x++)}for(;x<S.length;)_(l,S[x]),x++;for(;k<L.length;)_(d,L[k]),k++}return{original:Ot._ensureDomNodes(l),modified:Ot._ensureDomNodes(d)}}static _ensureDomNodes(e){return e.map((e=>(e.domNode||(e.domNode=$t()),e)))}}function Pt(e,t,i,n,o){return{range:new D.e(e,t,i,n),options:o}}const Ft={arrowRevertChange:gt.qx.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new Ee.W5(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(Ue.NC("revertChangeHoverMessage","Click to revert change")),glyphMarginClassName:"arrow-revert-change "+Ie.k.asClassName(Ne.l.arrowRight),zIndex:10001}),charDelete:gt.qx.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:gt.qx.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:gt.qx.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:gt.qx.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:gt.qx.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:gt.qx.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+Ie.k.asClassName(Dt),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:gt.qx.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:gt.qx.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+Ie.k.asClassName(Et),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:gt.qx.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class Bt extends Rt{constructor(e,t,i){super(e),this._disableSash=!1===t,this._defaultRatio=i,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new Le.g(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart((()=>this._onSashDragStart())),this._sash.onDidChange((e=>this._onSashDrag(e))),this._sash.onDidEnd((()=>this._onSashDragEnd())),this._sash.onDidReset((()=>this._onSashReset()))}setEnableSplitViewResizing(e,t){this._defaultRatio=t;const i=!1===e;this._disableSash!==i&&(this._disableSash=i,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio||this._defaultRatio){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Mt.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let i=Math.floor((e||this._defaultRatio)*t);const n=Math.floor(this._defaultRatio*t);return i=this._disableSash?n:i||n,t>2*Bt.MINIMUM_EDITOR_WIDTH?(i<Bt.MINIMUM_EDITOR_WIDTH&&(i=Bt.MINIMUM_EDITOR_WIDTH),i>t-Bt.MINIMUM_EDITOR_WIDTH&&(i=t-Bt.MINIMUM_EDITOR_WIDTH)):i=n,this._sashPosition!==i&&(this._sashPosition=i),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Mt.ENTIRE_DIFF_OVERVIEW_WIDTH:0),i=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=i/t,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=this._defaultRatio,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}setBoundarySashes(e){this._sash.orthogonalEndSash=e.bottom}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new Wt(e,t,i,n,o).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const o=this._dataSource.getOriginalEditor(),s=String(this._removeColor),r={decorations:[],overviewZones:[]},a=o.getModel(),l=o._getViewModel();for(const e of t)if(Kt(e)){r.decorations.push({range:new D.e(e.originalStartLineNumber,1,e.originalEndLineNumber,1073741824),options:n?Ft.lineDeleteWithSign:Ft.lineDelete}),zt(e)&&e.charChanges||r.decorations.push(Pt(e.originalStartLineNumber,1,e.originalEndLineNumber,1073741824,Ft.charDeleteWholeLine));const t=Zt(a,l,e.originalStartLineNumber,e.originalEndLineNumber);if(r.overviewZones.push(new mt.EY(t.startLineNumber,t.endLineNumber,0,s)),e.charChanges)for(const t of e.charChanges)if(jt(t))if(i)for(let e=t.originalStartLineNumber;e<=t.originalEndLineNumber;e++){let i,n;i=e===t.originalStartLineNumber?t.originalStartColumn:a.getLineFirstNonWhitespaceColumn(e),n=e===t.originalEndLineNumber?t.originalEndColumn:a.getLineLastNonWhitespaceColumn(e),r.decorations.push(Pt(e,i,e,n,Ft.charDelete))}else r.decorations.push(Pt(t.originalStartLineNumber,t.originalStartColumn,t.originalEndLineNumber,t.originalEndColumn,Ft.charDelete))}return r}_getModifiedEditorDecorations(e,t,i,n,o){const s=this._dataSource.getModifiedEditor(),r=String(this._insertColor),a={decorations:[],overviewZones:[]},l=s.getModel(),d=s._getViewModel();for(const s of t){if(o)if(s.modifiedEndLineNumber>0)a.decorations.push({range:new D.e(s.modifiedStartLineNumber,1,s.modifiedStartLineNumber,1),options:Ft.arrowRevertChange});else{const t=e.modified.find((e=>e.afterLineNumber===s.modifiedStartLineNumber));t&&(t.marginDomNode=qt())}if(zt(s)){a.decorations.push({range:new D.e(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber,1073741824),options:n?Ft.lineInsertWithSign:Ft.lineInsert}),Kt(s)&&s.charChanges||a.decorations.push(Pt(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber,1073741824,Ft.charInsertWholeLine));const e=Zt(l,d,s.modifiedStartLineNumber,s.modifiedEndLineNumber);if(a.overviewZones.push(new mt.EY(e.startLineNumber,e.endLineNumber,0,r)),s.charChanges)for(const e of s.charChanges)if(Ut(e))if(i)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let i,n;i=t===e.modifiedStartLineNumber?e.modifiedStartColumn:l.getLineFirstNonWhitespaceColumn(t),n=t===e.modifiedEndLineNumber?e.modifiedEndColumn:l.getLineLastNonWhitespaceColumn(t),a.decorations.push(Pt(t,i,t,n,Ft.charInsert))}else a.decorations.push(Pt(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,Ft.charInsert))}}return a}}Bt.MINIMUM_EDITOR_WIDTH=100;class Wt extends Ot{constructor(e,t,i,n,o){super(e,t,i,n,o)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class Vt extends Rt{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange((t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())})))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const o=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor();return new Ht(e,t,i,o,s,n).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const o=String(this._removeColor),s={decorations:[],overviewZones:[]},r=this._dataSource.getOriginalEditor(),a=r.getModel(),l=r._getViewModel();let d=0;for(const i of t)if(Kt(i)){for(s.decorations.push({range:new D.e(i.originalStartLineNumber,1,i.originalEndLineNumber,1073741824),options:Ft.lineDeleteMargin});d<e.modified.length;){const t=e.modified[d];if(t.diff&&t.diff.originalStartLineNumber>=i.originalStartLineNumber)break;d++}let t=0;if(d<e.modified.length){const n=e.modified[d];n.diff&&n.diff.originalStartLineNumber===i.originalStartLineNumber&&n.diff.originalEndLineNumber===i.originalEndLineNumber&&n.diff.modifiedStartLineNumber===i.modifiedStartLineNumber&&n.diff.modifiedEndLineNumber===i.modifiedEndLineNumber&&(t=n.heightInLines)}const n=Zt(a,l,i.originalStartLineNumber,i.originalEndLineNumber);s.overviewZones.push(new mt.EY(n.startLineNumber,n.endLineNumber,t,o))}return s}_getModifiedEditorDecorations(e,t,i,n,o){const s=this._dataSource.getModifiedEditor(),r=String(this._insertColor),a={decorations:[],overviewZones:[]},l=s.getModel(),d=s._getViewModel();for(const e of t)if(zt(e)){a.decorations.push({range:new D.e(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824),options:n?Ft.lineInsertWithSign:Ft.lineInsert});const t=Zt(l,d,e.modifiedStartLineNumber,e.modifiedEndLineNumber);if(a.overviewZones.push(new mt.EY(t.startLineNumber,t.endLineNumber,0,r)),e.charChanges){for(const t of e.charChanges)if(Ut(t))if(i)for(let e=t.modifiedStartLineNumber;e<=t.modifiedEndLineNumber;e++){let i,n;i=e===t.modifiedStartLineNumber?t.modifiedStartColumn:l.getLineFirstNonWhitespaceColumn(e),n=e===t.modifiedEndLineNumber?t.modifiedEndColumn:l.getLineLastNonWhitespaceColumn(e),a.decorations.push(Pt(e,i,e,n,Ft.charInsert))}else a.decorations.push(Pt(t.modifiedStartLineNumber,t.modifiedStartColumn,t.modifiedEndLineNumber,t.modifiedEndColumn,Ft.charInsert))}else a.decorations.push(Pt(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824,Ft.charInsertWholeLine))}return a}layout(){return Math.max(5,this._decorationsLeft)}}class Ht extends Ot{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._originalModel=n.getModel(),this._renderIndicators=s,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,i){const n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(e,t,i){const n=document.createElement("div");n.className=`view-lines line-delete ${Se.S}`;const o=document.createElement("div");o.className="inline-deleted-margin-view-zone";const s={shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:n,marginDomNode:o,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(t),null,null);return this._pendingLineChange.push(e),this._pendingViewZones.push(s),s}_finalize(e){const t=this._modifiedEditor.getOptions(),i=this._modifiedEditor.getModel().getOptions().tabSize,n=t.get(49),o=t.get(32),s=n.typicalHalfwidthCharacterWidth,r=t.get(102),a=this._originalModel.mightContainNonBasicASCII(),l=this._originalModel.mightContainRTL(),d=t.get(65),h=t.get(142).decorationsWidth,c=t.get(115),u=t.get(97),g=t.get(92),p=t.get(50),m=this._lineBreaksComputer.finalize();let f=0;for(let t=0;t<this._pendingLineChange.length;t++){const _=this._pendingLineChange[t],v=this._pendingViewZones[t],b=v.domNode;(0,Re.N)(b,n);const C=v.marginDomNode;(0,Re.N)(C,n);const w=[];if(_.charChanges)for(const e of _.charChanges)jt(e)&&w.push(new Z.$t(new D.e(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),"char-delete",0));const y=w.length>0,S=new ct.HT(1e4);let L=0,x=0,k=null;for(let t=_.originalStartLineNumber;t<=_.originalEndLineNumber;t++){const s=t-_.originalStartLineNumber,r=this._originalModel.tokenization.getLineTokens(t),b=r.getLineContent(),N=m[f++],D=pt.Kp.filter(w,t,1,b.length+1);if(N){let m=0;for(const e of N.breakOffsets){const t=r.sliceAndInflate(m,e,0),s=b.substring(m,e);L=Math.max(L,this._renderOriginalLine(x++,s,t,pt.Kp.extractWrapped(D,m,e),y,a,l,n,o,d,h,c,u,g,p,i,S,C)),m=e}for(k||(k=[]);k.length<s;)k[k.length]=1;k[s]=N.breakOffsets.length,v.heightInLines+=N.breakOffsets.length-1;const f=document.createElement("div");f.className="gutter-delete",e.original.push({afterLineNumber:t,afterColumn:0,heightInLines:N.breakOffsets.length-1,domNode:$t(),marginDomNode:f})}else L=Math.max(L,this._renderOriginalLine(x++,b,r,D,y,a,l,n,o,d,h,c,u,g,p,i,S,C))}L+=r;const N=S.build(),E=It?It.createHTML(N):N;if(b.innerHTML=E,v.minWidthInPx=L*s,k){const e=_.originalEndLineNumber-_.originalStartLineNumber;for(;k.length<=e;)k[k.length]=1}v.diff.viewLineCounts=k}e.original.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber))}_renderOriginalLine(e,t,i,n,s,r,a,l,d,h,c,u,g,p,m,f,_,v){_.appendString('<div class="view-line'),s||_.appendString(" char-delete"),_.appendString('" style="top:'),_.appendString(String(e*h)),_.appendString('px;width:1000000px;">');const b=Z.wA.isBasicASCII(t,r),C=Z.wA.containsRTL(t,b,a),w=(0,q.d1)(new q.IJ(l.isMonospace&&!d,l.canUseHalfwidthRightwardsArrow,t,!1,b,C,0,i,n,f,0,l.spaceWidth,l.middotWidth,l.wsmiddotWidth,u,g,p,m!==o.n0.OFF,null),_);if(_.appendString("</div>"),this._renderIndicators){const t=document.createElement("div");t.className=`delete-sign ${Ie.k.asClassName(Et)}`,t.setAttribute("style",`position:absolute;top:${e*h}px;width:${c}px;height:${h}px;right:0;`),v.appendChild(t)}return w.characterMapping.getHorizontalOffset(w.characterMapping.length)}}function zt(e){return e.modifiedEndLineNumber>0}function Kt(e){return e.originalEndLineNumber>0}function Ut(e){return e.modifiedStartLineNumber===e.modifiedEndLineNumber?e.modifiedEndColumn-e.modifiedStartColumn>0:e.modifiedEndLineNumber-e.modifiedStartLineNumber>0}function jt(e){return e.originalStartLineNumber===e.originalEndLineNumber?e.originalEndColumn-e.originalStartColumn>0:e.originalEndLineNumber-e.originalStartLineNumber>0}function $t(){const e=document.createElement("div");return e.className="diagonal-fill",e}function qt(){const e=document.createElement("div");return e.className="arrow-revert-change "+Ie.k.asClassName(Ne.l.arrowRight),we.$("div",{},e)}function Zt(e,t,i,n){const o=e.getLineCount();return i=Math.min(o,Math.max(1,i)),n=Math.min(o,Math.max(1,n)),t.coordinatesConverter.convertModelRangeToViewRange(new D.e(i,e.getLineMinColumn(i),n,e.getLineMaxColumn(n)))}function Gt(e,t){return{enableSplitViewResizing:(0,o.O7)(e.enableSplitViewResizing,t.enableSplitViewResizing),splitViewDefaultRatio:(0,o.L_)(e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,o.O7)(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:(0,o.O7)(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:(0,o.Zc)(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:(0,o.Zc)(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,o.O7)(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:(0,o.O7)(e.renderIndicators,t.renderIndicators),originalEditable:(0,o.O7)(e.originalEditable,t.originalEditable),diffCodeLens:(0,o.O7)(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:(0,o.O7)(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(i=e.diffWordWrap,n=t.diffWordWrap,(0,o.NY)(i,n,["off","on","inherit"])),diffAlgorithm:(0,o.NY)(e.diffAlgorithm,t.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,o.O7)(e.accessibilityVerbose,t.accessibilityVerbose),hideUnchangedRegions:{enabled:!1,contextLineCount:0,minimumLineCount:0,revealLineCount:0},experimental:{showEmptyDecorations:!1,showMoves:!1},isInEmbeddedEditor:(0,o.O7)(e.isInEmbeddedEditor,t.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:0,useInlineViewWhenSpaceIsLimited:!1};var i,n}(0,Lt.Ic)(((e,t)=>{const i=e.getColor(St.L_t);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${i} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${i} 50%, ${i} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)}));var Qt=i(30653),Yt=i(66663),Jt=i(91741);let Xt=class extends C.JT{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new k.Q5),this._onCodeEditorAdd=this._register(new k.Q5),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new k.Q5),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new k.Q5),this._onDiffEditorAdd=this._register(new k.Q5),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new k.Q5),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Jt.S,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorationsByType(e)))))}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}openCodeEditor(e,t,i){return n=this,o=void 0,r=function*(){for(const n of this._codeEditorOpenHandlers){const o=yield n(e,t,i);if(null!==o)return o}return null},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,a)}l((r=r.apply(n,o||[])).next())}));var n,o,s,r}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return(0,C.OF)(t)}};Xt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,Lt.XE)],Xt);var ei=i(65026),ti=function(e,t){return function(i,n){t(i,n,e)}};let ii=class extends Xt{constructor(e,t){super(t),this.onCodeEditorAdd((()=>this._checkContextKey())),this.onCodeEditorRemove((()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this.registerCodeEditorOpenHandler(((e,t,i)=>{return n=this,o=void 0,r=function*(){return t?this.doOpenEditor(t,e):null},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,a)}l((r=r.apply(n,o||[])).next())}));var n,o,s,r}))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===Yt.lg.http||i===Yt.lg.https)return(0,we.V3)(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};ii=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ti(0,_t.i6),ti(1,Lt.XE)],ii),(0,ei.z)(L.$,ii,0);const ni=(0,bt.yh)("layoutService");var oi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},si=function(e,t){return function(i,n){t(i,n,e)}};let ri=class{get dimension(){return this._dimension||(this._dimension=we.D6(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayout=k.ju.None,this.offset={top:0,quickPickTop:0}}};ri=oi([si(0,L.$)],ri);let ai=class extends ri{get hasContainer(){return!1}get container(){return this._container}constructor(e,t){super(t),this._container=e}};ai=oi([si(1,L.$)],ai),(0,ei.z)(ni,ri,1);var li=i(14603),di=i(28820),hi=i(64862),ci=function(e,t){return function(i,n){t(i,n,e)}},ui=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function gi(e){return e.scheme===Yt.lg.file?e.fsPath:e.path}let pi=0;class mi{constructor(e,t,i,n,o,s,r){this.id=++pi,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class fi{constructor(e,t){this.resourceLabel=e,this.reason=t}}class _i{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(0===i.reason?e:t).push(i.resourceLabel);const i=[];return e.length>0&&i.push(Ue.NC({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(Ue.NC({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class vi{constructor(e,t,i,n,o,s,r){this.id=++pi,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new _i),this.removedResources.has(t)||this.removedResources.set(t,new fi(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new _i),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new fi(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class bi{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(` * [UNDO] ${this._past[t]}`);for(let t=this._future.length-1;t>=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e<i;e++)t.push(this._past[e].id);for(let e=this._future.length-1;e>=0;e--)t.push(this._future[e].id);return new hi.YO(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let s=0,r=this._past.length;s<r;s++,n++){const r=this._past[s];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,o=0),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let o=this._future.length-1;o>=0;o--,n++){const r=this._future[o];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,s=o),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==s&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class Ci{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;e<t;e++)this._versionIds[e]=this.editStacks[e].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const wi=new bi("","");wi.locked=!0;let yi=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);const t=[];for(const e of this._editStacks)t.push(e[1].toString());console.log(t.join("\n"))}pushElement(e,t=hi.Xt.None,i=hi.gJ.None){if(0===e.type){const n=gi(e.resource),o=this.getUriComparisonKey(e.resource);this._pushElement(new mi(e,n,o,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,o=[],s=[];for(const t of e.resources){const e=gi(t),i=this.getUriComparisonKey(t);n.has(i)||(n.add(i),o.push(e),s.push(i))}1===o.length?this._pushElement(new mi(e,o[0],s[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new vi(e,o,s,t.id,t.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const i=e.resourceLabels[t],n=e.strResources[t];let o;this._editStacks.has(n)?o=this._editStacks.get(n):(o=new bi(i,n),this._editStacks.set(n,o)),o.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);if(e.hasFutureElements())return null;const i=e.getClosestPastElement();return i?i.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const e of i){const t=gi(e.resource),i=this.getUriComparisonKey(e.resource),o=new mi(e,t,i,0,0,0,0);n.set(o.strResource,o)}for(const i of e.strResources)t&&t.has(i)||this._editStacks.get(i).splitPastWorkspaceElement(e,n)}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const e of i){const t=gi(e.resource),i=this.getUriComparisonKey(e.resource),o=new mi(e,t,i,0,0,0,0);n.set(o.strResource,o)}for(const i of e.strResources)t&&t.has(i)||this._editStacks.get(i).splitFutureWorkspaceElement(e,n)}removeElements(e){const t="string"==typeof e?e:this.getUriComparisonKey(e);this._editStacks.has(t)&&(this._editStacks.get(t).dispose(),this._editStacks.delete(t))}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);this._editStacks.has(n)&&this._editStacks.get(n).setElementsValidFlag(t,i)}createSnapshot(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).createSnapshot(e):new hi.YO(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),i.hasPastElements()||i.hasFutureElements()||(i.dispose(),this._editStacks.delete(t))}}getElements(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&s.sourceId===e&&(!t||s.sourceOrder>t.sourceOrder)&&(t=s,i=n)}return[t,i]}canUndo(e){if(e instanceof hi.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasPastElements()}_onError(e,t){(0,De.dL)(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const s=this._acquireLocks(i);let r;try{r=t()}catch(t){return s(),n.dispose(),this._onError(t,e)}return r?r.then((()=>(s(),n.dispose(),o())),(t=>(s(),n.dispose(),this._onError(t,e)))):(s(),n.dispose(),o())}_invokeWorkspacePrepare(e){return ui(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return C.JT.None;const t=e.actual.prepareUndoRedo();return void 0===t?C.JT.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(C.JT.None);const i=e.actual.prepareUndoRedo();return i?(0,C.Wf)(i)?t(i):i.then((e=>t(e))):t(C.JT.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||wi);return new Ci(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Si(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new Si}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,Ue.NC({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,Ue.NC({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestPastElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,Ue.NC({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,Ue.NC({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,Ue.NC({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,n,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return ui(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let o;!function(e){e[e.All=0]="All",e[e.This=1]="This",e[e.Cancel=2]="Cancel"}(o||(o={}));const{result:s}=yield this._dialogService.prompt({type:li.Z.Info,message:Ue.NC("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:Ue.NC({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",i.editStacks.length),run:()=>o.All},{label:Ue.NC({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>o.This}],cancelButton:{run:()=>o.Cancel}});if(s===o.Cancel)return;if(s===o.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let o;try{o=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const s=this._checkWorkspaceUndo(e,t,i,!0);if(s)return o.dispose(),s.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,o,(()=>this._continueUndoInGroup(t.groupId,n)))}))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new Ci([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=Ue.NC({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof hi.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),o=n.getClosestPastElement();if(o){if(o.groupId){const[e,n]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&n)return this._undo(n,t,i)}if((o.sourceId!==t||o.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,i):this._resourceUndo(n,o,i)}finally{}}}_confirmAndContinueUndo(e,t,i){return ui(this,void 0,void 0,(function*(){if((yield this._dialogService.confirm({message:Ue.NC("confirmDifferentSource","Would you like to undo '{0}'?",i.label),primaryButton:Ue.NC({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:Ue.NC("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)}))}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.sourceId===e&&(!t||s.sourceOrder<t.sourceOrder)&&(t=s,i=n)}return[t,i]}canRedo(e){if(e instanceof hi.gJ){const[,t]=this._findClosestRedoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasFutureElements()}_tryToSplitAndRedo(e,t,i,n){if(t.canSplit())return this._splitFutureWorkspaceElement(t,i),this._notificationService.warn(n),new Si(this._redo(e));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new Si}_checkWorkspaceRedo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,Ue.NC({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,Ue.NC({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestFutureElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndRedo(e,t,null,Ue.NC({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,Ue.NC({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,Ue.NC({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return ui(this,void 0,void 0,(function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new Ci([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=Ue.NC({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.groupId===e&&(!t||s.groupOrder<t.groupOrder)&&(t=s,i=n)}return[t,i]}_continueRedoInGroup(e){if(!e)return;const[,t]=this._findClosestRedoElementInGroup(e);return t?this._redo(t):void 0}redo(e){if(e instanceof hi.gJ){const[,t]=this._findClosestRedoElementWithSource(e.id);return t?this._redo(t):void 0}return"string"==typeof e?this._redo(e):this._redo(this.getUriComparisonKey(e))}_redo(e){if(!this._editStacks.has(e))return;const t=this._editStacks.get(e),i=t.getClosestFutureElement();if(i){if(i.groupId){const[e,t]=this._findClosestRedoElementInGroup(i.groupId);if(i!==e&&t)return this._redo(t)}try{return 1===i.type?this._workspaceRedo(e,i):this._resourceRedo(t,i)}finally{}}}};yi=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ci(0,di.S),ci(1,wt.lT)],yi);class Si{constructor(e){this.returnValue=e}}(0,ei.z)(hi.tJ,yi,1),i(88191);var Li=i(43557),xi=i(26909),ki=i(73343),Ni=function(e,t){return function(i,n){t(i,n,e)}};let Di=class extends C.JT{constructor(e,t,i){super(),this._themeService=e,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new xi.$(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};Di=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ni(0,Lt.XE),Ni(1,Li.VZ),Ni(2,V.O)],Di),(0,ei.z)(ki.s,Di,1);var Ei=i(15527),Ii=i(43702),Ti=i(88721),Mi=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Ri="**",Ai="/",Oi="[/\\\\]",Pi="[^/\\\\]",Fi=/\//g;function Bi(e,t){switch(e){case 0:return"";case 1:return`${Pi}*?`;default:return`(?:${Oi}|${Pi}+${Oi}${t?`|${Oi}${Pi}+`:""})*?`}}function Wi(e,t){if(!e)return[];const i=[];let n=!1,o=!1,s="";for(const r of e){switch(r){case t:if(!n&&!o){i.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1}s+=r}return s&&i.push(s),i}function Vi(e){if(!e)return"";let t="";const i=Wi(e,Ai);if(i.every((e=>e===Ri)))t=".*";else{let e=!1;i.forEach(((n,o)=>{if(n===Ri){if(e)return;t+=Bi(2,o===i.length-1)}else{let e=!1,s="",r=!1,a="";for(const i of n)if("}"!==i&&e)s+=i;else if(!r||"]"===i&&a)switch(i){case"{":e=!0;continue;case"[":r=!0;continue;case"}":{const i=`(?:${Wi(s,",").map((e=>Vi(e))).join("|")})`;t+=i,e=!1,s="";break}case"]":t+="["+a+"]",r=!1,a="";break;case"?":t+=Pi;continue;case"*":t+=Bi(1);continue;default:t+=(0,w.ec)(i)}else{let e;e="-"===i?i:"^"!==i&&"!"!==i||a?i===Ai?"":(0,w.ec)(i):"^",a+=e}o<i.length-1&&(i[o+1]!==Ri||o+2<i.length)&&(t+=Oi)}e=n===Ri}))}return t}const Hi=/^\*\*\/\*\.[\w\.-]+$/,zi=/^\*\*\/([\w\.-]+)\/?$/,Ki=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,Ui=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,ji=/^\*\*((\/[\w\.-]+)+)\/?$/,$i=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,qi=new Ii.z6(1e4),Zi=function(){return!1},Gi=function(){return null};function Qi(e,t){if(!e)return Gi;let i;i="string"!=typeof e?e.pattern:e,i=i.trim();const n=`${i}_${!!t.trimForExclusions}`;let o,s=qi.get(n);return s||(s=Hi.test(i)?function(e,t){return function(i,n){return"string"==typeof i&&i.endsWith(e)?t:null}}(i.substr(4),i):(o=zi.exec(Yi(i,t)))?function(e,t){const i=`/${e}`,n=`\\${e}`,o=function(o,s){return"string"!=typeof o?null:s?s===e?t:null:o===e||o.endsWith(i)||o.endsWith(n)?t:null},s=[e];return o.basenames=s,o.patterns=[t],o.allBasenames=s,o}(o[1],i):(t.trimForExclusions?Ui:Ki).test(i)?function(e,t){const i=en(e.slice(1,-1).split(",").map((e=>Qi(e,t))).filter((e=>e!==Gi)),e),n=i.length;if(!n)return Gi;if(1===n)return i[0];const o=function(t,n){for(let o=0,s=i.length;o<s;o++)if(i[o](t,n))return e;return null},s=i.find((e=>!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(o.allPaths=r),o}(i,t):(o=ji.exec(Yi(i,t)))?Ji(o[1].substr(1),i,!0):(o=$i.exec(Yi(i,t)))?Ji(o[1],i,!1):function(e){try{const t=new RegExp(`^${Vi(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return Gi}}(i),qi.set(n,s)),function(e,t){if("string"==typeof t)return e;const i=function(i,n){return(0,Ei.KM)(i,t.base,!Xe.IJ)?e((0,w.j3)(i.substr(t.base.length),Ti.ir),n):null};return i.allBasenames=e.allBasenames,i.allPaths=e.allPaths,i.basenames=e.basenames,i.patterns=e.patterns,i}(s,e)}function Yi(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function Ji(e,t,i){const n=Ti.ir===Ti.KR.sep,o=n?e:e.replace(Fi,Ti.ir),s=Ti.ir+o,r=Ti.KR.sep+e;let a;return a=i?function(i,a){return"string"!=typeof i||i!==o&&!i.endsWith(s)&&(n||i!==e&&!i.endsWith(r))?null:t}:function(i,s){return"string"!=typeof i||i!==o&&(n||i!==e)?null:t},a.allPaths=[(i?"*/":"./")+e],a}function Xi(e,t={}){if(!e)return Zi;if("string"==typeof e||function(e){const t=e;return!!t&&("string"==typeof t.base&&"string"==typeof t.pattern)}(e)){const i=Qi(e,t);if(i===Gi)return Zi;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=en(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return Gi;const n=Qi(e,i);if(n===Gi)return Gi;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,o,s,r)=>{if(!r||!n(t,o))return null;const a=r(i.replace("$(basename)",(()=>s)));return(0,xe.J8)(a)?a.then((t=>t?e:null)):a?e:null};return t.requiresSiblings=!0,t}}return n}(i,e[i],t))).filter((e=>e!==Gi))),n=i.length;if(!n)return Gi;if(!i.some((e=>!!e.requiresSiblings))){if(1===n)return i[0];const e=function(e,t){let n;for(let o=0,s=i.length;o<s;o++){const s=i[o](e,t);if("string"==typeof s)return s;(0,xe.J8)(s)&&(n||(n=[]),n.push(s))}return n?(()=>Mi(this,void 0,void 0,(function*(){for(const e of n){const t=yield e;if("string"==typeof t)return t}return null})))():null},t=i.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const o=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,n){let o,s;for(let r=0,a=i.length;r<a;r++){const a=i[r];a.requiresSiblings&&n&&(t||(t=(0,Ti.EZ)(e)),o||(o=t.substr(0,t.length-(0,Ti.DZ)(e).length)));const l=a(e,t,o,n);if("string"==typeof l)return l;(0,xe.J8)(l)&&(s||(s=[]),s.push(l))}return s?(()=>Mi(this,void 0,void 0,(function*(){for(const e of s){const t=yield e;if("string"==typeof t)return t}return null})))():null},s=i.find((e=>!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(o.allPaths=r),o}(e,t)}function en(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let o;if(t){o=[];for(let e=0,i=n.length;e<i;e++)o.push(t)}else o=i.reduce(((e,t)=>{const i=t.patterns;return i?e.concat(i):e}),[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};s.basenames=n,s.patterns=o,s.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(s),r}function tn(e,t,i,n,o,s){if(Array.isArray(e)){let r=0;for(const a of e){const e=tn(a,t,i,n,o,s);if(10===e)return e;e>r&&(r=e)}return r}if("string"==typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:l,pattern:d,scheme:h,hasAccessToAllModels:c,notebookType:u}=e;if(!n&&!c)return 0;u&&o&&(t=o);let g=0;if(h)if(h===t.scheme)g=10;else{if("*"!==h)return 0;g=5}if(l)if(l===i)g=10;else{if("*"!==l)return 0;g=Math.max(g,5)}if(u)if(u===s)g=10;else{if("*"!==u||void 0===s)return 0;g=Math.max(g,5)}if(d){let e;if(e="string"==typeof d?d:Object.assign(Object.assign({},d),{base:(0,Ti.Fv)(d.base)}),e!==t.fsPath&&(r=e,a=t.fsPath,!r||"string"!=typeof a||!Xi(r)(a,void 0,undefined)))return 0;g=10}return g}return 0;var r,a}function nn(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(nn):!!e.exclusive)}class on{constructor(e,t,i,n){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n}equals(e){var t,i;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&(null===(t=this.notebookUri)||void 0===t?void 0:t.toString())===(null===(i=e.notebookUri)||void 0===i?void 0:i.toString())}}class sn{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new k.Q5,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,C.OF)((()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}_updateScores(e){var t,i;const n=null===(t=this._notebookInfoResolver)||void 0===t?void 0:t.call(this,e.uri),o=n?new on(e.uri,e.getLanguageId(),n.uri,n.type):new on(e.uri,e.getLanguageId(),void 0,void 0);if(!(null===(i=this._lastCandidate)||void 0===i?void 0:i.equals(o))){this._lastCandidate=o;for(const t of this._entries)if(t._score=tn(t.selector,o.uri,o.languageId,(0,P.pt)(e),o.notebookUri,o.notebookType),nn(t.selector)&&t._score>0){for(const e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(sn._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._score<t._score?1:e._score>t._score?-1:rn(e.selector)&&!rn(t.selector)?1:!rn(e.selector)&&rn(t.selector)?-1:e._time<t._time?1:e._time>t._time?-1:0}}function rn(e){return"string"!=typeof e&&(Array.isArray(e)?e.some(rn):Boolean(e.isBuiltin))}var an=i(71922);(0,ei.z)(an.p,class{constructor(){this.referenceProvider=new sn(this._score.bind(this)),this.renameProvider=new sn(this._score.bind(this)),this.codeActionProvider=new sn(this._score.bind(this)),this.definitionProvider=new sn(this._score.bind(this)),this.typeDefinitionProvider=new sn(this._score.bind(this)),this.declarationProvider=new sn(this._score.bind(this)),this.implementationProvider=new sn(this._score.bind(this)),this.documentSymbolProvider=new sn(this._score.bind(this)),this.inlayHintsProvider=new sn(this._score.bind(this)),this.colorProvider=new sn(this._score.bind(this)),this.codeLensProvider=new sn(this._score.bind(this)),this.documentFormattingEditProvider=new sn(this._score.bind(this)),this.documentRangeFormattingEditProvider=new sn(this._score.bind(this)),this.onTypeFormattingEditProvider=new sn(this._score.bind(this)),this.signatureHelpProvider=new sn(this._score.bind(this)),this.hoverProvider=new sn(this._score.bind(this)),this.documentHighlightProvider=new sn(this._score.bind(this)),this.selectionRangeProvider=new sn(this._score.bind(this)),this.foldingRangeProvider=new sn(this._score.bind(this)),this.linkProvider=new sn(this._score.bind(this)),this.inlineCompletionsProvider=new sn(this._score.bind(this)),this.completionProvider=new sn(this._score.bind(this)),this.linkedEditingRangeProvider=new sn(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new sn(this._score.bind(this)),this.documentSemanticTokensProvider=new sn(this._score.bind(this)),this.documentOnDropEditProvider=new sn(this._score.bind(this)),this.documentPasteEditProvider=new sn(this._score.bind(this))}_score(e){var t;return null===(t=this._notebookTypeResolver)||void 0===t?void 0:t.call(this,e)}},1);var ln=i(59069),dn=i(8313),hn=i(66007),cn=i(800),un=i(69386),gn=i(88216),pn=i(71765),mn=i(94565),fn=i(9488),_n=i(98401),vn=i(23193),bn=i(89872);function Cn(e){return Object.isFrozen(e)?e:N._A(e)}class wn{constructor(e={},t=[],i=[],n){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(null===(e=this.raw)||void 0===e?void 0:e.length){const e=this.raw.map((e=>{if(e instanceof wn)return e;const t=new yn("");return t.parseRaw(e),t.configurationModel}));this._rawConfiguration=e.reduce(((e,t)=>t===e?t:e.merge(t)),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?(0,oe.Mt)(this.contents,e):this.contents}inspect(e,t){const i=this.rawConfiguration.getValue(e);return{value:i,override:t?this.rawConfiguration.getOverrideValue(e,t):void 0,merged:t?this.rawConfiguration.override(t).getValue(e):i}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?(0,oe.Mt)(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){var t,i;const n=N.I8(this.contents),o=N.I8(this.overrides),s=[...this.keys],r=(null===(t=this.raw)||void 0===t?void 0:t.length)?[...this.raw]:[this];for(const t of e)if(r.push(...(null===(i=t.raw)||void 0===i?void 0:i.length)?t.raw:[t]),!t.isEmpty()){this.mergeContents(n,t.contents);for(const e of t.overrides){const[t]=o.filter((t=>fn.fS(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=fn.EB(t.keys)):o.push(N.I8(e))}for(const e of t.keys)-1===s.indexOf(e)&&s.push(e)}return new wn(n,s,o,r.every((e=>e instanceof wn))?void 0:r)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;const i={};for(const e of fn.EB([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e];const o=t[e];o&&("object"==typeof n&&"object"==typeof o?(n=N.I8(n),this.mergeContents(n,o)):n=o),i[e]=n}return new wn(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&_n.Kn(e[i])&&_n.Kn(t[i])?this.mergeContents(e[i],t[i]):e[i]=N.I8(t[i])}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=N.I8(e))};for(const i of this.overrides)1===i.identifiers.length&&i.identifiers[0]===e?t=i.contents:i.identifiers.includes(e)&&n(i.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);-1!==t&&(this.keys.splice(t,1),(0,oe.xL)(this.contents,e),vn.eU.test(e)&&this.overrides.splice(this.overrides.findIndex((t=>fn.fS(t.identifiers,(0,vn.ny)(e)))),1))}updateValue(e,t,i){(0,oe.KV)(this.contents,e,t,(e=>console.error(e))),(i=i||-1===this.keys.indexOf(e))&&this.keys.push(e),vn.eU.test(e)&&this.overrides.push({identifiers:(0,vn.ny)(e),keys:Object.keys(this.contents[e]),contents:(0,oe.Od)(this.contents[e],(e=>console.error(e)))})}}class yn{constructor(e){this._name=e,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new wn}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:o,restricted:s,hasExcludedProperties:r}=this.doParseRaw(e,t);this._configurationModel=new wn(i,n,o,r?[e]:void 0),this._restrictedConfigurations=s||[]}doParseRaw(e,t){const i=bn.B.as(vn.IP.Configuration).getConfigurationProperties(),n=this.filter(e,i,!0,t);return e=n.raw,{contents:(0,oe.Od)(e,(e=>console.error(`Conflict in settings file ${this._name}: ${e}`))),keys:Object.keys(e),overrides:this.toOverrides(e,(e=>console.error(`Conflict in settings file ${this._name}: ${e}`))),restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){var o,s,r;let a=!1;if(!(null==n?void 0:n.scopes)&&!(null==n?void 0:n.skipRestricted)&&!(null===(o=null==n?void 0:n.exclude)||void 0===o?void 0:o.length))return{raw:e,restricted:[],hasExcludedProperties:a};const l={},d=[];for(const o in e)if(vn.eU.test(o)&&i){const i=this.filter(e[o],t,!1,n);l[o]=i.raw,a=a||i.hasExcludedProperties,d.push(...i.restricted)}else{const i=t[o],h=i?void 0!==i.scope?i.scope:3:void 0;(null==i?void 0:i.restricted)&&d.push(o),(null===(s=n.exclude)||void 0===s?void 0:s.includes(o))||!(null===(r=n.include)||void 0===r?void 0:r.includes(o))&&(void 0!==h&&void 0!==n.scopes&&!n.scopes.includes(h)||n.skipRestricted&&(null==i?void 0:i.restricted))?a=!0:l[o]=e[o]}return{raw:l,restricted:d,hasExcludedProperties:a}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(vn.eU.test(n)){const o={};for(const t in e[n])o[t]=e[n][t];i.push({identifiers:(0,vn.ny)(n),keys:Object.keys(o),contents:(0,oe.Od)(o,t)})}return i}}class Sn{constructor(e,t,i,n,o,s,r,a,l,d,h,c,u){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=o,this.policyConfiguration=s,this.applicationConfiguration=r,this.userConfiguration=a,this.localUserConfiguration=l,this.remoteUserConfiguration=d,this.workspaceConfiguration=h,this.folderConfigurationModel=c,this.memoryConfigurationModel=u}inspect(e,t,i){const n=e.inspect(t,i);return{get value(){return Cn(n.value)},get override(){return Cn(n.override)},get merged(){return Cn(n.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return void 0!==this.userInspectValue.value||void 0!==this.userInspectValue.override?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class Ln{constructor(e,t,i,n,o=new wn,s=new wn,r=new Ii.Y9,a=new wn,l=new Ii.Y9){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=o,this._workspaceConfiguration=s,this._folderConfigurations=r,this._memoryConfiguration=a,this._memoryConfigurationByResource=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Ii.Y9,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidatedConfigurationModel(e,t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new wn,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),o=this.getFolderConfigurationModelForResource(t.resource,i),s=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=new Set;for(const t of n.overrides)for(const i of t.identifiers)void 0!==n.getOverrideValue(e,i)&&r.add(i);return new Sn(e,t,n.getValue(e),r.size?[...r]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,o||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),this._policyConfiguration.isEmpty()||void 0===this._policyConfiguration.getValue(e)||(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e}),[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.policy),n=this.parseConfigurationModel(e.application),o=this.parseConfigurationModel(e.user),s=this.parseConfigurationModel(e.workspace),r=e.folders.reduce(((e,t)=>(e.set(y.o.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new Ii.Y9);return new Ln(t,i,n,o,new wn,s,r,new wn,new Ii.Y9)}static parseConfigurationModel(e){return new wn(e.contents,e.keys,e.overrides)}}class xn{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._marker="\n",this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const t of e.keys)this.affectedKeys.add(t);for(const[,t]of e.overrides)for(const e of t)this.affectedKeys.add(e);this._affectsConfigStr=this._marker;for(const e of this.affectedKeys)this._affectsConfigStr+=e+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Ln.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;const n=this._marker+e,o=this._affectsConfigStr.indexOf(n);if(o<0)return!1;const s=o+n.length;if(s>=this._affectsConfigStr.length)return!1;const r=this._affectsConfigStr.charCodeAt(s);if(r!==this._markerCode1&&r!==this._markerCode2)return!1;if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,o=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!N.fS(n,o)}return!0}}var kn=i(77173);const Nn={kind:0},Dn={kind:1};class En{constructor(e,t,i){var n;this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const t of e){const e=t.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=En.handleRemovals([].concat(e).concat(t));for(let e=0,t=this._keybindings.length;e<t;e++){const t=this._keybindings[e];if(0===t.chords.length)continue;const i=null===(n=t.when)||void 0===n?void 0:n.substituteConstants();i&&0===i.type||this._addKeyPress(t.chords[0],t)}}static _isTargetedForRemoval(e,t,i){if(t)for(let i=0;i<t.length;i++)if(t[i]!==e.chords[i])return!1;if(i&&1!==i.type){if(!e.when)return!1;if(!(0,_t.Fb)(i,e.when))return!1}return!0}static handleRemovals(e){const t=new Map;for(let i=0,n=e.length;i<n;i++){const n=e[i];if(n.command&&"-"===n.command.charAt(0)){const e=n.command.substring(1);t.has(e)?t.get(e).push(n):t.set(e,[n])}}if(0===t.size)return e;const i=[];for(let n=0,o=e.length;n<o;n++){const o=e[n];if(!o.command||0===o.command.length){i.push(o);continue}if("-"===o.command.charAt(0))continue;const s=t.get(o.command);if(!s||!o.isDefault){i.push(o);continue}let r=!1;for(const e of s){const t=e.when;if(this._isTargetedForRemoval(o,e.chords,t)){r=!0;break}}r||i.push(o)}return i}_addKeyPress(e,t){const i=this._map.get(e);if(void 0===i)return this._map.set(e,[t]),void this._addToLookupMap(t);for(let e=i.length-1;e>=0;e--){const n=i[e];if(n.command===t.command)continue;let o=!0;for(let e=1;e<n.chords.length&&e<t.chords.length;e++)if(n.chords[e]!==t.chords[e]){o=!1;break}o&&En.whenIsEntirelyIncluded(n.when,t.when)&&this._removeFromLookupMap(n)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(void 0!==t)for(let i=0,n=t.length;i<n;i++)if(t[i]===e)return void t.splice(i,1)}static whenIsEntirelyIncluded(e,t){return!t||1===t.type||!(!e||1===e.type)&&(0,_t.K8)(e,t)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,t){const i=this._lookupMap.get(e);if(void 0===i||0===i.length)return null;if(1===i.length)return i[0];for(let e=i.length-1;e>=0;e--){const n=i[e];if(t.contextMatchesRules(n.when))return n}return i[i.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const o=this._map.get(n[0]);if(void 0===o)return this._log("\\ No keybinding entries."),Nn;let s=null;if(n.length<2)s=o;else{s=[];for(let e=0,t=o.length;e<t;e++){const t=o[e];if(n.length>t.chords.length)continue;let i=!0;for(let e=1;e<n.length;e++)if(t.chords[e]!==n[e]){i=!1;break}i&&s.push(t)}}const r=this._findCommand(e,s);return r?n.length<r.chords.length?(this._log(`\\ From ${s.length} keybinding entries, awaiting ${r.chords.length-n.length} more chord(s), when: ${In(r.when)}, source: ${Tn(r)}.`),Dn):(this._log(`\\ From ${s.length} keybinding entries, matched ${r.command}, when: ${In(r.when)}, source: ${Tn(r)}.`),{kind:2,commandId:r.command,commandArgs:r.commandArgs,isBubble:r.bubble}):(this._log(`\\ From ${s.length} keybinding entries, no when clauses matched the context.`),Nn)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){const n=t[i];if(En._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function In(e){return e?`${e.serialize()}`:"no when condition"}function Tn(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}const Mn=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class Rn extends C.JT{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:k.ju.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=o,this._onDidUpdateKeybindings=this._register(new k.Q5),this._currentChords=[],this._currentChordChecker=new xe.zh,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=An.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new xe._F,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),Nn;const[n]=i.getDispatchChords();if(null===n)return this._log("\\ Keyboard event cannot be dispatched"),Nn;const o=this._contextKeyService.getContext(t),s=this._currentChords.map((({keypress:e})=>e));return this._getResolver().resolve(o,s,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-e>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw(0,De.L6)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(Ue.NC("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{const e=this._currentChords.map((({label:e})=>e)).join(", ");this._currentChordStatusMessage=this._notificationService.status(Ue.NC("next.chord","({0}) was pressed. Waiting for next key of chord...",e))}}this._scheduleLeaveChordMode(),kn.F.enabled&&kn.F.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],kn.F.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=An.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=An.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[o]=i.getChords();return this._ignoreSingleModifiers=new An(o),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){var n;let o=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let s=null,r=null;if(i){const[t]=e.getSingleModifierDispatchChords();s=t,r=t?[t]:[]}else[s]=e.getDispatchChords(),r=this._currentChords.map((({keypress:e})=>e));if(null===s)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),o;const a=this._contextKeyService.getContext(t),l=e.getLabel(),d=this._getResolver().resolve(a,r,s);switch(d.kind){case 0:if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${e}, ${l}".`),this._notificationService.status(Ue.NC("missing.chord","The key combination ({0}, {1}) is not a command.",e,l),{hideAfter:1e4}),this._leaveChordMode(),o=!0}return o;case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),o=!0,this._expectAnotherChord(s,l),this._log(1===this._currentChords.length?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),o;case 2:if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${d.commandId} ]`),null===d.commandId||""===d.commandId){if(this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${e}, ${l}".`),this._notificationService.status(Ue.NC("missing.chord","The key combination ({0}, {1}) is not a command.",e,l),{hideAfter:1e4}),this._leaveChordMode(),o=!0}}else this.inChordMode&&this._leaveChordMode(),d.isBubble||(o=!0),this._log(`+ Invoking command ${d.commandId}.`),void 0===d.commandArgs?this._commandService.executeCommand(d.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(d.commandId,d.commandArgs).then(void 0,(e=>this._notificationService.warn(e))),Mn.test(d.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:d.commandId,from:"keybinding",detail:null!==(n=e.getUserSettingsLabel())&&void 0!==n?n:void 0});return o}}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class An{constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}An.EMPTY=new An(null);var On=i(91847),Pn=i(49989);class Fn{constructor(e,t,i,n,o,s,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?Bn(e.getDispatchChords()):[],e&&0===this.chords.length&&(this.chords=Bn(e.getSingleModifierDispatchChords())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=o,this.extensionId=s,this.isBuiltinExtension=r}}function Bn(e){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n)return[];t.push(n)}return t}var Wn=i(22258),Vn=i(8030);class Hn extends dn.f1{constructor(e,t){if(super(),0===t.length)throw(0,De.b1)("chords");this._os=e,this._chords=t}getLabel(){return Vn.xo.toLabel(this._os,this._chords,(e=>this._getLabel(e)))}getAriaLabel(){return Vn.X4.toLabel(this._os,this._chords,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Vn.jC.toLabel(this._os,this._chords,(e=>this._getElectronAccelerator(e)))}getUserSettingsLabel(){return Vn.r6.toLabel(this._os,this._chords,(e=>this._getUserSettingsLabel(e)))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map((e=>this._getChord(e)))}_getChord(e){return new dn.aZ(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map((e=>this._getChordDispatch(e)))}getSingleModifierDispatchChords(){return this._chords.map((e=>this._getSingleModifierChordDispatch(e)))}}class zn extends Hn{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return Wn.kL.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":Wn.kL.toString(e.keyCode)}_getElectronAccelerator(e){return Wn.kL.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=Wn.kL.toUserSettingsUS(e.keyCode);return t?t.toLowerCase():t}_getChordDispatch(e){return zn.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=Wn.kL.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=Wn.Vd[e];if(-1!==t)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof dn.$M)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new dn.$M(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=Bn(e.chords.map((e=>this._toKeyCodeChord(e))));return i.length>0?[new zn(i,t)]:[]}}var Kn,Un=i(44349),jn=i(40382),$n=i(20913),qn=i(95935),Zn=i(33425),Gn=i(10161),Qn=i(61134),Yn=i(16328),Jn={};function Xn(e,t,i){const n=i.mode===Kn.ALIGN?i.offset:i.offset+i.size,o=i.mode===Kn.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-n?n:0}Jn.styleTagTransform=_(),Jn.setAttributes=g(),Jn.insert=c().bind(null,"head"),Jn.domAPI=d(),Jn.insertStyleElement=m(),a()(Yn.Z,Jn),Yn.Z&&Yn.Z.locals&&Yn.Z.locals,function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(Kn||(Kn={}));class eo extends C.JT{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=C.JT.None,this.toDisposeOnSetContainer=C.JT.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=we.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,we.Cp(this.view),this.setContainer(e,t),this._register((0,C.OF)((()=>this.setContainer(null,1))))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=we.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=to,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(we.$("slot"))}else this.container.appendChild(this.view);const i=new C.SL;eo.BUBBLE_UP_EVENTS.forEach((e=>{i.add(we.mu(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),eo.BUBBLE_DOWN_EVENTS.forEach((e=>{i.add(we.mu(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}}show(e){var t,i;this.isVisible()&&this.hide(),we.PO(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",we.$Z(this.view),this.toDisposeOnClean=e.render(this.view)||C.JT.None,this.delegate=e,this.doLayout(),null===(i=(t=this.delegate).focus)||void 0===i||i.call(t)}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||Xe.gn&&Gn.D.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(we.Re(e)){const i=we.i(e),n=we.I8(e);t={top:i.top*n,left:i.left*n,width:i.width*n,height:i.height*n}}else t=function(e){const t=e;return!!t&&"number"==typeof t.x&&"number"==typeof t.y}(e)?{top:e.y,left:e.x,width:e.width||1,height:e.height||2}:{top:e.posy,left:e.posx,width:2,height:2};const i=we.w(this.view),n=we.wn(this.view),o=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0;let r,a;if(0===(this.delegate.anchorAxisAlignment||0)){const e={offset:t.top-window.pageYOffset,size:t.height,position:0===o?0:1},l={offset:t.left,size:t.width,position:0===s?0:1,mode:Kn.ALIGN};r=Xn(window.innerHeight,n,e)+window.pageYOffset,Qn.e.intersects({start:r,end:r+n},{start:e.offset,end:e.offset+e.size})&&(l.mode=Kn.AVOID),a=Xn(window.innerWidth,i,l)}else{const e={offset:t.left,size:t.width,position:0===s?0:1},l={offset:t.top,size:t.height,position:0===o?0:1,mode:Kn.ALIGN};a=Xn(window.innerWidth,i,e),Qn.e.intersects({start:a,end:a+i},{start:e.offset,end:e.offset+e.size})&&(l.mode=Kn.AVOID),r=Xn(window.innerHeight,n,l)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===s?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const l=we.i(this.container);this.view.style.top=r-(this.useFixedPosition?we.i(this.view).top:l.top)+"px",this.view.style.left=a-(this.useFixedPosition?we.i(this.view).left:l.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),we.Cp(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!we.jg(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}eo.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],eo.BUBBLE_DOWN_EVENTS=["click"];const to='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';let io=class extends C.JT{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=C.JT.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new eo(this.container,1)),this.layout(),this._register(e.onDidLayout((()=>this.layout())))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t===this.container&&this.shadowRoot===i||(this.container=t,this.setContainer(t,i?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=i,this.contextView.show(e);const n=(0,C.OF)((()=>{this.currentViewDisposable===n&&this.hideContextView()}));return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};io=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,ni)],io);var no=i(81170),oo=i(68801);let so=[],ro=[],ao=[];function lo(e,t=!1){!function(e,t,i){const n=function(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:false,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?Xi(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(Ti.KR.sep)>=0}}(e);so.push(n),n.userConfigured?ao.push(n):ro.push(n),i&&!n.userConfigured&&so.forEach((e=>{e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&e.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&e.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&e.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))}))}(e,0,t)}function ho(e,t,i){var n;let o,s,r;for(let a=i.length-1;a>=0;a--){const l=i[a];if(t===l.filenameLowercase){o=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const i=l.filepatternOnPath?e:t;(null===(n=l.filepatternLowercase)||void 0===n?void 0:n.call(l,i))&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&t.endsWith(l.extensionLowercase)&&(r=l)}return o||s||r||void 0}const co=Object.prototype.hasOwnProperty,uo="vs.editor.nullLanguage";class go{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(uo,0),this._register(oo.bd,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||uo}}class po extends C.JT{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new k.Q5),this.onDidChange=this._onDidChange.event,po.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new go,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(oo.dQ.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){po.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},so=so.filter((e=>e.userConfigured)),ro=[];const e=[].concat(oo.dQ.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),bn.B.as(vn.IP.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;co.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)lo({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const o of t.filenames)lo({id:i,mime:n,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(const e of t.filenamePatterns)lo({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,w.IO)(t)||lo({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(i){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,i)}}e.aliases.push(i);let o=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const t of o)t&&0!==t.length&&e.aliases.push(t);const s=null!==o&&o.length>0;if(s&&null===o[0]);else{const t=(s?o[0]:null)||i;!s&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&co.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return co.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&co.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?function(e,t){return function(e,t){let i;if(e)switch(e.scheme){case Yt.lg.file:i=e.fsPath;break;case Yt.lg.data:i=qn.Vb.parseMetaData(e).get(qn.Vb.META_DATA_LABEL);break;case Yt.lg.vscodeNotebookCell:i=void 0;break;default:i=e.path}if(!i)return[{id:"unknown",mime:no.v.unknown}];i=i.toLowerCase();const n=(0,Ti.EZ)(i),o=ho(i,n,ao);if(o)return[o,{id:oo.bd,mime:no.v.text}];const s=ho(i,n,ro);if(s)return[s,{id:oo.bd,mime:no.v.text}];if(t){const e=function(e){if((0,w.uS)(e)&&(e=e.substr(1)),e.length>0)for(let t=so.length-1;t>=0;t--){const i=so[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i}}(t);if(e)return[e,{id:oo.bd,mime:no.v.text}]}return[{id:"unknown",mime:no.v.unknown}]}(e,t).map((e=>e.id))}(e,t):[]}}po.instanceCount=0;class mo extends C.JT{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new k.Q5),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new k.Q5),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new k.Q5({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,mo.instanceCount++,this._registry=this._register(new po(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){mo.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,fn.Xh)(i,null)}createById(e){return new fo(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new fo(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=oo.bd),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),F.RW.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}mo.instanceCount=0;class fo{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages((()=>this._evaluate()))),this._emitter||(this._emitter=new k.Q5({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,null===(e=this._emitter)||void 0===e||e.fire(this.languageId))}}var _o=i(44691),vo=i(84144),bo=i(7448),Co=i(16268),wo=i(10553),yo=i(10244),So=i(21212);const Lo=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,xo=/(&amp;)?(&amp;)([^\s&])/g;var ko;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(ko||(ko={}));class No extends Fe.o{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const o=document.createElement("div");o.classList.add("monaco-menu"),o.setAttribute("role","presentation"),super(o,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Xe.dz||Xe.IJ?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=o,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new C.SL),this.initializeOrUpdateStyleSheet(e,n),this._register(wo.o.addTarget(o)),(0,we.nm)(o,we.tw.KEY_DOWN,(e=>{new ln.y(e).equals(2)&&e.preventDefault()})),i.enableMnemonics&&this.menuDisposables.add((0,we.nm)(o,we.tw.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){we.zB.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof Eo&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),Xe.IJ&&this._register((0,we.nm)(o,we.tw.KEY_DOWN,(e=>{const t=new ln.y(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),we.zB.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),we.zB.stop(e,!0))}))),this._register((0,we.nm)(this.domNode,we.tw.MOUSE_OUT,(e=>{const t=e.relatedTarget;(0,we.jg)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,we.nm)(this.actionsList,we.tw.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,we.jg)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register(wo.o.addTarget(this.actionsList)),this._register((0,we.nm)(this.actionsList,wo.t.Tap,(e=>{let t=e.initialTarget;if(t&&(0,we.jg)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));const s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Be.s$(o,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this.styleScrollElement(r,n),this._register((0,we.nm)(o,wo.t.Change,(e=>{we.zB.stop(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register((0,we.nm)(r,we.tw.MOUSE_UP,(e=>{e.preventDefault()}))),o.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((e=>{var t;return!(null===(t=i.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn(`Found submenu cycle: ${e.id}`),!1)})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof Io))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||((0,we.OO)(e)?this.styleSheet=(0,we.dS)(e):(No.globalStyleSheet||(No.globalStyleSheet=(0,we.dS)()),this.styleSheet=No.globalStyleSheet)),this.styleSheet.textContent=function(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${To(Ne.l.menuSelection)}\n${To(Ne.l.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}`;if(t){i+="\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t";const t=e.scrollbarShadow;t&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${t} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`);const n=e.scrollbarSliderBackground;n&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${n};\n\t\t\t\t}\n\t\t\t`);const o=e.scrollbarSliderHoverBackground;o&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${o};\n\t\t\t\t}\n\t\t\t`);const s=e.scrollbarSliderActiveBackground;s&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${s};\n\t\t\t\t}\n\t\t\t`)}return i}(t,(0,we.OO)(e))}styleScrollElement(e,t){var i,n;const o=null!==(i=t.foregroundColor)&&void 0!==i?i:"",s=null!==(n=t.backgroundColor)&&void 0!==n?n:"",r=t.borderColor?`1px solid ${t.borderColor}`:"",a=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=r,e.style.borderRadius="5px",e.style.color=o,e.style.backgroundColor=s,e.style.boxShadow=a}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t<this.actionsList.children.length;t++)if(e===this.actionsList.children[t]){this.focusedItem=t;break}}updateFocus(e){super.updateFocus(e,!0,!0),void 0!==this.focusedItem&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,t,i){if(e instanceof We.Z0)return new Io(t.context,e,{icon:!0},this.menuStyles);if(e instanceof We.wY){const n=new Eo(e,e.actions,i,Object.assign(Object.assign({},t),{submenuIds:new Set([...t.submenuIds||[],e.id])}),this.menuStyles);if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}{const i={enableMnemonics:t.enableMnemonics,useEventAsContext:t.useEventAsContext};if(t.getKeyBinding){const n=t.getKeyBinding(e);if(n){const e=n.getLabel();e&&(i.keybinding=e)}}const n=new Do(t.context,e,i,this.menuStyles);if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}}}class Do extends yo.YH{constructor(e,t,i,n){if(i.isMenu=!0,super(t,t,i),this.menuStyle=n,this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass="",this.options.label&&i.enableMnemonics){const e=this.action.label;if(e){const t=Lo.exec(e);t&&(this.mnemonic=(t[1]?t[1]:t[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new xe.pY((()=>{this.element&&(this._register((0,we.nm)(this.element,we.tw.MOUSE_UP,(e=>{if(we.zB.stop(e,!0),Co.vU){if(new bo.n(e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register((0,we.nm)(this.element,we.tw.CONTEXT_MENU,(e=>{we.zB.stop(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=(0,we.R3)(this.element,(0,we.$)("a.action-menu-item")),this._action.id===We.Z0.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,we.R3)(this.item,(0,we.$)("span.menu-item-check"+Ie.k.asCSSSelector(Ne.l.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,we.R3)(this.item,(0,we.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,we.R3)(this.item,(0,we.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),null===(e=this.item)||void 0===e||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){(0,we.PO)(this.label);let t=(0,So.x$)(this.action.label);if(t){const i=function(e){const t=Lo,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(t);this.options.enableMnemonics||(t=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const n=Lo.exec(t);if(n){t=w.YU(t),xo.lastIndex=0;let i=xo.exec(t);for(;i&&i[1];)i=xo.exec(t);const o=e=>e.replace(/&amp;&amp;/g,"&amp;");i?this.label.append(w.j3(o(t.substr(0,i.index))," "),(0,we.$)("u",{"aria-hidden":"true"},i[3]),w.oL(o(t.substr(i.index+i[0].length))," ")):this.label.innerText=o(t).trim(),null===(e=this.item)||void 0===e||e.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),void 0!==e?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",o=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=null!=t?t:"",this.item.style.backgroundColor=null!=i?i:"",this.item.style.outline=n,this.item.style.outlineOffset=o),this.check&&(this.check.style.color=null!=t?t:"")}}class Eo extends Do{constructor(e,t,i,n,o){super(e,e,n,o),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new C.SL),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:ko.Right,this.showScheduler=new xe.pY((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new xe.pY((()=>{this.element&&!(0,we.jg)((0,we.vY)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,we.R3)(this.item,(0,we.$)("span.submenu-indicator"+Ie.k.asCSSSelector(Ne.l.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,we.nm)(this.element,we.tw.KEY_UP,(e=>{const t=new ln.y(e);(t.equals(17)||t.equals(3))&&(we.zB.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,we.nm)(this.element,we.tw.KEY_DOWN,(e=>{const t=new ln.y(e);(0,we.vY)()===this.item&&(t.equals(17)||t.equals(3))&&we.zB.stop(e,!0)}))),this._register((0,we.nm)(this.element,we.tw.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,we.nm)(this.element,we.tw.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,we.nm)(this.element,we.tw.FOCUS_OUT,(e=>{this.element&&!(0,we.jg)((0,we.vY)(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}))))}updateEnabled(){}onClick(e){we.zB.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(e){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=Xn(e.width,t.width,{position:n===ko.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left<i.left+i.width&&(i.left+10+t.width<=e.width&&(o.left=i.left+10),i.top+=10,i.height=0),o.top=Xn(e.height,t.height,{position:0,offset:i.top,size:0}),o.top+t.height===i.top&&o.top+i.height+t.height<=e.height&&(o.top+=i.height),o}createSubmenu(e=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,we.R3)(this.element,(0,we.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const t=getComputedStyle(this.parentData.parent.domNode),i=parseFloat(t.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new No(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new We.eZ],this.submenuOptions,this.menuStyle);const n=this.element.getBoundingClientRect(),o={top:n.top-i,left:n.left,height:n.height+2*i,width:n.width},s=this.submenuContainer.getBoundingClientRect(),{top:r,left:a}=this.calculateSubmenuMenuLayout(new we.Ro(window.innerWidth,window.innerHeight),we.Ro.lift(s),o,this.expandDirection);this.submenuContainer.style.left=a-s.left+"px",this.submenuContainer.style.top=r-s.top+"px",this.submenuDisposables.add((0,we.nm)(this.submenuContainer,we.tw.KEY_UP,(e=>{new ln.y(e).equals(15)&&(we.zB.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add((0,we.nm)(this.submenuContainer,we.tw.KEY_DOWN,(e=>{new ln.y(e).equals(15)&&we.zB.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=null!=e?e:"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class Io extends yo.gU{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function To(e){const t=(0,Ne.u)()[e.id];return`.codicon-${e.id}:before { content: '\\${t.toString(16)}'; }`}var Mo=i(86253);class Ro{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=document.activeElement;const n=(0,we.Re)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{var o;this.lastContainer=n;const s=e.getMenuClassName?e.getMenuClassName():"";s&&(n.className+=" "+s),this.options.blockMouse&&(this.block=n.appendChild((0,we.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",null===(o=this.blockDisposable)||void 0===o||o.dispose(),this.blockDisposable=(0,we.nm)(this.block,we.tw.MOUSE_DOWN,(e=>e.stopPropagation())));const r=new C.SL,a=e.actionRunner||new We.Wi;return a.onWillRun((t=>this.onActionRun(t,!e.skipTelemetry)),this,r),a.onDidRun(this.onDidActionRun,this,r),i=new No(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:a,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)},Mo.ZR),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,r),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,r),r.add((0,we.nm)(window,we.tw.BLUR,(()=>this.contextViewService.hideContextView(!0)))),r.add((0,we.nm)(window,we.tw.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;const t=new bo.n(e);let i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),(0,C.F8)(r,i)},focus:()=>{null==i||i.focus(!!e.autoSelectFirstItem)},onHide:t=>{var i,n,o;null===(i=e.onHide)||void 0===i||i.call(e,!!t),this.block&&(this.block.remove(),this.block=null),null===(n=this.blockDisposable)||void 0===n||n.dispose(),this.blockDisposable=null,this.lastContainer&&((0,we.vY)()===this.lastContainer||(0,we.jg)((0,we.vY)(),this.lastContainer))&&(null===(o=this.focusToReturn)||void 0===o||o.focus()),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!(0,De.n2)(e.error)&&this.notificationService.error(e.error)}}var Ao=function(e,t){return function(i,n){t(i,n,e)}};let Oo=class extends C.JT{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new Ro(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,o,s){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=o,this.contextKeyService=s,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new k.Q5),this._onDidHideContextMenu=this._store.add(new k.Q5)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=Po.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{var i;null===(i=e.onHide)||void 0===i||i.call(e,t),this._onDidHideContextMenu.fire()}})),we._q.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};var Po;Oo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ao(0,at.b),Ao(1,wt.lT),Ao(2,vt.u),Ao(3,On.d),Ao(4,vo.co),Ao(5,_t.i6)],Oo),function(e){e.transform=function(e,t,i){if(!((n=e)&&n.menuId instanceof vo.eH))return e;var n;const{menuId:o,menuActionOptions:s,contextKeyService:r}=e;return Object.assign(Object.assign({},e),{getActions:()=>{const n=[];if(o){const e=t.createMenu(o,null!=r?r:i);(0,_o.LJ)(e,s,n),e.dispose()}return e.getActions?We.Z0.join(e.getActions(),n):n}})}}(Po||(Po={}));var Fo,Bo=i(23897);!function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(Fo||(Fo={}));var Wo=i(50988),Vo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ho=function(e,t){return function(i,n){t(i,n,e)}},zo=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Ko=class{constructor(e){this._commandService=e}open(e,t){return zo(this,void 0,void 0,(function*(){if(!(0,Wo.xn)(e,Yt.lg.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;if("string"==typeof e&&(e=y.o.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path))return!0;let i=[];try{i=(0,Bo.Qc)(decodeURIComponent(e.query))}catch(t){try{i=(0,Bo.Qc)(e.query)}catch(e){}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0}))}};Ko=Vo([Ho(0,mn.H)],Ko);let Uo=class{constructor(e){this._editorService=e}open(e,t){return zo(this,void 0,void 0,(function*(){"string"==typeof e&&(e=y.o.parse(e));const{selection:i,uri:n}=(0,Wo.xI)(e);return(e=n).scheme===Yt.lg.file&&(e=(0,qn.AH)(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,source:(null==t?void 0:t.fromUserGesture)?Fo.USER:Fo.API},null==t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}))}};Uo=Vo([Ho(0,L.$)],Uo);let jo=class{constructor(e,t){this._openers=new Jt.S,this._validators=new Jt.S,this._resolvers=new Jt.S,this._resolvedUriTargets=new Ii.Y9((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new Jt.S,this._defaultExternalOpener={openExternal:e=>zo(this,void 0,void 0,(function*(){return(0,Wo.Gs)(e,Yt.lg.http,Yt.lg.https)?we.V3(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>zo(this,void 0,void 0,(function*(){return!(!(null==t?void 0:t.openExternal)&&!(0,Wo.Gs)(e,Yt.lg.mailto,Yt.lg.http,Yt.lg.https,Yt.lg.vsls)||(yield this._doOpenExternal(e,t),0))}))}),this._openers.push(new Ko(t)),this._openers.push(new Uo(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}open(e,t){var i;return zo(this,void 0,void 0,(function*(){const n="string"==typeof e?y.o.parse(e):e,o=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:e;for(const e of this._validators)if(!(yield e.shouldOpen(o,t)))return!1;for(const i of this._openers)if(yield i.open(e,t))return!0;return!1}))}resolveExternalUri(e,t){return zo(this,void 0,void 0,(function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch(e){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return zo(this,void 0,void 0,(function*(){const i="string"==typeof e?y.o.parse(e):e;let n,o;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch(e){n=i}if(o="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners)if(yield t.openExternal(o,{sourceUri:i,preferredOpenerId:e},ke.T.None))return!0}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},ke.T.None)}))}dispose(){this._validators.clear()}};jo=Vo([Ho(0,L.$),Ho(1,mn.H)],jo);var $o=i(98674),qo=i(8625),Zo=function(e,t){return function(i,n){t(i,n,e)}};class Go extends C.JT{constructor(e){super(),this.model=e,this._markersData=new Map,this._register((0,C.OF)((()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()})))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let t=0;t<n.length;t++)this._markersData.set(n[t],e[t]);return 0!==i.length||0!==n.length}getMarker(e){return this._markersData.get(e.id)}}let Qo=class extends C.JT{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new k.Q5),this._markerDecorations=new Ii.Y9,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new Go(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==Yt.lg.inMemory&&e.uri.scheme!==Yt.lg.internal&&e.uri.scheme!==Yt.lg.vscode||null===(t=this._markerService)||void 0===t||t.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500}),i=t.map((t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)})));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=D.e.lift(t);if(t.severity!==$o.ZL.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){const t=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);if(1===t||i.endColumn>=t)return i;const n=e.getWordAtPosition(i.getStartPosition());n&&(i=new D.e(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n<i.endColumn&&(i=new D.e(i.startLineNumber,n,i.endLineNumber,i.endColumn),t.startColumn=n)}return i}_createDecorationOption(e){let t,i,n,o,s;switch(e.severity){case $o.ZL.Hint:t=this._hasMarkerTag(e,2)?void 0:this._hasMarkerTag(e,1)?"squiggly-unnecessary":"squiggly-hint",n=0;break;case $o.ZL.Warning:t="squiggly-warning",i=(0,Lt.EN)(qo.Re),n=20,s={color:(0,Lt.EN)(St.Ivo),position:P.F5.Inline};break;case $o.ZL.Info:t="squiggly-info",i=(0,Lt.EN)(qo.eS),n=10;break;case $o.ZL.Error:default:t="squiggly-error",i=(0,Lt.EN)(qo.lK),n=30,s={color:(0,Lt.EN)(St.Gj_),position:P.F5.Inline}}return e.tags&&(-1!==e.tags.indexOf(1)&&(o="squiggly-inline-unnecessary"),-1!==e.tags.indexOf(2)&&(o="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:i,position:P.sh.Right},minimap:s,zIndex:n,inlineClassName:o}}_hasMarkerTag(e,t){return!!e.tags&&e.tags.indexOf(t)>=0}};Qo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Zo(0,H.q),Zo(1,$o.lT)],Qo);var Yo,Jo=i(36357),Xo=i(22075),es=i(89954),ts=i(95215),is=function(e,t){return function(i,n){t(i,n,e)}};function ns(e){return e.toString()}function os(e){const t=new es.yP,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}class ss{constructor(e,t,i){this.model=e,this._modelEventListeners=new C.SL,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}dispose(){this._modelEventListeners.dispose()}}const rs=Xe.IJ||Xe.dz?1:2;class as{constructor(e,t,i,n,o,s,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=s,this.versionId=r,this.alternativeVersionId=a}}let ls=Yo=class extends C.JT{constructor(e,t,i,n,o){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._languageService=n,this._languageConfigurationService=o,this._onModelAdded=this._register(new k.Q5),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new k.Q5),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new k.Q5),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var i;let n=Xo.D.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o="tabSize";if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(o=Math.max(t,1))}let s=Xo.D.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(s="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=rs;const a=e.eol;"\r\n"===a?r=2:"\n"===a&&(r=1);let l=Xo.D.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let d=Xo.D.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(d="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let h=Xo.D.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(h="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let c=Xo.D.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(c={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:s,detectIndentation:d,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:h,bracketPairColorizationOptions:c}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===Xe.OS||2===Xe.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(e,t,i){const n="string"==typeof e?e:e.languageId;let o=this._modelCreationOptionsByLanguageAndResource[n+t];if(!o){const e=this._configurationService.getValue("editor",{overrideIdentifier:n,resource:t}),s=this._getEOL(t,n);o=Yo._readModelOptions({editor:e,eol:s},i),this._modelCreationOptionsByLanguageAndResource[n+t]=o}return o}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,o=i.length;n<o;n++){const o=i[n],s=this._models[o],r=s.model.getLanguageId(),a=s.model.uri;if(e&&!e.affectsConfiguration("editor",{overrideIdentifier:r,resource:a})&&!e.affectsConfiguration("files.eol",{overrideIdentifier:r,resource:a}))continue;const l=t[r+a],d=this.getCreationOptions(r,a,s.model.isForSimpleWidget);Yo._setModelOptionsForModel(s.model,d,l)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&1===e.getLineCount()&&e.setEOL(1===t.defaultEOL?0:1),i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace&&(0,N.fS)(i.bracketPairColorizationOptions,t.bracketPairColorizationOptions)||(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(ns(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(ns(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(ns(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t,i,n),s=new gt.yO(e,t,o,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(ns(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=os(s)===e.sha1;if(n||e.sharesUndoRedoStack){for(const e of t.past)(0,ts.e9)(e)&&e.matchesResource(i)&&e.setModel(s);for(const e of t.future)(0,ts.e9)(e)&&e.matchesResource(i)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(i,!0,(e=>(0,ts.e9)(e)&&e.matchesResource(i))),n&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=ns(s.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const a=new ss(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=a,a}createModel(e,t,i,n=!1){let o;return o=t?this._createModelData(e,t,i,n):this._createModelData(e,oo.bd,i,n),this._onModelAdded.fire(o.model),o.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push(this._models[n].model)}return e}getModel(e){const t=ns(e),i=this._models[t];return i?i.model:null}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===Yt.lg.file||e.scheme===Yt.lg.vscodeRemote||e.scheme===Yt.lg.vscodeUserData||e.scheme===Yt.lg.vscodeNotebookCell||"fake-fs"===e.scheme}_onWillDispose(e){const t=ns(e.uri),i=this._models[t],n=this._undoRedoService.getUriComparisonKey(e.uri)!==e.uri.toString();let o=!1,s=0;if(n||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(e.uri)){const t=this._undoRedoService.getElements(e.uri);if(t.past.length>0||t.future.length>0){for(const i of t.past)(0,ts.e9)(i)&&i.matchesResource(e.uri)&&(o=!0,s+=i.heapSize(e.uri),i.setModel(e.uri));for(const i of t.future)(0,ts.e9)(i)&&i.matchesResource(e.uri)&&(o=!0,s+=i.heapSize(e.uri),i.setModel(e.uri))}}const r=Yo.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(o)if(!n&&s>r){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(r-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>(0,ts.e9)(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new as(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,s,os(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!n){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,n=e.getLanguageId(),o=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);Yo._setModelOptionsForModel(e,s,o),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}};ls.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,ls=Yo=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([is(0,oe.Ui),is(1,pn.y),is(2,hi.tJ),is(3,V.O),is(4,B.c_)],ls);var ds=i(93198),hs={};hs.styleTagTransform=_(),hs.setAttributes=g(),hs.insert=c().bind(null,"head"),hs.domAPI=d(),hs.insertStyleElement=m(),a()(ds.Z,hs),ds.Z&&ds.Z.locals&&ds.Z.locals;var cs=i(95191),us=i(88289),gs=i(90725),ps=i(41157),ms=function(e,t){return function(i,n){t(i,n,e)}};let fs=class extends C.JT{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=bn.B.as(gs.IP.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[o,s]=this.getOrInstantiateProvider(e),r=this.visibleQuickAccess,a=null==r?void 0:r.descriptor;if(r&&s&&a===s)return e===s.prefix||(null==i?void 0:i.preserveValue)||(r.picker.value=e),void this.adjustValueSelection(r.picker,s,i);if(s&&!(null==i?void 0:i.preserveValue)){let t;if(r&&a&&a!==s){const e=r.value.substr(a.prefix.length);e&&(t=`${s.prefix}${e}`)}if(!t){const e=null==o?void 0:o.defaultFilterValue;e===gs.Ry.LAST?t=this.lastAcceptedPickerValues.get(s):"string"==typeof e&&(t=`${s.prefix}${e}`)}"string"==typeof t&&(e=t)}const l=new C.SL,d=l.add(this.quickInputService.createQuickPick());let h;d.value=e,this.adjustValueSelection(d,s,i),d.placeholder=null==s?void 0:s.placeholder,d.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!r,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(d.itemActivation=null!==(n=null==i?void 0:i.itemActivation)&&void 0!==n?n:ps.jG.SECOND),d.contextKey=null==s?void 0:s.contextKey,d.filterValue=e=>e.substring(s?s.prefix.length:0),t&&(h=new xe.CR,l.add((0,us.I)(d.onWillAccept)((e=>{e.veto(),d.hide()})))),l.add(this.registerPickerListeners(d,o,s,e,null==i?void 0:i.providerOptions));const c=l.add(new ke.A);return o&&l.add(o.provide(d,c.token,null==i?void 0:i.providerOptions)),(0,us.I)(d.onDidHide)((()=>{0===d.selectedItems.length&&c.cancel(),l.dispose(),null==h||h.complete(d.selectedItems.slice(0))})),d.show(),t?null==h?void 0:h.p:void 0}adjustValueSelection(e,t,i){var n;let o;o=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n,o){const s=new C.SL,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return s.add((0,C.OF)((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),s.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0,providerOptions:o}):r.value=e}))),i&&s.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),s}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};fs=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ms(0,ps.eJ),ms(1,bt.TG)],fs);var _s=i(32052),vs=i(89162),bs=i(64185),Cs={};Cs.styleTagTransform=_(),Cs.setAttributes=g(),Cs.insert=c().bind(null,"head"),Cs.domAPI=d(),Cs.insertStyleElement=m(),a()(bs.Z,Cs),bs.Z&&bs.Z.locals&&bs.Z.locals;const ws="done",ys="active",Ss="infinite",Ls="infinite-long-running",xs="discrete";class ks extends C.JT{constructor(e,t){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new xe.pY((()=>(0,we.$Z)(this.element)),0)),this.longRunningScheduler=this._register(new xe.pY((()=>this.infiniteLongRunning()),ks.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(null==t?void 0:t.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(ys,Ss,Ls,xs),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(ws),this.element.classList.contains(Ss)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(xs,ws,Ls),this.element.classList.add(ys,Ss),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Ls)}getContainer(){return this.element}}ks.LONG_RUNNING_INFINITE_THRESHOLD=1e4;var Ns=i(50153),Ds=i(51961),Es={};Es.styleTagTransform=_(),Es.setAttributes=g(),Es.insert=c().bind(null,"head"),Es.domAPI=d(),Es.insertStyleElement=m(),a()(Ds.Z,Es),Ds.Z&&Ds.Z.locals&&Ds.Z.locals;const Is=we.$;class Ts extends C.JT{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=e=>we.nm(this.findInput.inputBox.inputElement,we.tw.KEY_DOWN,(t=>{e(new ln.y(t))})),this.onMouseDown=e=>we.nm(this.findInput.inputBox.inputElement,we.tw.MOUSE_DOWN,(t=>{e(new bo.n(t))})),this.onDidChange=e=>this.findInput.onDidChange(e),this.container=we.R3(this.parent,Is(".quick-input-box")),this.findInput=this._register(new Ns.V(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return"password"===this.findInput.inputBox.inputElement.type}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===li.Z.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===li.Z.Info?1:e===li.Z.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===li.Z.Info?1:e===li.Z.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}var Ms=i(32107),Rs=i(12983),As=i(79579);const Os=new As.o((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));new As.o((()=>({collator:new Intl.Collator(void 0,{numeric:!0})}))),new As.o((()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})})));var Ps=i(49898),Fs=i(4850),Bs=i(56811),Ws=i(44742);class Vs{constructor(e){this.nodes=e}toString(){return this.nodes.map((e=>"string"==typeof e?e:e.label)).join("")}}!function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([Ps.H],Vs.prototype,"toString",null);const Hs=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi,zs={},Ks=new Ws.R("quick-input-button-icon-");function Us(e){if(!e)return;let t;const i=e.dark.toString();return zs[i]?t=zs[i]:(t=Ks.nextId(),we.fk(`.${t}, .hc-light .${t}`,`background-image: ${we.wY(e.light||e.dark)}`),we.fk(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${we.wY(e.dark)}`),zs[i]=t),t}var js=i(92321),$s=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},qs=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Zs=we.$;class Gs{constructor(e,t,i,n,o,s,r){var a,l,d;this._checked=!1,this._hidden=!1,this.hasCheckbox=n,this.index=i,this.fireButtonTriggered=o,this.fireSeparatorButtonTriggered=s,this._onChecked=r,this.onChecked=n?k.ju.map(k.ju.filter(this._onChecked.event,(e=>e.listElement===this)),(e=>e.checked)):k.ju.None,"separator"===e.type?this._separator=e:(this.item=e,t&&"separator"===t.type&&!t.buttons&&(this._separator=t),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=null===(a=this.item.highlights)||void 0===a?void 0:a.label,this._descriptionHighlights=null===(l=this.item.highlights)||void 0===l?void 0:l.description,this._detailHighlights=null===(d=this.item.highlights)||void 0===d?void 0:d.detail,this.saneTooltip=this.item.tooltip),this._init=new As.o((()=>{var t;const i=null!==(t=e.label)&&void 0!==t?t:"",n=(0,So.Ho)(i).text.trim(),o=e.ariaLabel||[i,this.saneDescription,this.saneDetail].map((e=>(0,So.JL)(e))).filter((e=>!!e)).join(", ");return{saneLabel:i,saneSortLabel:n,saneAriaLabel:o}}))}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({listElement:this,checked:e}))}get separator(){return this._separator}set separator(e){this._separator=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class Qs{constructor(e){this.themeService=e}get templateId(){return Qs.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=we.R3(e,Zs(".quick-input-list-entry"));const i=we.R3(t.entry,Zs("label.quick-input-list-label"));t.toDisposeTemplate.push(we.mu(i,we.tw.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=we.R3(i,Zs("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(we.mu(t.checkbox,we.tw.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const n=we.R3(i,Zs(".quick-input-list-rows")),o=we.R3(n,Zs(".quick-input-list-row")),s=we.R3(n,Zs(".quick-input-list-row"));t.label=new Ms.g(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0}),t.icon=we.Ce(t.label.element,Zs(".quick-input-list-icon"));const r=we.R3(o,Zs(".quick-input-list-entry-keybinding"));t.keybinding=new Rs.e(r,Xe.OS);const a=we.R3(s,Zs(".quick-input-list-label-meta"));return t.detail=new Ms.g(a,{supportHighlights:!0,supportIcons:!0}),t.separator=we.R3(t.entry,Zs(".quick-input-list-separator")),t.actionBar=new Fe.o(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){var n,o,s,r;i.element=e,e.element=null!==(n=i.entry)&&void 0!==n?n:void 0;const a=e.item?e.item:e.separator;i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked((e=>i.checkbox.checked=e)));const{labelHighlights:l,descriptionHighlights:d,detailHighlights:h}=e;if(null===(o=e.item)||void 0===o?void 0:o.iconPath){const t=(0,js._T)(this.themeService.getColorTheme().type)?e.item.iconPath.dark:null!==(s=e.item.iconPath.light)&&void 0!==s?s:e.item.iconPath.dark,n=y.o.revive(t);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=we.wY(n)}else i.icon.style.backgroundImage="",i.icon.className=(null===(r=e.item)||void 0===r?void 0:r.iconClass)?`quick-input-list-icon ${e.item.iconClass}`:"";const c={matches:l||[],descriptionTitle:e.saneDescription,descriptionMatches:d||[],labelEscapeNewLines:!0};"separator"!==a.type?(c.extraClasses=a.iconClasses,c.italic=a.italic,c.strikethrough=a.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item")):i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(e.saneLabel,e.saneDescription,c),i.keybinding.set("separator"===a.type?void 0:a.keybinding),e.saneDetail?(i.detail.element.style.display="",i.detail.setLabel(e.saneDetail,void 0,{matches:h,title:e.saneDetail,labelEscapeNewLines:!0})):i.detail.element.style.display="none",e.item&&e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator);const u=a.buttons;u&&u.length?(i.actionBar.push(u.map(((t,i)=>{let n=t.iconClass||(t.iconPath?Us(t.iconPath):void 0);return t.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:`id-${i}`,class:n,enabled:!0,label:"",tooltip:t.tooltip||"",run:()=>{"separator"!==a.type?e.fireButtonTriggered({button:t,item:a}):e.fireSeparatorButtonTriggered({button:t,separator:a})}}})),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=(0,C.B9)(i.toDisposeElement),i.actionBar.clear()}disposeTemplate(e){e.toDisposeElement=(0,C.B9)(e.toDisposeElement),e.toDisposeTemplate=(0,C.B9)(e.toDisposeTemplate)}}Qs.ID="listelement";class Ys{getHeight(e){return e.item?e.saneDetail?44:22:24}getTemplateId(e){return Qs.ID}}var Js;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(Js||(Js={}));class Xs{constructor(e,t,i,n){this.parent=e,this.options=i,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new k.Q5,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new k.Q5,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new k.Q5,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new k.Q5,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new k.Q5,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new k.Q5,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new k.Q5,this.onKeyDown=this._onKeyDown.event,this._onLeave=new k.Q5,this.onLeave=this._onLeave.event,this._listElementChecked=new k.Q5,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=we.R3(this.parent,Zs(".quick-input-list"));const o=new Ys,s=new tr;if(this.list=i.createList("QuickInput",this.container,o,[new Qs(n)],{identityProvider:{getId:e=>{var t,i,n,o,s,r,a,l;return null!==(l=null!==(r=null!==(o=null!==(i=null===(t=e.item)||void 0===t?void 0:t.id)&&void 0!==i?i:null===(n=e.item)||void 0===n?void 0:n.label)&&void 0!==o?o:null===(s=e.separator)||void 0===s?void 0:s.id)&&void 0!==r?r:null===(a=e.separator)||void 0===a?void 0:a.label)&&void 0!==l?l:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((e=>{const t=new ln.y(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(Xe.dz?e.metaKey:e.ctrlKey)&&this.list.setFocus((0,fn.w6)(this.list.length));break;case 16:{const e=this.list.getFocus();1===e.length&&0===e[0]&&this._onLeave.fire();break}case 18:{const e=this.list.getFocus();1===e.length&&e[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(we.nm(this.container,we.tw.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))}))),i.hoverDelegate){const e=new xe.rH(i.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver((t=>qs(this,void 0,void 0,(function*(){var i;if(t.browserEvent.target instanceof HTMLAnchorElement)e.cancel();else if(t.browserEvent.relatedTarget instanceof HTMLAnchorElement||!we.jg(t.browserEvent.relatedTarget,null===(i=t.element)||void 0===i?void 0:i.element))try{yield e.trigger((()=>qs(this,void 0,void 0,(function*(){t.element&&this.showHover(t.element)}))))}catch(e){if(!(0,De.n2)(e))throw e}}))))),this.disposables.push(this.list.onMouseOut((t=>{var i;we.jg(t.browserEvent.relatedTarget,null===(i=t.element)||void 0===i?void 0:i.element)||e.cancel()}))),this.disposables.push(e)}this.disposables.push(this._listElementChecked.event((e=>this.fireCheckedEvents()))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return k.ju.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return k.ju.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e=>e.item)),event:e.browserEvent})))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(e){this.list.getHTMLElement().ariaLabel=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n.hidden){if(!n.checked)return!1;t=!0}}return t}getCheckedCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].checked&&e++;return e}getVisibleCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach((t=>{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=(0,C.B9)(this.elementDisposables);const t=e=>this.fireButtonTriggered(e),i=e=>this.fireSeparatorButtonTriggered(e);this.inputElements=e;const n=new Map,o=this.parent.classList.contains("show-checkboxes");this.elements=e.reduce(((s,r,a)=>{var l;const d=a>0?e[a-1]:void 0;if("separator"===r.type&&!r.buttons)return s;const h=new Gs(r,d,a,o,t,i,this._listElementChecked),c=s.length;return s.push(h),n.set(null!==(l=h.item)&&void 0!==l?l:h.separator,c),s}),[]),this.elementsToIndexes=n,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(e){if(this.list.setFocus(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e)))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item)).filter((e=>!!e))}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===Js.Second&&this.list.length<2&&(e=Js.First),e){case Js.First:this.list.scrollTop=0,this.list.focusFirst(void 0,(e=>!!e.item));break;case Js.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,(e=>!!e.item));break;case Js.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,(e=>!!e.item));break;case Js.Next:{this.list.focusNext(void 0,!0,void 0,(e=>!!e.item));const e=this.list.getFocus()[0];0!==e&&!this.elements[e-1].item&&this.list.firstVisibleIndex>e-1&&this.list.reveal(e-1);break}case Js.Previous:{this.list.focusPrevious(void 0,!0,void 0,(e=>!!e.item));const e=this.list.getFocus()[0];0!==e&&!this.elements[e-1].item&&this.list.firstVisibleIndex>e-1&&this.list.reveal(e-1);break}case Js.NextPage:this.list.focusNextPage(void 0,(e=>!!e.item));break;case Js.PreviousPage:this.list.focusPreviousPage(void 0,(e=>!!e.item))}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(e){var t,i,n;void 0!==this.options.hoverDelegate&&(this._lastHover&&!this._lastHover.isDisposed&&(null===(i=(t=this.options.hoverDelegate).onDidHideHover)||void 0===i||i.call(t),null===(n=this._lastHover)||void 0===n||n.dispose()),e.element&&e.saneTooltip&&(this._lastHover=this.options.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:e=>{this.options.linkOpenerDelegate(e)},showPointer:!0,container:this.container,hoverPosition:1},!1)))}layout(e){this.list.getHTMLElement().style.maxHeight=e?44*Math.floor(e/44)+6+"px":"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const t=e;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let i;this.elements.forEach((n=>{var o,s,r,a;let l;l="fuzzy"===this.matchOnLabelMode?this.matchOnLabel&&null!==(o=(0,So.Gt)(e,(0,So.Ho)(n.saneLabel)))&&void 0!==o?o:void 0:this.matchOnLabel&&null!==(s=function(e,t){const{text:i,iconOffsets:n}=t;if(!n||0===n.length)return er(e,i);const o=(0,w.j3)(i," "),s=i.length-o.length,r=er(e,o);if(r)for(const e of r){const t=n[e.start+s]+s;e.start+=t,e.end+=t}return r}(t,(0,So.Ho)(n.saneLabel)))&&void 0!==s?s:void 0;const d=this.matchOnDescription&&null!==(r=(0,So.Gt)(e,(0,So.Ho)(n.saneDescription||"")))&&void 0!==r?r:void 0,h=this.matchOnDetail&&null!==(a=(0,So.Gt)(e,(0,So.Ho)(n.saneDetail||"")))&&void 0!==a?a:void 0;if(l||d||h?(n.labelHighlights=l,n.descriptionHighlights=d,n.detailHighlights=h,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item||!n.item.alwaysShow),n.item?n.separator=void 0:n.separator&&(n.hidden=!0),!this.sortByLabel){const e=n.index&&this.inputElements[n.index-1];i=e&&"separator"===e.type?e:i,i&&!n.hidden&&(n.separator=i,i=void 0)}}))}else this.elements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.item&&(e.separator=t&&"separator"===t.type&&!t.buttons?t:void 0)}));const i=this.elements.filter((e=>!e.hidden));if(this.sortByLabel&&e){const t=e.toLowerCase();i.sort(((e,i)=>function(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:0===n.length&&0===o.length?0:function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=n.startsWith(i),r=o.startsWith(i);if(s!==r)return s?-1:1;if(s&&r){if(n.length<o.length)return-1;if(n.length>o.length)return 1}return 0}(e,t,i);if(s)return s;const r=n.endsWith(i);if(r!==o.endsWith(i))return r?-1:1;const a=function(e,t,i=!1){const n=e||"",o=t||"",s=Os.value.collator.compare(n,o);return Os.value.collatorIsNumeric&&0===s&&n!==o?n<o?-1:1:s}(n,o);return 0!==a?a:n.localeCompare(o)}(e.saneSortLabel,t.saneSortLabel,i)}(e,i,t)))}return this.elementsToIndexes=i.reduce(((e,t,i)=>{var n;return e.set(null!==(n=t.item)&&void 0!==n?n:t.separator,i),e}),new Map),this.list.splice(0,this.list.length,i),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=(0,C.B9)(this.elementDisposables),this.disposables=(0,C.B9)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}fireSeparatorButtonTriggered(e){this._onSeparatorButtonTriggered.fire(e)}style(e){this.list.style(e)}toggleHover(){const e=this.list.getFocusedElements()[0];if(!(null==e?void 0:e.saneTooltip))return;if(this._lastHover&&!this._lastHover.isDisposed)return void this._lastHover.dispose();const t=this.list.getFocusedElements()[0];if(!t)return;this.showHover(t);const i=new C.SL;i.add(this.list.onDidChangeFocus((e=>{e.indexes.length&&this.showHover(e.elements[0])}))),this._lastHover&&i.add(this._lastHover),this._toggleHover=i,this.elementDisposables.push(this._toggleHover)}}function er(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1!==i?[{start:i,end:i+e.length}]:null}$s([Ps.H],Xs.prototype,"onDidChangeFocus",null),$s([Ps.H],Xs.prototype,"onDidChangeSelection",null);class tr{getWidgetAriaLabel(){return(0,Ue.NC)("quickInput","Quick Input")}getAriaLabel(e){var t;return(null===(t=e.separator)||void 0===t?void 0:t.label)?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}var ir=i(98892),nr=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const or={iconClass:Ie.k.asClassName(Ne.l.quickInputBack),tooltip:(0,Ue.NC)("quickInput.back","Back"),handle:-1};class sr extends C.JT{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=sr.noPromptMessage,this._severity=li.Z.Ignore,this.onDidTriggerButtonEmitter=this._register(new k.Q5),this.onDidHideEmitter=this._register(new k.Q5),this.onDisposeEmitter=this._register(new k.Q5),this.visibleDisposables=this._register(new C.SL),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!Xe.gn;this._ignoreFocusOut=e&&!Xe.gn,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=null!=e?e:[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=ps.Jq.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;const i=this.getTitle();i&&this.ui.title.textContent!==i?this.ui.title.textContent=i:i||"&nbsp;"===this.ui.title.innerHTML||(this.ui.title.innerText=" ");const n=this.getDescription();if(this.ui.description1.textContent!==n&&(this.ui.description1.textContent=n),this.ui.description2.textContent!==n&&(this.ui.description2.textContent=n),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?we.mc(this.ui.widget,this._widget):we.mc(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new xe._F,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter((e=>e===or));this.ui.leftActionBar.push(e.map(((e,t)=>{const i=new We.aU(`id-${t}`,"",e.iconClass||Us(e.iconPath),!0,(()=>nr(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==or));this.ui.rightActionBar.push(t.map(((e,t)=>{const i=new We.aU(`id-${t}`,"",e.iconClass||Us(e.iconPath),!0,(()=>nr(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const i=null!==(t=null===(e=this.toggles)||void 0===e?void 0:e.filter((e=>e instanceof ir.Z)))&&void 0!==t?t:[];this.ui.inputBox.toggles=i}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const o=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==o&&(this._lastValidationMessage=o,we.mc(this.ui.message),function(e,t,i){we.mc(t);const n=function(e){const t=[];let i,n=0;for(;i=Hs.exec(e);){i.index-n>0&&t.push(e.substring(n,i.index));const[,o,s,,r]=i;r?t.push({label:o,href:s,title:r}):t.push({label:o,href:s}),n=i.index+i[0].length}return n<e.length&&t.push(e.substring(n)),new Vs(t)}(e);let o=0;for(const e of n.nodes)if("string"==typeof e)t.append(...(0,Bs.T)(e));else{let n=e.title;!n&&e.href.startsWith("command:")?n=(0,Ue.NC)("executeCommand","Click to execute command '{0}'",e.href.substring(8)):n||(n=e.href);const s=we.$("a",{href:e.href,title:n,tabIndex:o++},e.label);s.style.textDecoration="underline";const r=t=>{we.cl(t)&&we.zB.stop(t,!0),i.callback(e.href)},a=i.disposables.add(new Fs.Y(s,we.tw.CLICK)).event,l=i.disposables.add(new Fs.Y(s,we.tw.KEY_DOWN)).event,d=i.disposables.add(k.ju.chain(l)).filter((e=>{const t=new ln.y(e);return t.equals(10)||t.equals(3)})).event;i.disposables.add(wo.o.addTarget(s));const h=i.disposables.add(new Fs.Y(s,wo.t.Tap)).event;k.ju.any(a,h,d)(r,null,i.disposables),t.appendChild(s)}}(o,this.ui.message,{callback:e=>{this.ui.linkOpenerDelegate(e)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,Ue.NC)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==li.Z.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}sr.noPromptMessage=(0,Ue.NC)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class rr extends sr{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new k.Q5),this.onWillAcceptEmitter=this._register(new k.Q5),this.onDidAcceptEmitter=this._register(new k.Q5),this.onDidCustomEmitter=this._register(new k.Q5),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=ps.jG.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new k.Q5),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new k.Q5),this.onDidTriggerItemButtonEmitter=this._register(new k.Q5),this.onDidTriggerSeparatorButtonEmitter=this._register(new k.Q5),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?ps.X5:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(Js.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add(this.ui.inputBox.onMouseDown((e=>{this.autoFocusOnList||this.ui.list.clearFocus()}))),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((e=>{switch(e.keyCode){case 18:this.ui.list.focus(Js.Next),this.canSelectMany&&this.ui.list.domFocus(),we.zB.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(Js.Previous):this.ui.list.focus(Js.Last),this.canSelectMany&&this.ui.list.domFocus(),we.zB.stop(e,!0);break;case 12:this.ui.list.focus(Js.NextPage),this.canSelectMany&&this.ui.list.domFocus(),we.zB.stop(e,!0);break;case 11:this.ui.list.focus(Js.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),we.zB.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Js.First),we.zB.stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Js.Last),we.zB.stop(e,!0))}}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this.ui.list.onDidChangeFocus((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,fn.fS)(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&(0,fn.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,fn.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered((e=>this.onDidTriggerSeparatorButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return we.nm(this.ui.container,we.tw.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new ln.y(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const n=e.getChords();return!(n.length>1||(n[0].shiftKey&&4===i?t.ctrlKey||t.altKey||t.metaKey:!(n[0].altKey&&6===i||n[0].ctrlKey&&5===i||n[0].metaKey&&57===i)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.buttons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;if(!n&&i.inputBox&&(n=this.placeholder||rr.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=null!=n?n:null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case ps.jG.NONE:this._itemActivation=ps.jG.FIRST;break;case ps.jG.SECOND:this.ui.list.focus(Js.Second),this._itemActivation=ps.jG.FIRST;break;case ps.jG.LAST:this.ui.list.focus(Js.Last),this._itemActivation=ps.jG.FIRST;break;default:this.trySelectFirst()}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Js.First)),this.keepScrollPosition&&(this.scrollTop=e)}}rr.DEFAULT_ARIA_LABEL=(0,Ue.NC)("quickInputBox.ariaLabel","Type to narrow down results.");class ar extends sr{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new k.Q5),this.onDidAcceptEmitter=this._register(new k.Q5),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>this.onDidAcceptEmitter.fire()))),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}const lr=we.$;class dr extends C.JT{constructor(e,t){super(),this.options=e,this.themeService=t,this.enabled=!0,this.onDidAcceptEmitter=this._register(new k.Q5),this.onDidCustomEmitter=this._register(new k.Q5),this.onDidTriggerButtonEmitter=this._register(new k.Q5),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new k.Q5),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new k.Q5),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(we.nm(window,we.tw.KEY_DOWN,e,!0)),this._register(we.nm(window,we.tw.KEY_UP,e,!0)),this._register(we.nm(window,we.tw.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=we.R3(this.parentElement,lr(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=we.dS(e),i=we.R3(e,lr(".quick-input-titlebar")),n=this.options.hoverDelegate?{hoverDelegate:this.options.hoverDelegate}:void 0,o=this._register(new Fe.o(i,n));o.domNode.classList.add("quick-input-left-action-bar");const s=we.R3(i,lr(".quick-input-title")),r=this._register(new Fe.o(i,n));r.domNode.classList.add("quick-input-right-action-bar");const a=we.R3(e,lr(".quick-input-header")),l=we.R3(a,lr("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",(0,Ue.NC)("quickInput.checkAll","Toggle all checkboxes")),this._register(we.mu(l,we.tw.CHANGE,(e=>{const t=l.checked;k.setAllVisibleChecked(t)}))),this._register(we.nm(l,we.tw.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const d=we.R3(a,lr(".quick-input-description")),h=we.R3(a,lr(".quick-input-and-message")),c=we.R3(h,lr(".quick-input-filter")),u=this._register(new Ts(c,this.styles.inputBox,this.styles.toggle));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=we.R3(c,lr(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new vs.Z(g,{countFormat:(0,Ue.NC)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),m=we.R3(c,lr(".quick-input-count"));m.setAttribute("aria-live","polite");const f=new vs.Z(m,{countFormat:(0,Ue.NC)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),_=we.R3(a,lr(".quick-input-action")),v=new _s.z(_,this.styles.button);v.label=(0,Ue.NC)("ok","OK"),this._register(v.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const b=we.R3(a,lr(".quick-input-action")),C=new _s.z(b,this.styles.button);C.label=(0,Ue.NC)("custom","Custom"),this._register(C.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const w=we.R3(h,lr(`#${this.idPrefix}message.quick-input-message`)),y=new ks(e,this.styles.progressBar);y.getContainer().classList.add("quick-input-progress");const S=we.R3(e,lr(".quick-input-html-widget"));S.tabIndex=-1;const L=we.R3(e,lr(".quick-input-description")),x=this.idPrefix+"list",k=this._register(new Xs(e,x,this.options,this.themeService));u.setAttribute("aria-controls",x),this._register(k.onDidChangeFocus((()=>{var e;u.setAttribute("aria-activedescendant",null!==(e=k.getActiveDescendant())&&void 0!==e?e:"")}))),this._register(k.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(k.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(k.onChangedCheckedCount((e=>{f.setCount(e)}))),this._register(k.onLeave((()=>{setTimeout((()=>{u.setFocus(),this.controller instanceof rr&&this.controller.canSelectMany&&k.clearFocus()}),0)})));const N=we.go(e);return this._register(N),this._register(we.nm(e,we.tw.FOCUS,(t=>{we.jg(t.relatedTarget,e)||(this.previousFocusElement=t.relatedTarget instanceof HTMLElement?t.relatedTarget:void 0)}),!0)),this._register(N.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(ps.Jq.Blur),this.previousFocusElement=void 0}))),this._register(we.nm(e,we.tw.FOCUS,(e=>{u.setFocus()}))),this._register(we.mu(e,we.tw.KEY_DOWN,(t=>{if(!we.jg(t.target,S))switch(t.keyCode){case 3:we.zB.stop(t,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:we.zB.stop(t,!0),this.hide(ps.Jq.Gesture);break;case 2:if(!t.altKey&&!t.ctrlKey&&!t.metaKey){const i=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(e.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.isDisplayed()&&i.push(".monaco-list"),this.getUI().message&&i.push(".quick-input-message a"),this.getUI().widget){if(we.jg(t.target,this.getUI().widget))break;i.push(".quick-input-html-widget")}const n=e.querySelectorAll(i.join(", "));t.shiftKey&&t.target===n[0]?(we.zB.stop(t,!0),k.clearFocus()):!t.shiftKey&&we.jg(t.target,n[n.length-1])&&(we.zB.stop(t,!0),n[0].focus())}break;case 10:t.ctrlKey&&(we.zB.stop(t,!0),this.getUI().list.toggleHover())}}))),this.ui={container:e,styleSheet:t,leftActionBar:o,titleBar:i,title:s,description1:L,description2:d,widget:S,rightActionBar:r,checkAll:l,inputContainer:h,filterContainer:c,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:m,count:f,okContainer:_,ok:v,message:w,customButtonContainer:b,customButton:C,list:k,progressBar:y,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e),linkOpenerDelegate:e=>this.options.linkOpenerDelegate(e)},this.updateStyles(),this.ui}pick(e,t={},i=ke.T.None){return new Promise(((n,o)=>{let s=e=>{var i;s=n,null===(i=t.onKeyMods)||void 0===i||i.call(t,r.keyMods),n(e)};if(i.isCancellationRequested)return void s(void 0);const r=this.createQuickPick();let a;const l=[r,r.onDidAccept((()=>{if(r.canSelectMany)s(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(s(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(s(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),o=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=o}}})))),r.onDidTriggerSeparatorButton((e=>{var i;return null===(i=t.onDidTriggerSeparatorButton)||void 0===i?void 0:i.call(t,e)})),r.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{(0,C.B9)(l),s(void 0)}))];r.title=t.title,r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,r.quickNavigate=t.quickNavigate,r.hideInput=!!t.hideInput,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(r.activeItems=[a])})),r.show(),Promise.resolve(e).then(void 0,(e=>{o(e),r.hide()}))}))}createQuickPick(){const e=this.getUI();return new rr(e)}createInputBox(){const e=this.getUI();return new ar(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,null==i||i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",we.mc(t.widget),t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(li.Z.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),we.mc(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();or.tooltip=n?(0,Ue.NC)("quickInput.backWithKeybinding","Back ({0})",n):(0,Ue.NC)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t,i,n;const o=this.controller;if(!o)return;const s=!we.jg(document.activeElement,null!==(i=null===(t=this.ui)||void 0===t?void 0:t.container)&&void 0!==i?i:null);if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!s){let e=this.previousFocusElement;for(;e&&!e.offsetParent;)e=null!==(n=e.parentElement)&&void 0!==n?n:void 0;(null==e?void 0:e.offsetParent)?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}o.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,dr.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=null!=e?e:"",this.ui.container.style.backgroundColor=null!=t?t:"",this.ui.container.style.color=null!=i?i:"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.list.style(this.styles.list);const s=[];this.styles.pickerGroup.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));const r=s.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}isDisplayed(){return this.ui&&"none"!==this.ui.container.style.display}}dr.MAX_WIDTH=600;var hr=function(e,t){return function(i,n){t(i,n,e)}};let cr=class extends Lt.bB{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(fs))),this._quickAccess}constructor(e,t,i,n){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this._onShow=this._register(new k.Q5),this._onHide=this._register(new k.Q5),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),linkOpenerDelegate:e=>{this.instantiationService.invokeFunction((t=>{t.get(Wo.v4).open(e,{allowCommands:!0,fromUserGesture:!0})}))},returnFocus:()=>e.focus(),createList:(e,t,i,n,o)=>this.instantiationService.createInstance(cs.ev,e,t,i,n,o),styles:this.computeStyles()},n=this._register(new dr(Object.assign(Object.assign({},i),t),this.themeService));return n.layout(e.dimension,e.offset.quickPickTop),this._register(e.onDidLayout((t=>n.layout(t,e.offset.quickPickTop)))),this._register(n.onShow((()=>{this.resetContextKeys(),this._onShow.fire()}))),this._register(n.onHide((()=>{this.resetContextKeys(),this._onHide.fire()}))),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new _t.uy(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),null==t||t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},i=ke.T.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,St.n_1)(St.zKr),quickInputForeground:(0,St.n_1)(St.tZ6),quickInputTitleBackground:(0,St.n_1)(St.loF),widgetBorder:(0,St.n_1)(St.A42),widgetShadow:(0,St.n_1)(St.rh)},inputBox:Mo.Hc,toggle:Mo.pl,countBadge:Mo.ku,button:Mo.wG,progressBar:Mo.b5,keybindingLabel:Mo.eO,list:(0,Mo.TU)({listBackground:St.zKr,listFocusBackground:St.Vqd,listFocusForeground:St.NPS,listInactiveFocusForeground:St.NPS,listInactiveSelectionIconForeground:St.cbQ,listInactiveFocusBackground:St.Vqd,listFocusOutline:St.xL1,listInactiveFocusOutline:St.xL1}),pickerGroup:{pickerGroupBorder:(0,St.n_1)(St.opG),pickerGroupForeground:(0,St.n_1)(St.kJk)}}}};cr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([hr(0,bt.TG),hr(1,_t.i6),hr(2,Lt.XE),hr(3,ni)],cr);var ur=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},gr=function(e,t){return function(i,n){t(i,n,e)}};let pr=class extends cr{constructor(e,t,i,n,o){super(t,i,n,new ai(e.getContainerDomNode(),o)),this.host=void 0;const s=fr.get(e);if(s){const t=s.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return t.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};pr=ur([gr(1,bt.TG),gr(2,_t.i6),gr(3,Lt.XE),gr(4,L.$)],pr);let mr=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(pr,e);this.mapEditorToService.set(e,t),(0,us.I)(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},i=ke.T.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};mr=ur([gr(0,bt.TG),gr(1,L.$)],mr);class fr{static get(e){return e.getContribution(fr.ID)}constructor(e){this.editor=e,this.widget=new _r(this.editor)}dispose(){this.widget.dispose()}}fr.ID="editor.controller.quickInput";class _r{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return _r.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}_r.ID="editor.contrib.quickInputWidget",(0,Oe._K)(fr.ID,fr,4);var vr=i(58763),br=i(44156),Cr=function(e,t){return function(i,n){t(i,n,e)}};let wr=class extends C.JT{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new k.Q5,this._onDidChangeReducedMotion=new k.Q5,this._accessibilityModeEnabledContext=I.U.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),e.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())}))),n(),this._register(this.onDidChangeScreenReaderOptimized((()=>n())));const o=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=o.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(o)}initReducedMotionListeners(e){if(!this._layoutService.hasContainer)return;this._register((0,we.nm)(e,"change",(()=>{this._systemMotionReduced=e.matches,"auto"===this._configMotionReduced&&this._onDidChangeReducedMotion.fire()})));const t=()=>{const e=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",e),this._layoutService.container.classList.toggle("enable-motion",!e)};t(),this._register(this.onDidChangeReducedMotion((()=>t())))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return"on"===e||"auto"===e&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};wr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Cr(0,_t.i6),Cr(1,ni),Cr(2,oe.Ui)],wr);var yr,Sr,Lr=i(26904),xr=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},kr=function(e,t){return function(i,n){t(i,n,e)}};let Nr=class{constructor(e,t){this._commandService=e,this._hiddenStates=new Dr(t)}createMenu(e,t,i){return new Ir(e,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};Nr=xr([kr(0,mn.H),kr(1,Lr.Uy)],Nr);let Dr=yr=class{constructor(e){this._storageService=e,this._disposables=new C.SL,this._onDidChange=new k.Q5,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(yr._key,0,"{}");this._data=JSON.parse(t)}catch(e){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,yr._key,this._disposables)((()=>{if(!this._ignoreChangeEvent)try{const t=e.get(yr._key,0,"{}");this._data=JSON.parse(t)}catch(e){console.log("FAILED to read storage after UPDATE",e)}this._onDidChange.fire()})))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var i;return null!==(i=this._hiddenByDefaultCache.get(`${e.id}/${t}`))&&void 0!==i&&i}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){var i,n;const o=this._isHiddenByDefault(e,t),s=null!==(n=null===(i=this._data[e.id])||void 0===i?void 0:i.includes(t))&&void 0!==n&&n;return o?!s:s}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);const n=this._data[e.id];if(i)n?n.indexOf(t)<0&&n.push(t):this._data[e.id]=[t];else if(n){const i=n.indexOf(t);i>=0&&(0,fn.LS)(n,i),0===n.length&&delete this._data[e.id]}this._persist()}reset(e){if(void 0===e)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(yr._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};Dr._key="menu.hiddenCommands",Dr=yr=xr([kr(0,Lr.Uy)],Dr);let Er=Sr=class{constructor(e,t,i,n,o){this._id=e,this._hiddenStates=t,this._collectContextKeysForSubmenus=i,this._commandService=n,this._contextKeyService=o,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=vo.BH.getMenuItems(this._id);let t;e.sort(Sr._compareMenuItems);for(const i of e){const e=i.group||"";t&&t[0]===e||(t=[e,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeys(i)}}_collectContextKeys(e){if(Sr._fillInKbExprKeys(e.when,this._structureContextKeys),(0,vo.vr)(e)){if(e.command.precondition&&Sr._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;Sr._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&vo.BH.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}createActionGroups(e){const t=[];for(const i of this._menuGroups){const[n,o]=i,s=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=(0,vo.vr)(t);i&&this._hiddenStates.setDefaultState(this._id,t.command.id,!!t.isHiddenByDefault);const n=Tr(this._id,i?t.command:t,this._hiddenStates);if(i)s.push(new vo.U8(t.command,t.alt,e,n,this._contextKeyService,this._commandService));else{const i=new Sr(t.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(e),o=We.Z0.join(...i.map((e=>e[1])));o.length>0&&s.push(new vo.NZ(t,n,o))}}s.length>0&&t.push([n,s])}return t}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n)return-1;if("navigation"===i)return-1;if("navigation"===n)return 1;const e=i.localeCompare(n);if(0!==e)return e}const o=e.order||0,s=t.order||0;return o<s?-1:o>s?1:Sr._compareTitles((0,vo.vr)(e)?e.command.title:e.title,(0,vo.vr)(t)?t.command.title:t.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};Er=Sr=xr([kr(3,mn.H),kr(4,_t.i6)],Er);let Ir=class{constructor(e,t,i,n,o){this._disposables=new C.SL,this._menuInfo=new Er(e,t,i.emitEventsForSubmenuChanges,n,o);const s=new xe.pY((()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})}),i.eventDebounceDelay);this._disposables.add(s),this._disposables.add(vo.BH.onDidChangeMenu((t=>{t.has(e)&&s.schedule()})));const r=this._disposables.add(new C.SL);this._onDidChange=new k.D0({onWillAddFirstListener:()=>{r.add(o.onDidChangeContext((e=>{const t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})}))),r.add(t.onDidChange((e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})})))},onDidRemoveLastListener:r.clear.bind(r),delay:i.eventDebounceDelay,merge:e=>{let t=!1,i=!1,n=!1;for(const o of e)if(t=t||o.isStructuralChange,i=i||o.isEnablementChange,n=n||o.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}}}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function Tr(e,t,i){const n=(0,vo.f6)(t)?t.submenu.id:t.id,o="string"==typeof t.title?t.title:t.title.value,s=(0,We.xw)({id:`hide/${e.id}/${n}`,label:(0,Ue.NC)("hide.label","Hide '{0}'",o),run(){i.updateHidden(e,n,!0)}}),r=(0,We.xw)({id:`toggle/${e.id}/${n}`,label:o,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:s,toggle:r,get isHidden(){return!r.checked}}}Ir=xr([kr(3,mn.H),kr(4,_t.i6)],Ir);var Mr=function(e,t){return function(i,n){t(i,n,e)}},Rr=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Ar=class extends C.JT{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],(Co.G6||Co.MG)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const e=new xe.CR;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((t=>Rr(this,void 0,void 0,(function*(){t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))))};this.layoutService.hasContainer&&(this._register((0,we.nm)(this.layoutService.container,"click",e)),this._register((0,we.nm)(this.layoutService.container,"keydown",e)))}writeText(e,t){return Rr(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return yield navigator.clipboard.writeText(e)}catch(e){console.error(e)}const i=document.activeElement,n=document.body.appendChild((0,we.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)}))}readText(e){return Rr(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(e){return console.error(e),""}}))}readFindText(){return Rr(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return Rr(this,void 0,void 0,(function*(){this.findText=e}))}writeResources(e){return Rr(this,void 0,void 0,(function*(){this.resources=e}))}readResources(){return Rr(this,void 0,void 0,(function*(){return this.resources}))}};Ar=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Mr(0,ni),Mr(1,Li.VZ)],Ar);var Or=i(53725),Pr=i(4767);const Fr="data-keybinding-context";class Br{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return Object.assign({},this._value)}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class Wr extends Br{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}Wr.INSTANCE=new Wr;class Vr extends Br{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=Pr.Id.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(7===e.source){const e=Array.from(this._values,(([e])=>e));this._values.clear(),i.fire(new Kr(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...Or.$.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new Kr(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(Vr._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Vr._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Vr._keyPrefix="config.";class Hr{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class zr{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class Kr{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every((t=>e.has(t)))}}class Ur{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every((t=>t.allKeysContainedIn(e)))}}class jr{constructor(e){this._onDidChangeContext=new k.K3({merge:e=>new Ur(e)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Hr(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new qr(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return!e||e.evaluate(t)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new zr(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new zr(e))}getContext(e){return this._isDisposed?Wr.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(Fr)){const t=e.getAttribute(Fr);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}}let $r=class extends jr{constructor(e){super(0),this._contexts=new Map,this._toDispose=new C.SL,this._lastContextId=0;const t=new Vr(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?Wr.INSTANCE:this._contexts.get(e)||Wr.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new Br(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};$r=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,oe.Ui)],$r);class qr extends jr{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new C.XK,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(Fr)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(Fr,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext((e=>{var t;t=this._parent.getContextValuesContainer(this._myContextId).value,e.allKeysContainedIn(new Set(Object.keys(t)))||this._onDidChangeContext.fire(e)}))}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(Fr),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?Wr.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}mn.P.registerCommand("_setContext",(function(e,t,i){e.get(_t.i6).createKey(String(t),function(e){return(0,N.rs)(e,(e=>"object"==typeof e&&1===e.$mid?y.o.revive(e).toString():e instanceof y.o?e.toString():void 0))}(i))})),mn.P.registerCommand({id:"getContextKeyInfo",handler:()=>[..._t.uy.all()].sort(((e,t)=>e.key.localeCompare(t.key))),description:{description:(0,Ue.NC)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),mn.P.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(const i of _t.uy.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));var Zr=i(97108);class Gr{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}}class Qr{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Gr(t,e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t}\n\t(-> incoming)[${[...i.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...i.outgoing.keys()].join(",")}]\n`);return e.join("\n")}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}class Yr extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class Jr{constructor(e=new Ct.y,t=!1,i,n=!1){var o;this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._activeInstantiations=new Set,this._services.set(bt.TG,this),this._globalGraph=n?null!==(o=null==i?void 0:i._globalGraph)&&void 0!==o?o:new Qr((e=>e)):void 0}createChild(e){return new Jr(e,this._strict,this,this._enableTracing)}invokeFunction(e,...t){const i=Xr.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:e=>{if(n)throw(0,De.L6)("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(e,i);if(!t)throw new Error(`[invokeFunction] unknown service '${e}'`);return t}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof Zr.M?(i=Xr.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Xr.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=bt.I8.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const t of n){const n=this._getOrCreateServiceInstance(t.id,i);n||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`,!1),o.push(n)}const s=n.length>0?n[0].index:t.length;if(t.length!==s){console.trace(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);const i=s-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,s)}return Reflect.construct(e,t.concat(o))}_setServiceInstance(e,t){if(this._services.get(e)instanceof Zr.M)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof Zr.M?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){var n;const o=new Qr((e=>e.id.toString()));let s=0;const r=[{id:e,desc:t,_trace:i}];for(;r.length;){const t=r.pop();if(o.lookupOrInsertNode(t),s++>1e3)throw new Yr(o);for(const i of bt.I8.getServiceDependencies(t.desc.ctor)){const s=this._getServiceInstanceOrDescriptor(i.id);if(s||this._throwIfStrict(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`,!0),null===(n=this._globalGraph)||void 0===n||n.insertEdge(String(t.id),String(i.id)),s instanceof Zr.M){const e={id:i.id,desc:s,_trace:t._trace.branch(i.id,!0)};o.insertEdge(t,e),r.push(e)}}}for(;;){const e=o.roots();if(0===e.length){if(!o.isEmpty())throw new Yr(o);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof Zr.M){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}o.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof Zr.M)return this._createServiceInstance(e,t,i,n,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,o){if(n){const n=new Jr(void 0,this._strict,this,this._enableTracing);n._globalGraphImplicitDependency=String(e);const s=new Map,r=new xe.Ue((()=>{const e=n._createInstance(t,i,o);for(const[t,i]of s){const n=e[t];if("function"==typeof n)for(const t of i)n.apply(e,t)}return s.clear(),e}));return new Proxy(Object.create(null),{get(e,t){if(!r.isInitialized&&"string"==typeof t&&(t.startsWith("onDid")||t.startsWith("onWill"))){let e=s.get(t);return e||(e=new Jt.S,s.set(t,e)),(t,i,n)=>{const o=e.push([t,i,n]);return(0,C.OF)(o)}}if(t in e)return e[t];const i=r.value;let n=i[t];return"function"!=typeof n||(n=n.bind(i),e[t]=n),n},set:(e,t,i)=>(r.value[t]=i,!0),getPrototypeOf:e=>t.prototype})}return this._createInstance(t,i,o)}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class Xr{static traceInvocation(e,t){return e?new Xr(2,t.name||(new Error).stack.split("\n").slice(3,4).join("\n")):Xr._None}static traceCreation(e,t){return e?new Xr(1,t.name):Xr._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new Xr(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;Xr._totals+=e;let t=!1;const i=[`${1===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){const o=[],s=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,o.push(`${s}CREATES -> ${r}`);const n=e(i+1,l);n&&o.push(n)}else o.push(`${s}uses -> ${r}`);return o.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Xr._totals.toFixed(2)}ms)`];(e>2||t)&&Xr.all.add(i.join("\n"))}}Xr.all=new Set,Xr._None=new class extends Xr{constructor(){super(0,null)}stop(){}branch(){return this}},Xr._totals=0;const ea=new Set([Yt.lg.inMemory,Yt.lg.vscodeSourceControl,Yt.lg.walkThrough,Yt.lg.walkThroughSnippet]);class ta{constructor(){this._byResource=new Ii.Y9,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new Ii.Y9,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){const i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1;const o=this._byResource.get(e);o&&(i=o.delete(t));const s=this._byOwner.get(t);if(s&&(n=s.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,o;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:Or.$.empty():y.o.isUri(e)?null!==(o=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==o?o:Or.$.empty():Or.$.map(Or.$.concat(...this._byOwner.values()),(e=>e[1]))}}class ia{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Ii.Y9,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(ea.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===$o.ZL.Error?t.errors+=1:i===$o.ZL.Warning?t.warnings+=1:i===$o.ZL.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class na{constructor(){this._onMarkerChanged=new k.D0({delay:0,merge:na._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new ta,this._stats=new ia(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if((0,fn.XY)(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const o of i){const i=na._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:d,endColumn:h,relatedInformation:c,tags:u}=i;if(s)return a=a>0?a:1,l=l>0?l:1,d=d>=a?d:a,h=h>0?h:l,{resource:t,owner:e,code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:d,endColumn:h,relatedInformation:c,tags:u}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const t of n){const n=Or.$.first(t);n&&(i.push(n.resource),this._data.delete(n.resource,e))}if((0,fn.Of)(t)){const n=new Ii.Y9;for(const{resource:o,marker:s}of t){const t=na._toMarker(e,o,s);if(!t)continue;const r=n.get(o);r?r.push(t):(n.set(o,[t]),i.push(o))}for(const[t,i]of n)this._data.set(t,e,i)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(na._accept(i,n)){const e=t.push(i);if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(null!=i?i:t),s=[];for(const t of e)for(const e of t)if(na._accept(e,n)){const t=s.push(e);if(o>0&&t===o)return s}return s}{const e=[];for(const t of this._data.values())for(const i of t)if(na._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new Ii.Y9;for(const i of e)for(const e of i)t.set(e,!0);return Array.from(t.keys())}}class oa extends C.JT{constructor(){super(...arguments),this._configurationModel=new wn}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new wn;const e=bn.B.as(vn.IP.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const e=i[n],o=t[n];void 0!==e?this._configurationModel.addValue(n,e):o?this._configurationModel.addValue(n,o.default):this._configurationModel.removeValue(n)}}}class sa extends C.JT{constructor(e,t=[]){super(),this.logger=new Li.qA([e,...t]),this._register(e.onDidChangeLogLevel((e=>this.setLevel(e))))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}var ra=i(10637),aa=i(48814),la=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},da=function(e,t){return function(i,n){t(i,n,e)}},ha=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class ca{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new k.Q5}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let ua=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new C.Jz(new ca(t))):Promise.reject(new Error("Model not found"))}};ua=la([da(0,H.q)],ua);class ga{show(){return ga.NULL_PROGRESS_RUNNER}showWhile(e,t){return ha(this,void 0,void 0,(function*(){yield e}))}}ga.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class pa{info(e){return this.notify({severity:li.Z.Info,message:e})}warn(e){return this.notify({severity:li.Z.Warning,message:e})}error(e){return this.notify({severity:li.Z.Error,message:e})}notify(e){switch(e.severity){case li.Z.Error:console.error(e.message);break;case li.Z.Warning:console.warn(e.message);break;default:console.log(e.message)}return pa.NO_OP}prompt(e,t,i,n){return pa.NO_OP}status(e,t){return C.JT.None}}pa.NO_OP=new wt.EO;let ma=class{constructor(e){this._onWillExecuteCommand=new k.Q5,this._onDidExecuteCommand=new k.Q5,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=mn.P.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(e){return Promise.reject(e)}}};ma=la([da(0,bt.TG)],ma);let fa=class extends Rn{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const r=e=>{const t=new C.SL;t.add(we.nm(e,we.tw.KEY_DOWN,(e=>{const t=new ln.y(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),t.add(we.nm(e,we.tw.KEY_UP,(e=>{const t=new ln.y(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()}))),this._domNodeListeners.push(new _a(e,t))},a=e=>{for(let t=0;t<this._domNodeListeners.length;t++){const i=this._domNodeListeners[t];i.domNode===e&&(this._domNodeListeners.splice(t,1),i.dispose())}},l=e=>{e.getOption(60)||r(e.getContainerDomNode())};this._register(s.onCodeEditorAdd(l)),this._register(s.onCodeEditorRemove((e=>{e.getOption(60)||a(e.getContainerDomNode())}))),s.listCodeEditors().forEach(l);const d=e=>{r(e.getContainerDomNode())};this._register(s.onDiffEditorAdd(d)),this._register(s.onDiffEditorRemove((e=>{a(e.getContainerDomNode())}))),s.listDiffEditors().forEach(d)}addDynamicKeybinding(e,t,i,n){return(0,C.F8)(mn.P.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map((e=>{var t;return{keybinding:(0,dn.Z9)(e.keybinding,Xe.OS),command:null!==(t=e.command)&&void 0!==t?t:null,commandArgs:e.commandArgs,when:e.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),(0,C.OF)((()=>{for(let e=0;e<this._dynamicKeybindings.length;e++)if(this._dynamicKeybindings[e]===t[0])return this._dynamicKeybindings.splice(e,t.length),void this.updateResolver()}))}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(Pn.W.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new En(e,t,(e=>this._log(e)))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const o of e){const e=o.when||void 0,s=o.keybinding;if(s){const r=zn.resolveKeybinding(s,Xe.OS);for(const s of r)i[n++]=new Fn(s,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new Fn(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new dn.$M(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new zn([t],Xe.OS)}};fa=la([da(0,_t.i6),da(1,mn.H),da(2,at.b),da(3,wt.lT),da(4,Li.VZ),da(5,L.$)],fa);class _a extends C.JT{constructor(e,t){super(),this.domNode=e,this._register(t)}}function va(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof y.o)}class ba{constructor(){this._onDidChangeConfiguration=new k.Q5,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const e=new oa;this._configuration=new Ln(e.reload(),new wn,new wn,new wn),e.dispose()}getValue(e,t){const i="string"==typeof e?e:void 0,n=va(e)?e:va(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new xn({keys:i,overrides:[]},t,this._configuration);e.source=8,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let Ca=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new k.Q5,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=Ke.L.isIPosition(t)?t:null,o=n?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0,s=e?this.getLanguage(e,n):void 0;return void 0===o?this.configurationService.getValue({resource:e,overrideIdentifier:s}):this.configurationService.getValue(o,{resource:e,overrideIdentifier:s})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};Ca=la([da(0,oe.Ui),da(1,H.q),da(2,V.O)],Ca);let wa=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"==typeof i&&"auto"!==i?i:Xe.IJ||Xe.dz?"\n":"\r\n"}};wa=la([da(0,oe.Ui)],wa);class ya{constructor(){const e=y.o.from({scheme:ya.SCHEME,authority:"model",path:"/"});this.workspace={id:jn.p$,folders:[new jn.md({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===ya.SCHEME?this.workspace.folders[0]:null}}function Sa(e,t,i){if(!t)return;if(!(e instanceof ba))return;const n=[];Object.keys(t).forEach((e=>{(0,cn.ei)(e)&&n.push([`editor.${e}`,t[e]]),i&&(0,cn.Pe)(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}ya.SCHEME="inmemory";let La=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return ha(this,void 0,void 0,(function*(){const t=Array.isArray(e)?e:hn.fo.convert(e),i=new Map;for(const e of t){if(!(e instanceof hn.Gl))throw new Error("bad edit - only text edits are supported");const t=this._modelService.getModel(e.resource);if(!t)throw new Error("bad edit - model not found");if("number"==typeof e.versionId&&t.getVersionId()!==e.versionId)throw new Error("bad state - model changed in the meantime");let n=i.get(t);n||(n=[],i.set(t,n)),n.push(un.h.replaceMove(D.e.lift(e.textEdit.range),e.textEdit.text))}let n=0,o=0;for(const[e,t]of i)e.pushStackElement(),e.pushEditOperations([],t,(()=>[])),e.pushStackElement(),o+=1,n+=t.length;return{ariaSummary:w.WU($n.iN.bulkEditServiceSummary,n,o),isApplied:n>0}}))}};La=la([da(0,H.q)],La);let xa=class extends io{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();e&&(t=e.getContainerDomNode())}return super.showContextView(e,t,i)}};xa=la([da(0,ni),da(1,L.$)],xa);let ka=class extends Oo{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s),this.configure({blockMouse:!1})}};var Na;ka=la([da(0,at.b),da(1,wt.lT),da(2,vt.u),da(3,On.d),da(4,vo.co),da(5,_t.i6)],ka),(0,ei.z)(oe.Ui,ba,0),(0,ei.z)(pn.V,Ca,0),(0,ei.z)(pn.y,wa,0),(0,ei.z)(jn.ec,ya,0),(0,ei.z)(Un.e,class{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}getUriBasenameLabel(e){return(0,qn.EZ)(e)}},0),(0,ei.z)(at.b,class{publicLog2(){}},0),(0,ei.z)(di.S,class{confirm(e){return ha(this,void 0,void 0,(function*(){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}))}doConfirm(e,t){let i=e;return t&&(i=i+"\n\n"+t),window.confirm(i)}prompt(e){var t,i;return ha(this,void 0,void 0,(function*(){let n;if(this.doConfirm(e.message,e.detail)){const o=[...null!==(t=e.buttons)&&void 0!==t?t:[]];e.cancelButton&&"string"!=typeof e.cancelButton&&"boolean"!=typeof e.cancelButton&&o.push(e.cancelButton),n=yield null===(i=o[0])||void 0===i?void 0:i.run({checkboxChecked:!1})}return{result:n}}))}error(e,t){return ha(this,void 0,void 0,(function*(){yield this.prompt({type:li.Z.Error,message:e,detail:t})}))}},0),(0,ei.z)(aa.Y,class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},0),(0,ei.z)(wt.lT,pa,0),(0,ei.z)($o.lT,na,0),(0,ei.z)(V.O,class extends mo{constructor(){super()}},0),(0,ei.z)(br.Z,vr.nI,0),(0,ei.z)(Li.VZ,class extends sa{constructor(){super(new Li.kw)}},0),(0,ei.z)(H.q,ls,0),(0,ei.z)(Jo.i,Qo,0),(0,ei.z)(_t.i6,$r,0),(0,ei.z)(yt.R9,class{withProgress(e,t,i){return t({report:()=>{}})}},0),(0,ei.z)(yt.ek,ga,0),(0,ei.z)(Lr.Uy,Lr.vm,0),(0,ei.z)(rt.p,z.eu,0),(0,ei.z)(hn.vu,La,0),(0,ei.z)(Zn.Y,class{constructor(){this._neverEmitter=new k.Q5,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},0),(0,ei.z)(gn.S,ua,0),(0,ei.z)(I.F,wr,0),(0,ei.z)(cs.Lw,cs.XN,0),(0,ei.z)(mn.H,ma,0),(0,ei.z)(On.d,fa,0),(0,ei.z)(ps.eJ,mr,0),(0,ei.z)(vt.u,xa,0),(0,ei.z)(Wo.v4,jo,0),(0,ei.z)(ft.p,Ar,0),(0,ei.z)(vt.i,ka,0),(0,ei.z)(vo.co,Nr,0),(0,ei.z)(E.e7,class{playAudioCue(e,t){return ha(this,void 0,void 0,(function*(){}))}},0),function(e){const t=new Ct.y;for(const[e,i]of(0,ei.d)())t.set(e,i);const i=new Jr(t,!0);t.set(bt.TG,i),e.get=function(e){n||s({});const o=t.get(e);if(!o)throw new Error("Missing service "+e);return o instanceof Zr.M?i.invokeFunction((t=>t.get(e))):o};let n=!1;const o=new k.Q5;function s(e){if(n)return i;n=!0;for(const[e,i]of(0,ei.d)())t.get(e)||t.set(e,i);for(const i in e)if(e.hasOwnProperty(i)){const n=(0,bt.yh)(i);t.get(n)instanceof Zr.M&&t.set(n,e[i])}const s=(0,ra.n)();for(const e of s)try{i.createInstance(e)}catch(e){(0,De.dL)(e)}return o.fire(),i}e.initialize=s,e.withServices=function(e){if(n)return e();const t=new C.SL,i=t.add(o.event((()=>{i.dispose(),t.add(e())})));return t}}(Na||(Na={}));var Da=i(9849),Ea=i(30184),Ia={};function Ta(e,t){const i=new C.SL,n=e.createDecorationsCollection();return i.add((0,Da.UV)({debugName:`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function Ma(e,t){return e.appendChild(t),(0,C.OF)((()=>{e.removeChild(t)}))}Ia.styleTagTransform=_(),Ia.setAttributes=g(),Ia.insert=c().bind(null,"head"),Ia.domAPI=d(),Ia.insertStyleElement=m(),a()(Ea.Z,Ia),Ea.Z&&Ea.Z.locals&&Ea.Z.locals;class Ra extends C.JT{get width(){return this._width}get height(){return this._height}constructor(e,t){super(),this.elementSizeObserver=this._register(new Ae.I(e,t)),this._width=(0,Da.uh)("width",this.elementSizeObserver.getWidth()),this._height=(0,Da.uh)("height",this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange((e=>(0,Da.PS)((e=>{this._width.set(this.elementSizeObserver.getWidth(),e),this._height.set(this.elementSizeObserver.getHeight(),e)})))))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function Aa(e,t){let i=e.get(),n=i,o=i;const s=(0,Da.uh)("animatedValue",i);let r,a=-1;function l(){const e=Date.now()-a;var t,d,h;o=Math.floor((d=n,h=i-n,(t=e)===300?d+h:h*(1-Math.pow(2,-10*t/300))+d)),e<300?r=requestAnimationFrame(l):o=i,s.set(o,void 0)}return t.add((0,Da.nJ)({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(t,i)=>(t.didChange(e)&&(i.animate=i.animate||t.change),!0)},((t,s)=>{void 0!==r&&(cancelAnimationFrame(r),r=void 0),n=o,i=e.read(t),a=Date.now()-(s.animate?0:300),l()}))),s}class Oa extends C.JT{constructor(e,t,i){super(),this._register(new Fa(e,i)),this._register(Ba(i,{height:t.actualHeight,top:t.actualTop}))}}class Pa{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=(0,Da.uh)("actualTop",void 0),this._actualHeight=(0,Da.uh)("actualHeight",void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=e=>{this._actualTop.set(e,void 0)},this.onComputedHeight=e=>{this._actualHeight.set(e,void 0)}}}class Fa{constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId="managedOverlayWidget-"+Fa._counter++,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}function Ba(e,t){return(0,Da.EH)((i=>{for(let[n,o]of Object.entries(t))o&&"object"==typeof o&&"read"in o&&(o=o.read(i)),"number"==typeof o&&(o=`${o}px`),n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e.style[n]=o}))}function Wa(e,t){return function(e,t){const i=globalThis.$hotReload_deprecateExports;i&&(0,Da.aq)("reload",(t=>{function n(i,n){return!![...Object.values(i)].some((t=>e.includes(t)))&&(t(void 0),!0)}return i.add(n),{dispose(){i.delete(n)}}})).read(t)}([e],t),e}function Va(e,t,i){const n=new C.SL,o=[];return n.add((0,Da.EH)((s=>{const r=t.read(s),a=new Map,l=new Map;i&&i(!0),e.changeViewZones((e=>{for(const t of o)e.removeZone(t);o.length=0;for(const t of r){const i=e.addZone(t);o.push(i),a.set(t,i)}})),i&&i(!1),n.add((0,Da.nJ)({createEmptyChangeSummary:()=>[],handleChange(e,t){const i=l.get(e.changedObservable);return void 0!==i&&t.push(i),!0}},((t,n)=>{for(const e of r)e.onChange&&(l.set(e.onChange,a.get(e)),e.onChange.read(t));i&&i(!0),e.changeViewZones((e=>{for(const t of n)e.layoutZone(t)})),i&&i(!1)})))}))),n.add({dispose(){i&&i(!0),e.changeViewZones((e=>{for(const t of o)e.removeZone(t)})),i&&i(!1)}}),n}Fa._counter=0;var Ha=i(19247),za=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ka=function(e,t){return function(i,n){t(i,n,e)}};const Ua=(0,je.q5)("diff-review-insert",Ne.l.add,(0,Ue.NC)("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),ja=(0,je.q5)("diff-review-remove",Ne.l.remove,(0,Ue.NC)("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),$a=(0,je.q5)("diff-review-close",Ne.l.close,(0,Ue.NC)("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));let qa=class extends C.JT{constructor(e,t,i,n,o,s,r,a,l){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=o,this._height=s,this._diffs=r,this._editors=a,this._instantiationService=l,this.model=(0,Da.Be)("model",((e,t)=>{const i=this._visible.read(e);if(this._parentNode.style.visibility=i?"visible":"hidden",!i)return null;const n=t.add(this._instantiationService.createInstance(Za,this._diffs,this._editors,this._setVisible,this._canClose));return{model:n,view:t.add(this._instantiationService.createInstance(il,this._parentNode,n,this._width,this._height,this._editors))}})),this._register((0,Da.$g)(this.model,!0))}next(){(0,Da.PS)((e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this.model.get().model.nextGroup(e)}))}prev(){(0,Da.PS)((e=>{this._setVisible(!0,e),this.model.get().model.previousGroup(e)}))}close(){(0,Da.PS)((e=>{this._setVisible(!1,e)}))}};qa=za([Ka(8,bt.TG)],qa);let Za=class extends C.JT{constructor(e,t,i,n,o){super(),this._diffs=e,this._editors=t,this._setVisible=i,this.canClose=n,this._audioCueService=o,this._groups=(0,Da.uh)("groups",[]),this._currentGroupIdx=(0,Da.uh)("currentGroupIdx",0),this._currentElementIdx=(0,Da.uh)("currentElementIdx",0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map(((e,t)=>this._groups.read(t)[e])),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map(((e,t)=>{var i;return null===(i=this.currentGroup.read(t))||void 0===i?void 0:i.lines[e]})),this._register((0,Da.EH)((e=>{const t=this._diffs.read(e);if(!t)return void this._groups.set([],void 0);const i=function(e,t,i){const n=[];for(const o of function*(e,t){let i,n;for(const t of e)void 0!==n&&(o=n,t.modifiedRange.startLineNumber-o.modifiedRange.endLineNumberExclusive<2*Ga)?i.push(t):(i&&(yield i),i=[t]),n=t;var o;i&&(yield i)}(e)){const e=[];e.push(new Ja);const s=new ot.z(Math.max(1,o[0].originalRange.startLineNumber-Ga),Math.min(o[o.length-1].originalRange.endLineNumberExclusive+Ga,t+1)),r=new ot.z(Math.max(1,o[0].modifiedRange.startLineNumber-Ga),Math.min(o[o.length-1].modifiedRange.endLineNumberExclusive+Ga,i+1));nl(o,((t,i)=>{const n=new ot.z(t?t.originalRange.endLineNumberExclusive:s.startLineNumber,i?i.originalRange.startLineNumber:s.endLineNumberExclusive),o=new ot.z(t?t.modifiedRange.endLineNumberExclusive:r.startLineNumber,i?i.modifiedRange.startLineNumber:r.endLineNumberExclusive);n.forEach((t=>{e.push(new tl(t,o.startLineNumber+(t-n.startLineNumber)))})),i&&(i.originalRange.forEach((t=>{e.push(new Xa(i,t))})),i.modifiedRange.forEach((t=>{e.push(new el(i,t))})))}));const a=o[0].modifiedRange.join(o[o.length-1].modifiedRange),l=o[0].originalRange.join(o[o.length-1].originalRange);n.push(new Ya(new st.Qy(a,l),e))}return n}(t,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());(0,Da.PS)((e=>{const t=this._editors.modified.getPosition();if(t){const n=i.findIndex((e=>(null==t?void 0:t.lineNumber)<e.range.modified.endLineNumberExclusive));-1!==n&&this._currentGroupIdx.set(n,e)}this._groups.set(i,e)}))}))),this._register((0,Da.EH)((e=>{const t=this.currentElement.read(e);(null==t?void 0:t.type)===Qa.Deleted?this._audioCueService.playAudioCue(E.y$.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(null==t?void 0:t.type)===Qa.Added&&this._audioCueService.playAudioCue(E.y$.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})}))),this._register((0,Da.EH)((e=>{var t;const i=this.currentElement.read(e);if(i&&i.type!==Qa.Header){const e=null!==(t=i.modifiedLineNumber)&&void 0!==t?t:i.diff.modifiedRange.startLineNumber;this._editors.modified.setSelection(D.e.fromPositions(new Ke.L(e,1)))}})))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||(0,Da.c8)(t,(t=>{this._currentGroupIdx.set(Ha.q.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),t),this._currentElementIdx.set(0,t)}))}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||(0,Da.PS)((i=>{this._currentElementIdx.set(Ha.q.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)}))}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);-1!==i&&(0,Da.PS)((e=>{this._currentElementIdx.set(i,e)}))}revealCurrentElementInEditor(){this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===Qa.Deleted?(this._editors.original.setSelection(D.e.fromPositions(new Ke.L(e.originalLineNumber,1))),this._editors.original.revealLine(e.originalLineNumber),this._editors.original.focus()):(e.type!==Qa.Header&&(this._editors.modified.setSelection(D.e.fromPositions(new Ke.L(e.modifiedLineNumber,1))),this._editors.modified.revealLine(e.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};Za=za([Ka(4,E.e7)],Za);const Ga=3;var Qa;!function(e){e[e.Header=0]="Header",e[e.Unchanged=1]="Unchanged",e[e.Deleted=2]="Deleted",e[e.Added=3]="Added"}(Qa||(Qa={}));class Ya{constructor(e,t){this.range=e,this.lines=t}}class Ja{constructor(){this.type=Qa.Header}}class Xa{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=Qa.Deleted,this.modifiedLineNumber=void 0}}class el{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=Qa.Added,this.originalLineNumber=void 0}}class tl{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=Qa.Unchanged}}let il=class extends C.JT{constructor(e,t,i,n,o,s){super(),this._element=e,this._model=t,this._width=i,this._height=n,this._editors=o,this._languageService=s,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";const r=document.createElement("div");r.className="diff-review-actions",this._actionBar=this._register(new Fe.o(r)),this._register((0,Da.EH)((e=>{this._actionBar.clear(),this._model.canClose.read(e)&&this._actionBar.push(new We.aU("diffreview.close",(0,Ue.NC)("label.close","Close"),"close-diff-review "+Ie.k.asClassName($a),!0,(()=>{return e=this,i=void 0,o=function*(){return t.close()},new((n=void 0)||(n=Promise))((function(t,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(e,i||[])).next())}));var e,i,n,o})),{label:!1,icon:!0})}))),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new Be.s$(this._content,{})),(0,we.mc)(this.domNode,this._scrollbar.getDomNode(),r),this._register((0,C.OF)((()=>{(0,we.mc)(this.domNode)}))),this._register(Ba(this.domNode,{width:this._width,height:this._height})),this._register(Ba(this._content,{width:this._width,height:this._height})),this._register((0,Da.gp)(((e,t)=>{this._model.currentGroup.read(e),this._render(t)}))),this._register((0,we.mu)(this.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._model.goToNextLine()),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._model.goToPreviousLine()),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this._model.close()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this._model.revealCurrentElementInEditor())})))}_render(e){const t=this._editors.original.getOptions(),i=this._editors.modified.getOptions(),n=document.createElement("div");n.className="diff-review-table",n.setAttribute("role","list"),n.setAttribute("aria-label",(0,Ue.NC)("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),(0,Re.N)(n,i.get(49)),(0,we.mc)(this._content,n);const o=this._editors.original.getModel(),s=this._editors.modified.getModel();if(!o||!s)return;const r=o.getOptions(),a=s.getOptions(),l=i.get(65),d=this._model.currentGroup.get();for(const h of(null==d?void 0:d.lines)||[]){if(!d)break;let c;if(h.type===Qa.Header){const e=document.createElement("div");e.className="diff-review-row",e.setAttribute("role","listitem");const t=d.range,i=this._model.currentGroupIndex.get(),n=this._model.groups.get().length,o=e=>0===e?(0,Ue.NC)("no_lines_changed","no lines changed"):1===e?(0,Ue.NC)("one_line_changed","1 line changed"):(0,Ue.NC)("more_lines_changed","{0} lines changed",e),s=o(t.original.length),r=o(t.modified.length);e.setAttribute("aria-label",(0,Ue.NC)({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",i+1,n,t.original.startLineNumber,s,t.modified.startLineNumber,r));const a=document.createElement("div");a.className="diff-review-cell diff-review-summary",a.appendChild(document.createTextNode(`${i+1}/${n}: @@ -${t.original.startLineNumber},${t.original.length} +${t.modified.startLineNumber},${t.modified.length} @@`)),e.appendChild(a),c=e}else c=this._createRow(h,l,this._width.get(),t,o,r,i,s,a);n.appendChild(c);const u=(0,Da.nK)((e=>this._model.currentElement.read(e)===h));e.add((0,Da.EH)((e=>{const t=u.read(e);c.tabIndex=t?0:-1,t&&c.focus()}))),e.add((0,we.nm)(c,"focus",(()=>{this._model.goToLine(h)})))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,o,s,r,a,l){const d=n.get(142),h=d.glyphMarginWidth+d.lineNumbersWidth,c=r.get(142),u=10+c.glyphMarginWidth+c.lineNumbersWidth;let g="diff-review-row",p="",m=null;switch(e.type){case Qa.Added:g="diff-review-row line-insert",p=" char-insert",m=Ua;break;case Qa.Deleted:g="diff-review-row line-delete",p=" char-delete",m=ja}const f=document.createElement("div");f.style.minWidth=i+"px",f.className=g,f.setAttribute("role","listitem"),f.ariaLevel="";const _=document.createElement("div");_.className="diff-review-cell",_.style.height=`${t}px`,f.appendChild(_);const v=document.createElement("span");v.style.width=h+"px",v.style.minWidth=h+"px",v.className="diff-review-line-number"+p,void 0!==e.originalLineNumber?v.appendChild(document.createTextNode(String(e.originalLineNumber))):v.innerText=" ",_.appendChild(v);const b=document.createElement("span");b.style.width=u+"px",b.style.minWidth=u+"px",b.style.paddingRight="10px",b.className="diff-review-line-number"+p,void 0!==e.modifiedLineNumber?b.appendChild(document.createTextNode(String(e.modifiedLineNumber))):b.innerText=" ",_.appendChild(b);const C=document.createElement("span");if(C.className="diff-review-spacer",m){const e=document.createElement("span");e.className=Ie.k.asClassName(m),e.innerText="  ",C.appendChild(e)}else C.innerText="  ";let w;if(_.appendChild(C),void 0!==e.modifiedLineNumber){let t=this._getLineHtml(a,r,l.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);Je._ttPolicy&&(t=Je._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),w=a.getLineContent(e.modifiedLineNumber)}else{let t=this._getLineHtml(o,n,s.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);Je._ttPolicy&&(t=Je._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),w=o.getLineContent(e.originalLineNumber)}0===w.length&&(w=(0,Ue.NC)("blankLine","blank"));let y="";switch(e.type){case Qa.Unchanged:y=e.originalLineNumber===e.modifiedLineNumber?(0,Ue.NC)({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",w,e.originalLineNumber):(0,Ue.NC)("equalLine","{0} original line {1} modified line {2}",w,e.originalLineNumber,e.modifiedLineNumber);break;case Qa.Added:y=(0,Ue.NC)("insertLine","+ {0} modified line {1}",w,e.modifiedLineNumber);break;case Qa.Deleted:y=(0,Ue.NC)("deleteLine","- {0} original line {1}",w,e.originalLineNumber)}return f.setAttribute("aria-label",y),f}_getLineHtml(e,t,i,n,s){const r=e.getLineContent(n),a=t.get(49),l=$.A.createEmpty(r,s),d=Z.wA.isBasicASCII(r,e.mightContainNonBasicASCII()),h=Z.wA.containsRTL(r,d,e.mightContainRTL());return(0,q.tF)(new q.IJ(a.isMonospace&&!t.get(32),a.canUseHalfwidthRightwardsArrow,r,!1,d,h,0,l,[],i,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(115),t.get(97),t.get(92),t.get(50)!==o.n0.OFF,null)).html}};function nl(e,t){let i;for(const n of e)t(i,n),i=n;t(i,void 0)}il=za([Ka(5,V.O)],il);const ol=(0,je.q5)("diff-insert",Ne.l.add,(0,Ue.NC)("diffInsertIcon","Line decoration for inserts in the diff editor.")),sl=(0,je.q5)("diff-remove",Ne.l.remove,(0,Ue.NC)("diffRemoveIcon","Line decoration for removals in the diff editor.")),rl=gt.qx.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+Ie.k.asClassName(ol),marginClassName:"gutter-insert"}),al=gt.qx.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+Ie.k.asClassName(sl),marginClassName:"gutter-delete"}),ll=gt.qx.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),dl=gt.qx.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),hl=gt.qx.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),cl=gt.qx.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),ul=gt.qx.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),gl=gt.qx.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),pl=gt.qx.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),ml=gt.qx.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"}),fl=gt.qx.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new Ee.W5(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,Ue.NC)("revertChangeHoverMessage","Click to revert change")),glyphMarginClassName:"arrow-revert-change "+Ie.k.asClassName(Ne.l.arrowRight),zIndex:10001});class _l extends C.JT{constructor(e,t,i,n,o){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=o,this._originalScrollTop=(0,Da.rD)(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,Da.rD)(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._viewZonesChanged=(0,Da.aq)("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=(0,Da.uh)("width",0),this._modifiedViewZonesChangedSignal=(0,Da.aq)("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=(0,Da.aq)("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=(0,Da.Be)("state",((e,t)=>{var i;this._element.replaceChildren();const n=this._diffModel.read(e),o=null===(i=null==n?void 0:n.diff.read(e))||void 0===i?void 0:i.movedTexts;if(!o||0===o.length)return void this.width.set(0,void 0);this._viewZonesChanged.read(e);const s=this._originalEditorLayoutInfo.read(e),r=this._modifiedEditorLayoutInfo.read(e);if(!s||!r)return void this.width.set(0,void 0);this._modifiedViewZonesChangedSignal.read(e),this._originalViewZonesChangedSignal.read(e);const a=o.map((t=>{function i(e,t){return(t.getTopForLineNumber(e.startLineNumber,!0)+t.getTopForLineNumber(e.endLineNumberExclusive,!0))/2}const n=i(t.lineRangeMapping.original,this._editors.original),o=this._originalScrollTop.read(e),s=i(t.lineRangeMapping.modified,this._editors.modified),r=n-o,a=s-this._modifiedScrollTop.read(e),l=Math.min(n,s),d=Math.max(n,s);return{range:new Ha.q(l,d),from:r,to:a,fromWithoutScroll:n,toWithoutScroll:s,move:t}}));a.sort((0,fn.f_)((0,fn.tT)((e=>e.fromWithoutScroll>e.toWithoutScroll),fn.nW),(0,fn.tT)((e=>e.fromWithoutScroll>e.toWithoutScroll?e.fromWithoutScroll:-e.toWithoutScroll),fn.fv)));const l=vl.compute(a.map((e=>e.range))),d=s.verticalScrollbarWidth,h=10*(l.getTrackCount()-1)+20,c=d+h+(r.contentLeft-_l.movedCodeBlockPadding);let u=0;for(const e of a){const i=d+10+10*l.getTrack(u),o=15,s=15,a=c,h=r.glyphMarginWidth+r.lineNumbersWidth,g=18,p=document.createElementNS("http://www.w3.org/2000/svg","rect");p.classList.add("arrow-rectangle"),p.setAttribute("x",""+(a-h)),p.setAttribute("y",""+(e.to-g/2)),p.setAttribute("width",`${h}`),p.setAttribute("height",`${g}`),this._element.appendChild(p);const m=document.createElementNS("http://www.w3.org/2000/svg","g"),f=document.createElementNS("http://www.w3.org/2000/svg","path");f.setAttribute("d",`M 0 ${e.from} L ${i} ${e.from} L ${i} ${e.to} L ${a-s} ${e.to}`),f.setAttribute("fill","none"),m.appendChild(f);const _=document.createElementNS("http://www.w3.org/2000/svg","polygon");_.classList.add("arrow"),t.add((0,Da.EH)((t=>{f.classList.toggle("currentMove",e.move===n.activeMovedText.read(t)),_.classList.toggle("currentMove",e.move===n.activeMovedText.read(t))}))),_.setAttribute("points",`${a-s},${e.to-o/2} ${a},${e.to} ${a-s},${e.to+o/2}`),m.appendChild(_),this._element.appendChild(m),u++}this.width.set(h,void 0)})),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register((0,C.OF)((()=>this._element.remove()))),this._register((0,Da.EH)((e=>{const t=this._originalEditorLayoutInfo.read(e),i=this._modifiedEditorLayoutInfo.read(e);t&&i&&(this._element.style.left=t.width-t.verticalScrollbarWidth+"px",this._element.style.height=`${t.height}px`,this._element.style.width=`${t.verticalScrollbarWidth+t.contentLeft-_l.movedCodeBlockPadding+this.width.read(e)}px`)}))),this._register((0,Da.$g)(this._state,!0));const s=(0,Da.nK)((e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);return i?i.movedTexts.map((e=>({move:e,original:new Pa((0,Da.Dz)(e.lineRangeMapping.original.startLineNumber-1),18),modified:new Pa((0,Da.Dz)(e.lineRangeMapping.modified.startLineNumber-1),18)}))):[]}));this._register(Va(this._editors.original,s.map((e=>e.map((e=>e.original)))))),this._register(Va(this._editors.modified,s.map((e=>e.map((e=>e.modified)))))),this._register((0,Da.gp)(((e,t)=>{const i=s.read(e);for(const e of i)t.add(new bl(this._editors.original,e.original,e.move,"original",this._diffModel.get())),t.add(new bl(this._editors.modified,e.modified,e.move,"modified",this._diffModel.get()))})));const r=(0,Da.rD)(this._editors.original.onDidChangeCursorPosition,(()=>this._editors.original.getPosition())),a=(0,Da.rD)(this._editors.modified.onDidChangeCursorPosition,(()=>this._editors.modified.getPosition())),l=(0,Da.aq)("original.onDidFocusEditorWidget",(e=>this._editors.original.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0))))),d=(0,Da.aq)("modified.onDidFocusEditorWidget",(e=>this._editors.modified.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0)))));let h="modified";this._register((0,Da.nJ)({createEmptyChangeSummary:()=>{},handleChange:(e,t)=>(e.didChange(l)&&(h="original"),e.didChange(d)&&(h="modified"),!0)},(e=>{l.read(e),d.read(e);const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e);let n;if(i&&"original"===h){const t=r.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.original.contains(t.lineNumber))))}if(i&&"modified"===h){const t=a.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.modified.contains(t.lineNumber))))}n!==t.movedTextToCompare.get()&&t.movedTextToCompare.set(void 0,void 0),t.setActiveMovedText(n)})))}}_l.movedCodeBlockPadding=4;class vl{static compute(e){const t=[],i=[];for(const n of e){let e=t.findIndex((e=>!e.intersectsStrict(n)));if(-1===e){const i=6;t.length>=i?e=(0,fn.tQ)(t,(0,fn.tT)((e=>e.intersectWithRangeLength(n)),fn.fv)):(e=t.length,t.push(new Ha.M))}t[e].addRange(n),i.push(e)}return new vl(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class bl extends Oa{constructor(e,t,i,n,o){const s=(0,we.h)("div.diff-hidden-lines-widget");super(e,t,s.root),this._editor=e,this._move=i,this._kind=n,this._diffModel=o,this._nodes=(0,we.h)("div.diff-moved-code-block",{style:{marginRight:"4px"}},[(0,we.h)("div.text-content@textContent"),(0,we.h)("div.action-bar@actionBar")]),s.root.appendChild(this._nodes.root);const r=(0,Da.rD)(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));let a;this._register(Ba(this._nodes.root,{paddingRight:r.map((e=>e.verticalScrollbarWidth))})),a=i.changes.length>0?"original"===this._kind?(0,Ue.NC)("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive):(0,Ue.NC)("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive):"original"===this._kind?(0,Ue.NC)("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive):(0,Ue.NC)("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive);const l=this._register(new Fe.o(this._nodes.actionBar,{highlightToggledItems:!0})),d=new We.aU("",a,"",!1);l.push(d,{icon:!1,label:!0});const h=new We.aU("","Compare",Ie.k.asClassName(Ne.l.compareChanges),!0,(()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)}));this._register((0,Da.EH)((e=>{const t=this._diffModel.movedTextToCompare.read(e)===i;h.checked=t}))),l.push(h,{icon:!1,label:!0})}}class Cl extends C.JT{constructor(e,t,i){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=(0,Da.nK)((e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.diff.read(e);if(!i)return null;const n=this._diffModel.read(e).movedTextToCompare.read(e),o=this._options.renderIndicators.read(e),s=this._options.showEmptyDecorations.read(e),r=[],a=[];if(!n)for(const t of i.mappings){if(t.lineRangeMapping.originalRange.isEmpty||r.push({range:t.lineRangeMapping.originalRange.toInclusiveRange(),options:o?al:dl}),t.lineRangeMapping.modifiedRange.isEmpty||a.push({range:t.lineRangeMapping.modifiedRange.toInclusiveRange(),options:o?rl:ll}),t.lineRangeMapping.modifiedRange.isEmpty||t.lineRangeMapping.originalRange.isEmpty)t.lineRangeMapping.originalRange.isEmpty||r.push({range:t.lineRangeMapping.originalRange.toInclusiveRange(),options:pl}),t.lineRangeMapping.modifiedRange.isEmpty||a.push({range:t.lineRangeMapping.modifiedRange.toInclusiveRange(),options:cl});else for(const e of t.lineRangeMapping.innerChanges||[])t.lineRangeMapping.originalRange.contains(e.originalRange.startLineNumber)&&r.push({range:e.originalRange,options:e.originalRange.isEmpty()&&s?ml:gl}),t.lineRangeMapping.modifiedRange.contains(e.modifiedRange.startLineNumber)&&a.push({range:e.modifiedRange,options:e.modifiedRange.isEmpty()&&s?ul:hl});t.lineRangeMapping.modifiedRange.isEmpty||!this._options.shouldRenderRevertArrows.read(e)||n||a.push({range:D.e.fromPositions(new Ke.L(t.lineRangeMapping.modifiedRange.startLineNumber,1)),options:fl})}if(n)for(const e of n.changes){const t=e.originalRange.toInclusiveRange();t&&r.push({range:t,options:o?al:dl});const i=e.modifiedRange.toInclusiveRange();i&&a.push({range:i,options:o?rl:ll});for(const t of e.innerChanges||[])r.push({range:t.originalRange,options:gl}),a.push({range:t.modifiedRange,options:hl})}const l=this._diffModel.read(e).activeMovedText.read(e);for(const e of i.movedTexts)r.push({range:e.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(e===l?" currentMove":""),blockPadding:[_l.movedCodeBlockPadding,0,_l.movedCodeBlockPadding,_l.movedCodeBlockPadding]}}),a.push({range:e.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(e===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:r,modifiedDecorations:a}})),this._register(Ta(this._editors.original,this._decorations.map((e=>(null==e?void 0:e.originalDecorations)||[])))),this._register(Ta(this._editors.modified,this._decorations.map((e=>(null==e?void 0:e.modifiedDecorations)||[]))))}}class wl extends C.JT{constructor(e,t,i){super(),this._options=e,this._domNode=t,this._dimensions=i,this._sashRatio=(0,Da.uh)("sashRatio",void 0),this.sashLeft=(0,Da.nK)((e=>{var t;const i=null!==(t=this._sashRatio.read(e))&&void 0!==t?t:this._options.splitViewDefaultRatio.read(e);return this._computeSashLeft(i,e)})),this._sash=this._register(new Le.g(this._domNode,{getVerticalSashTop:e=>0,getVerticalSashLeft:e=>this.sashLeft.get(),getVerticalSashHeight:e=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart((()=>{this._startSashPosition=this.sashLeft.get()}))),this._register(this._sash.onDidChange((e=>{const t=this._dimensions.width.get(),i=this._computeSashLeft((this._startSashPosition+(e.currentX-e.startX))/t,void 0);this._sashRatio.set(i/t,void 0)}))),this._register(this._sash.onDidEnd((()=>this._sash.layout()))),this._register(this._sash.onDidReset((()=>this._sashRatio.set(void 0,void 0)))),this._register((0,Da.EH)((e=>{const t=this._options.enableSplitViewResizing.read(e);this._sash.state=t?3:0,this.sashLeft.read(e),this._sash.layout()})))}setBoundarySashes(e){this._sash.orthogonalEndSash=e.bottom}_computeSashLeft(e,t){const i=this._dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),o=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,s=100;return i<=200?n:o<s?s:o>i-s?i-s:o}}var yl=i(18790),Sl=i(2442),Ll=i(41574),xl=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class kl extends C.JT{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._isDiffUpToDate=(0,Da.uh)("isDiffUpToDate",!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,Da.uh)("diff",void 0),this.diff=this._diff,this._unchangedRegions=(0,Da.uh)("unchangedRegion",{regions:[],originalDecorationIds:[],modifiedDecorationIds:[]}),this.unchangedRegions=(0,Da.nK)((e=>this._options.hideUnchangedRegions.read(e)?this._unchangedRegions.read(e).regions:((0,Da.PS)((e=>{for(const t of this._unchangedRegions.get().regions)t.collapseAll(e)})),[]))),this.movedTextToCompare=(0,Da.uh)("movedTextToCompare",void 0),this._activeMovedText=(0,Da.uh)("activeMovedText",void 0),this._hoveredMovedText=(0,Da.uh)("hoveredMovedText",void 0),this.activeMovedText=(0,Da.nK)((e=>{var t,i;return null!==(i=null!==(t=this.movedTextToCompare.read(e))&&void 0!==t?t:this._hoveredMovedText.read(e))&&void 0!==i?i:this._activeMovedText.read(e)})),this._cancellationTokenSource=new ke.A,this._register((0,C.OF)((()=>this._cancellationTokenSource.cancel())));const n=(0,Da.GN)("contentChangedSignal"),o=this._register(new xe.pY((()=>n.trigger(void 0)),200)),s=(t,i,n)=>{const o=El.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsminimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n)),s=this._unchangedRegions.get(),r=s.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).filter((e=>!!e)).map((e=>ot.z.fromRange(e))),a=s.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).filter((e=>!!e)).map((e=>ot.z.fromRange(e))),l=e.original.deltaDecorations(s.originalDecorationIds,o.map((e=>({range:e.originalRange.toInclusiveRange(),options:{description:"unchanged"}})))),d=e.modified.deltaDecorations(s.modifiedDecorationIds,o.map((e=>({range:e.modifiedRange.toInclusiveRange(),options:{description:"unchanged"}}))));for(const e of o)for(let t=0;t<s.regions.length;t++)if(e.originalRange.intersectsStrict(r[t])&&e.modifiedRange.intersectsStrict(a[t])){e.setHiddenModifiedRange(s.regions[t].getHiddenModifiedRange(void 0),i);break}this._unchangedRegions.set({regions:o,originalDecorationIds:l,modifiedDecorationIds:d},i)};this._register(e.modified.onDidChangeContent((t=>{if(this._diff.get()){Sl.Q.fromModelContentChanges(t.changes);const i=(this._lastDiff,e.original,void e.modified);i&&(this._lastDiff=i,(0,Da.PS)((e=>{this._diff.set(Nl.fromDiffResult(this._lastDiff),e),s(i,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}o.schedule()}))),this._register(e.original.onDidChangeContent((t=>{if(this._diff.get()){Sl.Q.fromModelContentChanges(t.changes);const i=(this._lastDiff,e.original,void e.modified);i&&(this._lastDiff=i,(0,Da.PS)((e=>{this._diff.set(Nl.fromDiffResult(this._lastDiff),e),s(i,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}o.schedule()})));const r=(0,Da.aq)("documentDiffProviderOptionChanged",i.onDidChange);this._register((0,Da.gp)(((t,a)=>xl(this,void 0,void 0,(function*(){var l,d;this._options.hideUnchangedRegionsminimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),o.cancel(),n.read(t),r.read(t),Wa(yl.a7,t),this._isDiffUpToDate.set(!1,void 0);let h=[];a.add(e.original.onDidChangeContent((e=>{const t=Sl.Q.fromModelContentChanges(e.changes);h=(0,Ll.o)(h,t)})));let c=[];a.add(e.modified.onDidChangeContent((e=>{const t=Sl.Q.fromModelContentChanges(e.changes);c=(0,Ll.o)(c,t)})));let u=yield i.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||(u=null!==(e.original,l=void e.modified)&&void 0!==l?l:u,u=null!==(e.original,d=void e.modified)&&void 0!==d?d:u,(0,Da.PS)((e=>{s(u,e),this._lastDiff=u;const t=Nl.fromDiffResult(u);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);const i=this.movedTextToCompare.get();this.movedTextToCompare.set(i?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified))):void 0,e)})))})))))}ensureModifiedLineIsVisible(e,t){var i;if(0===(null===(i=this.diff.get())||void 0===i?void 0:i.mappings.length))return;const n=this._unchangedRegions.get().regions;for(const i of n)if(i.getHiddenModifiedRange(void 0).contains(e))return void i.showModifiedLine(e,t)}ensureOriginalLineIsVisible(e,t){var i;if(0===(null===(i=this.diff.get())||void 0===i?void 0:i.mappings.length))return;const n=this._unchangedRegions.get().regions;for(const i of n)if(i.getHiddenOriginalRange(void 0).contains(e))return void i.showOriginalLine(e,t)}waitForDiff(){return xl(this,void 0,void 0,(function*(){yield(0,Da.F_)(this.isDiffUpToDate,(e=>e))}))}serializeState(){return{collapsedRegions:this._unchangedRegions.get().regions.map((e=>({range:e.getHiddenModifiedRange(void 0).serialize()})))}}restoreSerializedState(e){const t=e.collapsedRegions.map((e=>ot.z.deserialize(e.range))),i=this._unchangedRegions.get();(0,Da.PS)((e=>{for(const n of i.regions)for(const i of t)if(n.modifiedRange.intersect(i)){n.setHiddenModifiedRange(i,e);break}}))}}class Nl{static fromDiffResult(e){return new Nl(e.changes.map((e=>new Dl(e))),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class Dl{constructor(e){this.lineRangeMapping=e}}class El{static fromDiffs(e,t,i,n,o){const s=st.f0.inverse(e,t,i),r=[];for(const e of s){let s=e.originalRange.startLineNumber,a=e.modifiedRange.startLineNumber,l=e.originalRange.length;const d=1===s&&1===a,h=s+l===t+1&&a+l===i+1;(d||h)&&l>=o+n?(d&&!h&&(l-=o),h&&!d&&(s+=o,a+=o,l-=o),r.push(new El(s,a,l,0,0))):l>=2*o+n&&(s+=o,a+=o,l-=2*o,r.push(new El(s,a,l,0,0)))}return r}get originalRange(){return ot.z.ofLength(this.originalLineNumber,this.lineCount)}get modifiedRange(){return ot.z.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,o){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=(0,Da.uh)("visibleLineCountTop",0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,Da.uh)("visibleLineCountBottom",0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,Da.nK)((e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e))),this.isDragged=(0,Da.uh)("isDragged",!1),this._visibleLineCountTop.set(n,void 0),this._visibleLineCountBottom.set(o,void 0)}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return ot.z.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return ot.z.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t){const i=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),n=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;i<n?this._visibleLineCountTop.set(this._visibleLineCountTop.get()+i,t):this._visibleLineCountBottom.set(this._visibleLineCountBottom.get()+n,t)}showOriginalLine(e,t){const i=e-this.originalLineNumber,n=this.originalLineNumber+this.lineCount-e;i<n?this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+n-i,this.getMaxVisibleLineCountTop()),t):this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+i-n,this.getMaxVisibleLineCountBottom()),t)}collapseAll(e){this._visibleLineCountTop.set(0,e),this._visibleLineCountBottom.set(0,e)}setState(e,t,i){e=Math.max(Math.min(e,this.lineCount),0),t=Math.max(Math.min(t,this.lineCount-e),0),this._visibleLineCountTop.set(e,i),this._visibleLineCountBottom.set(t,i)}}var Il=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Tl extends C.JT{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,t,i,n,o,s,r,a,l){super(),this._getViewZoneId=e,this._marginDomNode=t,this._modifiedEditor=i,this._diff=n,this._editor=o,this._viewLineCounts=s,this._originalTextModel=r,this._contextMenuService=a,this._clipboardService=l,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=Ie.k.asClassName(Ne.l.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const d=this._modifiedEditor.getOption(65);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${d}px`,this._diffActions.style.lineHeight=`${d}px`,this._marginDomNode.appendChild(this._diffActions);let h=0;const c=i.getOption(125)&&!Xe.gn,u=(e,t)=>{var o;this._contextMenuService.showContextMenu({domForShadowRoot:c&&null!==(o=i.getDomNode())&&void 0!==o?o:void 0,getAnchor:()=>({x:e,y:t}),getActions:()=>{const e=[],t=n.modifiedRange.isEmpty;return e.push(new We.aU("diff.clipboard.copyDeletedContent",t?n.originalRange.length>1?(0,Ue.NC)("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):(0,Ue.NC)("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):n.originalRange.length>1?(0,Ue.NC)("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):(0,Ue.NC)("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,(()=>Il(this,void 0,void 0,(function*(){const e=this._originalTextModel.getValueInRange(n.originalRange.toExclusiveRange());yield this._clipboardService.writeText(e)}))))),n.originalRange.length>1&&e.push(new We.aU("diff.clipboard.copyDeletedLineContent",t?(0,Ue.NC)("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalRange.startLineNumber+h):(0,Ue.NC)("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalRange.startLineNumber+h),void 0,!0,(()=>Il(this,void 0,void 0,(function*(){let e=this._originalTextModel.getLineContent(n.originalRange.startLineNumber+h);""===e&&(e=0===this._originalTextModel.getEndOfLineSequence()?"\n":"\r\n"),yield this._clipboardService.writeText(e)}))))),i.getOption(89)||e.push(new We.aU("diff.inline.revertChange",(0,Ue.NC)("diff.inline.revertChange.label","Revert this change"),void 0,!0,(()=>Il(this,void 0,void 0,(function*(){this._editor.revert(this._diff)}))))),e},autoSelectFirstItem:!0})};this._register((0,we.mu)(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=(0,we.i)(this._diffActions),n=Math.floor(d/3);e.preventDefault(),u(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId!==this._getViewZoneId()?this.visibility=!1:(h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),this.visibility=!0)}))),this._register(i.onMouseDown((e=>{!e.event.rightButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._getViewZoneId()&&(e.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),u(e.event.posx,e.event.posy+d))})))}_updateLightBulbPosition(e,t,i){const{top:n}=(0,we.i)(e),o=t-n,s=Math.floor(o/i),r=s*i;if(this._diffActions.style.top=`${r}px`,this._viewLineCounts){let e=0;for(let t=0;t<this._viewLineCounts.length;t++)if(e+=this._viewLineCounts[t],s<e)return t}return s}}const Ml=It;function Rl(e,t,i,n){(0,Re.N)(n,t.fontInfo);const o=i.length>0,s=new ct.HT(1e4);let r=0,a=0;const l=[];for(let n=0;n<e.lineTokens.length;n++){const d=n+1,h=e.lineTokens[n],c=e.lineBreakData[n],u=pt.Kp.filter(i,d,1,Number.MAX_SAFE_INTEGER);if(c){let i=0;for(const n of c.breakOffsets){const l=h.sliceAndInflate(i,n,0);r=Math.max(r,Pl(a,l,pt.Kp.extractWrapped(u,i,n),o,e.mightContainNonBasicASCII,e.mightContainRTL,t,s)),a++,i=n}l.push(c.breakOffsets.length)}else l.push(1),r=Math.max(r,Pl(a,h,u,o,e.mightContainNonBasicASCII,e.mightContainRTL,t,s)),a++}r+=t.scrollBeyondLastColumn;const d=s.build(),h=Ml?Ml.createHTML(d):d;return n.innerHTML=h,{heightInLines:a,minWidthInPx:r*t.typicalHalfwidthCharacterWidth,viewLineCounts:l}}class Al{constructor(e,t,i,n){this.lineTokens=e,this.lineBreakData=t,this.mightContainNonBasicASCII=i,this.mightContainRTL=n}}class Ol{static fromEditor(e){var t;const i=e.getOptions(),n=i.get(49),o=i.get(142);return new Ol((null===(t=e.getModel())||void 0===t?void 0:t.getOptions().tabSize)||0,n,i.get(32),n.typicalHalfwidthCharacterWidth,i.get(102),i.get(65),o.decorationsWidth,i.get(115),i.get(97),i.get(92),i.get(50))}constructor(e,t,i,n,o,s,r,a,l,d,h){this.tabSize=e,this.fontInfo=t,this.disableMonospaceOptimizations=i,this.typicalHalfwidthCharacterWidth=n,this.scrollBeyondLastColumn=o,this.lineHeight=s,this.lineDecorationsWidth=r,this.stopRenderingLineAfter=a,this.renderWhitespace=l,this.renderControlCharacters=d,this.fontLigatures=h}}function Pl(e,t,i,n,s,r,a,l){l.appendString('<div class="view-line'),n||l.appendString(" char-delete"),l.appendString('" style="top:'),l.appendString(String(e*a.lineHeight)),l.appendString('px;width:1000000px;">');const d=t.getLineContent(),h=Z.wA.isBasicASCII(d,s),c=Z.wA.containsRTL(d,h,r),u=(0,q.d1)(new q.IJ(a.fontInfo.isMonospace&&!a.disableMonospaceOptimizations,a.fontInfo.canUseHalfwidthRightwardsArrow,d,!1,h,c,0,t,i,a.tabSize,0,a.fontInfo.spaceWidth,a.fontInfo.middotWidth,a.fontInfo.wsmiddotWidth,a.stopRenderingLineAfter,a.renderWhitespace,a.renderControlCharacters,a.fontLigatures!==o.n0.OFF,null),l);return l.appendString("</div>"),u.characterMapping.getHorizontalOffset(u.characterMapping.length)}var Fl=function(e,t){return function(i,n){t(i,n,e)}};let Bl=class extends C.JT{constructor(e,t,i,n,o,s,r){super(),this._editors=e,this._diffModel=t,this._options=i,this._diffEditorWidget=n,this._canIgnoreViewZoneUpdateEvent=o,this._clipboardService=s,this._contextMenuService=r,this._originalTopPadding=(0,Da.uh)("originalTopPadding",0),this._originalScrollOffset=(0,Da.uh)("originalScrollOffset",0),this._originalScrollOffsetAnimated=Aa(this._originalScrollOffset,this._store),this._modifiedTopPadding=(0,Da.uh)("modifiedTopPadding",0),this._modifiedScrollOffset=(0,Da.uh)("modifiedScrollOffset",0),this._modifiedScrollOffsetAnimated=Aa(this._modifiedScrollOffset,this._store);let a=!1;const l=(0,Da.uh)("state",0),d=this._register(new xe.pY((()=>{l.set(l.get()+1,void 0)}),0));this._register(this._editors.original.onDidChangeViewZones((e=>{a||this._canIgnoreViewZoneUpdateEvent()||d.schedule()}))),this._register(this._editors.modified.onDidChangeViewZones((e=>{a||this._canIgnoreViewZoneUpdateEvent()||d.schedule()}))),this._register(this._editors.original.onDidChangeConfiguration((e=>{(e.hasChanged(143)||e.hasChanged(65))&&d.schedule()}))),this._register(this._editors.modified.onDidChangeConfiguration((e=>{(e.hasChanged(143)||e.hasChanged(65))&&d.schedule()})));const h=this._diffModel.map((e=>e?(0,Da.rD)(e.model.original.onDidChangeTokens,(()=>2===e.model.original.tokenization.backgroundTokenizationState)):void 0)).map(((e,t)=>null==e?void 0:e.read(t))),c=new Set,u=new Set,g=(0,Da.nK)((e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);if(!t||!i)return null;l.read(e);const n=this._options.renderSideBySide.read(e);return Wl(this._editors.original,this._editors.modified,i.mappings,c,u,n)})),p=(0,Da.nK)((e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e);if(!i)return null;l.read(e);const n=i.changes.map((e=>new Dl(e)));return Wl(this._editors.original,this._editors.modified,n,c,u,!0)}));function m(){const e=document.createElement("div");return e.className="diagonal-fill",e}const f=this._register(new C.SL),_=(0,Da.nK)((e=>{var t,i,n,o,s,r,a,l;f.clear();const d=g.read(e)||[],c=[],u=[],_=this._modifiedTopPadding.read(e);_>0&&u.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:_,showInHiddenAreas:!0});const v=this._originalTopPadding.read(e);v>0&&c.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:v,showInHiddenAreas:!0});const b=this._options.renderSideBySide.read(e),C=b||null===(t=this._editors.modified._getViewModel())||void 0===t?void 0:t.createLineBreaksComputer();if(C)for(const D of d)if(D.diff)for(let E=D.originalRange.startLineNumber;E<D.originalRange.endLineNumberExclusive;E++)null==C||C.addRequest(this._editors.original.getModel().getLineContent(E),null,null);const w=null!==(i=null==C?void 0:C.finalize())&&void 0!==i?i:[];let y=0;const S=this._editors.modified.getOption(65),L=null===(n=this._diffModel.read(e))||void 0===n?void 0:n.movedTextToCompare.read(e),x=null!==(s=null===(o=this._editors.original.getModel())||void 0===o?void 0:o.mightContainNonBasicASCII())&&void 0!==s&&s,k=null!==(a=null===(r=this._editors.original.getModel())||void 0===r?void 0:r.mightContainRTL())&&void 0!==a&&a,N=Ol.fromEditor(this._editors.modified);for(const I of d)if(I.diff&&!b){if(!I.originalRange.isEmpty){h.read(e);const M=document.createElement("div");M.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const R=new Al(I.originalRange.mapToLineArray((e=>this._editors.original.getModel().tokenization.getLineTokens(e))),I.originalRange.mapToLineArray((e=>w[y++])),x,k),A=[];for(const B of I.diff.innerChanges||[])A.push(new Z.$t(B.originalRange.delta(-(I.diff.originalRange.startLineNumber-1)),gl.className,0));const O=Rl(R,N,A,M),P=document.createElement("div");if(P.className="inline-deleted-margin-view-zone",(0,Re.N)(P,N.fontInfo),this._options.renderIndicators.read(e))for(let W=0;W<O.heightInLines;W++){const V=document.createElement("div");V.className=`delete-sign ${Ie.k.asClassName(sl)}`,V.setAttribute("style",`position:absolute;top:${W*S}px;width:${N.lineDecorationsWidth}px;height:${S}px;right:0;`),P.appendChild(V)}let F;f.add(new Tl((()=>(0,_n.cW)(F)),P,this._editors.modified,I.diff,this._diffEditorWidget,O.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let H=0;H<O.viewLineCounts.length;H++){const z=O.viewLineCounts[H];z>1&&c.push({afterLineNumber:I.originalRange.startLineNumber+H,domNode:m(),heightInPx:(z-1)*S,showInHiddenAreas:!0})}u.push({afterLineNumber:I.modifiedRange.startLineNumber-1,domNode:M,heightInPx:O.heightInLines*S,minWidthInPx:O.minWidthInPx,marginDomNode:P,setZoneId(e){F=e},showInHiddenAreas:!0})}const T=document.createElement("div");T.className="gutter-delete",c.push({afterLineNumber:I.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:I.modifiedHeightInPx,marginDomNode:T,showInHiddenAreas:!0})}else{const K=I.modifiedHeightInPx-I.originalHeightInPx;if(K>0){if(null==L?void 0:L.lineRangeMapping.original.delta(-1).deltaLength(2).contains(I.originalRange.endLineNumberExclusive-1))continue;c.push({afterLineNumber:I.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:K,showInHiddenAreas:!0})}else{if(null==L?void 0:L.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(I.modifiedRange.endLineNumberExclusive-1))continue;function U(){const e=document.createElement("div");return e.className="arrow-revert-change "+Ie.k.asClassName(Ne.l.arrowRight),(0,we.$)("div",{},e)}let j;I.diff&&I.diff.modifiedRange.isEmpty&&this._options.shouldRenderRevertArrows.read(e)&&(j=U()),u.push({afterLineNumber:I.modifiedRange.endLineNumberExclusive-1,domNode:m(),heightInPx:-K,marginDomNode:j,showInHiddenAreas:!0})}}for(const $ of null!==(l=p.read(e))&&void 0!==l?l:[]){if(!(null==L?void 0:L.lineRangeMapping.original.intersect($.originalRange))||!(null==L?void 0:L.lineRangeMapping.modified.intersect($.modifiedRange)))continue;const q=$.modifiedHeightInPx-$.originalHeightInPx;q>0?c.push({afterLineNumber:$.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:q,showInHiddenAreas:!0}):u.push({afterLineNumber:$.modifiedRange.endLineNumberExclusive-1,domNode:m(),heightInPx:-q,showInHiddenAreas:!0})}return{orig:c,mod:u}}));this._register((0,Da.gp)((e=>{const t=Pe.Z.capture(this._editors.modified),i=_.read(e);a=!0,this._editors.original.changeViewZones((e=>{for(const t of c)e.removeZone(t);c.clear();for(const t of i.orig){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),c.add(i)}})),this._editors.modified.changeViewZones((e=>{for(const t of u)e.removeZone(t);u.clear();for(const t of i.mod){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),u.add(i)}})),a=!1,t.restore(this._editors.modified)}))),this._register((0,C.OF)((()=>{this._editors.original.changeViewZones((e=>{for(const t of c)e.removeZone(t);c.clear()})),this._editors.modified.changeViewZones((e=>{for(const t of u)e.removeZone(t);u.clear()}))})));let v=!1;this._register(this._editors.original.onDidScrollChange((e=>{e.scrollLeftChanged&&!v&&(v=!0,this._editors.modified.setScrollLeft(e.scrollLeft),v=!1)}))),this._register(this._editors.modified.onDidScrollChange((e=>{e.scrollLeftChanged&&!v&&(v=!0,this._editors.original.setScrollLeft(e.scrollLeft),v=!1)}))),this._originalScrollTop=(0,Da.rD)(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,Da.rD)(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._register((0,Da.EH)((e=>{const t=this._originalScrollTop.read(e)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(e))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(e));t!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(t,1)}))),this._register((0,Da.EH)((e=>{const t=this._modifiedScrollTop.read(e)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(e))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(e));t!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(t,1)}))),this._register((0,Da.EH)((e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e);let n=0;if(i){const e=this._editors.original.getTopForLineNumber(i.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();n=this._editors.modified.getTopForLineNumber(i.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-e}n>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(n,void 0)):n<0?(this._modifiedTopPadding.set(-n,void 0),this._originalTopPadding.set(0,void 0)):setTimeout((()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)}),400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-n,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+n,void 0,!0)})))}};function Wl(e,t,i,n,o,s){const r=new fn.H9(Vl(e,n)),a=new fn.H9(Vl(t,o)),l=e.getOption(65),d=t.getOption(65),h=[];let c=0,u=0;function g(e,t){for(;;){let i=r.peek(),n=a.peek();if(i&&i.lineNumber>=e&&(i=void 0),n&&n.lineNumber>=t&&(n=void 0),!i&&!n)break;const o=i?i.lineNumber-c:Number.MAX_VALUE,s=n?n.lineNumber-u:Number.MAX_VALUE;o<s?(r.dequeue(),n={lineNumber:i.lineNumber-c+u,heightInPx:0}):o>s?(a.dequeue(),i={lineNumber:n.lineNumber-u+c,heightInPx:0}):(r.dequeue(),a.dequeue()),h.push({originalRange:ot.z.ofLength(i.lineNumber,1),modifiedRange:ot.z.ofLength(n.lineNumber,1),originalHeightInPx:l+i.heightInPx,modifiedHeightInPx:d+n.heightInPx,diff:void 0})}}for(const p of i){const m=p.lineRangeMapping;g(m.originalRange.startLineNumber,m.modifiedRange.startLineNumber);let f=!0,_=m.modifiedRange.startLineNumber,v=m.originalRange.startLineNumber;function b(e,t){var i,n,o,s;if(e<v||t<_)return;if(f)f=!1;else if(e===v||t===_)return;const c=new ot.z(v,e),u=new ot.z(_,t);if(c.isEmpty&&u.isEmpty)return;const g=null!==(n=null===(i=r.takeWhile((t=>t.lineNumber<e)))||void 0===i?void 0:i.reduce(((e,t)=>e+t.heightInPx),0))&&void 0!==n?n:0,m=null!==(s=null===(o=a.takeWhile((e=>e.lineNumber<t)))||void 0===o?void 0:o.reduce(((e,t)=>e+t.heightInPx),0))&&void 0!==s?s:0;h.push({originalRange:c,modifiedRange:u,originalHeightInPx:c.length*l+g,modifiedHeightInPx:u.length*d+m,diff:p.lineRangeMapping}),v=e,_=t}if(s)for(const C of m.innerChanges||[])C.originalRange.startColumn>1&&C.modifiedRange.startColumn>1&&b(C.originalRange.startLineNumber,C.modifiedRange.startLineNumber),C.originalRange.endColumn<e.getModel().getLineMaxColumn(C.originalRange.endLineNumber)&&b(C.originalRange.endLineNumber,C.modifiedRange.endLineNumber);b(m.originalRange.endLineNumberExclusive,m.modifiedRange.endLineNumberExclusive),c=m.originalRange.endLineNumberExclusive,u=m.modifiedRange.endLineNumberExclusive}return g(Number.MAX_VALUE,Number.MAX_VALUE),h}function Vl(e,t){const i=[],n=[],o=-1!==e.getOption(143).wrappingColumn,s=e._getViewModel().coordinatesConverter,r=e.getOption(65);if(o)for(let t=1;t<=e.getModel().getLineCount();t++){const e=s.getModelLineViewLineCount(t);e>1&&n.push({lineNumber:t,heightInPx:r*(e-1)})}for(const n of e.getWhitespaces()){if(t.has(n.id))continue;const e=0===n.afterLineNumber?0:s.convertViewPositionToModelPosition(new Ke.L(n.afterLineNumber,1)).lineNumber;i.push({lineNumber:e,heightInPx:n.height})}return function(e,t,i,n){if(0===e.length)return t;if(0===t.length)return e;const o=[];let s=0,r=0;for(;s<e.length&&r<t.length;){const n=e[s],d=t[r],h=i(n),c=i(d);h<c?(o.push(n),s++):h>c?(o.push(d),r++):(o.push((l=d,{lineNumber:(a=n).lineNumber,heightInPx:a.heightInPx+l.heightInPx})),s++,r++)}for(var a,l;s<e.length;)o.push(e[s]),s++;for(;r<t.length;)o.push(t[r]),r++;return o}(i,n,(e=>e.lineNumber))}Bl=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Fl(5,ft.p),Fl(6,vt.i)],Bl);var Hl,zl=i(51203);let Kl=Hl=class extends C.JT{constructor(e,t,i,n,o,s,r,a){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=n,this._rootHeight=o,this._modifiedEditorLayoutInfo=s,this._options=r,this._themeService=a;const l=(0,Da.rD)(this._themeService.onDidColorThemeChange,(()=>this._themeService.getColorTheme())),d=(0,Da.nK)((e=>{const t=l.read(e);return{insertColor:t.getColor(St.P6Y)||(t.getColor(St.ypS)||St.CzK).transparent(2),removeColor:t.getColor(St.F9q)||(t.getColor(St.P4M)||St.keg).transparent(2)}})),h=(0,Da.rD)(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),c=(0,Da.rD)(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollHeight()));this._register((0,Da.gp)(((e,t)=>{if(!this._options.renderOverviewRuler.read(e))return;const i=(0,ye.X)(document.createElement("div"));i.setClassName("diffViewport"),i.setPosition("absolute");const n=(0,we.h)("div.diffOverview",{style:{position:"absolute",top:"0px",width:Hl.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;t.add(Ma(n,i.domNode)),t.add((0,we.mu)(n,we.tw.POINTER_DOWN,(e=>{this._editors.modified.delegateVerticalScrollbarPointerDown(e)}))),t.add((0,we.nm)(n,we.tw.MOUSE_WHEEL,(e=>{this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1})),t.add(Ma(this._rootElement,n)),t.add((0,Da.gp)(((e,t)=>{const o=this._diffModel.read(e),s=this._editors.original.createOverviewRuler("original diffOverviewRuler");s&&(t.add(s),t.add(Ma(n,s.getDomNode())));const r=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(r&&(t.add(r),t.add(Ma(n,r.getDomNode()))),!s||!r)return;const a=(0,Da.aq)("viewZoneChanged",this._editors.original.onDidChangeViewZones),l=(0,Da.aq)("viewZoneChanged",this._editors.modified.onDidChangeViewZones),u=(0,Da.aq)("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),g=(0,Da.aq)("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);t.add((0,Da.EH)((e=>{var t;a.read(e),l.read(e),u.read(e),g.read(e);const i=d.read(e),n=null===(t=null==o?void 0:o.diff.read(e))||void 0===t?void 0:t.mappings;function h(e,t,i){const n=i._getViewModel();return n?e.filter((e=>e.length>0)).map((e=>{const i=n.coordinatesConverter.convertModelPositionToViewPosition(new Ke.L(e.startLineNumber,1)),o=n.coordinatesConverter.convertModelPositionToViewPosition(new Ke.L(e.endLineNumberExclusive,1)),s=o.lineNumber-i.lineNumber;return new mt.EY(i.lineNumber,o.lineNumber,s,t.toString())})):[]}const c=h((n||[]).map((e=>e.lineRangeMapping.originalRange)),i.removeColor,this._editors.original),p=h((n||[]).map((e=>e.lineRangeMapping.modifiedRange)),i.insertColor,this._editors.modified);null==s||s.setZones(c),null==r||r.setZones(p)}))),t.add((0,Da.EH)((e=>{const t=this._rootHeight.read(e),o=this._rootWidth.read(e),a=this._modifiedEditorLayoutInfo.read(e);if(a){const n=Hl.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Hl.ONE_OVERVIEW_WIDTH;s.setLayout({top:0,height:t,right:n+Hl.ONE_OVERVIEW_WIDTH,width:Hl.ONE_OVERVIEW_WIDTH}),r.setLayout({top:0,height:t,right:0,width:Hl.ONE_OVERVIEW_WIDTH});const o=h.read(e),l=c.read(e),d=this._editors.modified.getOption(101),u=new zl.M(d.verticalHasArrows?d.arrowSize:0,d.verticalScrollbarSize,0,a.height,l,o);i.setTop(u.getSliderPosition()),i.setHeight(u.getSliderSize())}else i.setTop(0),i.setHeight(0);n.style.height=t+"px",n.style.left=o-Hl.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",i.setWidth(Hl.ENTIRE_DIFF_OVERVIEW_WIDTH)})))})))})))}};Kl.ONE_OVERVIEW_WIDTH=15,Kl.ENTIRE_DIFF_OVERVIEW_WIDTH=2*Hl.ONE_OVERVIEW_WIDTH,Kl=Hl=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(7,Lt.XE)],Kl);class Ul{remove(){var e;null===(e=this.parent)||void 0===e||e.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class jl extends Ul{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class $l extends Ul{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class ql extends Ul{static create(e,t,i){const n=new ke.A(i),o=new ql(t.uri),s=e.ordered(t),r=s.map(((e,i)=>{var s;const r=Ul.findId(`provider_${i}`,o),a=new $l(r,o,null!==(s=e.displayName)&&void 0!==s?s:"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,n.token)).then((e=>{for(const t of e||[])ql._makeOutlineElement(t,a);return a}),(e=>((0,De.Cp)(e),a))).then((e=>{Ul.empty(e)?e.remove():o._groups.set(r,e)}))})),a=e.onDidChange((()=>{const i=e.ordered(t);(0,fn.fS)(i,s)||n.cancel()}));return Promise.all(r).then((()=>n.token.isCancellationRequested&&!i.isCancellationRequested?ql.create(e,t,i):o._compact())).finally((()=>{a.dispose()}))}static _makeOutlineElement(e,t){const i=Ul.findId(e,t),n=new jl(i,t,e);if(e.children)for(const t of e.children)ql._makeOutlineElement(t,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=Or.$.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof jl?e.push(t.symbol):e.push(...Or.$.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>D.e.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return ql._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>Ke.L.compare(D.e.getStartPosition(e.range),D.e.getStartPosition(t.range))||Ke.L.compare(D.e.getEndPosition(t.range),D.e.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&ql._flattenDocumentSymbols(e,n.children,n.name)}}var Zl=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Gl=function(e,t){return function(i,n){t(i,n,e)}};let Ql=class extends C.JT{get isUpdatingViewZones(){return this._isUpdatingViewZones}constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._languageFeaturesService=n,this._isUpdatingViewZones=!1,this._modifiedModel=(0,Da.rD)(this._editors.modified.onDidChangeModel,(()=>this._editors.modified.getModel())),this._modifiedOutlineSource=(0,Da.Be)("modified outline source",((e,t)=>{const i=this._modifiedModel.read(e);if(i)return t.add(new Jl(this._languageFeaturesService,i))})),this._register(this._editors.original.onDidChangeCursorPosition((e=>{if(3===e.reason){const e=this._diffModel.get();(0,Da.PS)((t=>{for(const i of this._editors.original.getSelections()||[])null==e||e.ensureOriginalLineIsVisible(i.getStartPosition().lineNumber,t),null==e||e.ensureOriginalLineIsVisible(i.getEndPosition().lineNumber,t)}))}}))),this._register(this._editors.modified.onDidChangeCursorPosition((e=>{if(3===e.reason){const e=this._diffModel.get();(0,Da.PS)((t=>{for(const i of this._editors.modified.getSelections()||[])null==e||e.ensureModifiedLineIsVisible(i.getStartPosition().lineNumber,t),null==e||e.ensureModifiedLineIsVisible(i.getEndPosition().lineNumber,t)}))}})));const o=this._diffModel.map(((e,t)=>{var i,n;return 0===(null===(i=null==e?void 0:e.diff.read(t))||void 0===i?void 0:i.mappings.length)?[]:null!==(n=null==e?void 0:e.unchangedRegions.read(t))&&void 0!==n?n:[]})),s=(0,Da.Be)("view zones",((e,t)=>{const i=[],n=[],s=this._options.renderSideBySide.read(e),r=this._modifiedOutlineSource.read(e);if(!r)return{origViewZones:i,modViewZones:n};const a=o.read(e);for(const o of a)if(!o.shouldHideControls(e)){{const e=(0,Da.nK)((e=>o.getHiddenOriginalRange(e).startLineNumber-1)),n=new Pa(e,24);i.push(n),t.add(new Xl(this._editors.original,n,o,o.originalRange,!s,r,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,void 0)),this._options))}{const e=(0,Da.nK)((e=>o.getHiddenModifiedRange(e).startLineNumber-1)),i=new Pa(e,24);n.push(i),t.add(new Xl(this._editors.modified,i,o,o.modifiedRange,!1,r,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,void 0)),this._options))}}return{origViewZones:i,modViewZones:n}})),r={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new Ee.W5(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,Ue.NC)("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+Ie.k.asClassName(Ne.l.fold),zIndex:10001};this._register(Ta(this._editors.original,(0,Da.nK)((e=>{const t=o.read(e),i=t.map((e=>({range:e.originalRange.toInclusiveRange(),options:r})));for(const n of t)n.shouldHideControls(e)&&i.push({range:D.e.fromPositions(new Ke.L(n.originalLineNumber,1)),options:a});return i})))),this._register(Ta(this._editors.modified,(0,Da.nK)((e=>{const t=o.read(e),i=t.map((e=>({range:e.modifiedRange.toInclusiveRange(),options:r})));for(const n of t)n.shouldHideControls(e)&&i.push({range:ot.z.ofLength(n.modifiedLineNumber,1).toInclusiveRange(),options:a});return i})))),this._register(Va(this._editors.original,s.map((e=>e.origViewZones)),(e=>this._isUpdatingViewZones=e))),this._register(Va(this._editors.modified,s.map((e=>e.modViewZones)),(e=>this._isUpdatingViewZones=e))),this._register((0,Da.EH)((e=>{const t=o.read(e);this._editors.original.setHiddenAreas(t.map((t=>t.getHiddenOriginalRange(e).toInclusiveRange())).filter(_n.$K)),this._editors.modified.setHiddenAreas(t.map((t=>t.getHiddenModifiedRange(e).toInclusiveRange())).filter(_n.$K))}))),this._register(this._editors.modified.onMouseUp((e=>{var t;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("fold-unchanged"))){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.modifiedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}}))),this._register(this._editors.original.onMouseUp((e=>{var t;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("fold-unchanged"))){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.originalRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}})))}};Ql=Zl([Gl(3,an.p)],Ql);class Yl extends ke.A{dispose(){super.dispose(!0)}}let Jl=class extends C.JT{constructor(e,t){super(),this._languageFeaturesService=e,this._textModel=t,this._currentModel=(0,Da.uh)("current model",void 0);const i=(0,Da.aq)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),n=(0,Da.aq)("_textModel.onDidChangeContent",k.ju.debounce((e=>this._textModel.onDidChangeContent(e)),(()=>{}),100));this._register((0,Da.gp)(((e,t)=>{return o=this,s=void 0,a=function*(){i.read(e),n.read(e);const o=t.add(new Yl),s=yield ql.create(this._languageFeaturesService.documentSymbolProvider,this._textModel,o.token);t.isDisposed||this._currentModel.set(s,void 0)},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function n(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,n)}l((a=a.apply(o,s||[])).next())}));var o,s,r,a})))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const n=i.asListOfDocumentSymbols().filter((t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber)));return n.sort((0,fn.BV)((0,fn.tT)((e=>e.range.endLineNumber-e.range.startLineNumber),fn.fv))),n.map((e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber})))}};Jl=Zl([Gl(0,an.p)],Jl);class Xl extends Oa{constructor(e,t,i,n,o,s,r,a){const l=(0,we.h)("div.diff-hidden-lines-widget");super(e,t,l.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this.hide=o,this._modifiedOutlineSource=s,this._revealModifiedHiddenLine=r,this._options=a,this._nodes=(0,we.h)("div.diff-hidden-lines",[(0,we.h)("div.top@top",{title:(0,Ue.NC)("diff.hiddenLines.top","Click or drag to show more above")}),(0,we.h)("div.center@content",{style:{display:"flex"}},[(0,we.h)("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[(0,we.$)("a",{title:(0,Ue.NC)("showAll","Show all"),role:"button",onclick:()=>{this.showAll()}},...(0,Bs.T)("$(unfold)"))]),(0,we.h)("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),(0,we.h)("div.bottom@bottom",{title:(0,Ue.NC)("diff.bottom","Click or drag to show more below"),role:"button"})]),l.root.appendChild(this._nodes.root);const d=(0,Da.rD)(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));this.hide?(0,we.mc)(this._nodes.first):this._register(Ba(this._nodes.first,{width:d.map((e=>e.contentLeft))}));const h=this._editor;this._register((0,we.nm)(this._nodes.top,"mousedown",(e=>{if(0!==e.button)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set(!0,void 0);const o=(0,we.nm)(window,"mousemove",(e=>{const o=e.clientY-t;i=i||Math.abs(o)>2;const s=Math.round(o/h.getOption(65)),r=Math.max(0,Math.min(n+s,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(r,void 0)})),s=(0,we.nm)(window,"mouseup",(e=>{i||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(!1,void 0),o.dispose(),s.dispose()}))}))),this._register((0,we.nm)(this._nodes.bottom,"mousedown",(e=>{if(0!==e.button)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set(!0,void 0);const o=(0,we.nm)(window,"mousemove",(e=>{const o=e.clientY-t;i=i||Math.abs(o)>2;const s=Math.round(o/h.getOption(65)),r=Math.max(0,Math.min(n-s,this._unchangedRegion.getMaxVisibleLineCountBottom())),a=h.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(r,void 0);const l=h.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);h.setScrollTop(h.getScrollTop()+(l-a))})),s=(0,we.nm)(window,"mouseup",(e=>{if(this._unchangedRegion.isDragged.set(!1,void 0),!i){const e=h.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const t=h.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);h.setScrollTop(h.getScrollTop()+(t-e))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),o.dispose(),s.dispose()}))}))),this._register((0,Da.EH)((e=>{const t=[];if(!this.hide){const n=i.getHiddenModifiedRange(e).length,o=(0,Ue.NC)("hiddenLines","{0} hidden lines",n),s=(0,we.$)("span",{title:(0,Ue.NC)("diff.hiddenLines.expandAll","Double click to unfold")},o);s.addEventListener("dblclick",(e=>{0===e.button&&(e.preventDefault(),this.showAll())})),t.push(s);const r=this._unchangedRegion.getHiddenModifiedRange(e),a=this._modifiedOutlineSource.getBreadcrumbItems(r,e);if(a.length>0){t.push((0,we.$)("span",void 0,"  |  "));for(let e=0;e<a.length;e++){const i=a[e],n=F.uZ.toIcon(i.kind),o=(0,we.h)("div.breadcrumb-item",{style:{display:"flex",alignItems:"center"}},[(0,Bs.h)(n)," ",i.name,...e===a.length-1?[]:[(0,Bs.h)(Ne.l.chevronRight)]]).root;t.push(o),o.onclick=()=>{this._revealModifiedHiddenLine(i.startLineNumber)}}}}(0,we.mc)(this._nodes.others,...t)})))}showAll(){this._unchangedRegion.showAll(void 0)}}(0,St.P6G)("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},(0,Ue.NC)("diffEditor.move.border","The border color for text that got moved in the diff editor.")),(0,St.P6G)("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},(0,Ue.NC)("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor."));class ed extends C.JT{constructor(){super(...arguments),this._id=++ed.idCounter,this._onDidDispose=this._register(new k.Q5),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}ed.idCounter=0;var td=function(e,t){return function(i,n){t(i,n,e)}};let id=class extends C.JT{constructor(e,t,i,n,o,s,r){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._createInnerEditor=o,this._instantiationService=s,this._keybindingService=r,this._onDidContentSizeChange=this._register(new k.Q5),this.original=this._register(this._createLeftHandSideEditor(i.editorOptions.get(),n.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(i.editorOptions.get(),n.modifiedEditor||{})),this._register((0,Da.nJ)({createEmptyChangeSummary:()=>({}),handleChange:(e,t)=>(e.didChange(i.editorOptions)&&Object.assign(t,e.change.changedOptions),!0)},((e,t)=>{i.editorOptions.read(e),this._options.renderSideBySide.read(e),this.modified.updateOptions(this._adjustOptionsForRightHandSide(e,t)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(e,t))})))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t);return n.setContextValue("isInDiffLeftEditor",!0),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t);return n.setContextValue("isInDiffRightEditor",!0),n}_constructInnerEditor(e,t,i,n){const o=this._createInnerEditor(e,t,i,n);return this._register(o.onDidContentSizeChange((e=>{const t=this.original.getContentWidth()+this.modified.getContentWidth()+Kl.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),o}_adjustOptionsForLeftHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=o.BH.revealHorizontalRightPadding.defaultValue+Kl.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const t=Object.assign(Object.assign({},e),{dimension:{height:0,width:0}});return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){var t;e||(e="");const i=(0,Ue.NC)("diff-aria-navigation-tip"," use {0} to open the accessibility help.",null===(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))||void 0===t?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+i:e?e.replaceAll(i,""):""}};id=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([td(5,bt.TG),td(6,On.d)],id);var nd=i(15115);class od{get editorOptions(){return this._options}constructor(e,t){this.diffEditorWidth=t,this.couldShowInlineViewBecauseOfSize=(0,Da.nK)((e=>this._options.read(e).renderSideBySide&&this.diffEditorWidth.read(e)<=this._options.read(e).renderSideBySideInlineBreakpoint)),this.renderOverviewRuler=(0,Da.nK)((e=>this._options.read(e).renderOverviewRuler)),this.renderSideBySide=(0,Da.nK)((e=>this._options.read(e).renderSideBySide&&!(this._options.read(e).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(e)))),this.readOnly=(0,Da.nK)((e=>this._options.read(e).readOnly)),this.shouldRenderRevertArrows=(0,Da.nK)((e=>!!this._options.read(e).renderMarginRevertIcon&&!!this.renderSideBySide.read(e)&&!this.readOnly.read(e))),this.renderIndicators=(0,Da.nK)((e=>this._options.read(e).renderIndicators)),this.enableSplitViewResizing=(0,Da.nK)((e=>this._options.read(e).enableSplitViewResizing)),this.splitViewDefaultRatio=(0,Da.nK)((e=>this._options.read(e).splitViewDefaultRatio)),this.ignoreTrimWhitespace=(0,Da.nK)((e=>this._options.read(e).ignoreTrimWhitespace)),this.maxComputationTimeMs=(0,Da.nK)((e=>this._options.read(e).maxComputationTime)),this.showMoves=(0,Da.nK)((e=>this._options.read(e).experimental.showMoves&&this.renderSideBySide.read(e))),this.isInEmbeddedEditor=(0,Da.nK)((e=>this._options.read(e).isInEmbeddedEditor)),this.diffWordWrap=(0,Da.nK)((e=>this._options.read(e).diffWordWrap)),this.originalEditable=(0,Da.nK)((e=>this._options.read(e).originalEditable)),this.diffCodeLens=(0,Da.nK)((e=>this._options.read(e).diffCodeLens)),this.accessibilityVerbose=(0,Da.nK)((e=>this._options.read(e).accessibilityVerbose)),this.diffAlgorithm=(0,Da.nK)((e=>this._options.read(e).diffAlgorithm)),this.showEmptyDecorations=(0,Da.nK)((e=>this._options.read(e).experimental.showEmptyDecorations)),this.onlyShowAccessibleDiffViewer=(0,Da.nK)((e=>this._options.read(e).onlyShowAccessibleDiffViewer)),this.hideUnchangedRegions=(0,Da.nK)((e=>this._options.read(e).hideUnchangedRegions.enabled)),this.hideUnchangedRegionsRevealLineCount=(0,Da.nK)((e=>this._options.read(e).hideUnchangedRegions.revealLineCount)),this.hideUnchangedRegionsContextLineCount=(0,Da.nK)((e=>this._options.read(e).hideUnchangedRegions.contextLineCount)),this.hideUnchangedRegionsminimumLineCount=(0,Da.nK)((e=>this._options.read(e).hideUnchangedRegions.minimumLineCount));const i=Object.assign(Object.assign({},e),sd(e,nd.k));this._options=(0,Da.uh)("options",i)}updateOptions(e){const t=sd(e,this._options.get()),i=Object.assign(Object.assign(Object.assign({},this._options.get()),e),t);this._options.set(i,void 0,{changedOptions:e})}}function sd(e,t){var i,n,s,r,a,l,d,h;return{enableSplitViewResizing:(0,o.O7)(e.enableSplitViewResizing,t.enableSplitViewResizing),splitViewDefaultRatio:(0,o.L_)(e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,o.O7)(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:(0,o.O7)(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:(0,o.Zc)(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:(0,o.Zc)(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,o.O7)(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:(0,o.O7)(e.renderIndicators,t.renderIndicators),originalEditable:(0,o.O7)(e.originalEditable,t.originalEditable),diffCodeLens:(0,o.O7)(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:(0,o.O7)(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(0,o.NY)(e.diffWordWrap,t.diffWordWrap,["off","on","inherit"]),diffAlgorithm:(0,o.NY)(e.diffAlgorithm,t.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,o.O7)(e.accessibilityVerbose,t.accessibilityVerbose),experimental:{showMoves:(0,o.O7)(null===(i=e.experimental)||void 0===i?void 0:i.showMoves,t.experimental.showMoves),showEmptyDecorations:(0,o.O7)(null===(n=e.experimental)||void 0===n?void 0:n.showEmptyDecorations,t.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:(0,o.O7)(null!==(r=null===(s=e.hideUnchangedRegions)||void 0===s?void 0:s.enabled)&&void 0!==r?r:null===(a=e.experimental)||void 0===a?void 0:a.collapseUnchangedRegions,t.hideUnchangedRegions.enabled),contextLineCount:(0,o.Zc)(null===(l=e.hideUnchangedRegions)||void 0===l?void 0:l.contextLineCount,t.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:(0,o.Zc)(null===(d=e.hideUnchangedRegions)||void 0===d?void 0:d.minimumLineCount,t.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:(0,o.Zc)(null===(h=e.hideUnchangedRegions)||void 0===h?void 0:h.revealLineCount,t.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:(0,o.O7)(e.isInEmbeddedEditor,t.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:(0,o.O7)(e.onlyShowAccessibleDiffViewer,t.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:(0,o.Zc)(e.renderSideBySideInlineBreakpoint,t.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:(0,o.O7)(e.useInlineViewWhenSpaceIsLimited,t.useInlineViewWhenSpaceIsLimited)}}var rd=function(e,t){return function(i,n){t(i,n,e)}};let ad=class extends ed{constructor(e,t,i,n,o,s,r,a){var l;super(),this._domElement=e,this._parentContextKeyService=n,this._parentInstantiationService=o,this._audioCueService=r,this._editorProgressService=a,this.elements=(0,we.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,we.h)("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[(0,we.$)("span",{},"No Changes")]),(0,we.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,we.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,we.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=this._register((0,Da.DN)("diffModel",void 0)),this.onDidChangeModel=k.ju.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new Ct.y([_t.i6,this._contextKeyService])),this._boundarySashes=(0,Da.uh)("boundarySashes",void 0),this._accessibleDiffViewerShouldBeVisible=(0,Da.uh)("accessibleDiffViewerShouldBeVisible",!1),this._accessibleDiffViewerVisible=(0,Da.nK)((e=>!!this._options.onlyShowAccessibleDiffViewer.read(e)||this._accessibleDiffViewerShouldBeVisible.read(e))),this.movedBlocksLinesPart=(0,Da.uh)("MovedBlocksLinesPart",void 0),this._layoutInfo=(0,Da.nK)((e=>{var t,i,n;const o=this._rootSizeObserver.width.read(e),s=this._rootSizeObserver.height.read(e),r=null===(t=this._sash.read(e))||void 0===t?void 0:t.sashLeft.read(e),a=null!=r?r:Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),l=o-a-(this._options.renderOverviewRuler.read(e)?Kl.ENTIRE_DIFF_OVERVIEW_WIDTH:0),d=a-(null!==(n=null===(i=this.movedBlocksLinesPart.read(e))||void 0===i?void 0:i.width.read(e))&&void 0!==n?n:0);return this.elements.original.style.width=d+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=l+"px",this.elements.modified.style.left=a+"px",this._editors.original.layout({width:d,height:s}),this._editors.modified.layout({width:l,height:s}),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}})),this._diffValue=this._diffModel.map(((e,t)=>null==e?void 0:e.diff.read(t))),this.onDidUpdateDiff=k.ju.fromObservableLight(this._diffValue),s.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._contextKeyService.createKey("diffEditorVersion",2),this._domElement.appendChild(this.elements.root),this._register((0,C.OF)((()=>this._domElement.removeChild(this.elements.root)))),this._rootSizeObserver=this._register(new Ra(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(null!==(l=t.automaticLayout)&&void 0!==l&&l),this._options=new od(t,this._rootSizeObserver.width),this._contextKeyService.createKey(ut.u.isEmbeddedDiffEditor.key,!1);const d=ut.u.isEmbeddedDiffEditor.bindTo(this._contextKeyService);this._register((0,Da.EH)((e=>{d.set(this._options.isInEmbeddedEditor.read(e))})));const h=ut.u.comparingMovedCode.bindTo(this._contextKeyService);this._register((0,Da.EH)((e=>{var t;h.set(!!(null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e)))})));const c=ut.u.diffEditorRenderSideBySideInlineBreakpointReached.bindTo(this._contextKeyService);this._register((0,Da.EH)((e=>{c.set(this._options.couldShowInlineViewBecauseOfSize.read(e))}))),this._editors=this._register(this._instantiationService.createInstance(id,this.elements.original,this.elements.modified,this._options,i,((e,t,i,n)=>this._createInnerEditor(e,t,i,n)))),this._sash=(0,Da.Be)("sash",((e,t)=>{const i=this._options.renderSideBySide.read(e);if(this.elements.root.classList.toggle("side-by-side",i),!i)return;const n=t.add(new wl(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map(((e,t)=>e-(this._options.renderOverviewRuler.read(t)?Kl.ENTIRE_DIFF_OVERVIEW_WIDTH:0)))}));return t.add((0,Da.EH)((e=>{const t=this._boundarySashes.read(e);t&&n.setBoundarySashes(t)}))),n})),this._register((0,Da.$g)(this._sash,!0)),this._register((0,Da.gp)(((e,t)=>{this.unchangedRangesFeature=t.add(this._instantiationService.createInstance(Wa(Ql,e),this._editors,this._diffModel,this._options))}))),this._register((0,Da.gp)(((e,t)=>{t.add(new(Wa(Cl,e))(this._editors,this._diffModel,this._options))}))),this._register((0,Da.gp)(((e,t)=>{t.add(this._instantiationService.createInstance(Wa(Bl,e),this._editors,this._diffModel,this._options,this,(()=>this.unchangedRangesFeature.isUpdatingViewZones)))}))),this._register((0,Da.gp)(((e,t)=>{t.add(this._instantiationService.createInstance(Wa(Kl,e),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map((e=>e.modifiedEditor)),this._options))}))),this._register((0,Da.gp)(((e,t)=>{this._accessibleDiffViewer=t.add(this._register(this._instantiationService.createInstance(Wa(qa,e),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,((e,t)=>this._accessibleDiffViewerShouldBeVisible.set(e,t)),this._options.onlyShowAccessibleDiffViewer.map((e=>!e)),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(((e,t)=>{var i;return null===(i=null==e?void 0:e.diff.read(t))||void 0===i?void 0:i.mappings.map((e=>e.lineRangeMapping))})),this._editors)))})));const u=this._accessibleDiffViewerVisible.map((e=>e?"hidden":"visible"));this._register(Ba(this.elements.modified,{visibility:u})),this._register(Ba(this.elements.original,{visibility:u})),this._createDiffEditorContributions(),s.addDiffEditor(this),this._register((0,Da.$g)(this._layoutInfo,!0)),this._register((0,Da.gp)(((e,t)=>{this.movedBlocksLinesPart.set(t.add(new(Wa(_l,e))(this.elements.root,this._diffModel,this._layoutInfo.map((e=>e.originalEditor)),this._layoutInfo.map((e=>e.modifiedEditor)),this._editors)),void 0)}))),this._register(Ba(this.elements.overlay,{width:this._layoutInfo.map(((e,t)=>e.originalEditor.width+(this._options.renderSideBySide.read(t)?0:e.modifiedEditor.width))),visibility:(0,Da.nK)((e=>{var t,i;return this._options.hideUnchangedRegions.read(e)&&0===(null===(i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.diff.read(e))||void 0===i?void 0:i.mappings.length)?"visible":"hidden"}))})),this._register(this._editors.modified.onMouseDown((e=>{var t,i;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("arrow-revert-change"))){const t=e.target.position.lineNumber,n=e.target,o=this._diffModel.get();if(!o)return;const s=null===(i=o.diff.get())||void 0===i?void 0:i.mappings;if(!s)return;const r=s.find((e=>(null==n?void 0:n.detail.afterLineNumber)===e.lineRangeMapping.modifiedRange.startLineNumber-1||e.lineRangeMapping.modifiedRange.startLineNumber===t));if(!r)return;this.revert(r.lineRangeMapping),e.event.stopPropagation()}}))),this._register(k.ju.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,(e=>{var t,i;if(3===(null==e?void 0:e.reason)){const n=null===(i=null===(t=this._diffModel.get())||void 0===t?void 0:t.diff.get())||void 0===i?void 0:i.mappings.find((t=>t.lineRangeMapping.modifiedRange.contains(e.position.lineNumber)));(null==n?void 0:n.lineRangeMapping.modifiedRange.isEmpty)?this._audioCueService.playAudioCue(E.y$.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):(null==n?void 0:n.lineRangeMapping.originalRange.isEmpty)?this._audioCueService.playAudioCue(E.y$.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):n&&this._audioCueService.playAudioCue(E.y$.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}})));const g=this._diffModel.map(((e,t)=>null==e?void 0:e.isDiffUpToDate.read(t)));this._register((0,Da.gp)(((e,t)=>{if(!1===g.read(e)){const e=this._editorProgressService.show(!0,1e3);t.add((0,C.OF)((()=>e.done())))}})))}_createInnerEditor(e,t,i,n){return e.createInstance(Ce.Gm,t,i,n)}_createDiffEditorContributions(){const e=Oe.Uc.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(e){(0,De.dL)(e)}}get _targetEditor(){return this._editors.modified}getEditorType(){return O.g.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;return{original:this._editors.original.saveViewState(),modified:this._editors.modified.saveViewState(),modelState:null===(e=this._diffModel.get())||void 0===e?void 0:e.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){const i=e;this._editors.original.restoreViewState(i.original),this._editors.modified.restoreViewState(i.modified),i.modelState&&(null===(t=this._diffModel.get())||void 0===t||t.restoreSerializedState(i.modelState))}}createViewModel(e){return new kl(e,this._options,this._instantiationService.createInstance(dt,{diffAlgorithm:this._options.diffAlgorithm.get()}))}getModel(){var e,t;return null!==(t=null===(e=this._diffModel.get())||void 0===e?void 0:e.model)&&void 0!==t?t:null}setModel(e){!e&&this._diffModel.get()&&this._accessibleDiffViewer.close();const t=e?"model"in e?e:this.createViewModel(e):void 0;this._editors.original.setModel(t?t.model.original:null),this._editors.modified.setModel(t?t.model.modified:null),(0,Da.PS)((e=>{this._diffModel.set(t,e)}))}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.diff.get();return t?t.mappings.map((e=>{const t=e.lineRangeMapping;let i,n,o,s,r=t.innerChanges;return t.originalRange.isEmpty?(i=t.originalRange.startLineNumber-1,n=0,r=void 0):(i=t.originalRange.startLineNumber,n=t.originalRange.endLineNumberExclusive-1),t.modifiedRange.isEmpty?(o=t.modifiedRange.startLineNumber-1,s=0,r=void 0):(o=t.modifiedRange.startLineNumber,s=t.modifiedRange.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:o,modifiedEndLineNumber:s,charChanges:null==r?void 0:r.map((e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn})))}})):null}revert(e){var t;const i=null===(t=this._diffModel.get())||void 0===t?void 0:t.model;if(!i)return;const n=e.innerChanges?e.innerChanges.map((e=>({range:e.modifiedRange,text:i.original.getValueInRange(e.originalRange)}))):[{range:e.modifiedRange.toExclusiveRange(),text:i.original.getValueInRange(e.originalRange.toExclusiveRange())}];this._editors.modified.executeEdits("diffEditor",n)}accessibleDiffViewerNext(){this._accessibleDiffViewer.next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.prev()}};ad=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([rd(3,_t.i6),rd(4,bt.TG),rd(5,L.$),rd(6,E.e7),rd(7,yt.ek)],ad);var ld=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},dd=function(e,t){return function(i,n){t(i,n,e)}};let hd=0,cd=!1,ud=class extends Ce.Gm{constructor(e,t,i,n,o,s,r,a,l,d,h,c){const u=Object.assign({},t);u.ariaLabel=u.ariaLabel||$n.B8.editorViewAccessibleLabel,u.ariaLabel=u.ariaLabel+";"+$n.B8.accessibilityHelpMessage,super(e,u,{},i,n,o,s,a,l,d,h,c),this._standaloneKeybindingService=r instanceof fa?r:null,function(e){if(!e){if(cd)return;cd=!0}be.wW(e||document.body)}(u.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++hd,o=_t.Ao.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),C.JT.None;const t=e.id,i=e.label,n=_t.Ao.and(_t.Ao.equals("editorId",this.getId()),_t.Ao.deserialize(e.precondition)),o=e.keybindings,s=_t.Ao.and(n,_t.Ao.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),d=new C.SL,h=this.getId()+":"+t;if(d.add(mn.P.registerCommand(h,l)),r){const e={command:{id:h,title:i},when:n,group:r,order:a};d.add(vo.BH.appendMenuItem(vo.eH.EditorContext,e))}if(Array.isArray(o))for(const e of o)d.add(this._standaloneKeybindingService.addDynamicKeybinding(h,e,l,s));const c=new Qt.p(h,i,i,n,((...t)=>Promise.resolve(e.run(this,...t))),this._contextKeyService);return this._actions.set(t,c),d.add((0,C.OF)((()=>{this._actions.delete(t)}))),d}_triggerCommand(e,t){if(this._codeEditorService instanceof ii)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};ud=ld([dd(2,bt.TG),dd(3,L.$),dd(4,mn.H),dd(5,_t.i6),dd(6,On.d),dd(7,Lt.XE),dd(8,wt.lT),dd(9,I.F),dd(10,B.c_),dd(11,an.p)],ud);let gd=class extends ud{constructor(e,t,i,n,o,s,r,a,l,d,h,c,u,g,p){const m=Object.assign({},t);Sa(d,m,!1);const f=a.registerEditorContainer(e);"string"==typeof m.theme&&a.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&a.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));const _=m.model;let v;if(delete m.model,super(e,m,i,n,o,s,r,a,l,h,g,p),this._configurationService=d,this._standaloneThemeService=a,this._register(f),void 0===_){const e=u.getLanguageIdByMimeType(m.language)||m.language||oo.bd;v=fd(c,u,m.value||"",e,void 0),this._ownsModel=!0}else v=_,this._ownsModel=!1;if(this._attachModel(v),v){const e={oldModelUrl:null,newModelUrl:v.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){Sa(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};gd=ld([dd(2,bt.TG),dd(3,L.$),dd(4,mn.H),dd(5,_t.i6),dd(6,On.d),dd(7,br.Z),dd(8,wt.lT),dd(9,oe.Ui),dd(10,I.F),dd(11,H.q),dd(12,V.O),dd(13,B.c_),dd(14,an.p)],gd);let pd=class extends Mt{constructor(e,t,i,n,o,s,r,a,l,d,h){const c=Object.assign({},t);Sa(a,c,!0);const u=s.registerEditorContainer(e);"string"==typeof c.theme&&s.setTheme(c.theme),void 0!==c.autoDetectHighContrast&&s.setAutoDetectHighContrast(Boolean(c.autoDetectHighContrast)),super(e,c,{},h,n,i,o,s,r,l,d),this._configurationService=a,this._standaloneThemeService=s,this._register(u)}dispose(){super.dispose()}updateOptions(e){Sa(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(ud,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};pd=ld([dd(2,bt.TG),dd(3,_t.i6),dd(4,L.$),dd(5,br.Z),dd(6,wt.lT),dd(7,oe.Ui),dd(8,vt.i),dd(9,yt.ek),dd(10,ft.p)],pd);let md=class extends ad{constructor(e,t,i,n,o,s,r,a,l,d,h,c){const u=Object.assign({},t);Sa(a,u,!0);const g=s.registerEditorContainer(e);"string"==typeof u.theme&&s.setTheme(u.theme),void 0!==u.autoDetectHighContrast&&s.setAutoDetectHighContrast(Boolean(u.autoDetectHighContrast)),super(e,u,{},n,i,o,c,d),this._configurationService=a,this._standaloneThemeService=s,this._register(g)}dispose(){super.dispose()}updateOptions(e){Sa(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(ud,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function fd(e,t,i,n,o){if(i=i||"",!n){const n=i.indexOf("\n");let s=i;return-1!==n&&(s=i.substring(0,n)),_d(e,i,t.createByFilepathOrFirstLine(o||null,s),o)}return _d(e,i,t.createById(n),o)}function _d(e,t,i,n){return e.createModel(t,i,n)}md=ld([dd(2,bt.TG),dd(3,_t.i6),dd(4,L.$),dd(5,br.Z),dd(6,wt.lT),dd(7,oe.Ui),dd(8,vt.i),dd(9,yt.ek),dd(10,ft.p),dd(11,E.e7)],md);var vd=i(82334),bd=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function Cd(e){const t=Na.get(On.d);return t instanceof fa?t.addDynamicKeybindings(e.map((e=>({keybinding:e.keybinding,command:e.command,commandArgs:e.commandArgs,when:_t.Ao.deserialize(e.when)})))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),C.JT.None)}var wd=i(41264);function yd(e,t){return"boolean"==typeof e?e:t}function Sd(e,t){return"string"==typeof e?e:t}function Ld(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function xd(e,t){t=t.replace(/@@/g,"");let i,n=0;do{i=!1,t=t.replace(/@(\w+)/g,(function(n,o){i=!0;let s="";if("string"==typeof e[o])s=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?ee(e,"language definition does not contain attribute '"+o+"', used at: "+t):ee(e,"attribute reference '"+o+"' must be a string, used at: "+t);s=e[o].source}return Y(s)?"":"(?:"+s+")"})),n++}while(i&&n<5);t=t.replace(/\x01/g,"@");const o=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,o)}function kd(e,t,i,n){let o=-1,s=i,r=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);r&&(r[3]&&(o=parseInt(r[3]),r[2]&&(o+=100)),s=r[4]);let a,l="~",d=s;if(s&&0!==s.length?/^\w*$/.test(d)?l="==":(r=s.match(/^(@|!@|~|!~|==|!=)(.*)$/),r&&(l=r[1],d=r[2])):(l="!=",d=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(d))if("@"===l||"!@"===l){const i=e[d];if(!i)throw ee(e,"the @ match target '"+d+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const e of t)if("string"!=typeof e)return!1;return!0}(0,i))throw ee(e,"the @ match target '"+d+"' must be an array of strings, in rule: "+t);const n=Ld(i,e.ignoreCase);a=function(e){return"@"===l?n(e):!n(e)}}else if("~"===l||"!~"===l)if(d.indexOf("$")<0){const t=xd(e,"^"+d+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,i,n,o){return xd(e,"^"+te(e,d,i,n,o)+"$").test(t)};else if(d.indexOf("$")<0){const t=J(e,d);a=function(e){return"=="===l?e===t:e!==t}}else{const t=J(e,d);a=function(i,n,o,s,r){const a=te(e,t,n,o,s);return"=="===l?i===a:i!==a}}else{const t=Ld(d.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===o?{name:i,value:n,test:function(e,t,i,n){return a(e,e,t,i,n)}}:{name:i,value:n,test:function(e,t,i,n){const s=function(e,t,i,n){if(n<0)return e;if(n<t.length)return t[n];if(n>=100){n-=100;const e=i.split(".");if(e.unshift(i),n<e.length)return e[n]}return null}(e,t,i,o);return a(s||"",e,t,i,n)}}}function Nd(e,t,i){if(i){if("string"==typeof i)return i;if(i.token||""===i.token){if("string"!=typeof i.token)throw ee(e,"a 'token' attribute must be of type string, in rule: "+t);{const n={token:i.token};if(i.token.indexOf("$")>=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw ee(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw ee(e,"the next state must be a string value in rule: "+t);{let o=i.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,te(e,o,"",[],""))))throw ee(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=o}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){const n=[];for(let o=0,s=i.length;o<s;o++)n[o]=Nd(e,t,i[o]);return{group:n}}if(i.cases){const n=[];for(const o in i.cases)if(i.cases.hasOwnProperty(o)){const s=Nd(e,t,i.cases[o]);"@default"===o||"@"===o||""===o?n.push({test:void 0,value:s,name:o}):"@eos"===o?n.push({test:function(e,t,i,n){return n},value:s,name:o}):n.push(kd(e,t,o,s))}const o=e.defaultToken;return{test:function(e,t,i,s){for(const o of n)if(!o.test||o.test(e,t,i,s))return o.value;return o}}}throw ee(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t)}return{token:""}}class Dd{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if("string"==typeof t)i=t;else{if(!(t instanceof RegExp))throw ee(e,"rules must start with a match string or regular expression: "+this.name);i=t.source}this.matchOnlyAtLineStart=i.length>0&&"^"===i[0],this.name=this.name+": "+i,this.regex=xd(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=Nd(e,this.name,t)}}function Ed(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");const i={};i.languageId=e,i.includeLF=yd(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=yd(t.ignoreCase,!1),i.unicode=yd(t.unicode,!1),i.tokenPostfix=Sd(t.tokenPostfix,"."+i.languageId),i.defaultToken=Sd(t.defaultToken,"source"),i.usesEmbedded=!1;const n=t;function o(e,s,r){for(const a of r){let r=a.include;if(r){if("string"!=typeof r)throw ee(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw ee(i,"include target '"+r+"' is not defined at: "+e);o(e+"."+r,s,t.tokenizer[r])}else{const t=new Dd(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw ee(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw ee(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=yd(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}s.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw ee(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,o("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw ee(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw ee(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw ee(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");s.push({token:t.token+i.tokenPostfix,open:J(i,t.open),close:J(i,t.close)})}return i.brackets=s,i.noThrow=!0,i}var Id=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Td{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"==typeof this._actual.tokenize)return Md.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new F.DI(n.tokens,n.endState)}}class Md{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let o=0,s=e.length;o<s;o++){const s=e[o];let r=s.startIndex;0===o?r=0:r<n&&(r=n),i[o]=new F.WU(r,s.scopes,t),n=r}return i}static adaptTokenize(e,t,i,n){const o=t.tokenize(i,n),s=Md._toClassicTokens(o.tokens,e);let r;return r=o.endState.equals(n)?n:o.endState,new F.hG(s,r)}tokenize(e,t,i){return Md.adaptTokenize(this._languageId,this._actual,e,i)}_toBinaryTokens(e,t){const i=e.encodeLanguageId(this._languageId),n=this._standaloneThemeService.getColorTheme().tokenTheme,o=[];let s=0,r=0;for(let e=0,a=t.length;e<a;e++){const a=t[e],l=1024|n.match(i,a.scopes);if(s>0&&o[s-1]===l)continue;let d=a.startIndex;0===e?d=0:d<r&&(d=r),o[s++]=d,o[s++]=l,r=d}const a=new Uint32Array(s);for(let e=0;e<s;e++)a[e]=o[e];return a}tokenizeEncoded(e,t,i){const n=this._actual.tokenize(e,i),o=this._toBinaryTokens(this._languageService.languageIdCodec,n.tokens);let s;return s=n.endState.equals(i)?i:n.endState,new F.DI(o,s)}}function Rd(e){return e&&"function"==typeof e.then}function Ad(e,t){return function(e){return"tokenizeEncoded"in e}(t)?new Td(e,t):new Md(e,t,Na.get(V.O),Na.get(br.Z))}function Od(e,t){const i=new F.MO((()=>Id(this,void 0,void 0,(function*(){const i=yield Promise.resolve(t.create());return i?"function"==typeof i.getInitialState?Ad(e,i):new ue(Na.get(V.O),Na.get(br.Z),e,Ed(e,i),Na.get(oe.Ui)):null}))));return F.RW.registerFactory(e,i)}var Pd=i(58823);o.BH.wrappingIndent.defaultValue=0,o.BH.glyphMargin.defaultValue=!1,o.BH.autoIndent.defaultValue=3,o.BH.overviewRulerLanes.defaultValue=2,Pd.xC.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const Fd=(0,s.O)();Fd.editor={create:function(e,t,i){return Na.initialize(i||{}).createInstance(gd,e,t)},getEditors:function(){return Na.get(L.$).listCodeEditors()},getDiffEditors:function(){return Na.get(L.$).listDiffEditors()},onDidCreateEditor:function(e){return Na.get(L.$).onCodeEditorAdd((t=>{e(t)}))},onDidCreateDiffEditor:function(e){return Na.get(L.$).onDiffEditorAdd((t=>{e(t)}))},createDiffEditor:function(e,t,i){var n;const o=Na.initialize(i||{});return(null===(n=null==t?void 0:t.experimental)||void 0===n?void 0:n.useVersion2)?o.createInstance(md,e,t):o.createInstance(pd,e,t)},createDiffNavigator:function(e,t){return Na.initialize({}).createInstance(R,e,t)},addCommand:function(e){if("string"!=typeof e.id||"function"!=typeof e.run)throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return mn.P.registerCommand(e.id,e.run)},addEditorAction:function(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const t=_t.Ao.deserialize(e.precondition),i=new C.SL;if(i.add(mn.P.registerCommand(e.id,((i,...n)=>Oe._l.runEditorCommand(i,n,t,((t,i,n)=>Promise.resolve(e.run(i,...n))))))),e.contextMenuGroupId){const n={command:{id:e.id,title:e.label},when:t,group:e.contextMenuGroupId,order:e.contextMenuOrder||0};i.add(vo.BH.appendMenuItem(vo.eH.EditorContext,n))}if(Array.isArray(e.keybindings)){const n=Na.get(On.d);if(n instanceof fa){const o=_t.Ao.and(t,_t.Ao.deserialize(e.keybindingContext));i.add(n.addDynamicKeybindings(e.keybindings.map((t=>({keybinding:t,command:e.id,when:o})))))}else console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService")}return i},addKeybindingRule:function(e){return Cd([e])},addKeybindingRules:Cd,createModel:function(e,t,i){const n=Na.get(V.O),o=n.getLanguageIdByMimeType(t)||t;return fd(Na.get(H.q),n,e,o,i)},setModelLanguage:function(e,t){const i=Na.get(V.O),n=i.getLanguageIdByMimeType(t)||t||oo.bd;e.setLanguage(i.createById(n))},setModelMarkers:function(e,t,i){e&&Na.get($o.lT).changeOne(t,e.uri,i)},getModelMarkers:function(e){return Na.get($o.lT).read(e)},removeAllMarkers:function(e){Na.get($o.lT).changeAll(e,[])},onDidChangeMarkers:function(e){return Na.get($o.lT).onMarkerChanged(e)},getModels:function(){return Na.get(H.q).getModels()},getModel:function(e){return Na.get(H.q).getModel(e)},onDidCreateModel:function(e){return Na.get(H.q).onModelAdded(e)},onWillDisposeModel:function(e){return Na.get(H.q).onModelRemoved(e)},onDidChangeModelLanguage:function(e){return Na.get(H.q).onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))},createWebWorker:function(e){return function(e,t,i){return new K(e,t,i)}(Na.get(H.q),Na.get(B.c_),e)},colorizeElement:function(e,t){const i=Na.get(V.O),n=Na.get(br.Z);return _e.colorizeElement(n,i,e,t).then((()=>{n.registerEditorContainer(e)}))},colorize:function(e,t,i){const n=Na.get(V.O);return Na.get(br.Z).registerEditorContainer(document.body),_e.colorize(n,e,t,i)},colorizeModelLine:function(e,t,i=4){return Na.get(br.Z).registerEditorContainer(document.body),_e.colorizeModelLine(e,t,i)},tokenize:function(e,t){F.RW.getOrCreate(t);const i=(s=t,F.RW.get(s)||{getInitialState:()=>W.TJ,tokenize:(e,t,i)=>(0,W.Ri)(s,i)}),n=(0,w.uq)(e),o=[];var s;let r=i.getInitialState();for(let e=0,t=n.length;e<t;e++){const t=n[e],s=i.tokenize(t,!0,r);o[e]=s.tokens,r=s.endState}return o},defineTheme:function(e,t){Na.get(br.Z).defineTheme(e,t)},setTheme:function(e){Na.get(br.Z).setTheme(e)},remeasureFonts:function(){S.g.clearAllFontInfos()},registerCommand:function(e,t){return mn.P.registerCommand({id:e,handler:t})},registerLinkOpener:function(e){return Na.get(Wo.v4).registerOpener({open(t){return bd(this,void 0,void 0,(function*(){return"string"==typeof t&&(t=y.o.parse(t)),e.open(t)}))}})},registerEditorOpener:function(e){return Na.get(L.$).registerCodeEditorOpenHandler(((t,i,n)=>bd(this,void 0,void 0,(function*(){var n;if(!i)return null;const o=null===(n=t.options)||void 0===n?void 0:n.selection;let s;return o&&"number"==typeof o.endLineNumber&&"number"==typeof o.endColumn?s=o:o&&(s={lineNumber:o.startLineNumber,column:o.startColumn}),(yield e.openCodeEditor(i,t.resource,s))?i:null}))))},AccessibilitySupport:U.ao,ContentWidgetPositionPreference:U.r3,CursorChangeReason:U.Vi,DefaultEndOfLine:U._x,EditorAutoIndentStrategy:U.rf,EditorOption:U.wT,EndOfLinePreference:U.gm,EndOfLineSequence:U.jl,MinimapPosition:U.F5,MouseTargetType:U.MG,OverlayWidgetPositionPreference:U.E$,OverviewRulerLane:U.sh,GlyphMarginLane:U.U,RenderLineNumbersType:U.Lu,RenderMinimap:U.vQ,ScrollbarVisibility:U.g_,ScrollType:U.g4,TextEditorCursorBlinkingStyle:U.In,TextEditorCursorStyle:U.d2,TrackedRangeStickiness:U.OI,WrappingIndent:U.up,InjectedTextCursorStops:U.RM,PositionAffinity:U.py,ConfigurationChangedEvent:o.Bb,BareFontInfo:A.E4,FontInfo:A.pR,TextModelResolvedOptions:P.dJ,FindMatch:P.tk,ApplyUpdateResult:o.rk,LineRange:ot.z,LineRangeMapping:st.f0,RangeMapping:st.iy,EditorZoom:vd.C,MovedText:st.y0,SimpleLineRangeMapping:st.Qy,EditorType:O.g,EditorOptions:o.BH},Fd.languages={register:function(e){oo.dQ.registerLanguage(e)},getLanguages:function(){let e=[];return e=e.concat(oo.dQ.getLanguages()),e},onLanguage:function(e,t){return Na.withServices((()=>{const i=Na.get(V.O).onDidRequestRichLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))},onLanguageEncountered:function(e,t){return Na.withServices((()=>{const i=Na.get(V.O).onDidRequestBasicLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))},getEncodedLanguageId:function(e){return Na.get(V.O).languageIdCodec.encodeLanguageId(e)},setLanguageConfiguration:function(e,t){if(!Na.get(V.O).isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);return Na.get(B.c_).register(e,t,100)},setColorMap:function(e){const t=Na.get(br.Z);if(e){const i=[null];for(let t=1,n=e.length;t<n;t++)i[t]=wd.Il.fromHex(e[t]);t.setColorMapOverride(i)}else t.setColorMapOverride(null)},registerTokensProviderFactory:Od,setTokensProvider:function(e,t){if(!Na.get(V.O).isRegisteredLanguageId(e))throw new Error(`Cannot set tokens provider for unknown language ${e}`);return Rd(t)?Od(e,{create:()=>t}):F.RW.register(e,Ad(e,t))},setMonarchTokensProvider:function(e,t){return Rd(t)?Od(e,{create:()=>t}):F.RW.register(e,(t=>new ue(Na.get(V.O),Na.get(br.Z),e,Ed(e,t),Na.get(oe.Ui)))(t))},registerReferenceProvider:function(e,t){return Na.get(an.p).referenceProvider.register(e,t)},registerRenameProvider:function(e,t){return Na.get(an.p).renameProvider.register(e,t)},registerCompletionItemProvider:function(e,t){return Na.get(an.p).completionProvider.register(e,t)},registerSignatureHelpProvider:function(e,t){return Na.get(an.p).signatureHelpProvider.register(e,t)},registerHoverProvider:function(e,t){return Na.get(an.p).hoverProvider.register(e,{provideHover:(e,i,n)=>{const o=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then((e=>{if(e)return!e.range&&o&&(e.range=new D.e(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new D.e(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return Na.get(an.p).documentSymbolProvider.register(e,t)},registerDocumentHighlightProvider:function(e,t){return Na.get(an.p).documentHighlightProvider.register(e,t)},registerLinkedEditingRangeProvider:function(e,t){return Na.get(an.p).linkedEditingRangeProvider.register(e,t)},registerDefinitionProvider:function(e,t){return Na.get(an.p).definitionProvider.register(e,t)},registerImplementationProvider:function(e,t){return Na.get(an.p).implementationProvider.register(e,t)},registerTypeDefinitionProvider:function(e,t){return Na.get(an.p).typeDefinitionProvider.register(e,t)},registerCodeLensProvider:function(e,t){return Na.get(an.p).codeLensProvider.register(e,t)},registerCodeActionProvider:function(e,t,i){return Na.get(an.p).codeActionProvider.register(e,{providedCodeActionKinds:null==i?void 0:i.providedCodeActionKinds,documentation:null==i?void 0:i.documentation,provideCodeActions:(e,i,n,o)=>{const s=Na.get($o.lT).read({resource:e.uri}).filter((e=>D.e.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:s,only:n.only,trigger:n.trigger},o)},resolveCodeAction:t.resolveCodeAction})},registerDocumentFormattingEditProvider:function(e,t){return Na.get(an.p).documentFormattingEditProvider.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return Na.get(an.p).documentRangeFormattingEditProvider.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return Na.get(an.p).onTypeFormattingEditProvider.register(e,t)},registerLinkProvider:function(e,t){return Na.get(an.p).linkProvider.register(e,t)},registerColorProvider:function(e,t){return Na.get(an.p).colorProvider.register(e,t)},registerFoldingRangeProvider:function(e,t){return Na.get(an.p).foldingRangeProvider.register(e,t)},registerDeclarationProvider:function(e,t){return Na.get(an.p).declarationProvider.register(e,t)},registerSelectionRangeProvider:function(e,t){return Na.get(an.p).selectionRangeProvider.register(e,t)},registerDocumentSemanticTokensProvider:function(e,t){return Na.get(an.p).documentSemanticTokensProvider.register(e,t)},registerDocumentRangeSemanticTokensProvider:function(e,t){return Na.get(an.p).documentRangeSemanticTokensProvider.register(e,t)},registerInlineCompletionsProvider:function(e,t){return Na.get(an.p).inlineCompletionsProvider.register(e,t)},registerInlayHintsProvider:function(e,t){return Na.get(an.p).inlayHintsProvider.register(e,t)},DocumentHighlightKind:U.MY,CompletionItemKind:U.cm,CompletionItemTag:U.we,CompletionItemInsertTextRule:U.a7,SymbolKind:U.cR,SymbolTag:U.r4,IndentAction:U.wU,CompletionTriggerKind:U.Ij,SignatureHelpTriggerKind:U.WW,InlayHintKind:U.gl,InlineCompletionTriggerKind:U.bw,CodeActionTriggerType:U.np,FoldingRangeKind:F.AD,SelectedSuggestionInfo:F.ln};const Bd=Fd.CancellationTokenSource,Wd=Fd.Emitter,Vd=Fd.KeyCode,Hd=Fd.KeyMod,zd=Fd.Position,Kd=Fd.Range,Ud=Fd.Selection,jd=Fd.SelectionDirection,$d=Fd.MarkerSeverity,qd=Fd.MarkerTag,Zd=Fd.Uri,Gd=Fd.Token,Qd=Fd.editor,Yd=Fd.languages,Jd=globalThis.MonacoEnvironment;var Xd;((null==Jd?void 0:Jd.globalAPI)||"function"==typeof define&&i.amdO)&&(globalThis.monaco=Fd),void 0!==globalThis.require&&"function"==typeof globalThis.require.config&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]}),i(29126),i(89808),i(13598),i(52042),i(50497),i(11336),i(76334),i(30253),i(47940),i(18162),i(79556),i(56292),i(40605),i(30282),i(42429),i(24129),i(88765),i(43814),i(45067),i(21589),i(97820),i(40927),i(26220),i(1526),i(64091),i(40902),i(68423),i(17476),i(16745),i(43763),i(72323),i(46595),i(36831),i(66079),i(90158),i(38698),i(82665),i(51944),i(77365),i(37562),i(6595),i(75769),i(51714),i(86935),i(62893),i(27616),i(83335),i(46266),i(89723),i(55788),i(48746),i(94992),i(16563),i(57296),i(85098),i(83187),i(12026),i(76194),i(5566),i(26254),i(5734),i(40191),i(93127),i(34483),i(40840),i(37266),i(2375),i(96461),i(76628),i(40185),i(27776),i(28118),i(96337),i(87530),i(25929),i(17918),i(6205),i(46837),i(88307),i(39585),i(58203),i(67077),i(81905),i(94199),self.MonacoEnvironment=(Xd={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"},{globalAPI:!1,getWorkerUrl:function(e,t){var n=i.p,o=(n?n.replace(/\/$/,"")+"/":"")+Xd[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(o)){var s=String(window.location),r=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(o.substring(0,r.length)!==r){/^(\/\/)/.test(o)&&(o=window.location.protocol+o);var a=new Blob(["/*"+t+'*/importScripts("'+o+'");'],{type:"application/javascript"});return URL.createObjectURL(a)}}return o}});const eh=n},16268:(e,t,i)=>{i.d(t,{$W:()=>b,Dt:()=>_,G6:()=>m,MG:()=>f,Pf:()=>g,Tz:()=>d,i7:()=>p,ie:()=>h,uB:()=>l,vU:()=>u});var n=i(4669),o=i(5976);class s{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}s.INSTANCE=new s;class r extends o.JT{constructor(){super(),this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){var t;null===(t=this._mediaQueryList)||void 0===t||t.removeEventListener("change",this._listener),this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class a extends o.JT{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new r);this._register(e.onDidChange((()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)})))}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}function l(e,t){"string"==typeof e&&(e=window.matchMedia(e)),e.addEventListener("change",t)}const d=new class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=(0,o.dk)(new a)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};function h(){return s.INSTANCE.getZoomFactor()}const c=navigator.userAgent,u=c.indexOf("Firefox")>=0,g=c.indexOf("AppleWebKit")>=0,p=c.indexOf("Chrome")>=0,m=!p&&c.indexOf("Safari")>=0,f=!p&&!m&&g,_=(c.indexOf("Electron/"),c.indexOf("Android")>=0);let v=!1;if(window.matchMedia){const e=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=window.matchMedia("(display-mode: fullscreen)");v=e.matches,l(e,(({matches:e})=>{v&&t.matches||(v=e)}))}function b(){return v}},10161:(e,t,i)=>{i.d(t,{D:()=>s});var n=i(16268),o=i(1432);const s={clipboard:{writeText:o.tY||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:o.tY||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:o.tY||n.$W()?0:navigator.keyboard||n.G6?1:2,touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}},23547:(e,t,i)=>{i.d(t,{g:()=>n});const n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i(81170).v.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}},65321:(e,t,i)=>{i.d(t,{$:()=>ae,$Z:()=>de,Ay:()=>V,Ce:()=>ie,Cp:()=>he,D6:()=>L,Dx:()=>S,FK:()=>M,Fx:()=>P,GQ:()=>b,I8:()=>I,If:()=>R,OO:()=>W,PO:()=>g,R3:()=>te,Re:()=>q,Ro:()=>k,Uh:()=>ce,Uw:()=>p,V3:()=>ue,XT:()=>fe,_0:()=>J,_F:()=>_e,_h:()=>me,_q:()=>be,cl:()=>G,dS:()=>z,dp:()=>D,eg:()=>Ce,fk:()=>j,go:()=>ee,h:()=>ye,i:()=>E,iJ:()=>le,jL:()=>w,jg:()=>O,jt:()=>ge,lI:()=>C,mc:()=>ne,mu:()=>v,nm:()=>f,sQ:()=>ve,tw:()=>Z,uN:()=>$,uU:()=>F,vL:()=>Y,vY:()=>H,w:()=>T,wY:()=>pe,wn:()=>A,xQ:()=>N,zB:()=>Q});var n=i(16268),o=i(10161),s=i(59069),r=i(7448),a=i(17301),l=i(4669),d=i(70921),h=i(5976),c=i(66663),u=i(1432);function g(e){for(;e.firstChild;)e.firstChild.remove()}function p(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class m{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function f(e,t,i,n){return new m(e,t,i,n)}function _(e){return function(t){return e(new r.n(t))}}const v=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t?o=_(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=function(e){return function(t){return e(new s.y(t))}}(i)),f(e,t,o,n)},b=function(e,t,i){return function(e,t,i){return f(e,u.gn&&o.D.pointerEvents?Z.POINTER_DOWN:Z.MOUSE_DOWN,t,i)}(e,_(t),i)};let C,w;class y{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,a.dL)(e)}}static sort(e,t){return t.priority-e.priority}}function S(e){return document.defaultView.getComputedStyle(e,null)}function L(e){if(e!==document.body)return new k(e.clientWidth,e.clientHeight);if(u.gn&&window.visualViewport)return new k(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new k(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new k(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new k(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}!function(){let e=[],t=null,i=!1,n=!1;const o=()=>{for(i=!1,t=e,e=[],n=!0;t.length>0;)t.sort(y.sort),t.shift().execute();n=!1};w=(t,n=0)=>{const s=new y(t,n);return e.push(s),i||(i=!0,requestAnimationFrame(o)),s},C=(e,i)=>{if(n){const n=new y(e,i);return t.push(n),n}return w(e,i)}}();class x{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=S(e),o=n?n.getPropertyValue(t):"0";return x.convertToPixels(e,o)}static getBorderLeftWidth(e){return x.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return x.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return x.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return x.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return x.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return x.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return x.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return x.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return x.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return x.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return x.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return x.getDimension(e,"margin-bottom","marginBottom")}}class k{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new k(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof k?e:new k(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function N(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;const o=B(e)?null:S(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=x.getBorderLeftWidth(e),i+=x.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function D(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}function E(e){const t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:t.width,height:t.height}}function I(e){let t=e,i=1;do{const e=S(t).zoom;null!=e&&"1"!==e&&(i*=e),t=t.parentElement}while(null!==t&&t!==document.documentElement);return i}function T(e){const t=x.getMarginLeft(e)+x.getMarginRight(e);return e.offsetWidth+t}function M(e){const t=x.getBorderLeftWidth(e)+x.getBorderRightWidth(e),i=x.getPaddingLeft(e)+x.getPaddingRight(e);return e.offsetWidth-t-i}function R(e){const t=x.getBorderTopWidth(e)+x.getBorderBottomWidth(e),i=x.getPaddingTop(e)+x.getPaddingBottom(e);return e.offsetHeight-t-i}function A(e){const t=x.getMarginTop(e)+x.getMarginBottom(e);return e.offsetHeight+t}function O(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function P(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}function F(e,t,i){return!!P(e,t,i)}function B(e){return e&&!!e.host&&!!e.mode}function W(e){return!!V(e)}function V(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return B(e)?e:null}function H(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function z(e=document.getElementsByTagName("head")[0],t){const i=document.createElement("style");return i.type="text/css",i.media="screen",null==t||t(i),e.appendChild(i),i}k.None=new k(0,0);let K=null;function U(){return K||(K=z()),K}function j(e,t,i=U()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function $(e,t=U()){if(!t)return;const i=function(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}(t),n=[];for(let t=0;t<i.length;t++)-1!==i[t].selectorText.indexOf(e)&&n.push(t);for(let e=n.length-1;e>=0;e--)t.sheet.deleteRule(n[e])}function q(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const Z={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.Pf?"webkitAnimationStart":"animationstart",ANIMATION_END:n.Pf?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.Pf?"webkitAnimationIteration":"animationiteration"};function G(e){const t=e;return!(!t||"function"!=typeof t.preventDefault||"function"!=typeof t.stopPropagation)}const Q={stop:(e,t)=>(e.preventDefault(),t&&e.stopPropagation(),e)};function Y(e){const t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function J(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class X extends h.JT{static hasFocusWithin(e){const t=V(e);return O(t?t.activeElement:document.activeElement,e)}constructor(e){super(),this._onDidFocus=this._register(new l.Q5),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new l.Q5),this.onDidBlur=this._onDidBlur.event;let t=X.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,window.setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{X.hasFocusWithin(e)!==t&&(t?o():n())},this._register(f(e,Z.FOCUS,n,!0)),this._register(f(e,Z.BLUR,o,!0)),this._register(f(e,Z.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(f(e,Z.FOCUS_OUT,(()=>this._refreshStateHandler())))}}function ee(e){return new X(e)}function te(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function ie(e,t){return e.insertBefore(t,e.firstChild),t}function ne(e,...t){e.innerText="",te(e,...t)}const oe=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var se;function re(e,t,i,...n){const o=oe.exec(t);if(!o)throw new Error("Bad use of emmet");const s=o[1]||"div";let r;return r=e!==se.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach((([e,t])=>{void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function ae(e,t,...i){return re(se.HTML,e,t,...i)}function le(e,...t){e?de(...t):he(...t)}function de(...e){for(const t of e)t.style.display="",t.removeAttribute("aria-hidden")}function he(...e){for(const t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function ce(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function ue(e){window.open(e,"_blank","noopener")}function ge(e){const t=()=>{e(),i=w(t)};let i=w(t);return(0,h.OF)((()=>i.dispose()))}function pe(e){return e?`url('${c.Gi.uriToBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function me(e){return`'${e.replace(/'/g,"%27")}'`}function fe(e,t){if(void 0!==e){const i=e.match(/^\s*var\((.+)\)$/);if(i){const e=i[1].split(",",2);return 2===e.length&&(t=fe(e[1].trim(),t)),`var(${e[0]}, ${t})`}return e}return t}function _e(e,t=!1){const i=document.createElement("a");return d.v5("afterSanitizeAttributes",(n=>{for(const o of["href","src"])if(n.hasAttribute(o)){const s=n.getAttribute(o);if("href"===o&&s.startsWith("#"))continue;if(i.href=s,!e.includes(i.protocol.replace(/:$/,""))){if(t&&"src"===o&&i.href.startsWith("data:"))continue;n.removeAttribute(o)}}})),(0,h.OF)((()=>{d.ok("afterSanitizeAttributes")}))}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(se||(se={})),ae.SVG=function(e,t,...i){return re(se.SVG,e,t,...i)},c.WX.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");const ve=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class be extends l.Q5{constructor(){super(),this._subscriptions=new h.SL,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(f(window,"keydown",(e=>{if(e.defaultPrevented)return;const t=new s.y(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),this._subscriptions.add(f(window,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),this._subscriptions.add(f(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(f(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(f(document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),this._subscriptions.add(f(window,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return be.instance||(be.instance=new be),be.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class Ce extends h.JT{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(f(this.element,Z.DRAG_ENTER,(e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter(e)}))),this._register(f(this.element,Z.DRAG_OVER,(e=>{var t,i;e.preventDefault(),null===(i=(t=this.callbacks).onDragOver)||void 0===i||i.call(t,e,e.timeStamp-this.dragStartTime)}))),this._register(f(this.element,Z.DRAG_LEAVE,(e=>{this.counter--,0===this.counter&&(this.dragStartTime=0,this.callbacks.onDragLeave(e))}))),this._register(f(this.element,Z.DRAG_END,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(e)}))),this._register(f(this.element,Z.DROP,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(e)})))}}const we=/(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;function ye(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const o=we.exec(e);if(!o||!o.groups)throw new Error("Bad use of h");const s=o.groups.tag||"div",r=document.createElement(s);o.groups.id&&(r.id=o.groups.id);const a=[];if(o.groups.class)for(const e of o.groups.class.split("."))""!==e&&a.push(e);if(void 0!==i.className)for(const e of i.className.split("."))""!==e&&a.push(e);a.length>0&&(r.className=a.join(" "));const l={};if(o.groups.name&&(l[o.groups.name]=r),n)for(const e of n)e instanceof HTMLElement?r.appendChild(e):"string"==typeof e?r.append(e):"root"in e&&(Object.assign(l,e),r.appendChild(e.root));for(const[e,t]of Object.entries(i))if("className"!==e)if("style"===e)for(const[e,i]of Object.entries(t))r.style.setProperty(Se(e),"number"==typeof i?i+"px":""+i);else"tabIndex"===e?r.tabIndex=t:r.setAttribute(Se(e),t.toString());return l.root=r,l}function Se(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},70921:(e,t,i)=>{i.d(t,{Nw:()=>J,ok:()=>ee,v5:()=>X});const{entries:n,setPrototypeOf:o,isFrozen:s,getPrototypeOf:r,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:d,create:h}=Object,{apply:c,construct:u}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e,t,i){return e.apply(t,i)}),l||(l=function(e){return e}),d||(d=function(e){return e}),u||(u=function(e,t){return new e(...t)});const g=x(Array.prototype.forEach),p=x(Array.prototype.pop),m=x(Array.prototype.push),f=x(String.prototype.toLowerCase),_=x(String.prototype.toString),v=x(String.prototype.match),b=x(String.prototype.replace),C=x(String.prototype.indexOf),w=x(String.prototype.trim),y=x(RegExp.prototype.test),S=(L=TypeError,function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return u(L,t)});var L;function x(e){return function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return c(e,t,n)}}function k(e,t,i){var n;i=null!==(n=i)&&void 0!==n?n:f,o&&o(e,null);let r=t.length;for(;r--;){let n=t[r];if("string"==typeof n){const e=i(n);e!==n&&(s(t)||(t[r]=e),n=e)}e[n]=!0}return e}function N(e){const t=h(null);for(const[i,o]of n(e))t[i]=o;return t}function D(e,t){for(;null!==e;){const i=a(e,t);if(i){if(i.get)return x(i.get);if("function"==typeof i.value)return x(i.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}const E=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),I=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),T=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),R=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),A=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=l(["#text"]),P=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),F=l(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),W=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=d(/\{\{[\w\W]*|[\w\W]*\}\}/gm),H=d(/<%[\w\W]*|[\w\W]*%>/gm),z=d(/\${[\w\W]*}/gm),K=d(/^data-[\-\w.\u00B7-\uFFFF]/),U=d(/^aria-[\-\w]+$/),j=d(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=d(/^(?:\w+script|data):/i),q=d(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=d(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:V,ERB_EXPR:H,TMPLIT_EXPR:z,DATA_ATTR:K,ARIA_ATTR:U,IS_ALLOWED_URI:j,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:q,DOCTYPE_NAME:Z});const Q=()=>"undefined"==typeof window?null:window;var Y=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q();const i=t=>e(t);if(i.version="3.0.5",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;const o=t.document,s=o.currentScript;let{document:r}=t;const{DocumentFragment:a,HTMLTemplateElement:d,Node:h,Element:c,NodeFilter:u,NamedNodeMap:L=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:x,DOMParser:V,trustedTypes:H}=t,z=c.prototype,K=D(z,"cloneNode"),U=D(z,"nextSibling"),$=D(z,"childNodes"),q=D(z,"parentNode");if("function"==typeof d){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Y,J="";const{implementation:X,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ie}=r,{importNode:ne}=o;let oe={};i.isSupported="function"==typeof n&&"function"==typeof q&&X&&void 0!==X.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:re,TMPLIT_EXPR:ae,DATA_ATTR:le,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:ce}=G;let{IS_ALLOWED_URI:ue}=G,ge=null;const pe=k({},[...E,...I,...T,...R,...O]);let me=null;const fe=k({},[...P,...F,...B,...W]);let _e=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,be=null,Ce=!0,we=!0,ye=!1,Se=!0,Le=!1,xe=!1,ke=!1,Ne=!1,De=!1,Ee=!1,Ie=!1,Te=!0,Me=!1,Re=!0,Ae=!1,Oe={},Pe=null;const Fe=k({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Be=null;const We=k({},["audio","video","img","source","image","track"]);let Ve=null;const He=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ze="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",Ue="http://www.w3.org/1999/xhtml";let je=Ue,$e=!1,qe=null;const Ze=k({},[ze,Ke,Ue],_);let Ge;const Qe=["application/xhtml+xml","text/html"];let Ye,Je=null;const Xe=r.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},tt=function(e){if(!Je||Je!==e){if(e&&"object"==typeof e||(e={}),e=N(e),Ge=Ge=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ye="application/xhtml+xml"===Ge?_:f,ge="ALLOWED_TAGS"in e?k({},e.ALLOWED_TAGS,Ye):pe,me="ALLOWED_ATTR"in e?k({},e.ALLOWED_ATTR,Ye):fe,qe="ALLOWED_NAMESPACES"in e?k({},e.ALLOWED_NAMESPACES,_):Ze,Ve="ADD_URI_SAFE_ATTR"in e?k(N(He),e.ADD_URI_SAFE_ATTR,Ye):He,Be="ADD_DATA_URI_TAGS"in e?k(N(We),e.ADD_DATA_URI_TAGS,Ye):We,Pe="FORBID_CONTENTS"in e?k({},e.FORBID_CONTENTS,Ye):Fe,ve="FORBID_TAGS"in e?k({},e.FORBID_TAGS,Ye):{},be="FORBID_ATTR"in e?k({},e.FORBID_ATTR,Ye):{},Oe="USE_PROFILES"in e&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,we=!1!==e.ALLOW_DATA_ATTR,ye=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Le=e.SAFE_FOR_TEMPLATES||!1,xe=e.WHOLE_DOCUMENT||!1,De=e.RETURN_DOM||!1,Ee=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,Te=!1!==e.SANITIZE_DOM,Me=e.SANITIZE_NAMED_PROPS||!1,Re=!1!==e.KEEP_CONTENT,Ae=e.IN_PLACE||!1,ue=e.ALLOWED_URI_REGEXP||j,je=e.NAMESPACE||Ue,_e=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_e.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Le&&(we=!1),Ee&&(De=!0),Oe&&(ge=k({},[...O]),me=[],!0===Oe.html&&(k(ge,E),k(me,P)),!0===Oe.svg&&(k(ge,I),k(me,F),k(me,W)),!0===Oe.svgFilters&&(k(ge,T),k(me,F),k(me,W)),!0===Oe.mathMl&&(k(ge,R),k(me,B),k(me,W))),e.ADD_TAGS&&(ge===pe&&(ge=N(ge)),k(ge,e.ADD_TAGS,Ye)),e.ADD_ATTR&&(me===fe&&(me=N(me)),k(me,e.ADD_ATTR,Ye)),e.ADD_URI_SAFE_ATTR&&k(Ve,e.ADD_URI_SAFE_ATTR,Ye),e.FORBID_CONTENTS&&(Pe===Fe&&(Pe=N(Pe)),k(Pe,e.FORBID_CONTENTS,Ye)),Re&&(ge["#text"]=!0),xe&&k(ge,["html","head","body"]),ge.table&&(k(ge,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Y=e.TRUSTED_TYPES_POLICY,J=Y.createHTML("")}else void 0===Y&&(Y=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(H,s)),null!==Y&&"string"==typeof J&&(J=Y.createHTML(""));l&&l(e),Je=e}},it=k({},["mi","mo","mn","ms","mtext"]),nt=k({},["foreignobject","desc","title","annotation-xml"]),ot=k({},["title","style","font","a","script"]),st=k({},I);k(st,T),k(st,M);const rt=k({},R);k(rt,A);const at=function(e){m(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},lt=function(e,t){try{m(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!me[e])if(De||Ee)try{at(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t,i;if(Ne)e="<remove></remove>"+e;else{const t=v(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===Ge&&je===Ue&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const n=Y?Y.createHTML(e):e;if(je===Ue)try{t=(new V).parseFromString(n,Ge)}catch(e){}if(!t||!t.documentElement){t=X.createDocument(je,"template",null);try{t.documentElement.innerHTML=$e?J:n}catch(e){}}const o=t.body||t.documentElement;return e&&i&&o.insertBefore(r.createTextNode(i),o.childNodes[0]||null),je===Ue?ie.call(t,xe?"html":"body")[0]:xe?t.documentElement:o},ht=function(e){return ee.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},ct=function(e){return"object"==typeof h?e instanceof h:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ut=function(e,t,n){oe[e]&&g(oe[e],(e=>{e.call(i,t,n,Je)}))},gt=function(e){let t;if(ut("beforeSanitizeElements",e,null),(n=e)instanceof x&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof L)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return at(e),!0;var n;const o=Ye(e.nodeName);if(ut("uponSanitizeElement",e,{tagName:o,allowedTags:ge}),e.hasChildNodes()&&!ct(e.firstElementChild)&&(!ct(e.content)||!ct(e.content.firstElementChild))&&y(/<[/\w]/g,e.innerHTML)&&y(/<[/\w]/g,e.textContent))return at(e),!0;if(!ge[o]||ve[o]){if(!ve[o]&&mt(o)){if(_e.tagNameCheck instanceof RegExp&&y(_e.tagNameCheck,o))return!1;if(_e.tagNameCheck instanceof Function&&_e.tagNameCheck(o))return!1}if(Re&&!Pe[o]){const t=q(e)||e.parentNode,i=$(e)||e.childNodes;if(i&&t)for(let n=i.length-1;n>=0;--n)t.insertBefore(K(i[n],!0),U(e))}return at(e),!0}return e instanceof c&&!function(e){let t=q(e);t&&t.tagName||(t={namespaceURI:je,tagName:"template"});const i=f(e.tagName),n=f(t.tagName);return!!qe[e.namespaceURI]&&(e.namespaceURI===Ke?t.namespaceURI===Ue?"svg"===i:t.namespaceURI===ze?"svg"===i&&("annotation-xml"===n||it[n]):Boolean(st[i]):e.namespaceURI===ze?t.namespaceURI===Ue?"math"===i:t.namespaceURI===Ke?"math"===i&&nt[n]:Boolean(rt[i]):e.namespaceURI===Ue?!(t.namespaceURI===Ke&&!nt[n])&&!(t.namespaceURI===ze&&!it[n])&&!rt[i]&&(ot[i]||!st[i]):!("application/xhtml+xml"!==Ge||!qe[e.namespaceURI]))}(e)?(at(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!y(/<\/no(script|embed|frames)/i,e.innerHTML)?(Le&&3===e.nodeType&&(t=e.textContent,t=b(t,se," "),t=b(t,re," "),t=b(t,ae," "),e.textContent!==t&&(m(i.removed,{element:e.cloneNode()}),e.textContent=t)),ut("afterSanitizeElements",e,null),!1):(at(e),!0)},pt=function(e,t,i){if(Te&&("id"===t||"name"===t)&&(i in r||i in Xe))return!1;if(we&&!be[t]&&y(le,t));else if(Ce&&y(de,t));else if(!me[t]||be[t]){if(!(mt(e)&&(_e.tagNameCheck instanceof RegExp&&y(_e.tagNameCheck,e)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(e))&&(_e.attributeNameCheck instanceof RegExp&&y(_e.attributeNameCheck,t)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(t))||"is"===t&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&y(_e.tagNameCheck,i)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(i))))return!1}else if(Ve[t]);else if(y(ue,b(i,ce,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==C(i,"data:")||!Be[e])if(ye&&!y(he,b(i,ce,"")));else if(i)return!1;return!0},mt=function(e){return e.indexOf("-")>0},ft=function(e){let t,n,o,s;ut("beforeSanitizeAttributes",e,null);const{attributes:r}=e;if(!r)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:me};for(s=r.length;s--;){t=r[s];const{name:l,namespaceURI:d}=t;if(n="value"===l?t.value:w(t.value),o=Ye(l),a.attrName=o,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,ut("uponSanitizeAttribute",e,a),n=a.attrValue,a.forceKeepAttr)continue;if(lt(l,e),!a.keepAttr)continue;if(!Se&&y(/\/>/i,n)){lt(l,e);continue}Le&&(n=b(n,se," "),n=b(n,re," "),n=b(n,ae," "));const h=Ye(e.nodeName);if(pt(h,o,n)){if(!Me||"id"!==o&&"name"!==o||(lt(l,e),n="user-content-"+n),Y&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(d);else switch(H.getAttributeType(h,o)){case"TrustedHTML":n=Y.createHTML(n);break;case"TrustedScriptURL":n=Y.createScriptURL(n)}try{d?e.setAttributeNS(d,l,n):e.setAttribute(l,n),p(i.removed)}catch(e){}}}ut("afterSanitizeAttributes",e,null)},_t=function e(t){let i;const n=ht(t);for(ut("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)ut("uponSanitizeShadowNode",i,null),gt(i)||(i.content instanceof a&&e(i.content),ft(i));ut("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e){let t,n,s,r,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if($e=!e,$e&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ct(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!i.isSupported)return e;if(ke||tt(l),i.removed=[],"string"==typeof e&&(Ae=!1),Ae){if(e.nodeName){const t=Ye(e.nodeName);if(!ge[t]||ve[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof h)t=dt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!De&&!Le&&!xe&&-1===e.indexOf("<"))return Y&&Ie?Y.createHTML(e):e;if(t=dt(e),!t)return De?null:Ie?J:""}t&&Ne&&at(t.firstChild);const d=ht(Ae?e:t);for(;s=d.nextNode();)gt(s)||(s.content instanceof a&&_t(s.content),ft(s));if(Ae)return e;if(De){if(Ee)for(r=te.call(t.ownerDocument);t.firstChild;)r.appendChild(t.firstChild);else r=t;return(me.shadowroot||me.shadowrootmode)&&(r=ne.call(o,r,!0)),r}let c=xe?t.outerHTML:t.innerHTML;return xe&&ge["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&y(Z,t.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+c),Le&&(c=b(c,se," "),c=b(c,re," "),c=b(c,ae," ")),Y&&Ie?Y.createHTML(c):c},i.setConfig=function(e){tt(e),ke=!0},i.clearConfig=function(){Je=null,ke=!1},i.isValidAttribute=function(e,t,i){Je||tt({});const n=Ye(e),o=Ye(t);return pt(n,o,i)},i.addHook=function(e,t){"function"==typeof t&&(oe[e]=oe[e]||[],m(oe[e],t))},i.removeHook=function(e){if(oe[e])return p(oe[e])},i.removeHooks=function(e){oe[e]&&(oe[e]=[])},i.removeAllHooks=function(){oe={}},i}();Y.version,Y.isSupported;const J=Y.sanitize,X=(Y.setConfig,Y.clearConfig,Y.isValidAttribute,Y.addHook),ee=Y.removeHook;Y.removeHooks,Y.removeAllHooks},4850:(e,t,i)=>{i.d(t,{Y:()=>o});var n=i(4669);class o{get event(){return this.emitter.event}constructor(e,t,i){const o=e=>this.emitter.fire(e);this.emitter=new n.Q5({onWillAddFirstListener:()=>e.addEventListener(t,o,i),onDidRemoveLastListener:()=>e.removeEventListener(t,o,i)})}dispose(){this.emitter.dispose()}}},38626:(e,t,i)=>{i.d(t,{X:()=>s,Z:()=>n});class n{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=o(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=o(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=o(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=o(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=o(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=o(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=o(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=o(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=o(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=o(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=o(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function o(e){return"number"==typeof e?`${e}px`:e}function s(e){return new n(e)}},48764:(e,t,i)=>{i.d(t,{BO:()=>s,IY:()=>o,az:()=>r});var n=i(65321);function o(e,t={}){const i=r(t);return i.textContent=e,i}function s(e,t={}){const i=r(t);return l(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const s=[],r=new a(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==d(r.peek(),t);if(i&&(e=r.next()),i||0===d(e,t)||e!==r.peek())if("\n"===e)2===o.type&&(o=s.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),s.push(o),o=t}else o.content+=e;else{r.advance(),2===o.type&&(o=s.pop());const i=d(e,t);if(o.type===i||5===o.type&&6===i)o=s.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),s.push(o),o=e}}}return 2===o.type&&(o=s.pop()),s.length,i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function r(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i,o){let s;if(2===t.type)s=document.createTextNode(t.content||"");else if(3===t.type)s=document.createElement("b");else if(4===t.type)s=document.createElement("i");else if(7===t.type&&o)s=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(n.mu(e,"click",(e=>{i.callback(String(t.index),e)}))),s=e}else 8===t.type?s=document.createElement("br"):1===t.type&&(s=e);s&&e!==s&&e.appendChild(s),s&&Array.isArray(t.children)&&t.children.forEach((e=>{l(s,e,i,o)}))}function d(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},93911:(e,t,i)=>{i.d(t,{C:()=>s});var n=i(65321),o=i(5976);class s{constructor(){this._hooks=new o.SL,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,s,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add((0,o.OF)((()=>{try{e.releasePointerCapture(t)}catch(e){}})))}catch(e){a=window}this._hooks.add(n.nm(a,n.tw.POINTER_MOVE,(e=>{e.buttons===i?(e.preventDefault(),this._pointerMoveCallback(e)):this.stopMonitoring(!0)}))),this._hooks.add(n.nm(a,n.tw.POINTER_UP,(e=>this.stopMonitoring(!0))))}}},59069:(e,t,i)=>{i.d(t,{y:()=>d});var n=i(16268),o=i(22258),s=i(8313),r=i(1432);const a=r.dz?256:2048,l=r.dz?2048:256;class d{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=function(e){if(e.charCode){const t=String.fromCharCode(e.charCode).toUpperCase();return o.kL.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(n.vU)switch(t){case 59:return 85;case 60:if(r.IJ)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(r.dz)return 57}else if(n.Pf){if(r.dz&&93===t)return 57;if(!r.dz&&92===t)return 57}return o.H_[t]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=a),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=l),t|=e,t}_computeKeyCodeChord(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new s.$M(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}},77352:(e,t,i)=>{i.d(t,{ap:()=>k,et:()=>T});var n=i(65321),o=i(70921),s=i(4850),r=i(48764),a=i(59069),l=i(7448),d=i(56811),h=i(17301),c=i(4669),u=i(59365),g=i(21212),p=i(44742),m=i(79579),f=i(5976);let _={};!function(){function e(e,t){t(_)}var t,i;e.amd=!0,t=this,i=function(e){function t(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var s=/[&<>"']/,r=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},h=function(e){return d[e]};function c(e,t){if(t){if(s.test(e))return e.replace(r,h)}else if(a.test(e))return e.replace(l,h);return e}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g;function m(e,t){e="string"==typeof e?e:e.source,t=t||"";var i={replace:function(t,n){return n=(n=n.source||n).replace(p,"$1"),e=e.replace(t,n),i},getRegex:function(){return new RegExp(e,t)}};return i}var f=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function v(e,t,i){if(e){var n;try{n=decodeURIComponent(g(i)).replace(f,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!_.test(i)&&(i=function(e,t){b[" "+e]||(C.test(e)?b[" "+e]=e+"/":b[" "+e]=k(e,"/",!0));var i=-1===(e=b[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(w,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(y,"$1")+t:e+t}(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(e){return null}return i}var b={},C=/^[^:]+:\/*[^/]*$/,w=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/,S={exec:function(){}};function L(e){for(var t,i,n=1;n<arguments.length;n++)for(i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}function x(e,t){var i=e.replace(/\|/g,(function(e,t,i){for(var n=!1,o=t;--o>=0&&"\\"===i[o];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function k(e,t,i){var n=e.length;if(0===n)return"";for(var o=0;o<n;){var s=e.charAt(n-o-1);if(s!==t||i){if(s===t||!i)break;o++}else o++}return e.slice(0,n-o)}function N(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function D(e,t){if(t<1)return"";for(var i="";t>1;)1&t&&(i+=e),t>>=1,e+=e;return i+e}function E(e,t,i,n){var o=t.href,s=t.title?c(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;var a={type:"link",raw:i,href:o,title:s,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,a}return{type:"image",raw:i,href:o,title:s,text:c(r)}}var I=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},i.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:k(i,"\n")}}},i.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},i.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=k(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}},i.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},i.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var i=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(i,[]),text:i}}},i.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,o,s,r,a,l,d,h,c,u,g,p,m=t[1].trim(),f=m.length>1,_={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?"\\d{1,9}\\"+m.slice(-1):"\\"+m,this.options.pedantic&&(m=f?m:"[*+-]");for(var v=new RegExp("^( {0,3}"+m+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(p=!1,t=v.exec(e))&&!this.rules.block.hr.test(e);){if(i=t[0],e=e.substring(i.length),h=t[2].split("\n",1)[0],c=e.split("\n",1)[0],this.options.pedantic?(r=2,g=h.trimLeft()):(r=(r=t[2].search(/[^ ]/))>4?1:r,g=h.slice(r),r+=t[1].length),l=!1,!h&&/^ *$/.test(c)&&(i+=c+"\n",e=e.substring(c.length+1),p=!0),!p)for(var b=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),C=new RegExp("^ {0,"+Math.min(3,r-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),w=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:```|~~~)"),y=new RegExp("^ {0,"+Math.min(3,r-1)+"}#");e&&(h=u=e.split("\n",1)[0],this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!w.test(h))&&!y.test(h)&&!b.test(h)&&!C.test(e);){if(h.search(/[^ ]/)>=r||!h.trim())g+="\n"+h.slice(r);else{if(l)break;g+="\n"+h}l||h.trim()||(l=!0),i+=u+"\n",e=e.substring(u.length+1)}_.loose||(d?_.loose=!0:/\n *\n *$/.test(i)&&(d=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(g))&&(s="[ ] "!==o[0],g=g.replace(/^\[[ xX]\] +/,"")),_.items.push({type:"list_item",raw:i,task:!!o,checked:s,loose:!1,text:g}),_.raw+=i}_.items[_.items.length-1].raw=i.trimRight(),_.items[_.items.length-1].text=g.trimRight(),_.raw=_.raw.trimRight();var S=_.items.length;for(a=0;a<S;a++){this.lexer.state.top=!1,_.items[a].tokens=this.lexer.blockTokens(_.items[a].text,[]);var L=_.items[a].tokens.filter((function(e){return"space"===e.type})),x=L.every((function(e){for(var t,i=0,o=n(e.raw.split(""));!(t=o()).done;)if("\n"===t.value&&(i+=1),i>1)return!0;return!1}));!_.loose&&L.length&&x&&(_.loose=!0,_.items[a].loose=!0)}return _}},i.html=function(e){var t=this.rules.block.html.exec(e);if(t){var i={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var n=this.options.sanitizer?this.options.sanitizer(t[0]):c(t[0]);i.type="paragraph",i.text=n,i.tokens=this.lexer.inline(n)}return i}},i.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},i.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:x(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,o,s,r,a=i.align.length;for(n=0;n<a;n++)/^ *-+: *$/.test(i.align[n])?i.align[n]="right":/^ *:-+: *$/.test(i.align[n])?i.align[n]="center":/^ *:-+ *$/.test(i.align[n])?i.align[n]="left":i.align[n]=null;for(a=i.rows.length,n=0;n<a;n++)i.rows[n]=x(i.rows[n],i.header.length).map((function(e){return{text:e}}));for(a=i.header.length,o=0;o<a;o++)i.header[o].tokens=this.lexer.inline(i.header[o].text);for(a=i.rows.length,o=0;o<a;o++)for(r=i.rows[o],s=0;s<r.length;s++)r[s].tokens=this.lexer.inline(r[s].text);return i}}},i.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}},i.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t){var i="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:i,tokens:this.lexer.inline(i)}}},i.text=function(e){var t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}},i.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:c(t[1])}},i.tag=function(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):c(t[0]):t[0]}},i.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;var n=k(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var o=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var i=e.length,n=0,o=0;o<i;o++)if("\\"===e[o])o++;else if(e[o]===t[0])n++;else if(e[o]===t[1]&&--n<0)return o;return-1}(t[2],"()");if(o>-1){var s=(0===t[0].indexOf("!")?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,s).trim(),t[3]=""}}var r=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);l&&(r=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(i)?r.slice(1):r.slice(1,-1)),E(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0],this.lexer)}},i.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return E(i,n,i[0],this.lexer)}},i.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var o=n[1]||n[2]||"";if(!o||o&&(""===i||this.rules.inline.punctuation.exec(i))){var s,r,a=n[0].length-1,l=a,d=0,h="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);null!=(n=h.exec(t));)if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(r=s.length,n[3]||n[4])l+=r;else if(!((n[5]||n[6])&&a%3)||(a+r)%3){if(!((l-=r)>0)){if(r=Math.min(r,r+l+d),Math.min(a,r)%2){var c=e.slice(1,a+n.index+r);return{type:"em",raw:e.slice(0,a+n.index+r+1),text:c,tokens:this.lexer.inlineTokens(c)}}var u=e.slice(2,a+n.index+r-1);return{type:"strong",raw:e.slice(0,a+n.index+r+1),text:u,tokens:this.lexer.inlineTokens(u)}}}else d+=r}}},i.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return n&&o&&(i=i.substring(1,i.length-1)),i=c(i,!0),{type:"codespan",raw:t[0],text:i}}},i.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},i.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}},i.autolink=function(e,t){var i,n,o=this.rules.inline.autolink.exec(e);if(o)return n="@"===o[2]?"mailto:"+(i=c(this.options.mangle?t(o[1]):o[1])):i=c(o[1]),{type:"link",raw:o[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},i.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,o;if("@"===i[2])o="mailto:"+(n=c(this.options.mangle?t(i[0]):i[0]));else{var s;do{s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(s!==i[0]);n=c(i[0]),o="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}},i.inlineText=function(e,t){var i,n=this.rules.inline.text.exec(e);if(n)return i=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):c(n[0]):n[0]:c(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:i}},t}(),T={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:S,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};T.def=m(T.def).replace("label",T._label).replace("title",T._title).getRegex(),T.bullet=/(?:[*+-]|\d{1,9}[.)])/,T.listItemStart=m(/^( *)(bull) */).replace("bull",T.bullet).getRegex(),T.list=m(T.list).replace(/bull/g,T.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+T.def.source+")").getRegex(),T._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",T._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,T.html=m(T.html,"i").replace("comment",T._comment).replace("tag",T._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),T.paragraph=m(T._paragraph).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T._tag).getRegex(),T.blockquote=m(T.blockquote).replace("paragraph",T.paragraph).getRegex(),T.normal=L({},T),T.gfm=L({},T.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),T.gfm.table=m(T.gfm.table).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T._tag).getRegex(),T.gfm.paragraph=m(T._paragraph).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",T.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T._tag).getRegex(),T.pedantic=L({},T.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",T._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:S,paragraph:m(T.normal._paragraph).replace("hr",T.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",T.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var M={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:S,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:S,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function R(e){return e.replace(/---/g,"—").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function A(e){var t,i,n="",o=e.length;for(t=0;t<o;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}M._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",M.punctuation=m(M.punctuation).replace(/punctuation/g,M._punctuation).getRegex(),M.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,M.escapedEmSt=/\\\*|\\_/g,M._comment=m(T._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),M.emStrong.lDelim=m(M.emStrong.lDelim).replace(/punct/g,M._punctuation).getRegex(),M.emStrong.rDelimAst=m(M.emStrong.rDelimAst,"g").replace(/punct/g,M._punctuation).getRegex(),M.emStrong.rDelimUnd=m(M.emStrong.rDelimUnd,"g").replace(/punct/g,M._punctuation).getRegex(),M._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,M._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,M._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,M.autolink=m(M.autolink).replace("scheme",M._scheme).replace("email",M._email).getRegex(),M._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,M.tag=m(M.tag).replace("comment",M._comment).replace("attribute",M._attribute).getRegex(),M._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,M._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,M._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,M.link=m(M.link).replace("label",M._label).replace("href",M._href).replace("title",M._title).getRegex(),M.reflink=m(M.reflink).replace("label",M._label).replace("ref",T._label).getRegex(),M.nolink=m(M.nolink).replace("ref",T._label).getRegex(),M.reflinkSearch=m(M.reflinkSearch,"g").replace("reflink",M.reflink).replace("nolink",M.nolink).getRegex(),M.normal=L({},M),M.pedantic=L({},M.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",M._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",M._label).getRegex()}),M.gfm=L({},M.normal,{escape:m(M.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),M.gfm.url=m(M.gfm.url,"i").replace("email",M.gfm._extended_email).getRegex(),M.breaks=L({},M.gfm,{br:m(M.br).replace("{2,}","*").getRegex(),text:m(M.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var O=function(){function i(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new I,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var i={block:T.normal,inline:M.normal};this.options.pedantic?(i.block=T.pedantic,i.inline=M.pedantic):this.options.gfm&&(i.block=T.gfm,this.options.breaks?i.inline=M.breaks:i.inline=M.gfm),this.tokenizer.rules=i}i.lex=function(e,t){return new i(t).lex(e)},i.lexInline=function(e,t){return new i(t).inlineTokens(e)};var n,o,s=i.prototype;return s.lex=function(e){var t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens},s.blockTokens=function(e,t){var i,n,o,s,r=this;for(void 0===t&&(t=[]),e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,i){return t+" ".repeat(i.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(i=n.call({lexer:r},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)}))))if(i=this.tokenizer.space(e))e=e.substring(i.raw.length),1===i.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(i);else if(i=this.tokenizer.code(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?t.push(i):(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.list(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.html(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.def(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(n.raw+="\n"+i.raw,n.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.table(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.lheading(e))e=e.substring(i.raw.length),t.push(i);else if(o=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,i=e.slice(1),n=void 0;r.options.extensions.startBlock.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}(),this.state.top&&(i=this.tokenizer.paragraph(o)))n=t[t.length-1],s&&"paragraph"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i),s=o.length!==e.length,e=e.substring(i.raw.length);else if(i=this.tokenizer.text(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return this.state.top=!0,t},s.inline=function(e,t){return void 0===t&&(t=[]),this.inlineQueue.push({src:e,tokens:t}),t},s.inlineTokens=function(e,t){var i,n,o,s=this;void 0===t&&(t=[]);var r,a,l,d=e;if(this.tokens.links){var h=Object.keys(this.tokens.links);if(h.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(d));)h.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(d=d.slice(0,r.index)+"["+D("a",r[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(d));)d=d.slice(0,r.index)+"["+D("a",r[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(d));)d=d.slice(0,r.index)+"++"+d.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(i=n.call({lexer:s},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)}))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,d,l))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e,A))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e,A))){if(o=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,i=e.slice(1),n=void 0;s.options.extensions.startInline.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}(),i=this.tokenizer.inlineText(o,R))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(l=i.raw.slice(-1)),a=!0,(n=t[t.length-1])&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(i.raw.length),t.push(i);return t},n=i,o=[{key:"rules",get:function(){return{block:T,inline:M}}}],null&&t(n.prototype,null),o&&t(n,o),Object.defineProperty(n,"prototype",{writable:!1}),i}(),P=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,n);null!=o&&o!==e&&(i=!0,e=o)}return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="'+this.options.langPrefix+c(n,!0)+'">'+(i?e:c(e,!0))+"</code></pre>\n":"<pre><code>"+(i?e:c(e,!0))+"</code></pre>\n"},i.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},i.html=function(e){return e},i.heading=function(e,t,i,n){return this.options.headerIds?"<h"+t+' id="'+(this.options.headerPrefix+n.slug(i))+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},i.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},i.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"</"+n+">\n"},i.listitem=function(e){return"<li>"+e+"</li>\n"},i.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},i.paragraph=function(e){return"<p>"+e+"</p>\n"},i.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},i.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},i.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"</"+i+">\n"},i.strong=function(e){return"<strong>"+e+"</strong>"},i.em=function(e){return"<em>"+e+"</em>"},i.codespan=function(e){return"<code>"+e+"</code>"},i.br=function(){return this.options.xhtml?"<br/>":"<br>"},i.del=function(e){return"<del>"+e+"</del>"},i.link=function(e,t,i){if(null===(e=v(this.options.sanitize,this.options.baseUrl,e)))return i;var n='<a href="'+c(e)+'"';return t&&(n+=' title="'+t+'"'),n+">"+i+"</a>"},i.image=function(e,t,i){if(null===(e=v(this.options.sanitize,this.options.baseUrl,e)))return i;var n='<img src="'+e+'" alt="'+i+'"';return t&&(n+=' title="'+t+'"'),n+(this.options.xhtml?"/>":">")},i.text=function(e){return e},t}(),F=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),B=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),W=function(){function t(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new P,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new F,this.slugger=new B}t.parse=function(e,i){return new t(i).parse(e)},t.parseInline=function(e,i){return new t(i).parseInline(e)};var i=t.prototype;return i.parse=function(e,t){void 0===t&&(t=!0);var i,n,o,s,r,a,l,d,h,c,u,p,m,f,_,v,b,C,w,y="",S=e.length;for(i=0;i<S;i++)if(c=e[i],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[c.type])||!1===(w=this.options.extensions.renderers[c.type].call({parser:this},c))&&["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type))switch(c.type){case"space":continue;case"hr":y+=this.renderer.hr();continue;case"heading":y+=this.renderer.heading(this.parseInline(c.tokens),c.depth,g(this.parseInline(c.tokens,this.textRenderer)),this.slugger);continue;case"code":y+=this.renderer.code(c.text,c.lang,c.escaped);continue;case"table":for(d="",l="",s=c.header.length,n=0;n<s;n++)l+=this.renderer.tablecell(this.parseInline(c.header[n].tokens),{header:!0,align:c.align[n]});for(d+=this.renderer.tablerow(l),h="",s=c.rows.length,n=0;n<s;n++){for(l="",r=(a=c.rows[n]).length,o=0;o<r;o++)l+=this.renderer.tablecell(this.parseInline(a[o].tokens),{header:!1,align:c.align[o]});h+=this.renderer.tablerow(l)}y+=this.renderer.table(d,h);continue;case"blockquote":h=this.parse(c.tokens),y+=this.renderer.blockquote(h);continue;case"list":for(u=c.ordered,p=c.start,m=c.loose,s=c.items.length,h="",n=0;n<s;n++)v=(_=c.items[n]).checked,b=_.task,f="",_.task&&(C=this.renderer.checkbox(v),m?_.tokens.length>0&&"paragraph"===_.tokens[0].type?(_.tokens[0].text=C+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&"text"===_.tokens[0].tokens[0].type&&(_.tokens[0].tokens[0].text=C+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:C}):f+=C),f+=this.parse(_.tokens,m),h+=this.renderer.listitem(f,b,v);y+=this.renderer.list(h,u,p);continue;case"html":y+=this.renderer.html(c.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(c.tokens));continue;case"text":for(h=c.tokens?this.parseInline(c.tokens):c.text;i+1<S&&"text"===e[i+1].type;)h+="\n"+((c=e[++i]).tokens?this.parseInline(c.tokens):c.text);y+=t?this.renderer.paragraph(h):h;continue;default:var L='Token with "'+c.type+'" type was not found.';if(this.options.silent)return void console.error(L);throw new Error(L)}else y+=w||"";return y},i.parseInline=function(e,t){t=t||this.renderer;var i,n,o,s="",r=e.length;for(i=0;i<r;i++)if(n=e[i],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type])||!1===(o=this.options.extensions.renderers[n.type].call({parser:this},n))&&["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type))switch(n.type){case"escape":case"text":s+=t.text(n.text);break;case"html":s+=t.html(n.text);break;case"link":s+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":s+=t.image(n.href,n.title,n.text);break;case"strong":s+=t.strong(this.parseInline(n.tokens,t));break;case"em":s+=t.em(this.parseInline(n.tokens,t));break;case"codespan":s+=t.codespan(n.text);break;case"br":s+=t.br();break;case"del":s+=t.del(this.parseInline(n.tokens,t));break;default:var a='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(a);throw new Error(a)}else s+=o||"";return s},t}();function V(e,t,i){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(i=t,t=null),N(t=L({},V.defaults,t||{})),i){var n,o=t.highlight;try{n=O.lex(e,t)}catch(e){return i(e)}var s=function(e){var s;if(!e)try{t.walkTokens&&V.walkTokens(n,t.walkTokens),s=W.parse(n,t)}catch(t){e=t}return t.highlight=o,e?i(e):i(null,s)};if(!o||o.length<3)return s();if(delete t.highlight,!n.length)return s();var r=0;return V.walkTokens(n,(function(e){"code"===e.type&&(r++,setTimeout((function(){o(e.text,e.lang,(function(t,i){if(t)return s(t);null!=i&&i!==e.text&&(e.text=i,e.escaped=!0),0==--r&&s()}))}),0))})),void(0===r&&s())}function a(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+c(e.message+"",!0)+"</pre>";throw e}try{var l=O.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(V.walkTokens(l,t.walkTokens)).then((function(){return W.parse(l,t)})).catch(a);V.walkTokens(l,t.walkTokens)}return W.parse(l,t)}catch(e){a(e)}}V.options=V.setOptions=function(t){var i;return L(V.defaults,t),i=V.defaults,e.defaults=i,V},V.getDefaults=o,V.defaults=e.defaults,V.use=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n,o=L.apply(void 0,[{}].concat(t)),s=V.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((function(e){if(e.extensions&&(n=!0,e.extensions.forEach((function(e){if(!e.name)throw new Error("extension name required");if(e.renderer){var t=s.renderers?s.renderers[e.name]:null;s.renderers[e.name]=t?function(){for(var i=arguments.length,n=new Array(i),o=0;o<i;o++)n[o]=arguments[o];var s=e.renderer.apply(this,n);return!1===s&&(s=t.apply(this,n)),s}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");s[e.level]?s[e.level].unshift(e.tokenizer):s[e.level]=[e.tokenizer],e.start&&("block"===e.level?s.startBlock?s.startBlock.push(e.start):s.startBlock=[e.start]:"inline"===e.level&&(s.startInline?s.startInline.push(e.start):s.startInline=[e.start]))}e.childTokens&&(s.childTokens[e.name]=e.childTokens)}))),e.renderer&&function(){var t=V.defaults.renderer||new P,i=function(i){var n=t[i];t[i]=function(){for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];var a=e.renderer[i].apply(t,s);return!1===a&&(a=n.apply(t,s)),a}};for(var n in e.renderer)i(n);o.renderer=t}(),e.tokenizer&&function(){var t=V.defaults.tokenizer||new I,i=function(i){var n=t[i];t[i]=function(){for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];var a=e.tokenizer[i].apply(t,s);return!1===a&&(a=n.apply(t,s)),a}};for(var n in e.tokenizer)i(n);o.tokenizer=t}(),e.walkTokens){var t=V.defaults.walkTokens;o.walkTokens=function(i){var n=[];return n.push(e.walkTokens.call(this,i)),t&&(n=n.concat(t.call(this,i))),n}}n&&(o.extensions=s),V.setOptions(o)}))},V.walkTokens=function(e,t){for(var i,o=[],s=function(){var e=i.value;switch(o=o.concat(t.call(V,e)),e.type){case"table":for(var s,r=n(e.header);!(s=r()).done;){var a=s.value;o=o.concat(V.walkTokens(a.tokens,t))}for(var l,d=n(e.rows);!(l=d()).done;)for(var h,c=n(l.value);!(h=c()).done;){var u=h.value;o=o.concat(V.walkTokens(u.tokens,t))}break;case"list":o=o.concat(V.walkTokens(e.items,t));break;default:V.defaults.extensions&&V.defaults.extensions.childTokens&&V.defaults.extensions.childTokens[e.type]?V.defaults.extensions.childTokens[e.type].forEach((function(i){o=o.concat(V.walkTokens(e[i],t))})):e.tokens&&(o=o.concat(V.walkTokens(e.tokens,t)))}},r=n(e);!(i=r()).done;)s();return o},V.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");N(t=L({},V.defaults,t||{}));try{var i=O.lexInline(e,t);return t.walkTokens&&V.walkTokens(i,t.walkTokens),W.parseInline(i,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+c(e.message+"",!0)+"</pre>";throw e}},V.Parser=W,V.parser=W.parse,V.Renderer=P,V.TextRenderer=F,V.Lexer=O,V.lexer=O.lex,V.Tokenizer=I,V.Slugger=B,V.parse=V;var H=V.options,z=V.setOptions,K=V.use,U=V.walkTokens,j=V.parseInline,$=V,q=W.parse,Z=O.lex;e.Lexer=O,e.Parser=W,e.Renderer=P,e.Slugger=B,e.TextRenderer=F,e.Tokenizer=I,e.getDefaults=o,e.lexer=Z,e.marked=V,e.options=H,e.parse=$,e.parseInline=j,e.parser=q,e.setOptions=z,e.use=K,e.walkTokens=U,Object.defineProperty(e,"__esModule",{value:!0})},e.amd?e(0,i):"object"==typeof exports?i(exports):i((t="undefined"!=typeof globalThis?globalThis:t||self).marked={})}(),_.Lexer||exports.Lexer,_.Parser||exports.Parser,_.Renderer||exports.Renderer,_.Slugger||exports.Slugger,_.TextRenderer||exports.TextRenderer,_.Tokenizer||exports.Tokenizer,_.getDefaults||exports.getDefaults,_.lexer||exports.lexer;var v=_.marked||exports.marked,b=(_.options||exports.options,_.parse||exports.parse,_.parseInline||exports.parseInline,_.parser||exports.parser,_.setOptions||exports.setOptions,_.use||exports.use,_.walkTokens||exports.walkTokens,i(23897)),C=i(66663),w=i(36248),y=i(95935),S=i(97295),L=i(70666);const x=Object.freeze({image:(e,t,i)=>{let n=[],o=[];return e&&(({href:e,dimensions:n}=(0,u.v1)(e)),o.push(`src="${(0,u.d9)(e)}"`)),i&&o.push(`alt="${(0,u.d9)(i)}"`),t&&o.push(`title="${(0,u.d9)(t)}"`),n.length&&(o=o.concat(n)),"<img "+o.join(" ")+">"},paragraph:e=>`<p>${e}</p>`,link:(e,t,i)=>"string"!=typeof e?"":(e===i&&(i=(0,u.oR)(i)),t="string"==typeof t?(0,u.d9)((0,u.oR)(t)):"",`<a href="${e=(e=(0,u.oR)(e)).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}" title="${t||e}">${i}</a>`)});function k(e,t={},i={}){var o,u;const m=new f.SL;let _=!1;const y=(0,r.az)(t),k=function(t){let i;try{i=(0,b.Qc)(decodeURIComponent(t))}catch(e){}return i?(i=(0,w.rs)(i,(t=>e.uris&&e.uris[t]?L.o.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},I=function(t,i){const n=e.uris&&e.uris[t];let o=L.o.revive(n);return i?t.startsWith(C.lg.data+":")?t:(o||(o=L.o.parse(t)),C.Gi.uriToBrowserUri(o).toString(!0)):o?L.o.parse(t).toString()===o.toString()?t:(o.query&&(o=o.with({query:k(o.query)})),o.toString()):t},T=new v.Renderer;T.image=x.image,T.link=x.link,T.paragraph=x.paragraph;const M=[],R=[];if(t.codeBlockRendererSync?T.code=(e,i)=>{const n=p.a.nextId(),o=t.codeBlockRendererSync(N(i),e);return R.push([n,o]),`<div class="code" data-code="${n}">${(0,S.YU)(e)}</div>`}:t.codeBlockRenderer&&(T.code=(e,i)=>{const n=p.a.nextId(),o=t.codeBlockRenderer(N(i),e);return M.push(o.then((e=>[n,e]))),`<div class="code" data-code="${n}">${(0,S.YU)(e)}</div>`}),t.actionHandler){const i=function(i){let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{let o=n.dataset.href;o&&(e.baseUri&&(o=D(L.o.from(e.baseUri),o)),t.actionHandler.callback(o,i))}catch(e){(0,h.dL)(e)}finally{i.preventDefault()}},o=t.actionHandler.disposables.add(new s.Y(y,"click")),r=t.actionHandler.disposables.add(new s.Y(y,"auxclick"));t.actionHandler.disposables.add(c.ju.any(o.event,r.event)((e=>{const t=new l.n(e);(t.leftButton||t.middleButton)&&i(t)}))),t.actionHandler.disposables.add(n.nm(y,"keydown",(e=>{const t=new a.y(e);(t.equals(10)||t.equals(3))&&i(t)})))}e.supportHtml||(i.sanitizer=t=>(e.isTrusted?t.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?t:"",i.sanitize=!0,i.silent=!0),i.renderer=T;let A,F=null!==(o=e.value)&&void 0!==o?o:"";if(F.length>1e5&&(F=`${F.substr(0,1e5)}…`),e.supportThemeIcons&&(F=(0,g.f$)(F)),t.fillInIncompleteTokens){const e=Object.assign(Object.assign({},v.defaults),i),t=function(e){let t,i;for(t=0;t<e.length;t++){const n=e[t];if("paragraph"===n.type&&n.raw.match(/(\n|^)```/)){i=P(e.slice(t));break}if("paragraph"===n.type&&n.raw.match(/(\n|^)\|/)){i=K(e.slice(t));break}if(t===e.length-1&&"paragraph"===n.type){const e=O(n);if(e){i=[e];break}}}if(i){const n=[...e.slice(0,t),...i];return n.links=e.links,n}return e}(v.lexer(F,e));A=v.parser(t,e)}else A=v.parse(F,i);e.supportThemeIcons&&(A=(0,d.T)(A).map((e=>"string"==typeof e?e:e.outerHTML)).join(""));const B=(new DOMParser).parseFromString(E(e,A),"text/html");if(B.body.querySelectorAll("img").forEach((t=>{const i=t.getAttribute("src");if(i){let n=i;try{e.baseUri&&(n=D(L.o.from(e.baseUri),n))}catch(e){}t.src=I(n,!0)}})),B.body.querySelectorAll("a").forEach((t=>{const i=t.getAttribute("href");if(t.setAttribute("href",""),!i||/^data:|javascript:/i.test(i)||/^command:/i.test(i)&&!e.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(i))t.replaceWith(...t.childNodes);else{let n=I(i,!1);e.baseUri&&(n=D(L.o.from(e.baseUri),i)),t.dataset.href=n}})),y.innerHTML=E(e,B.body.innerHTML),M.length>0)Promise.all(M).then((e=>{var i,o;if(_)return;const s=new Map(e),r=y.querySelectorAll("div[data-code]");for(const e of r){const t=s.get(null!==(i=e.dataset.code)&&void 0!==i?i:"");t&&n.mc(e,t)}null===(o=t.asyncRenderCallback)||void 0===o||o.call(t)}));else if(R.length>0){const e=new Map(R),t=y.querySelectorAll("div[data-code]");for(const i of t){const t=e.get(null!==(u=i.dataset.code)&&void 0!==u?u:"");t&&n.mc(i,t)}}if(t.asyncRenderCallback)for(const e of y.getElementsByTagName("img")){const i=m.add(n.nm(e,"load",(()=>{i.dispose(),t.asyncRenderCallback()})))}return{element:y,dispose:()=>{_=!0,m.dispose()}}}function N(e){if(!e)return"";const t=e.split(/[\s+|:|,|\{|\?]/,1);return t.length?t[0]:e}function D(e,t){return/^\w[\w\d+.-]*:/.test(t)?t:e.path.endsWith("/")?(0,y.i3)(e,t).toString():(0,y.i3)((0,y.XX)(e),t).toString()}function E(e,t){const{config:i,allowedSchemes:s}=function(e){const t=[C.lg.http,C.lg.https,C.lg.mailto,C.lg.data,C.lg.file,C.lg.vscodeFileResource,C.lg.vscodeRemote,C.lg.vscodeRemoteResource];return e.isTrusted&&t.push(C.lg.command),{config:{ALLOWED_TAGS:[...n.sQ],ALLOWED_ATTR:I,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:t}}(e);o.v5("uponSanitizeAttribute",((e,t)=>{if("style"!==t.attrName&&"class"!==t.attrName);else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}}));const r=n._F(s);try{return o.Nw(t,Object.assign(Object.assign({},i),{RETURN_TRUSTED_TYPE:!0}))}finally{o.ok("uponSanitizeAttribute"),r.dispose()}}const I=["align","autoplay","alt","class","controls","data-code","data-href","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];function T(e){return"string"==typeof e?e:function(e){var t;let i=null!==(t=e.value)&&void 0!==t?t:"";return i.length>1e5&&(i=`${i.substr(0,1e5)}…`),E({isTrusted:!1},v.parse(i,{renderer:R.value}).replace(/&(#\d+|[a-zA-Z]+);/g,(e=>{var t;return null!==(t=M.get(e))&&void 0!==t?t:e}))).toString()}(e)}const M=new Map([["&quot;",'"'],["&nbsp;"," "],["&amp;","&"],["&#39;","'"],["&lt;","<"],["&gt;",">"]]),R=new m.o((()=>{const e=new v.Renderer;return e.code=e=>e,e.blockquote=e=>e,e.html=e=>"",e.heading=(e,t,i)=>e+"\n",e.hr=()=>"",e.list=(e,t)=>e,e.listitem=e=>e+"\n",e.paragraph=e=>e+"\n",e.table=(e,t)=>e+t+"\n",e.tablerow=e=>e,e.tablecell=(e,t)=>e+" ",e.strong=e=>e,e.em=e=>e,e.codespan=e=>e,e.br=()=>"\n",e.del=e=>e,e.image=(e,t,i)=>"",e.text=e=>e,e.link=(e,t,i)=>i,e}));function A(e){let t="";return e.forEach((e=>{t+=e.raw})),t}function O(e){for(const t of e.tokens)if("text"===t.type){const i=t.raw.split("\n"),n=i[i.length-1];if(n.includes("`"))return F(e);if(n.includes("**"))return z(e,"**");if(n.match(/\*\w/))return z(e,"*");if(n.match(/(^|\s)__\w/))return H(e);if(n.match(/(^|\s)_\w/))return B(e);if(n.match(/(^|\s)\[.*\]\(\w*/))return W(e);if(n.match(/(^|\s)\[\w/))return V(e)}}function P(e){const t=A(e);return v.lexer(t+"\n```")}function F(e){return z(e,"`")}function B(e){return z(e,"_")}function W(e){return z(e,")")}function V(e){return z(e,"](about:blank)")}function H(e){return z(e,"__")}function z(e,t){const i=A(Array.isArray(e)?e:[e]);return v.lexer(i+t)[0]}function K(e){const t=A(e),i=t.split("\n");let n,o=!1;for(let e=0;e<i.length;e++){const t=i[e].trim();if(void 0===n&&t.match(/^\s*\|/)){const e=t.match(/(\|[^\|]+)(?=\||$)/g);e&&(n=e.length)}else if("number"==typeof n){if(!t.match(/^\s*\|/))return;if(e!==i.length-1)return;o=!0}}if("number"==typeof n&&n>0){const e=o?i.slice(0,-1).join("\n"):t,s=!!e.match(/\|\s*$/),r=e+(s?"":"|")+`\n|${" --- |".repeat(n)}`;return v.lexer(r)}}},7448:(e,t,i)=>{i.d(t,{n:()=>d,q:()=>h});var n=i(16268);let o=!1,s=null;function r(e){if(!e.parent||e.parent===e)return null;try{const t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return o=!0,null}catch(e){return o=!0,null}return e.parent}class a{static getSameOriginWindowChain(){if(!s){s=[];let e,t=window;do{e=r(t),e?s.push({window:t,iframeElement:t.frameElement||null}):s.push({window:t,iframeElement:null}),t=e}while(t)}return s.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0;const o=this.getSameOriginWindowChain();for(const e of o){if(i+=e.window.scrollY,n+=e.window.scrollX,e.window===t)break;if(!e.iframeElement)break;const o=e.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}var l=i(1432);class d{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);const t=a.getPositionOfChildWindowRelativeToAncestorWindow(window,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class h{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){const t=e,i=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.vU&&!l.dz?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)n.G6&&l.ED?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.vU&&!l.dz?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;null===(e=this.browserEvent)||void 0===e||e.preventDefault()}stopPropagation(){var e;null===(e=this.browserEvent)||void 0===e||e.stopPropagation()}}},50795:(e,t,i)=>{var n;i.d(t,{B:()=>n}),function(e){const t={total:0,min:Number.MAX_VALUE,max:0},i=Object.assign({},t),n=Object.assign({},t),o=Object.assign({},t);let s=0;const r={keydown:0,input:0,render:0};function a(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function l(){performance.mark("input/start"),r.input=1,c()}function d(){1===r.input&&(performance.mark("input/end"),r.input=2)}function h(){1===r.render&&(performance.mark("render/end"),r.render=2)}function c(){setTimeout(u)}function u(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),g("keydown",t),g("input",i),g("render",n),g("inputlatency",o),s++,performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0)}function g(e,t){const i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function p(e){return{average:e.total/s,max:e.max,min:e.min}}function m(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=function(){u(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(a)},e.onBeforeInput=l,e.onInput=function(){0===r.input&&l(),queueMicrotask(d)},e.onKeyUp=function(){u()},e.onSelectionChange=function(){u()},e.onRenderStart=function(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(h),c())},e.getAndClearMeasurements=function(){if(0===s)return;const e={keydown:p(t),input:p(i),render:p(n),total:p(o),sampleCount:s};return m(t),m(i),m(n),m(o),s=0,e}}(n||(n={}))},10553:(e,t,i)=>{i.d(t,{o:()=>d,t:()=>n});var n,o=i(65321),s=i(9488),r=i(49898),a=i(5976),l=i(91741);!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(n||(n={}));class d extends a.JT{constructor(){super(),this.dispatched=!1,this.targets=new l.S,this.ignoreTargets=new l.S,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(o.nm(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(o.nm(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(o.nm(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){if(!d.isTouchDevice())return a.JT.None;d.INSTANCE||(d.INSTANCE=new d);const t=d.INSTANCE.targets.push(e);return(0,a.OF)(t)}static ignoreTarget(e){if(!d.isTouchDevice())return a.JT.None;d.INSTANCE||(d.INSTANCE=new d);const t=d.INSTANCE.ignoreTargets.push(e);return(0,a.OF)(t)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,o=e.targetTouches.length;i<o;i++){const o=e.targetTouches.item(i);this.activeTouches[o.identifier]={id:o.identifier,initialTarget:o.target,initialTimeStamp:t,initialPageX:o.pageX,initialPageY:o.pageY,rollingTimestamps:[t],rollingPageX:[o.pageX],rollingPageY:[o.pageY]};const s=this.newGestureEvent(n.Start,o.target);s.pageX=o.pageX,s.pageY=o.pageY,this.dispatchEvent(s)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e){const t=Date.now(),i=Object.keys(this.activeTouches).length;for(let o=0,r=e.changedTouches.length;o<r;o++){const r=e.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(r.identifier))){console.warn("move of an UNKNOWN touch",r);continue}const a=this.activeTouches[r.identifier],l=Date.now()-a.initialTimeStamp;if(l<d.HOLD_DELAY&&Math.abs(a.initialPageX-s.Gb(a.rollingPageX))<30&&Math.abs(a.initialPageY-s.Gb(a.rollingPageY))<30){const e=this.newGestureEvent(n.Tap,a.initialTarget);e.pageX=s.Gb(a.rollingPageX),e.pageY=s.Gb(a.rollingPageY),this.dispatchEvent(e)}else if(l>=d.HOLD_DELAY&&Math.abs(a.initialPageX-s.Gb(a.rollingPageX))<30&&Math.abs(a.initialPageY-s.Gb(a.rollingPageY))<30){const e=this.newGestureEvent(n.Contextmenu,a.initialTarget);e.pageX=s.Gb(a.rollingPageX),e.pageY=s.Gb(a.rollingPageY),this.dispatchEvent(e)}else if(1===i){const e=s.Gb(a.rollingPageX),i=s.Gb(a.rollingPageY),n=s.Gb(a.rollingTimestamps)-a.rollingTimestamps[0],o=e-a.rollingPageX[0],r=i-a.rollingPageY[0],l=[...this.targets].filter((e=>a.initialTarget instanceof Node&&e.contains(a.initialTarget)));this.inertia(l,t,Math.abs(o)/n,o>0?1:-1,e,Math.abs(r)/n,r>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(n.End,a.initialTarget)),delete this.activeTouches[r.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>d.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;for(const t of this.targets)t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}}inertia(e,t,i,s,r,a,l,h){this.handle=o.jL((()=>{const o=Date.now(),c=o-t;let u=0,g=0,p=!0;i+=d.SCROLL_FRICTION*c,a+=d.SCROLL_FRICTION*c,i>0&&(p=!1,u=s*i*c),a>0&&(p=!1,g=l*a*c);const m=this.newGestureEvent(n.Change);m.translationX=u,m.translationY=g,e.forEach((e=>e.dispatchEvent(m))),p||this.inertia(e,o,i,s,r+u,a,l,h+g)}))}onTouchMove(e){const t=Date.now();for(let i=0,o=e.changedTouches.length;i<o;i++){const o=e.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("end of an UNKNOWN touch",o);continue}const r=this.activeTouches[o.identifier],a=this.newGestureEvent(n.Change,r.initialTarget);a.translationX=o.pageX-s.Gb(r.rollingPageX),a.translationY=o.pageY-s.Gb(r.rollingPageY),a.pageX=o.pageX,a.pageY=o.pageY,this.dispatchEvent(a),r.rollingPageX.length>3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(o.pageX),r.rollingPageY.push(o.pageY),r.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}d.SCROLL_FRICTION=-.005,d.HOLD_DELAY=700,d.CLEAR_TAP_COUNT_TIME=400,function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([r.H],d,"isTouchDevice",null)},77514:(e,t,i)=>{i.d(t,{Z:()=>o});var n=i(17301);function o(e,t){var i;const o=globalThis.MonacoEnvironment;if(null==o?void 0:o.createTrustedTypesPolicy)try{return o.createTrustedTypesPolicy(e,t)}catch(e){return void(0,n.dL)(e)}try{return null===(i=window.trustedTypes)||void 0===i?void 0:i.createPolicy(e,t)}catch(e){return void(0,n.dL)(e)}}},10244:(e,t,i)=>{i.d(t,{gU:()=>U,YH:()=>K,Lc:()=>j});var n=i(16268),o=i(23547),s=i(65321),r=i(10553),a=i(51433),l=i(4850),d=i(59069),h=i(77352),c=i(43799),u=i(9488),g=i(4669),p=i(22258),m=i(5976),f=i(1432),_=i(93379),v=i.n(_),b=i(7795),C=i.n(b),w=i(90569),y=i.n(w),S=i(3565),L=i.n(S),x=i(19216),k=i.n(x),N=i(44589),D=i.n(N),E=i(62591),I={};I.styleTagTransform=D(),I.setAttributes=L(),I.insert=y().bind(null,"head"),I.domAPI=C(),I.insertStyleElement=k(),v()(E.Z,I),E.Z&&E.Z.locals&&E.Z.locals;var T=i(63580);const M=s.$,R="selectOption.entry.template";class A{get templateId(){return R}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=s.R3(e,M(".option-text")),t.detail=s.R3(e,M(".option-detail")),t.decoratorRight=s.R3(e,M(".option-decorator-right")),t}renderElement(e,t,i){const n=i,o=e.text,s=e.detail,r=e.decoratorRight,a=e.isDisabled;n.text.textContent=o,n.detail.textContent=s||"",n.decoratorRight.innerText=r||"",a?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class O extends m.JT{constructor(e,t,i,n,o){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=o||Object.create(null),"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=O.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new g.Q5,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return R}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=s.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=s.R3(this.selectDropDownContainer,M(".select-box-details-pane"));const t=s.R3(this.selectDropDownContainer,M(".select-box-dropdown-container-width-control")),i=s.R3(t,M(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",s.R3(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=s.dS(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(s.nm(this.selectDropDownContainer,s.tw.DRAG_START,(e=>{s.zB.stop(e,!0)})))}registerListeners(){let e;this._register(s.mu(this.selectElement,"change",(e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}))),this._register(s.nm(this.selectElement,s.tw.CLICK,(e=>{s.zB.stop(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(s.nm(this.selectElement,s.tw.MOUSE_DOWN,(e=>{s.zB.stop(e)}))),this._register(s.nm(this.selectElement,"touchstart",(t=>{e=this._isVisible}))),this._register(s.nm(this.selectElement,"touchend",(t=>{s.zB.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(s.nm(this.selectElement,s.tw.KEY_DOWN,(e=>{const t=new d.y(e);let i=!1;f.dz?18!==t.keyCode&&16!==t.keyCode&&10!==t.keyCode&&3!==t.keyCode||(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),s.zB.stop(e,!0))})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){u.fS(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"==typeof e.description&&(this._hasDetails=!0)}))),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;null===(e=this.selectList)||void 0===e||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join("\n")}styleSelectElement(){var e,t,i;const n=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",o=null!==(t=this.styles.selectForeground)&&void 0!==t?t:"",s=null!==(i=this.styles.selectBorder)&&void 0!==i?i:"";this.selectElement.style.backgroundColor=n,this.selectElement.style.color=o,this.selectElement.style.borderColor=s}styleList(){var e,t;const i=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",n=s.XT(this.styles.selectListBackground,i);this.selectDropDownListContainer.style.backgroundColor=n,this.selectionDetailsPane.style.backgroundColor=n;const o=null!==(t=this.styles.focusBorder)&&void 0!==t?t:"";this.selectDropDownContainer.style.outlineColor=o,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch(e){}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach(((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)})),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=s.i(this.selectElement),i=getComputedStyle(this.selectElement),n=parseFloat(i.getPropertyValue("--dropdown-padding-top"))+parseFloat(i.getPropertyValue("--dropdown-padding-bottom")),o=window.innerHeight-t.top-t.height-(this.selectBoxOptions.minBottomMargin||0),r=t.top-O.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,a=this.selectElement.offsetWidth,l=this.setWidthControlElement(this.widthControlElement),d=Math.max(l,Math.round(a)).toString()+"px";this.selectDropDownContainer.style.width=d,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let h=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const c=this._hasDetails?this._cachedMaxDetailsHeight:0,u=h+n+c,g=Math.floor((o-n-c)/this.getHeight()),p=Math.floor((r-n-c)/this.getHeight());if(e)return!(t.top+t.height>window.innerHeight-22||t.top<O.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||g<1&&p<1||(g<O.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&p>g&&this.options.length>g?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),0));if(t.top+t.height>window.innerHeight-22||t.top<O.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||0===this._dropDownPosition&&g<1||1===this._dropDownPosition&&p<1)return this.hideSelectDropDown(!0),!1;if(0===this._dropDownPosition){if(this._isVisible&&g+p<1)return this.hideSelectDropDown(!0),!1;u>o&&(h=g*this.getHeight())}else u>r&&(h=p*this.getHeight());return this.selectList.layout(h),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=h+n+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=h+n+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=d,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach(((e,t)=>{const o=e.detail?e.detail.length:0,s=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+o+s;r>n&&(i=t,n=r)})),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=s.w(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=s.R3(e,M(".select-box-dropdown-list-container")),this.listRenderer=new A,this.selectList=new c.aV("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>(0,T.NC)({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>f.dz?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new l.Y(this.selectDropDownListContainer,"keydown")),i=g.ju.chain(t.event).filter((()=>this.selectList.length>0)).map((e=>new d.y(e)));this._register(i.filter((e=>3===e.keyCode)).on((e=>this.onEnter(e)),this)),this._register(i.filter((e=>2===e.keyCode)).on((e=>this.onEnter(e)),this)),this._register(i.filter((e=>9===e.keyCode)).on((e=>this.onEscape(e)),this)),this._register(i.filter((e=>16===e.keyCode)).on((e=>this.onUpArrow(e)),this)),this._register(i.filter((e=>18===e.keyCode)).on((e=>this.onDownArrow(e)),this)),this._register(i.filter((e=>12===e.keyCode)).on(this.onPageDown,this)),this._register(i.filter((e=>11===e.keyCode)).on(this.onPageUp,this)),this._register(i.filter((e=>14===e.keyCode)).on(this.onHome,this)),this._register(i.filter((e=>13===e.keyCode)).on(this.onEnd,this)),this._register(i.filter((e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113)).on(this.onCharacter,this)),this._register(s.nm(this.selectList.getHTMLElement(),s.tw.POINTER_UP,(e=>this.onPointerUp(e)))),this._register(this.selectList.onMouseOver((e=>void 0!==e.index&&this.selectList.setFocus([e.index])))),this._register(this.selectList.onDidChangeFocus((e=>this.onListFocus(e)))),this._register(s.nm(this.selectDropDownContainer,s.tw.FOCUS_OUT,(e=>{this._isVisible&&!s.jg(e.relatedTarget,this.selectDropDownContainer)&&this.onListBlur()}))),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;s.zB.stop(e);const t=e.target;if(!t)return;if(t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),o=i.classList.contains("option-disabled");n>=0&&n<this.options.length&&!o&&(this.selected=n,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)),this.hideSelectDropDown(!0))}onListBlur(){this._sticky||(this.selected!==this._currentSelection&&this.select(this._currentSelection),this.hideSelectDropDown(!1))}renderDescriptionMarkdown(e,t){const i=e=>{for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes.item(t);"img"===(n.tagName&&n.tagName.toLowerCase())?e.removeChild(n):i(n)}},n=(0,h.ap)({value:e,supportThemeIcons:!0},{actionHandler:t});return n.element.classList.add("select-box-description-markdown"),i(n.element),n.element}onListFocus(e){this._isVisible&&this._hasDetails&&this.updateDetail(e.indexes[0])}updateDetail(e){var t,i;this.selectionDetailsPane.innerText="";const n=this.options[e],o=null!==(t=null==n?void 0:n.description)&&void 0!==t?t:"",s=null!==(i=null==n?void 0:n.descriptionIsMarkdown)&&void 0!==i&&i;if(o){if(s){const e=n.descriptionMarkdownActionHandler;this.selectionDetailsPane.appendChild(this.renderDescriptionMarkdown(o,e))}else this.selectionDetailsPane.innerText=o;this.selectionDetailsPane.style.display="block"}else this.selectionDetailsPane.style.display="none";this._skipLayout=!0,this.contextViewProvider.layout(),this._skipLayout=!1}onEscape(e){s.zB.stop(e),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(e){s.zB.stop(e),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)),this.hideSelectDropDown(!0)}onDownArrow(e){if(this.selected<this.options.length-1){s.zB.stop(e,!0);const t=this.options[this.selected+1].isDisabled;if(t&&this.options.length>this.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(s.zB.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){s.zB.stop(e),this.selectList.focusPreviousPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected<this.options.length-1&&(this.selected++,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onPageDown(e){s.zB.stop(e),this.selectList.focusNextPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onHome(e){s.zB.stop(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){s.zB.stop(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=p.kL.toString(e.keyCode);let i=-1;for(let n=0;n<this.options.length-1;n++)if(i=(n+this.selected+1)%this.options.length,this.options[i].text.charAt(0).toUpperCase()===t&&!this.options[i].isDisabled){this.select(i),this.selectList.setFocus([i]),this.selectList.reveal(this.selectList.getFocus()[0]),s.zB.stop(e);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}}O.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32,O.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2,O.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3;class P extends m.JT{constructor(e,t,i,n){super(),this.selected=0,this.selectBoxOptions=n||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new g.Q5),this.styles=i,this.registerListeners(),this.setOptions(e,t)}registerListeners(){this._register(r.o.addTarget(this.selectElement)),[r.t.Tap].forEach((e=>{this._register(s.nm(this.selectElement,e,(e=>{this.selectElement.focus()})))})),this._register(s.mu(this.selectElement,"click",(e=>{s.zB.stop(e,!0)}))),this._register(s.mu(this.selectElement,"change",(e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})}))),this._register(s.mu(this.selectElement,"keydown",(e=>{let t=!1;f.dz?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&u.fS(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))}))),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected<this.options.length&&"string"==typeof this.options[this.selected].text?this.selectElement.title=this.options[this.selected].text:this.selectElement.title=""}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){e.classList.add("select-container"),e.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}applyStyles(){var e,t,i;this.selectElement&&(this.selectElement.style.backgroundColor=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",this.selectElement.style.color=null!==(t=this.styles.selectForeground)&&void 0!==t?t:"",this.selectElement.style.borderColor=null!==(i=this.styles.selectBorder)&&void 0!==i?i:"")}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}}var F=i(93794),B=i(46512),W={};W.styleTagTransform=D(),W.setAttributes=L(),W.insert=y().bind(null,"head"),W.domAPI=C(),W.insertStyleElement=k(),v()(B.Z,W),B.Z&&B.Z.locals&&B.Z.locals;class V extends F.${constructor(e,t,i,n,o){super(),f.dz&&!(null==o?void 0:o.useCustomDrawn)?this.selectBoxDelegate=new P(e,t,n,o):this.selectBoxDelegate=new O(e,t,i,n,o),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(e,t){this.selectBoxDelegate.setOptions(e,t)}select(e){this.selectBoxDelegate.select(e)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(e){this.selectBoxDelegate.setFocusable(e)}render(e){this.selectBoxDelegate.render(e)}}var H=i(74741),z=i(98401);i(75408);class K extends m.JT{get action(){return this._action}constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof H.aU&&this._register(t.onDidChange((e=>{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new H.Wi)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(r.o.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,n.vU&&this._register((0,s.nm)(e,s.tw.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(o.g.TEXT,this._action.label)})))),this._register((0,s.nm)(t,r.t.Tap,(e=>this.onClick(e,!0)))),this._register((0,s.nm)(t,s.tw.MOUSE_DOWN,(e=>{i||s.zB.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),f.dz&&this._register((0,s.nm)(t,s.tw.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,s.nm)(t,s.tw.CLICK,(e=>{s.zB.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register((0,s.nm)(t,s.tw.DBLCLICK,(e=>{s.zB.stop(e,!0)}))),[s.tw.MOUSE_UP,s.tw.MOUSE_OUT].forEach((e=>{this._register((0,s.nm)(t,e,(e=>{s.zB.stop(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;s.zB.stop(e,!0);const n=z.Jp(this._context)?(null===(i=this.options)||void 0===i?void 0:i.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){var e;if(!this.element)return;const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=(0,a.g)(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateAriaLabel(){var e;if(this.element){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class U extends K{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=(0,s.R3)(this.element,(0,s.$)("a.action-label"))),this.label&&this.label.setAttribute("role",this.getDefaultAriaRole()),this.options.label&&this.options.keybinding&&this.element&&((0,s.R3)(this.element,(0,s.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===H.Z0.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=T.NC({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),null!=e?e:void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.action.class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):null===(e=this.label)||void 0===e||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),null===(e=this.element)||void 0===e||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),null===(t=this.element)||void 0===t||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(void 0!==this.action.checked?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.setAttribute("aria-checked",""),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class j extends K{constructor(e,t,i,n,o,s,r){super(e,t),this.selectBox=new V(i,n,o,s,r),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect((e=>this.runAction(e.selected,e.index))))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;null===(e=this.selectBox)||void 0===e||e.focus()}blur(){var e;null===(e=this.selectBox)||void 0===e||e.blur()}render(e){this.selectBox.render(e)}}},90317:(e,t,i)=>{i.d(t,{o:()=>c});var n=i(65321),o=i(59069),s=i(10244),r=i(74741),a=i(4669),l=i(5976),d=i(98401),h=(i(75408),function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))});class c extends l.JT{constructor(e,t={}){var i,d,h,c,u,g;let p,m;switch(super(),this._actionRunnerDisposables=this._register(new l.SL),this.viewItemDisposables=this._register(new l.b2),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new a.Q5),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new a.Q5({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new a.Q5),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new a.Q5),this.onWillRun=this._onWillRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(d=this.options.orientation)&&void 0!==d?d:0,this._triggerKeys={keyDown:null!==(c=null===(h=this.options.triggerKeys)||void 0===h?void 0:h.keyDown)&&void 0!==c&&c,keys:null!==(g=null===(u=this.options.triggerKeys)||void 0===u?void 0:u.keys)&&void 0!==g?g:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new r.Wi,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:p=[15],m=[17];break;case 1:p=[16],m=[18],this.domNode.className+=" vertical"}this._register(n.nm(this.domNode,n.tw.KEY_DOWN,(e=>{const t=new o.y(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;p&&(t.equals(p[0])||t.equals(p[1]))?i=this.focusPrevious():m&&(t.equals(m[0])||t.equals(m[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof s.YH&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(n.nm(this.domNode,n.tw.KEY_UP,(e=>{const t=new o.y(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()}))),this.focusTracker=this._register(n.go(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{n.vY()!==this.domNode&&n.jg(n.vY(),this.domNode)||(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof s.YH&&e.isEnabled()));e instanceof s.YH&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof s.YH&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;e<this.actionsList.children.length;e++){const t=this.actionsList.children[e];if(n.jg(n.vY(),t)){this.focusedItem=e;break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach((t=>t.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems.forEach((t=>t.actionRunner=e))}getContainer(){return this.domNode}getAction(e){var t;if("number"==typeof e)return null===(t=this.viewItems[e])||void 0===t?void 0:t.action;if(e instanceof HTMLElement){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t<this.actionsList.childNodes.length;t++)if(this.actionsList.childNodes[t]===e)return this.viewItems[t].action}}push(e,t={}){const i=Array.isArray(e)?e:[e];let o=d.hj(t.index)?t.index:null;i.forEach((e=>{const i=document.createElement("li");let r;i.className="action-item",i.setAttribute("role","presentation");const a=Object.assign({hoverDelegate:this.options.hoverDelegate},t);this.options.actionViewItemProvider&&(r=this.options.actionViewItemProvider(e,a)),r||(r=new s.gU(this.context,e,a)),this.options.allowContextMenu||this.viewItemDisposables.set(r,n.nm(i,n.tw.CONTEXT_MENU,(e=>{n.zB.stop(e,!0)}))),r.actionRunner=this._actionRunner,r.setActionContext(this.context),r.render(i),this.focusable&&r instanceof s.YH&&0===this.viewItems.length&&r.setFocusable(!0),null===o||o<0||o>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(r)):(this.actionsList.insertBefore(i,this.actionsList.children[o]),this.viewItems.splice(o,0,r),o++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,l.B9)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),n.PO(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===r.Z0.ID));return this.updateFocus(),!0}focusPrevious(e){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===r.Z0.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n;void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&(null===(n=this.viewItems[this.previouslyFocusedItem])||void 0===n||n.blur());const o=void 0!==this.focusedItem&&this.viewItems[this.focusedItem];if(o){let n=!0;d.mf(o.focus)||(n=!1),this.options.focusOnlyEnabledItems&&d.mf(o.isEnabled)&&!o.isEnabled()&&(n=!1),o.action.id===r.Z0.ID&&(n=!1),n?(i||this.previouslyFocusedItem!==this.focusedItem)&&(o.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof s.YH){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return h(this,void 0,void 0,(function*(){yield this._actionRunner.run(e,t)}))}dispose(){this._context=void 0,this.viewItems=(0,l.B9)(this.viewItems),this.getContainer().remove(),super.dispose()}}},56346:(e,t,i)=>{i.d(t,{Z9:()=>x,wW:()=>L,i7:()=>k});var n=i(65321),o=i(93379),s=i.n(o),r=i(7795),a=i.n(r),l=i(90569),d=i.n(l),h=i(3565),c=i.n(h),u=i(19216),g=i.n(u),p=i(44589),m=i.n(p),f=i(93),_={};_.styleTagTransform=m(),_.setAttributes=c(),_.insert=d().bind(null,"head"),_.domAPI=a(),_.insertStyleElement=g(),s()(f.Z,_),f.Z&&f.Z.locals&&f.Z.locals;const v=2e4;let b,C,w,y,S;function L(e){b=document.createElement("div"),b.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),b.appendChild(e),e};C=t(),w=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),b.appendChild(e),e};y=i(),S=i(),e.appendChild(b)}function x(e){b&&(C.textContent!==e?(n.PO(w),N(C,e)):(n.PO(C),N(w,e)))}function k(e){b&&(y.textContent!==e?(n.PO(S),N(y,e)):(n.PO(y),N(S,e)))}function N(e,t){n.PO(e),t.length>v&&(t=t.substr(0,v)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},32052:(e,t,i)=>{i.d(t,{z:()=>N});var n=i(65321),o=i(70921),s=i(59069),r=i(77352),a=i(10553),l=i(56811),d=i(41264),h=i(4669),c=i(59365),u=i(5976),g=i(93379),p=i.n(g),m=i(7795),f=i.n(m),_=i(90569),v=i.n(_),b=i(3565),C=i.n(b),w=i(19216),y=i.n(w),S=i(44589),L=i.n(S),x=i(72013),k={};k.styleTagTransform=L(),k.setAttributes=C(),k.insert=v().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=y(),p()(x.Z,k),x.Z&&x.Z.locals&&x.Z.locals,d.Il.white.toString(),d.Il.white.toString();class N extends u.JT{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new h.Q5),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,o=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=o||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),e.appendChild(this._element),this._register(a.o.addTarget(this._element)),[n.tw.CLICK,a.t.Tap].forEach((e=>{this._register((0,n.nm)(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):n.zB.stop(e)})))})),this._register((0,n.nm)(this._element,n.tw.KEY_DOWN,(e=>{const t=new s.y(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._element.blur(),i=!0),i&&n.zB.stop(t,!0)}))),this._register((0,n.nm)(this._element,n.tw.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)}))),this._register((0,n.nm)(this._element,n.tw.MOUSE_OUT,(e=>{this.updateBackground(!1)}))),this.focusTracker=this._register((0,n.go)(this._element)),this._register(this.focusTracker.onDidFocus((()=>{this.enabled&&this.updateBackground(!0)}))),this._register(this.focusTracker.onDidBlur((()=>{this.enabled&&this.updateBackground(!1)})))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of(0,l.T)(e))if("string"==typeof i){if(i=i.trim(),""===i)continue;const e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var t;if(this._label===e)return;if((0,c.Fr)(this._label)&&(0,c.Fr)(e)&&(0,c.g_)(this._label,e))return;this._element.classList.add("monaco-text-button");const i=this.options.supportShortLabel?this._labelElement:this._element;if((0,c.Fr)(e)){const s=(0,r.ap)(e,{inline:!0});s.dispose();const a=null===(t=s.element.querySelector("p"))||void 0===t?void 0:t.innerHTML;if(a){const e=(0,o.Nw)(a,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});i.innerHTML=e}else(0,n.mc)(i)}else this.options.supportIcons?(0,n.mc)(i,...this.getContentElements(e)):i.textContent=e;"string"==typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=(0,r.et)(e)),this._label=e}get label(){return this._label}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}},89899:(e,t,i)=>{var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(50058),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=i(24081),v={};v.styleTagTransform=p(),v.setAttributes=h(),v.insert=l().bind(null,"head"),v.domAPI=r(),v.insertStyleElement=u(),o()(_.Z,v),_.Z&&_.Z.locals&&_.Z.locals},89162:(e,t,i)=>{i.d(t,{Z:()=>b});var n=i(65321),o=i(97295),s=i(93379),r=i.n(s),a=i(7795),l=i.n(a),d=i(90569),h=i.n(d),c=i(3565),u=i.n(c),g=i(19216),p=i.n(g),m=i(44589),f=i.n(m),_=i(90477),v={};v.styleTagTransform=f(),v.setAttributes=u(),v.insert=h().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p(),r()(_.Z,v),_.Z&&_.Z.locals&&_.Z.locals;class b{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=(0,n.R3)(e,(0,n.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=(0,o.WU)(this.countFormat,this.count),this.element.title=(0,o.WU)(this.titleFormat,this.count),this.element.style.backgroundColor=null!==(e=this.styles.badgeBackground)&&void 0!==e?e:"",this.element.style.color=null!==(t=this.styles.badgeForeground)&&void 0!==t?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}},98324:(e,t,i)=>{i.d(t,{C:()=>x});var n=i(65321),o=i(10244),s=i(59069),r=i(10553),a=i(74741),l=i(4669),d=i(93379),h=i.n(d),c=i(7795),u=i.n(c),g=i(90569),p=i.n(g),m=i(3565),f=i.n(m),_=i(19216),v=i.n(_),b=i(44589),C=i.n(b),w=i(25035),y={};y.styleTagTransform=C(),y.setAttributes=f(),y.insert=p().bind(null,"head"),y.domAPI=u(),y.insertStyleElement=v(),h()(w.Z,y),w.Z&&w.Z.locals&&w.Z.locals;class S extends a.Wi{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new l.Q5),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,n.R3)(e,(0,n.$)(".monaco-dropdown")),this._label=(0,n.R3)(this._element,(0,n.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[n.tw.CLICK,n.tw.MOUSE_DOWN,r.t.Tap])this._register((0,n.nm)(this.element,e,(e=>n.zB.stop(e,!0))));for(const e of[n.tw.MOUSE_DOWN,r.t.Tap])this._register((0,n.nm)(this._label,e,(e=>{e instanceof MouseEvent&&(e.detail>1||0!==e.button)||(this.visible?this.hide():this.show())})));this._register((0,n.nm)(this._label,n.tw.KEY_UP,(e=>{const t=new s.y(e);(t.equals(3)||t.equals(10))&&(n.zB.stop(e,!0),this.visible?this.hide():this.show())})));const o=i(this._label);o&&this._register(o),this._register(r.o.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class L extends S{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class x extends o.YH{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new l.Q5),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=(0,n.R3)(e,(0,n.$)("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new L(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),null!=e?e:void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;null===(e=this.dropdownMenu)||void 0===e||e.show()}updateEnabled(){var e,t;const i=!this.action.enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}},50153:(e,t,i)=>{i.d(t,{V:()=>c});var n=i(65321),o=i(51307),s=i(44299),r=i(93794),a=i(4669),l=(i(30340),i(63580)),d=i(5976);const h=l.NC("defaultLabel","input");class c extends r.${constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=new d.SL,this.additionalToggles=[],this._onDidOptionChange=this._register(new a.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new a.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new a.Q5),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new a.Q5),this._onKeyUp=this._register(new a.Q5),this._onCaseSensitiveKeyDown=this._register(new a.Q5),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new a.Q5),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||h,this.showCommonFindToggles=!!i.showCommonFindToggles;const r=i.appendCaseSensitiveLabel||"",l=i.appendWholeWordsLabel||"",c=i.appendRegexLabel||"",u=i.history||[],g=!!i.flexibleHeight,p=!!i.flexibleWidth,m=i.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new s.pG(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:u,showHistoryHint:i.showHistoryHint,flexibleHeight:g,flexibleWidth:p,flexibleMaxHeight:m,inputBoxStyles:i.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new o.eH(Object.assign({appendTitle:c,isChecked:!1},i.toggleStyles))),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new o.Qx(Object.assign({appendTitle:l,isChecked:!1},i.toggleStyles))),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new o.rk(Object.assign({appendTitle:r,isChecked:!1},i.toggleStyles))),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)})));const e=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(t=>{if(t.equals(15)||t.equals(17)||t.equals(9)){const i=e.indexOf(document.activeElement);if(i>=0){let o=-1;t.equals(17)?o=(i+1)%e.length:t.equals(15)&&(o=0===i?e.length-1:i-1),t.equals(9)?(e[i].blur(),this.inputBox.focus()):o>=0&&e[o].focus(),n.zB.stop(t,!0)}}}))}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(null==i?void 0:i.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),null==e||e.appendChild(this.domNode),this._register(n.nm(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(n.nm(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,i;this.domNode.classList.remove("disabled"),this.inputBox.enable(),null===(e=this.regex)||void 0===e||e.enable(),null===(t=this.wholeWords)||void 0===t||t.enable(),null===(i=this.caseSensitive)||void 0===i||i.enable();for(const e of this.additionalToggles)e.enable()}disable(){var e,t,i;this.domNode.classList.add("disabled"),this.inputBox.disable(),null===(e=this.regex)||void 0===e||e.disable(),null===(t=this.wholeWords)||void 0===t||t.disable(),null===(i=this.caseSensitive)||void 0===i||i.disable();for(const e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const e of this.additionalToggles)e.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.dispose(),this.additionalTogglesDisposables=new d.SL;for(const t of null!=e?e:[])this.additionalTogglesDisposables.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.add(t.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()}))),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,i,n,o,s,r;this.inputBox.paddingRight=e?0:(null!==(i=null===(t=this.caseSensitive)||void 0===t?void 0:t.width())&&void 0!==i?i:0)+(null!==(o=null===(n=this.wholeWords)||void 0===n?void 0:n.width())&&void 0!==o?o:0)+(null!==(r=null===(s=this.regex)||void 0===s?void 0:s.width())&&void 0!==r?r:0)+this.additionalToggles.reduce(((e,t)=>e+t.width()),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return null!==(t=null===(e=this.caseSensitive)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return null!==(t=null===(e=this.wholeWords)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return null!==(t=null===(e=this.regex)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;null===(e=this.caseSensitive)||void 0===e||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}},51307:(e,t,i)=>{i.d(t,{Qx:()=>h,eH:()=>c,rk:()=>d});var n=i(98892),o=i(73046),s=i(63580);const r=s.NC("caseDescription","Match Case"),a=s.NC("wordsDescription","Match Whole Word"),l=s.NC("regexDescription","Use Regular Expression");class d extends n.Z{constructor(e){super({icon:o.l.caseSensitive,title:r+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class h extends n.Z{constructor(e){super({icon:o.l.wholeWord,title:a+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class c extends n.Z{constructor(e){super({icon:o.l.regex,title:l+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}},34650:(e,t,i)=>{i.d(t,{q:()=>r});var n=i(65321),o=i(56811),s=i(36248);class r{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=null!==(i=null==t?void 0:t.supportIcons)&&void 0!==i&&i,this.domNode=n.R3(e,n.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=r.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&s.fS(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t<i.start){const n=this.text.substring(t,i.start);this.supportIcons?e.push(...(0,o.T)(n)):e.push(n),t=i.start}const s=this.text.substring(t,i.end),r=n.$("span.highlight",void 0,...this.supportIcons?(0,o.T)(s):[s]);i.extraClasses&&r.classList.add(...i.extraClasses),e.push(r),t=i.end}if(t<this.text.length){const i=this.text.substring(t);this.supportIcons?e.push(...(0,o.T)(i)):e.push(i)}n.mc(this.domNode,...e),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(e,t){let i=0,n=0;return e.replace(/\r\n|\r|\n/g,((e,o)=>{n="\r\n"===e?-1:0,o+=i;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=n),e.end>=o&&(e.end+=n));return i+=n,"⏎"}))}}},82246:(e,t,i)=>{i.d(t,{Sr:()=>L,c8:()=>S,uX:()=>x});var n=i(65321),o=i(59069),s=i(64117),r=i(5976),a=i(93379),l=i.n(a),d=i(7795),h=i.n(d),c=i(90569),u=i.n(c),g=i(3565),p=i.n(g),m=i(19216),f=i.n(m),_=i(44589),v=i.n(_),b=i(93039),C={};C.styleTagTransform=v(),C.setAttributes=p(),C.insert=u().bind(null,"head"),C.domAPI=h(),C.insertStyleElement=f(),l()(b.Z,C),b.Z&&b.Z.locals&&b.Z.locals;var w=i(63580);const y=n.$;class S extends r.JT{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new s.s$(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class L extends r.JT{static render(e,t,i){return new L(e,t,i)}constructor(e,t,i){super(),this.actionContainer=n.R3(e,y("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=n.R3(this.actionContainer,y("a.action")),this.action.setAttribute("role","button"),t.iconClass&&n.R3(this.action,y(`span.icon.${t.iconClass}`)),n.R3(this.action,y("span")).textContent=i?`${t.label} (${i})`:t.label,this._register(n.nm(this.actionContainer,n.tw.CLICK,(e=>{e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer)}))),this._register(n.nm(this.actionContainer,n.tw.KEY_DOWN,(e=>{const i=new o.y(e);(i.equals(3)||i.equals(10))&&(e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer))}))),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function x(e,t){return e&&t?(0,w.NC)("acessibleViewHint","Inspect this in the accessible view with {0}.",t):e?(0,w.NC)("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}},32107:(e,t,i)=>{i.d(t,{g:()=>L});var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(94269),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=i(65321),v=i(34650),b=i(51433),C=i(5976),w=i(36248),y=i(61134);class S{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class L extends C.JT{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new S(_.R3(e,_.$(".monaco-icon-label")))),this.labelContainer=_.R3(this.domNode.element,_.$(".monaco-icon-label-container"));const i=_.R3(this.labelContainer,_.$("span.monaco-icon-name-container"));(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new k(i,!!t.supportIcons):this.nameNode=new x(i),this.hoverDelegate=null==t?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"],o=["monaco-icon-label-container"];let s="";if(i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough"),i.disabledCommand&&o.push("disabled"),i.title&&(s+=i.title)),this.domNode.className=n.join(" "),this.domNode.element.setAttribute("aria-label",s),this.labelContainer.className=o.join(" "),this.setupHover((null==i?void 0:i.descriptionTitle)?this.labelContainer:this.element,null==i?void 0:i.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const e=this.getOrCreateDescriptionNode();e instanceof v.q?(e.set(t||"",i?i.descriptionMatches:void 0,void 0,null==i?void 0:i.labelEscapeNewLines),this.setupHover(e.element,null==i?void 0:i.descriptionTitle)):(e.textContent=t&&(null==i?void 0:i.labelEscapeNewLines)?v.q.escapeNewLines(t,[]):t||"",this.setupHover(e.element,(null==i?void 0:i.descriptionTitle)||""),e.empty=!t)}}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const i=(0,b.g)(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else(0,b.O)(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new S(_.R3(this.labelContainer,_.$("span.monaco-icon-description-container"))));(null===(e=this.creationOptions)||void 0===e?void 0:e.supportDescriptionHighlights)?this.descriptionNode=new v.q(_.R3(t.element,_.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new S(_.R3(t.element,_.$("span.label-description"))))}return this.descriptionNode}}class x{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,w.fS)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=_.R3(this.container,_.$("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){const n=e[i],o=(null==t?void 0:t.domId)&&`${null==t?void 0:t.domId}_${i}`;_.R3(this.container,_.$("a.label-name",{id:o,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},n)),i<e.length-1&&_.R3(this.container,_.$("span.label-separator",void 0,(null==t?void 0:t.separator)||"/"))}}}}class k{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,w.fS)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new v.q(_.R3(this.container,_.$("a.label-name",{id:null==t?void 0:t.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(e,null==t?void 0:t.matches,void 0,null==t?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(null==t?void 0:t.separator)||"/",n=function(e,t,i){if(!i)return;let n=0;return e.map((e=>{const o={start:n,end:n+e.length},s=i.map((e=>y.e.intersect(o,e))).filter((e=>!y.e.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,s}))}(e,i,null==t?void 0:t.matches);for(let o=0;o<e.length;o++){const s=e[o],r=n?n[o]:void 0,a=(null==t?void 0:t.domId)&&`${null==t?void 0:t.domId}_${o}`,l=_.$("a.label-name",{id:a,"data-icon-label-count":e.length,"data-icon-label-index":o,role:"treeitem"});new v.q(_.R3(this.container,l),{supportIcons:this.supportIcons}).set(s,r,void 0,null==t?void 0:t.labelEscapeNewLines),o<e.length-1&&_.R3(l,_.$("span.label-separator",void 0,i))}}}}},51433:(e,t,i)=>{i.d(t,{O:()=>u,g:()=>p});var n=i(65321),o=i(15393),s=i(71050),r=i(59365),a=i(21212),l=i(5976),d=i(98401),h=i(63580),c=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function u(e,t){(0,d.HD)(t)?e.title=(0,a.x$)(t):(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}class g{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t,i){var n;return c(this,void 0,void 0,(function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let o;if(void 0===e||(0,d.HD)(e)||e instanceof HTMLElement)o=e;else if((0,d.mf)(e.markdown)){this._hoverWidget||this.show((0,h.NC)("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new s.A;const i=this._cancellationTokenSource.token;if(o=yield e.markdown(i),void 0===o&&(o=e.markdownNotSupportedFallback),this.isDisposed||i.isCancellationRequested)return}else o=null!==(n=e.markdown)&&void 0!==n?n:e.markdownNotSupportedFallback;this.show(o,t,i)}))}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const o=Object.assign({content:e,target:this.target,showPointer:"element"===this.hoverDelegate.placement,hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!n},i);this._hoverWidget=this.hoverDelegate.showHover(o,t)}null==n||n.dispose()}hasContent(e){return!(!e||(0,r.Fr)(e)&&!e.value)}get isDisposed(){var e;return null===(e=this._hoverWidget)||void 0===e?void 0:e.isDisposed}dispose(){var e,t;null===(e=this._hoverWidget)||void 0===e||e.dispose(),null===(t=this._cancellationTokenSource)||void 0===t||t.dispose(!0),this._cancellationTokenSource=void 0}}function p(e,t,i,s){let r,a;const d=(t,i)=>{var n;const o=void 0!==a;t&&(null==a||a.dispose(),a=void 0),i&&(null==r||r.dispose(),r=void 0),o&&(null===(n=e.onDidHideHover)||void 0===n||n.call(e))},h=(n,r,l)=>new o._F((()=>c(this,void 0,void 0,(function*(){a&&!a.isDisposed||(a=new g(e,l||t,n>0),yield a.update(i,r,s))}))),n),u=n.nm(t,n.tw.MOUSE_OVER,(()=>{if(r)return;const i=new l.SL;i.add(n.nm(t,n.tw.MOUSE_LEAVE,(e=>d(!1,e.fromElement===t)),!0)),i.add(n.nm(t,n.tw.MOUSE_DOWN,(()=>d(!0,!0)),!0));const o={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>{o.x=e.x+10,e.target instanceof HTMLElement&&e.target.classList.contains("action-label")&&d(!0,!0)};i.add(n.nm(t,n.tw.MOUSE_MOVE,e,!0))}i.add(h(e.delay,!1,o)),r=i}),!0);return{show:e=>{d(!1,!0),h(0,e)},hide:()=>{d(!0,!0)},update:(e,t)=>c(this,void 0,void 0,(function*(){i=e,yield null==a?void 0:a.update(i,void 0,t)})),dispose:()=>{u.dispose(),d(!0,!0)}}}},56811:(e,t,i)=>{i.d(t,{T:()=>r,h:()=>a});var n=i(65321),o=i(25670);const s=new RegExp(`(\\\\)?\\$\\((${o.k.iconNameExpression}(?:${o.k.iconModifierExpression})?)\\)`,"g");function r(e){const t=new Array;let i,n=0,o=0;for(;null!==(i=s.exec(e));){o=i.index||0,n<o&&t.push(e.substring(n,o)),n=(i.index||0)+i[0].length;const[,s,r]=i;t.push(s?`$(${r})`:a({id:r}))}return n<e.length&&t.push(e.substring(n)),t}function a(e){const t=n.$("span");return t.classList.add(...o.k.asClassNameArray(e)),t}},44299:(e,t,i)=>{i.d(t,{pG:()=>M,g4:()=>I});var n=i(65321),o=i(4850),s=i(48764),r=i(90317),a=i(56346),l=i(64117),d=i(93794),h=i(4669);class c{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class u{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return null===this._navigator.current()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new c(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var g=i(36248),p=i(93379),m=i.n(p),f=i(7795),_=i.n(f),v=i(90569),b=i.n(v),C=i(3565),w=i.n(C),y=i(19216),S=i.n(y),L=i(44589),x=i.n(L),k=i(41188),N={};N.styleTagTransform=x(),N.setAttributes=w(),N.insert=b().bind(null,"head"),N.domAPI=_(),N.insertStyleElement=S(),m()(k.Z,N),k.Z&&k.Z.locals&&k.Z.locals;var D=i(63580);const E=n.$,I={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0};class T extends d.${constructor(e,t,i){var s;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new h.Q5),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new h.Q5),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(s=this.options.tooltip)&&void 0!==s?s:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=n.R3(e,E(".monaco-inputbox.idle"));const a=this.options.flexibleHeight?"textarea":"input",d=n.R3(this.element,E(".ibwrapper"));if(this.input=n.R3(d,E(a+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=n.R3(d,E("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new l.NB(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),n.R3(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new o.Y(document,"selectionchange")),i=h.ju.filter(t.event,(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===d}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this._register(this.ignoreGesture(this.input)),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new r.o(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:n.wn(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if("open"===this.state&&(0,g.fS)(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${n.XT(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null==e?void 0:e.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=n.w(this.element)+"px";let i;this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{var o,r;if(!this.message)return null;e=n.R3(i,E(".monaco-inputbox-container")),t();const a={inline:!0,className:"monaco-inputbox-message"},l=this.message.formatContent?(0,s.BO)(this.message.content,a):(0,s.IY)(this.message.content,a);l.classList.add(this.classForType(this.message.type));const d=this.stylesForType(this.message.type);return l.style.backgroundColor=null!==(o=d.background)&&void 0!==o?o:"",l.style.color=null!==(r=d.foreground)&&void 0!==r?r:"",l.style.border=d.border?`1px solid ${d.border}`:"",n.R3(e,l),null},onHide:()=>{this.state="closed"},layout:t}),i=3===this.message.type?D.NC("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?D.NC("alertWarningMessage","Warning: {0}",this.message.content):D.NC("alertInfoMessage","Info: {0}",this.message.content),a.Z9(i),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}applyStyles(){var e,t,i;const o=this.options.inputBoxStyles,s=null!==(e=o.inputBackground)&&void 0!==e?e:"",r=null!==(t=o.inputForeground)&&void 0!==t?t:"",a=null!==(i=o.inputBorder)&&void 0!==i?i:"";this.element.style.backgroundColor=s,this.element.style.color=r,this.input.style.backgroundColor="inherit",this.input.style.color=r,this.element.style.border=`1px solid ${n.XT(a,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=n.wn(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,null===(e=this.actionbar)||void 0===e||e.dispose(),super.dispose()}}class M extends T{constructor(e,t,i){const n=D.NC({key:"history.inputbox.hint",comment:["Text will be prefixed with ⇅ plus a single space, then used as a hint where input field keeps history"]},"for history"),o=` or ⇅ ${n}`,s=` (⇅ ${n})`;super(e,t,i),this._onDidFocus=this._register(new h.Q5),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new h.Q5),this.onDidBlur=this._onDidBlur.event,this.history=new u(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(o)&&!this.placeholder.endsWith(s)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?o:s,t=this.placeholder+e;i.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||r()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>r())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(s)||e(o)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=null!=e?e:"",a.i7(this.value?this.value:D.NC("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,a.i7(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}},12983:(e,t,i)=>{i.d(t,{e:()=>S,F:()=>y});var n=i(65321),o=i(8030),s=i(36248),r=i(93379),a=i.n(r),l=i(7795),d=i.n(l),h=i(90569),c=i.n(h),u=i(3565),g=i.n(u),p=i(19216),m=i.n(p),f=i(44589),_=i.n(f),v=i(72298),b={};b.styleTagTransform=_(),b.setAttributes=g(),b.insert=c().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m(),a()(v.Z,b),v.Z&&v.Z.locals&&v.Z.locals;var C=i(63580);const w=n.$,y={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class S{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null);const o=this.options.keybindingLabelForeground;this.domNode=n.R3(e,w(".monaco-keybinding")),o&&(this.domNode.style.color=o),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&S.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){var e;if(this.clear(),this.keybinding){const t=this.keybinding.getChords();t[0]&&this.renderChord(this.domNode,t[0],this.matches?this.matches.firstPart:null);for(let e=1;e<t.length;e++)n.R3(this.domNode,w("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderChord(this.domNode,t[e],this.matches?this.matches.chordPart:null);const i=null!==(e=this.options.disableTitle)&&void 0!==e&&e?void 0:this.keybinding.getAriaLabel()||void 0;void 0!==i?this.domNode.title=i:this.domNode.removeAttribute("title")}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}clear(){n.PO(this.domNode),this.keyElements.clear()}renderChord(e,t,i){const n=o.xo.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(null==i?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(null==i?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(null==i?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(null==i?void 0:i.metaKey),n.separator);const s=t.keyLabel;s&&this.renderKey(e,s,Boolean(null==i?void 0:i.keyCode),"")}renderKey(e,t,i,o){n.R3(e,this.createKeyElement(t,i?".highlight":"")),o&&n.R3(e,w("span.monaco-keybinding-key-separator",void 0,o))}renderUnbound(e){n.R3(e,this.createKeyElement((0,C.NC)("unbound","Unbound")))}createKeyElement(e,t=""){const i=w("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),this.options.keybindingLabelBackground&&(i.style.backgroundColor=this.options.keybindingLabelBackground),this.options.keybindingLabelBorder&&(i.style.borderColor=this.options.keybindingLabelBorder),this.options.keybindingLabelBottomBorder&&(i.style.borderBottomColor=this.options.keybindingLabelBottomBorder),this.options.keybindingLabelShadow&&(i.style.boxShadow=`inset 0 -1px 0 ${this.options.keybindingLabelShadow}`),i}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&(0,s.fS)(e.firstPart,t.firstPart)&&(0,s.fS)(e.chordPart,t.chordPart)}}},25707:(e,t,i)=>{i.d(t,{kX:()=>S,Bv:()=>N});var n=i(23547),o=i(65321),s=i(4850),r=i(10553),a=i(64117),l=i(9488),d=i(15393),h=i(49898),c=i(4669),u=i(5976),g=i(61134),p=i(76633);function m(e,t){const i=[];for(const n of t){if(e.start>=n.range.end)continue;if(e.end<n.range.start)break;const t=g.e.intersect(e,n.range);g.e.isEmpty(t)||i.push({range:t,size:n.size})}return i}function f({start:e,end:t},i){return{start:e+i,end:t+i}}class _{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=null!=e?e:0,this._size=this._paddingTop}splice(e,t,i=[]){const n=i.length-t,o=m({start:0,end:e},this.groups),s=m({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((e=>({range:f(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(const n of e){const e=n.range.start,o=n.range.end,s=n.size;i&&s===i.size?i.range.end=o:(i={range:{start:e,end:o},size:s},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(o,r,s),this._size=this._paddingTop+this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e<this._paddingTop)return 0;let t=0,i=this._paddingTop;for(const n of this.groups){const o=n.range.end-n.range.start,s=i+o*n.size;if(e<s)return t+Math.floor((e-i)/n.size);t+=o,i=s}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let t=0,i=0;for(const n of this.groups){const o=n.range.end-n.range.start,s=i+o;if(e<s)return this._paddingTop+t+(e-i)*n.size;t+=o*n.size,i=s}return-1}}class v{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let t=this.getTemplateCache(e).pop(),i=!1;if(t)i=this.transactionNodesPendingRemoval.has(t.domNode),i&&this.transactionNodesPendingRemoval.delete(t.domNode);else{const i=(0,o.$)(".monaco-list-row");t={domNode:i,templateId:e,templateData:this.getRenderer(e).renderTemplate(i)}}return{row:t,isReusingConnectedDomNode:i}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(const e of this.transactionNodesPendingRemoval)this.doRemoveNode(e);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(this.inTransaction?this.transactionNodesPendingRemoval.add(t):this.doRemoveNode(t)),this.getTemplateCache(i).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),function(e){var t;try{null===(t=e.parentElement)||void 0===t||t.removeChild(e)}catch(e){}}(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach(((e,t)=>{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null})),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var b=i(17301),C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const w={CurrentDragAndDropData:void 0},y={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class S{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class L{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class x{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;t<e.files.length;t++){const i=e.files.item(t);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}class k{constructor(e){(null==e?void 0:e.getSetSize)?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(e,t,i)=>i,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class N{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,o.FK)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=y){var s,l,h,g,m,f,b,C,w,S,L,x,D;if(this.virtualDelegate=t,this.domId="list_id_"+ ++N.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new d.vp(50),this.splicing=!1,this.dragOverAnimationStopDisposable=u.JT.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=u.JT.None,this.onDragLeaveTimeout=u.JT.None,this.disposables=new u.SL,this._onDidChangeContentHeight=new c.Q5,this._onDidChangeContentWidth=new c.Q5,this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new _(null!==(s=n.paddingTop)&&void 0!==s?s:0);for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new v(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=null!==(l=n.horizontalScrolling)&&void 0!==l?l:y.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=void 0===n.paddingBottom?0:n.paddingBottom,this.accessibilityProvider=new k(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(null!==(h=n.transformOptimization)&&void 0!==h?h:y.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(r.o.addTarget(this.rowsContainer)),this.scrollable=new p.Rm({forceIntegerValues:!0,smoothScrollDuration:null!==(g=n.smoothScrolling)&&void 0!==g&&g?125:0,scheduleAtNextAnimationFrame:e=>(0,o.jL)(e)}),this.scrollableElement=this.disposables.add(new a.$Z(this.rowsContainer,{alwaysConsumeMouseWheel:null!==(m=n.alwaysConsumeMouseWheel)&&void 0!==m?m:y.alwaysConsumeMouseWheel,horizontal:1,vertical:null!==(f=n.verticalScrollMode)&&void 0!==f?f:y.verticalScrollMode,useShadows:null!==(b=n.useShadows)&&void 0!==b?b:y.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,o.nm)(this.rowsContainer,r.t.Change,(e=>this.onTouchChange(e)))),this.disposables.add((0,o.nm)(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add((0,o.nm)(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=null!==(C=n.setRowLineHeight)&&void 0!==C?C:y.setRowLineHeight,this.setRowHeight=null!==(w=n.setRowHeight)&&void 0!==w?w:y.setRowHeight,this.supportDynamicHeights=null!==(S=n.supportDynamicHeights)&&void 0!==S?S:y.supportDynamicHeights,this.dnd=null!==(L=n.dnd)&&void 0!==L?L:y.dnd,this.layout(null===(x=n.initialSize)||void 0===x?void 0:x.height,null===(D=n.initialSize)||void 0===D?void 0:D.width)}updateOptions(e){let t;if(void 0!==e.paddingBottom&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t=Object.assign(Object.assign({},null!=t?t:{}),{scrollByPage:e.scrollByPage})),void 0!==e.mouseWheelScrollSensitivity&&(t=Object.assign(Object.assign({},null!=t?t:{}),{mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity})),void 0!==e.fastScrollSensitivity&&(t=Object.assign(Object.assign({},null!=t?t:{}),{fastScrollSensitivity:e.fastScrollSensitivity})),t&&this.scrollableElement.updateOptions(t),void 0!==e.paddingTop&&e.paddingTop!==this.rangeMap.paddingTop){const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(t,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},s=g.e.intersect(n,o),r=new Map;for(let e=s.end-1;e>=s.start;e--){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let i=r.get(t.templateId);i||(i=[],r.set(t.templateId,i));const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),i.push(t.row)}t.row=null}const a={start:e+t,end:this.items.length},l=g.e.intersect(a,n),d=g.e.relativeComplement(a,n),h=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:u.JT.None,checkedDisposable:u.JT.None})));let c;0===e&&t>=this.items.length?(this.rangeMap=new _(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,h),c=this.items,this.items=h):(this.rangeMap.splice(e,t,h),c=this.items.splice(e,t,...h));const p=i.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),v=f(l,p),b=g.e.intersect(m,v);for(let e=b.start;e<b.end;e++)this.updateItemInDOM(this.items[e],e);const C=g.e.relativeComplement(v,m);for(const e of C)for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t);const w=d.map((e=>f(e,p))),y=[{start:e,end:e+i.length},...w].map((e=>g.e.intersect(m,e))),S=this.getNextToLastElement(y);for(const e of y)for(let t=e.start;t<e.end;t++){const e=this.items[t],i=r.get(e.templateId),n=null==i?void 0:i.pop();this.insertItemInDOM(t,S,n)}for(const e of r.values())for(const t of e)this.cache.release(t);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),c.map((e=>e.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,o.jL)((()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){const e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),t=this.rangeMap.positionAt(e.start),i=this.rangeMap.positionAt(e.start+1);return-1!==i&&(i-t)/2+t<this.scrollTop?e.start+1:e.start}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:"number"==typeof e?e:(0,o.If)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,o.FK)(this.domNode)})}render(e,t,i,n,o,s=!1){const r=this.getRenderRange(t,i),a=g.e.relativeComplement(r,e),l=g.e.relativeComplement(e,r),d=this.getNextToLastElement(a);if(s){const t=g.e.intersect(e,r);for(let e=t.start;e<t.end;e++)this.updateItemInDOM(this.items[e],e)}this.cache.transact((()=>{for(const e of l)for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t);for(const e of a)for(let t=e.start;t<e.end;t++)this.insertItemInDOM(t,d)})),void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==o&&(this.rowsContainer.style.width=`${Math.max(o,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t,i){const n=this.items[e];let s=!1;if(!n.row)if(i)n.row=i;else{const e=this.cache.alloc(n.templateId);n.row=e.row,s=e.isReusingConnectedDomNode}const r=this.accessibilityProvider.getRole(n.element)||"listitem";n.row.domNode.setAttribute("role",r);const a=this.accessibilityProvider.isChecked(n.element);if("boolean"==typeof a)n.row.domNode.setAttribute("aria-checked",String(!!a));else if(a){const e=e=>n.row.domNode.setAttribute("aria-checked",String(!!e));e(a.value),n.checkedDisposable=a.onDidChange(e)}!s&&n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const l=this.renderers.get(n.templateId);if(!l)throw new Error(`No renderer found for template id ${n.templateId}`);null==l||l.renderElement(n.element,e,n.row.templateData,n.size);const d=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!d,d&&(n.dragStartDisposable=(0,o.nm)(n.row.domNode,"dragstart",(e=>this.onDragStart(n.element,d,e)))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=(0,o.FK)(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return c.ju.map(this.disposables.add(new s.Y(this.domNode,"click")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseDblClick(){return c.ju.map(this.disposables.add(new s.Y(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseMiddleClick(){return c.ju.filter(c.ju.map(this.disposables.add(new s.Y(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e)),this.disposables),(e=>1===e.browserEvent.button),this.disposables)}get onMouseDown(){return c.ju.map(this.disposables.add(new s.Y(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOver(){return c.ju.map(this.disposables.add(new s.Y(this.domNode,"mouseover")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOut(){return c.ju.map(this.disposables.add(new s.Y(this.domNode,"mouseout")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onContextMenu(){return c.ju.any(c.ju.map(this.disposables.add(new s.Y(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e)),this.disposables),c.ju.map(this.disposables.add(new s.Y(this.domNode,r.t.Contextmenu)).event,(e=>this.toGestureEvent(e)),this.disposables))}get onTouchStart(){return c.ju.map(this.disposables.add(new s.Y(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)),this.disposables)}get onTap(){return c.ju.map(this.disposables.add(new s.Y(this.rowsContainer,r.t.Tap)).event,(e=>this.toGestureEvent(e)),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){var s,r;if(!i.dataTransfer)return;const a=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(n.g.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(a,i)),void 0===e&&(e=String(a.length));const t=(0,o.$)(".monaco-drag-image");t.textContent=e;const n=(e=>{for(;e&&!e.classList.contains("monaco-workbench");)e=e.parentElement;return e||document.body})(this.domNode);n.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>n.removeChild(t)),0)}this.domNode.classList.add("dragging"),this.currentDragData=new S(a),w.CurrentDragAndDropData=new L(a),null===(r=(s=this.dnd).onDragStart)||void 0===r||r.call(s,this.currentDragData,i)}onDragOver(e){var t;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),w.CurrentDragAndDropData&&"vscode-ui"===w.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(w.CurrentDragAndDropData)this.currentDragData=w.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new x}const i=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof i?i:i.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let n;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof i&&0===i.effect?"copy":"move",n="boolean"!=typeof i&&i.feedback?i.feedback:void 0===e.index?[-1]:[e.index],n=(0,l.EB)(n).filter((e=>e>=-1&&e<this.length)).sort(((e,t)=>e-t)),n=-1===n[0]?[-1]:n,o=this.currentDragFeedback,s=n,Array.isArray(o)&&Array.isArray(s)?(0,l.fS)(o,s):o===s)return!0;var o,s;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),-1===n[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,u.OF)((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of n){const i=this.items[e];i.dropTarget=!0,null===(t=i.row)||void 0===t||t.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,u.OF)((()=>{var e;for(const t of n){const i=this.items[t];i.dropTarget=!1,null===(e=i.row)||void 0===e||e.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,d.Vg)((()=>this.clearDragOverFeedback()),100),this.currentDragData&&(null===(i=(t=this.dnd).onDragLeave)||void 0===i||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,w.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){var t,i;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,w.CurrentDragAndDropData=void 0,null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=u.JT.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,o.xQ)(this.domNode).top;this.dragOverAnimationDisposable=(0,o.jt)(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,d.Vg)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let o,s;e===this.elementTop(n.start)?(o=n.start,s=0):n.end-n.start>1&&(o=n.start+1,s=this.elementTop(o)-e);let r=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e<a.end;e++){const t=this.probeDynamicHeight(e);0!==t&&this.rangeMap.splice(e,1,[this.items[e]]),r+=t,l=l||0!==t}if(!l){0!==r&&this.eventuallyUpdateScrollDimensions();const t=g.e.relativeComplement(n,a);for(const e of t)for(let t=e.start;t<e.end;t++)this.items[t].row&&this.removeItemFromDOM(t);const l=g.e.relativeComplement(a,n);for(const e of l)for(let t=e.start;t<e.end;t++){const e=t+1,i=e<this.items.length?this.items[e].row:null,n=i?i.domNode:null;this.insertItemInDOM(t,n)}for(let e=a.start;e<a.end;e++)this.items[e].row&&this.updateItemInDOM(this.items[e],e);if("number"==typeof o){const t=this.scrollable.getFutureScrollPosition().scrollTop-e,n=this.elementTop(o)-s+t;this.setScrollTop(n,i)}return void this._onDidChangeContentHeight.fire(this.contentHeight)}}}probeDynamicHeight(e){var t,i,n;const o=this.items[e];if(this.virtualDelegate.getDynamicHeight){const e=this.virtualDelegate.getDynamicHeight(o.element);if(null!==e){const t=o.size;return o.size=e,o.lastDynamicHeightWidth=this.renderWidth,e-t}}if(!o.hasDynamicHeight||o.lastDynamicHeightWidth===this.renderWidth)return 0;if(this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(o.element))return 0;const s=o.size;if(o.row)return o.row.domNode.style.height="",o.size=o.row.domNode.offsetHeight,o.lastDynamicHeightWidth=this.renderWidth,o.size-s;const{row:r}=this.cache.alloc(o.templateId);r.domNode.style.height="",this.rowsContainer.appendChild(r.domNode);const a=this.renderers.get(o.templateId);if(!a)throw new b.he("Missing renderer for templateId: "+o.templateId);return a.renderElement(o.element,e,r.templateData,void 0),o.size=r.domNode.offsetHeight,null===(t=a.disposeElement)||void 0===t||t.call(a,o.element,e,r.templateData,void 0),null===(n=(i=this.virtualDelegate).setDynamicHeight)||void 0===n||n.call(i,o.element,o.size),o.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(r.domNode),this.cache.release(r),o.size-s}getNextToLastElement(e){const t=e[e.length-1];if(!t)return null;const i=this.items[t.end];return i&&i.row?i.row.domNode:null}getElementDomId(e){return`${this.domId}_${e}`}dispose(){var e;if(this.items){for(const t of this.items)if(t.row){const i=this.renderers.get(t.row.templateId);i&&(null===(e=i.disposeElement)||void 0===e||e.call(i,t.element,-1,t.row.templateData,void 0),i.disposeTemplate(t.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,u.B9)(this.disposables)}}N.InstanceCount=0,C([h.H],N.prototype,"onMouseClick",null),C([h.H],N.prototype,"onMouseDblClick",null),C([h.H],N.prototype,"onMouseMiddleClick",null),C([h.H],N.prototype,"onMouseDown",null),C([h.H],N.prototype,"onMouseOver",null),C([h.H],N.prototype,"onMouseOut",null),C([h.H],N.prototype,"onContextMenu",null),C([h.H],N.prototype,"onTouchStart",null),C([h.H],N.prototype,"onTap",null)},43799:(e,t,i)=>{i.d(t,{wD:()=>H,aV:()=>G,sx:()=>V,AA:()=>C,iK:()=>M,cK:()=>I,hD:()=>T,wn:()=>B,Zo:()=>F,uZ:()=>z});var n=i(65321),o=i(4850),s=i(59069),r=i(10553),a=i(56346);class l{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}var d=i(9488),h=i(15393),c=i(41264),u=i(49898),g=i(4669),p=i(75392),m=i(5976),f=i(59870),_=i(1432),v=i(98401);i(33164);class b extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var C,w,y=i(25707),S=i(7448),L=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},x=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class k{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index<e?n.push(o):o.index>=e+t&&n.push({index:o.index+i-t,templateData:o.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class N{get name(){return this._trait}get renderer(){return new k(this)}constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new g.Q5,this.onChange=this._onChange.event}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const o=i.length-t,s=e+t,r=[];let a=0;for(;a<this.sortedIndexes.length&&this.sortedIndexes[a]<e;)r.push(this.sortedIndexes[a++]);for(let t=0;t<i.length;t++)i[t]&&r.push(t+e);for(;a<this.sortedIndexes.length&&this.sortedIndexes[a]>=s;)r.push(this.sortedIndexes[a++]+o);const l=this.length+o;if(this.sortedIndexes.length>0&&0===r.length&&l>0){const t=null!==(n=this.sortedIndexes.find((t=>t>=e)))&&void 0!==n?n:l-1;r.push(Math.min(t,l-1))}this.renderer.splice(e,t,i.length),this._set(r,r),this.length=l}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(j),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const s=U(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return(0,d.ry)(this.sortedIndexes,e,j)>=0}dispose(){(0,m.B9)(this._onChange)}}L([u.H],N.prototype,"renderer",null);class D extends N{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class E{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString()));if(0===n.length)return this.trait.splice(e,t,new Array(i.length).fill(!1));const o=new Set(n),s=i.map((e=>o.has(this.identityProvider.getId(e).toString())));this.trait.splice(e,t,s)}}function I(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function T(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&!!e.parentElement&&T(e.parentElement)}function M(e){return!!("A"===e.tagName&&e.classList.contains("monaco-button")||"DIV"===e.tagName&&e.classList.contains("monaco-button-dropdown"))||!e.classList.contains("monaco-list")&&!!e.parentElement&&M(e.parentElement)}class R{get onKeyDown(){return this.disposables.add(g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keydown")).event).filter((e=>!I(e.target))).map((e=>new s.y(e))))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new m.SL,this.multipleSelectionDisposables=new m.SL,this.onKeyDown.filter((e=>3===e.keyCode)).on(this.onEnter,this,this.disposables),this.onKeyDown.filter((e=>16===e.keyCode)).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter((e=>18===e.keyCode)).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter((e=>11===e.keyCode)).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter((e=>12===e.keyCode)).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter((e=>9===e.keyCode)).on(this.onEscape,this,this.disposables),!1!==i.multipleSelectionSupport&&this.onKeyDown.filter((e=>(_.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter((e=>(_.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,d.w6)(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}L([u.H],R.prototype,"onKeyDown",null),function(e){e[e.Automatic=0]="Automatic",e[e.Trigger=1]="Trigger"}(C||(C={})),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(w||(w={}));const A=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=98&&e.keyCode<=107||e.keyCode>=85&&e.keyCode<=95)}};class O{constructor(e,t,i,n,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=o,this.enabled=!1,this.state=w.Idle,this.mode=C.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new m.SL,this.disposables=new m.SL,this.updateOptions(e.options)}updateOptions(e){var t,i;null===(t=e.typeNavigationEnabled)||void 0===t||t?this.enable():this.disable(),this.mode=null!==(i=e.typeNavigationMode)&&void 0!==i?i:C.Automatic}enable(){if(this.enabled)return;let e=!1;const t=this.enabledDisposables.add(g.ju.chain(this.enabledDisposables.add(new o.Y(this.view.domNode,"keydown")).event)).filter((e=>!I(e.target))).filter((()=>this.mode===C.Automatic||this.triggered)).map((e=>new s.y(e))).filter((t=>e||this.keyboardNavigationEventFilter(t))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>n.zB.stop(e,!0))).map((e=>e.browserEvent.key)).event,i=g.ju.debounce(t,(()=>null),800,void 0,void 0,void 0,this.enabledDisposables);g.ju.reduce(g.ju.any(t,i),((e,t)=>null===t?null:(e||"")+t),void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t((()=>e=!0),void 0,this.enabledDisposables),i((()=>e=!1),void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&(0,a.Z9)(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=w.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===w.Idle?1:0;this.state=w.Typing;for(let t=0;t<this.list.length;t++){const o=(i+t+n)%this.list.length,s=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(o)),r=s&&s.toString();if(this.list.options.typeNavigationEnabled){if(void 0!==r){const t=(0,p.Ji)(e,r),n=(0,p.XU)(e,r);if(n){const e=n[0].end-n[0].start;if(t||e>1&&1===n.length)return this.previouslyFocused=i,this.list.setFocus([o]),void this.list.reveal(o)}}}else if(void 0===r||(0,p.Ji)(e,r))return this.previouslyFocused=i,this.list.setFocus([o]),void this.list.reveal(o)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class P{constructor(e,t){this.list=e,this.view=t,this.disposables=new m.SL,this.disposables.add(g.ju.chain(this.disposables.add(new o.Y(t.domNode,"keydown")).event)).filter((e=>!I(e.target))).map((e=>new s.y(e))).filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const o=window.getComputedStyle(n);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function F(e){return _.dz?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function B(e){return e.browserEvent.shiftKey}const W={isSelectionSingleChangeEvent:F,isSelectionRangeChangeEvent:B};class V{constructor(e){this.list=e,this.disposables=new m.SL,this._onPointer=new g.Q5,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||W),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(r.o.addTarget(e.getHTMLElement()))),g.ju.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||W))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){T(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(I(e.browserEvent.target)||T(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(I(e.browserEvent.target)||T(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),(i=e.browserEvent)instanceof MouseEvent&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(I(e.browserEvent.target)||T(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=Math.min(i,t),o=Math.max(i,t),s=(0,d.w6)(n,o+1),r=this.list.getSelection(),a=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;for(;o>=0&&e[o]===t-(i-o);)n.push(e[o--]);for(n.reverse(),o=i;o<e.length&&e[o]===t+(o-i);)n.push(e[o++]);return n}(U(r,[i]),i);if(0===a.length)return;const l=U(s,function(e,t){const i=[];let n=0,o=0;for(;n<e.length||o<t.length;)if(n>=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]<t[o]?i.push(e[n++]):o++}return i}(r,a));this.list.setSelection(l,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const i=this.list.getSelection(),n=i.filter((e=>e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class H{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,i;const o=this.selectorSuffix&&`.${this.selectorSuffix}`,s=[];e.listBackground&&s.push(`.monaco-list${o} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(s.push(`.monaco-list${o}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),s.push(`.monaco-list${o}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&s.push(`.monaco-list${o}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(s.push(`.monaco-list${o}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),s.push(`.monaco-list${o}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&s.push(`.monaco-list${o}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&s.push(`.monaco-list${o}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${o}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${o}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(s.push(`.monaco-list${o} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),s.push(`.monaco-list${o} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&s.push(`.monaco-list${o} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(s.push(`.monaco-list${o} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),s.push(`.monaco-list${o} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(s.push(`.monaco-list${o} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),s.push(`.monaco-list${o} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&s.push(`.monaco-list${o} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&s.push(`.monaco-list${o}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&s.push(`.monaco-list${o}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const r=(0,n.XT)(e.listFocusAndSelectionOutline,(0,n.XT)(e.listSelectionOutline,null!==(t=e.listFocusOutline)&&void 0!==t?t:""));r&&s.push(`.monaco-list${o}:focus .monaco-list-row.focused.selected { outline: 1px solid ${r}; outline-offset: -1px;}`),e.listFocusOutline&&s.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${o}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${o}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const a=(0,n.XT)(e.listSelectionOutline,null!==(i=e.listInactiveFocusOutline)&&void 0!==i?i:"");a&&s.push(`.monaco-list${o} .monaco-list-row.focused.selected { outline: 1px dotted ${a}; outline-offset: -1px; }`),e.listSelectionOutline&&s.push(`.monaco-list${o} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&s.push(`.monaco-list${o} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&s.push(`.monaco-list${o} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&s.push(`\n\t\t\t\t.monaco-list${o}.drop-target,\n\t\t\t\t.monaco-list${o} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${o} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.tableColumnsBorder&&s.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`),e.tableOddRowsBackgroundColor&&s.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=s.join("\n")}}const z={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:c.Il.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:c.Il.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:c.Il.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0},K={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function U(e,t){const i=[];let n=0,o=0;for(;n<e.length||o<t.length;)if(n>=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]<t[o]?i.push(e[n++]):i.push(t[o++])}return i}const j=(e,t)=>e-t;class ${constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let o=0;for(const s of this.renderers)s.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){var o;let s=0;for(const r of this.renderers)null===(o=r.disposeElement)||void 0===o||o.call(r,e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class q{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.setAttribute("aria-level",`${o}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class Z{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var o,s;null===(s=(o=this.dnd).onDragLeave)||void 0===s||s.call(o,e,t,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class G{get onDidChangeFocus(){return g.ju.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)),this.disposables)}get onDidChangeSelection(){return g.ju.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=this.disposables.add(g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keydown")).event)).map((e=>new s.y(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map((e=>n.zB.stop(e,!0))).filter((()=>!1)).event,i=this.disposables.add(g.ju.chain(this.disposables.add(new o.Y(this.view.domNode,"keyup")).event)).forEach((()=>e=!1)).map((e=>new s.y(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map((e=>n.zB.stop(e,!0))).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})).event,r=this.disposables.add(g.ju.chain(this.view.onContextMenu)).filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:new S.n(i),browserEvent:i}))).event;return g.ju.any(t,i,r)}get onKeyDown(){return this.disposables.add(new o.Y(this.view.domNode,"keydown")).event}get onDidFocus(){return g.ju.signal(this.disposables.add(new o.Y(this.view.domNode,"focus",!0)).event)}constructor(e,t,i,o,s=K){var r,a,d,h;this.user=e,this._options=s,this.focus=new N("focused"),this.anchor=new N("anchor"),this.eventBufferer=new g.E7,this._ariaLabel="",this.disposables=new m.SL,this._onDidDispose=new g.Q5,this.onDidDispose=this._onDidDispose.event;const c=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(r=this._options.accessibilityProvider)||void 0===r?void 0:r.getWidgetRole():"list";this.selection=new D("listbox"!==c);const u=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(u.push(new q(this.accessibilityProvider)),null===(d=(a=this.accessibilityProvider).onDidChangeActiveDescendant)||void 0===d||d.call(a,this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map((e=>new $(e.templateId,[...u,e])));const p=Object.assign(Object.assign({},s),{dnd:s.dnd&&new Z(this,s.dnd)});if(this.view=this.createListView(t,i,o,p),this.view.domNode.setAttribute("role",c),s.styleController)this.styleController=s.styleController(this.view.domId);else{const e=(0,n.dS)(this.view.domNode);this.styleController=new H(e,this.view.domId)}if(this.spliceable=new l([new E(this.focus,this.view,s.identityProvider),new E(this.selection,this.view,s.identityProvider),new E(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new P(this,this.view)),("boolean"!=typeof s.keyboardSupport||s.keyboardSupport)&&(this.keyboardController=new R(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const e=s.keyboardNavigationDelegate||A;this.typeNavigationController=new O(this,this.view,s.keyboardNavigationLabelProvider,null!==(h=s.keyboardNavigationEventFilter)&&void 0!==h?h:()=>!0,e),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new y.Bv(e,t,i,n)}createMouseController(e){return new V(this)}updateOptions(e={}){var t,i;this._options=Object.assign(Object.assign({},this._options),e),null===(t=this.typeNavigationController)||void 0===t||t.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),null===(i=this.keyboardController)||void 0===i||i.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new b(this.user,`Invalid start index: ${e}`);if(t<0)throw new b(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,d.Xh)(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findNextIndex(o.length>0?o[0]+e:0,t,n);s>-1&&this.setFocus([s],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);s>-1&&this.setFocus([s],i)}focusNextPage(e,t){return x(this,void 0,void 0,(function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){const o=this.findPreviousIndex(i,!1,t);o>-1&&n!==o?this.setFocus([o],e):this.setFocus([i],e)}else{const o=this.view.getScrollTop();let s=o+this.view.renderHeight;i>n&&(s-=this.view.elementHeight(i)),this.view.setScrollTop(s),this.view.getScrollTop()!==o&&(this.setFocus([]),yield(0,h.Vs)(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return x(this,void 0,void 0,(function*(){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const o=this.getFocus()[0];if(o!==i&&(void 0===o||o>=i)){const n=this.findNextIndex(i,!1,t);n>-1&&o!==n?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),yield(0,h.Vs)(0),yield this.focusPreviousPage(e,t))}}))}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e>=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e<0&&!t)return-1;if(e=(this.length+e%this.length)%this.length,!i||i(this.element(e)))return e;e--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map((e=>this.view.element(e)))}reveal(e,t){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if((0,v.hj)(t)){const e=o-this.view.renderHeight;this.view.setScrollTop(e*(0,f.uZ)(t,0,1)+n)}else{const e=n+o,t=i+this.view.renderHeight;n<i&&e>=t||(n<i||e>=t&&o>=this.view.renderHeight?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(e){return this.view.getElementDomId(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}L([u.H],G.prototype,"onDidChangeFocus",null),L([u.H],G.prototype,"onDidChangeSelection",null),L([u.H],G.prototype,"onContextMenu",null),L([u.H],G.prototype,"onKeyDown",null),L([u.H],G.prototype,"onDidFocus",null)},31185:(e,t,i)=>{i.d(t,{S:()=>_});var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(67548),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;const _="monaco-mouse-cursor-text"},17735:(e,t,i)=>{i.d(t,{f:()=>a});var n=i(65321),o=i(63841),s=i(4669),r=i(5976);class a{constructor(){let e;this._onDidWillResize=new s.Q5,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new s.Q5,this.onDidResize=this._onDidResize.event,this._sashListener=new r.SL,this._size=new n.Ro(0,0),this._minSize=new n.Ro(0,0),this._maxSize=new n.Ro(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new o.g(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new o.g(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new o.g(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:o.l.North}),this._southSash=new o.g(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:o.l.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(s.ju.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(s.ju.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(s.ju.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(s.ju.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:o}=this._minSize,{height:s,width:r}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(o,Math.min(r,t));const a=new n.Ro(t,e);n.Ro.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}},63841:(e,t,i)=>{i.d(t,{l:()=>x,g:()=>R});var n=i(65321),o=i(4850),s=i(10553),r=i(15393),a=i(49898),l=i(4669),d=i(5976),h=i(1432),c=i(93379),u=i.n(c),g=i(7795),p=i.n(g),m=i(90569),f=i.n(m),_=i(3565),v=i.n(_),b=i(19216),C=i.n(b),w=i(44589),y=i.n(w),S=i(91629),L={};L.styleTagTransform=y(),L.setAttributes=v(),L.insert=f().bind(null,"head"),L.domAPI=p(),L.insertStyleElement=C(),u()(S.Z,L),S.Z&&S.Z.locals&&S.Z.locals;var x,k=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(x||(x={}));const N=new l.Q5,D=new l.Q5;class E{constructor(){this.disposables=new d.SL}get onPointerMove(){return this.disposables.add(new o.Y(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new o.Y(window,"mouseup")).event}dispose(){this.disposables.dispose()}}k([a.H],E.prototype,"onPointerMove",null),k([a.H],E.prototype,"onPointerUp",null);class I{get onPointerMove(){return this.disposables.add(new o.Y(this.el,s.t.Change)).event}get onPointerUp(){return this.disposables.add(new o.Y(this.el,s.t.End)).event}constructor(e){this.el=e,this.disposables=new d.SL}dispose(){this.disposables.dispose()}}k([a.H],I.prototype,"onPointerMove",null),k([a.H],I.prototype,"onPointerUp",null);class T{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}k([a.H],T.prototype,"onPointerMove",null),k([a.H],T.prototype,"onPointerUp",null);const M="pointer-events-disabled";class R extends d.JT{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,n.R3)(this.el,(0,n.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,d.OF)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new o.Y(this._orthogonalStartDragHandle,"mouseenter")).event((()=>R.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new o.Y(this._orthogonalStartDragHandle,"mouseleave")).event((()=>R.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,n.R3)(this.el,(0,n.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,d.OF)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new o.Y(this._orthogonalEndDragHandle,"mouseenter")).event((()=>R.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new o.Y(this._orthogonalEndDragHandle,"mouseleave")).event((()=>R.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new r.vp(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new l.Q5),this._onDidStart=this._register(new l.Q5),this._onDidChange=this._register(new l.Q5),this._onDidReset=this._register(new l.Q5),this._onDidEnd=this._register(new l.Q5),this.orthogonalStartSashDisposables=this._register(new d.SL),this.orthogonalStartDragHandleDisposables=this._register(new d.SL),this.orthogonalEndSashDisposables=this._register(new d.SL),this.orthogonalEndDragHandleDisposables=this._register(new d.SL),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,n.R3)(e,(0,n.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),h.dz&&this.el.classList.add("mac");const a=this._register(new o.Y(this.el,"mousedown")).event;this._register(a((e=>this.onPointerStart(e,new E)),this));const c=this._register(new o.Y(this.el,"dblclick")).event;this._register(c(this.onPointerDoublePress,this));const u=this._register(new o.Y(this.el,"mouseenter")).event;this._register(u((()=>R.onMouseEnter(this))));const g=this._register(new o.Y(this.el,"mouseleave")).event;this._register(g((()=>R.onMouseLeave(this)))),this._register(s.o.addTarget(this.el));const p=this._register(new o.Y(this.el,s.t.Start)).event;this._register(p((e=>this.onPointerStart(e,new I(this.el))),this));const m=this._register(new o.Y(this.el,s.t.Tap)).event;let f;this._register(m((e=>{if(f)return clearTimeout(f),f=void 0,void this.onPointerDoublePress(e);clearTimeout(f),f=setTimeout((()=>f=void 0),250)}),this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(N.event((e=>{this.size=e,this.layout()})))),this._register(D.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}onPointerStart(e,t){n.zB.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new T(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new T(t))),!this.state)return;const o=document.getElementsByTagName("iframe");for(const e of o)e.classList.add(M);const s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=(0,n.dS)(this.el),u=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":h.dz?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":h.dz?"col-resize":"ew-resize",c.textContent=`* { cursor: ${e} !important; }`},g=new d.SL;u(),i||this.onDidEnablementChange.event(u,null,g),t.onPointerMove((e=>{n.zB.stop(e,!1);const t={startX:s,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a};this._onDidChange.fire(t)}),null,g),t.onPointerUp((e=>{n.zB.stop(e,!1),this.el.removeChild(c),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose();for(const e of o)e.classList.remove(M)}),null,g),g.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&R.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&R.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){R.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var t;const i=null!==(t=e.initialTarget)&&void 0!==t?t:e.target;if(i&&i instanceof HTMLElement)return i.classList.contains("orthogonal-drag-handle")?i.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},64117:(e,t,i)=>{i.d(t,{s$:()=>H,Io:()=>F,NB:()=>W,$Z:()=>V});var n=i(16268),o=i(65321),s=i(38626),r=i(7448),a=i(93911),l=i(93794),d=i(15393),h=i(25670);class c extends l.${constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...h.k.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new a.C),this._register(o.mu(this.bgDomNode,o.tw.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._register(o.mu(this.domNode,o.tw.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._pointerdownRepeatTimer=this._register(new d.zh),this._pointerdownScheduleRepeatTimer=this._register(new d._F)}_arrowPointerDown(e){e.target&&e.target instanceof Element&&(this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet((()=>{this._pointerdownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{}),(()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()})),e.preventDefault())}}var u=i(5976);class g extends u.JT{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new d._F)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{var e;null===(e=this._domNode)||void 0===e||e.setClassName(this._visibleClassName)}),0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,null===(t=this._domNode)||void 0===t||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}var p=i(1432);class m extends l.${constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new g(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new a.C),this._shouldRender=!0,this.domNode=(0,s.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(o.nm(this.domNode.domNode,o.tw.POINTER_DOWN,(e=>this._domNodePointerDown(e))))}_createArrow(e){const t=this._register(new c(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,s.X)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(o.nm(this.slider.domNode,o.tw.POINTER_DOWN,(e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}))),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);i<=o&&o<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.offsetX&&"number"==typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{const n=o.i(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{const o=this._sliderOrthogonalPointerPosition(e),s=Math.abs(o-i);if(p.ED&&s>140)return void this._setDesiredScrollPositionNow(n.getScrollPosition());const r=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}var f=i(51203),_=i(73046);class v extends m{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f.M(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){const e=(t.arrowSize-11)/2,i=(t.horizontalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.l.scrollbarButtonLeft,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,1,0))}),this._createArrow({className:"scra",icon:_.l.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class b extends m{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f.M(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.l.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,1))}),this._createArrow({className:"scra",icon:_.l.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var C=i(4669),w=i(76633),y=i(93379),S=i.n(y),L=i(7795),x=i.n(L),k=i(90569),N=i.n(k),D=i(3565),E=i.n(D),I=i(19216),T=i.n(I),M=i(44589),R=i.n(M),A=i(7198),O={};O.styleTagTransform=R(),O.setAttributes=E(),O.insert=N().bind(null,"head"),O.domAPI=x(),O.insertStyleElement=T(),S()(A.Z,O),A.Z&&A.Z.locals&&A.Z.locals;class P{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class F{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}acceptStandardWheelEvent(e){const t=window.devicePixelRatio/(0,n.ie)();p.ED||p.IJ?this.accept(Date.now(),e.deltaX/t,e.deltaY/t):this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,i){const n=new P(e,t,i);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return-1===this._front&&-1===this._rear||this._memory[this._rear],this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}F.INSTANCE=new F;class B extends l.${get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new C.Q5),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new C.Q5),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,p.dz&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new b(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new v(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,s.X)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,s.X)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,s.X)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onmouseleave(this._listenOnDomNode,(e=>this._onMouseLeave(e))),this._hideTimeout=this._register(new d._F),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,u.B9)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,p.dz&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new r.q(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,u.B9)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new r.q(e))};this._mouseWheelToDispose.push(o.nm(this._listenOnDomNode,o.tw.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){var t;if(null===(t=e.browserEvent)||void 0===t?void 0:t.defaultPrevented)return;const i=F.INSTANCE;i.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let t=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&o+t===0?o=t=0:Math.abs(t)>=Math.abs(o)?o=0:t=0),this._options.flipAxes&&([t,o]=[o,t]);const s=!p.dz&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||o||(o=t,t=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,t*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(t){const e=50*t,i=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,i)}if(o){const e=50*o,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}a=this._scrollable.validateScrollPosition(a),(r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&i.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),n=!0)}let o=n;!o&&this._options.alwaysConsumeMouseWheel&&(o=!0),!o&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(o=!0),o&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",o=t?" top":"",s=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class W extends B{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new w.Rm({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>o.jL(e)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class V extends B{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class H extends B{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new w.Rm({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>o.jL(e)});super(e,t,i),this._register(i),this._element=e,this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},51203:(e,t,i)=>{i.d(t,{M:()=>n});class n{constructor(e,t,i,n,o,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new n(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,o){const s=Math.max(0,i-e),r=Math.max(0,s-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*r/n))),d=(r-l)/(n-i),h=o*d;return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:d,computedSliderPosition:Math.round(h)}}_refreshComputedValues(){const e=n._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return t<this._computedSliderPosition?i-=this._visibleSize:i+=this._visibleSize,i}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;const t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}},89782:(e,t,i)=>{i.d(t,{M:()=>R,z:()=>A});var n=i(65321),o=i(4850),s=i(63841),r=i(64117),a=i(9488),l=i(41264),d=i(4669),h=i(5976),c=i(59870),u=i(76633),g=i(98401),p=i(93379),m=i.n(p),f=i(7795),_=i.n(f),v=i(90569),b=i.n(v),C=i(3565),w=i.n(C),y=i(19216),S=i.n(y),L=i(44589),x=i.n(L),k=i(82470),N={};N.styleTagTransform=x(),N.setAttributes=w(),N.insert=b().bind(null,"head"),N.domAPI=_(),N.insertStyleElement=S(),m()(k.Z,N),k.Z&&k.Z.locals&&k.Z.locals;const D={separatorBorder:l.Il.transparent};class E{set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){var i,n;e!==this.visible&&(e?(this.size=(0,c.uZ)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),null===(n=(i=this.view).setVisible)||void 0===n||n.call(i,e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return null===(e=this.view.proportionalLayout)||void 0===e||e}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"==typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){this.disposable.dispose()}}class I extends E{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class T extends E{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var M,R;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(M||(M={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Auto=function(e){return{type:"auto",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(R||(R={}));class A extends h.JT{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){var i,s,a,l,h;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=M.Idle,this._onDidSashChange=this._register(new d.Q5),this._onDidSashReset=this._register(new d.Q5),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=null!==(i=t.orientation)&&void 0!==i?i:0,this.inverseAltBehavior=null!==(s=t.inverseAltBehavior)&&void 0!==s&&s,this.proportionalLayout=null===(a=t.proportionalLayout)||void 0===a||a,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=(0,n.R3)(this.el,(0,n.$)(".sash-container")),this.viewContainer=(0,n.$)(".split-view-container"),this.scrollable=this._register(new u.Rm({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:n.jL})),this.scrollableElement=this._register(new r.$Z(this.viewContainer,{vertical:0===this.orientation?null!==(l=t.scrollbarVisibility)&&void 0!==l?l:1:2,horizontal:1===this.orientation?null!==(h=t.scrollbarVisibility)&&void 0!==h?h:1:2},this.scrollable));const c=this._register(new o.Y(this.viewContainer,"scroll")).event;this._register(c((e=>{const t=this.scrollableElement.getScrollPosition(),i=Math.abs(this.viewContainer.scrollLeft-t.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,n=Math.abs(this.viewContainer.scrollTop-t.scrollTop)<=1?void 0:this.viewContainer.scrollTop;void 0===i&&void 0===n||this.scrollableElement.setScrollPosition({scrollLeft:i,scrollTop:n})}))),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{e.scrollTopChanged&&(this.viewContainer.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this.viewContainer.scrollLeft=e.scrollLeft)}))),(0,n.R3)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||D),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=g.o8(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let t=0;for(let i=0;i<this.viewItems.length;i++){const n=this.viewItems[i],o=this.proportions[i];"number"==typeof o?t+=o:e-=n.size}for(let i=0;i<this.viewItems.length;i++){const n=this.viewItems[i],o=this.proportions[i];"number"==typeof o&&(n.size=(0,c.uZ)(Math.round(o*e/t),n.minimumSize,n.maximumSize))}}else{const t=(0,a.w6)(this.viewItems.length),n=t.filter((e=>1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.proportionalLayout?e.size/this.contentSize:void 0)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const o=this.sashItems.findIndex((t=>t.sash===e)),s=(0,h.F8)((0,n.nm)(document.body,"keydown",(e=>r(this.sashDragState.current,e.altKey))),(0,n.nm)(document.body,"keyup",(()=>r(this.sashDragState.current,!1)))),r=(e,t)=>{const i=this.viewItems.map((e=>e.size));let n,r,l=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(o===this.sashItems.length-1){const e=this.viewItems[o];l=(e.minimumSize-e.size)/2,d=(e.maximumSize-e.size)/2}else{const e=this.viewItems[o+1];l=(e.size-e.maximumSize)/2,d=(e.size-e.minimumSize)/2}if(!t){const e=(0,a.w6)(o,-1),t=(0,a.w6)(o+1,this.viewItems.length),s=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),l=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),d=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),h=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),c=Math.max(s,h),u=Math.min(d,l),g=this.findFirstSnapIndex(e),p=this.findFirstSnapIndex(t);if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?c-t:c+t,size:e.size}}if("number"==typeof p){const e=this.viewItems[p],t=Math.floor(e.viewMinimumSize/2);r={index:p,limitDelta:e.visible?u+t:u-t,size:e.size}}}this.sashDragState={start:e,current:e,index:o,sizes:i,minDelta:l,maxDelta:d,alt:t,snapBefore:n,snapAfter:r,disposable:s}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:s,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const d=e-i,h=this.resize(t,d,n,void 0,void 0,s,r,a,l);if(o){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,o=this.viewItems[n],s=o.size-o.maximumSize,r=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-h,i,void 0,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=(0,c.uZ)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==M.Idle)throw new Error("Cant modify splitview");if(this.state=M.Busy,e<0||e>=this.viewItems.length)return;const i=(0,a.w6)(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],o=i.filter((e=>2===this.viewItems[e].priority)),s=this.viewItems[e];t=Math.round(t),t=(0,c.uZ)(t,s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(n,o),this.state=M.Idle}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=(0,c.uZ)(i,t.minimumSize,t.maximumSize);const n=(0,a.w6)(this.viewItems.length),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));this.relayout(o,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,o){if(this.state!==M.Idle)throw new Error("Cant modify splitview");this.state=M.Busy;const r=(0,n.$)(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(i));const l=e.onDidChange((e=>this.onViewChange(p,e))),c=(0,h.OF)((()=>this.viewContainer.removeChild(r))),u=(0,h.F8)(l,c);let g;"number"==typeof t?g=t:("auto"===t.type&&(t=this.areViewsDistributed()?{type:"distribute"}:{type:"split",index:t.index}),g="split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize);const p=0===this.orientation?new I(r,e,g,u):new T(r,e,g,u);if(this.viewItems.splice(i,0,p),this.viewItems.length>1){const e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},t=0===this.orientation?new s.g(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new s.g(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),o=d.ju.map(t.onDidStart,n)(this.onSashStart,this),r=d.ju.map(t.onDidChange,n)(this.onSashChange,this),l=d.ju.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),c=l(this.onSashEnd,this),u=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=(0,a.w6)(e,-1),n=(0,a.w6)(e+1,this.viewItems.length),o=this.findFirstSnapIndex(i),s=this.findFirstSnapIndex(n);("number"!=typeof o||this.viewItems[o].visible)&&("number"!=typeof s||this.viewItems[s].visible)&&this._onDidSashReset.fire(e)})),g=(0,h.F8)(o,r,c,u,t),p={sash:t,disposable:g};this.sashItems.splice(i-1,0,p)}let m;r.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(m=[t.index]),o||this.relayout([i],m),this.state=M.Idle,o||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,o,s=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,l,d){if(e<0||e>=this.viewItems.length)return 0;const h=(0,a.w6)(e,-1),u=(0,a.w6)(e+1,this.viewItems.length);if(o)for(const e of o)(0,a.zI)(h,e),(0,a.zI)(u,e);if(n)for(const e of n)(0,a.al)(h,e),(0,a.al)(u,e);const g=h.map((e=>this.viewItems[e])),p=h.map((e=>i[e])),m=u.map((e=>this.viewItems[e])),f=u.map((e=>i[e])),_=h.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),v=h.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),b=0===u.length?Number.POSITIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),C=0===u.length?Number.NEGATIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),w=Math.max(_,C,s),y=Math.min(b,v,r);let S=!1;if(l){const e=this.viewItems[l.index],i=t>=l.limitDelta;S=i!==e.visible,e.setVisible(i,l.size)}if(!S&&d){const e=this.viewItems[d.index],i=t<d.limitDelta;S=i!==e.visible,e.setVisible(i,d.size)}if(S)return this.resize(e,t,i,n,o,s,r);for(let e=0,i=t=(0,c.uZ)(t,w,y);e<g.length;e++){const t=g[e],n=(0,c.uZ)(p[e]+i,t.minimumSize,t.maximumSize);i-=n-p[e],t.size=n}for(let e=0,i=t;e<m.length;e++){const t=m[e],n=(0,c.uZ)(f[e]-i,t.minimumSize,t.maximumSize);i+=n-f[e],t.size=n}return t}distributeEmptySpace(e){const t=this.viewItems.reduce(((e,t)=>e+t.size),0);let i=this.size-t;const n=(0,a.w6)(this.viewItems.length-1,-1),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));for(const e of s)(0,a.zI)(n,e);for(const e of o)(0,a.al)(n,e);"number"==typeof e&&(0,a.al)(n,e);for(let e=0;0!==i&&e<n.length;e++){const t=this.viewItems[n[e]],o=(0,c.uZ)(t.size+i,t.minimumSize,t.maximumSize);i-=o-t.size,t.size=o}}layoutViews(){this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const o=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const s=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let r=0;for(let e=0;e<this.sashItems.length;e++){const{sash:n}=this.sashItems[e];r+=this.viewItems[e].size;const l=!(t[e]&&s[e+1]),d=!(i[e]&&o[e+1]);if(l&&d){const i=(0,a.w6)(e,-1),s=(0,a.w6)(e+1,this.viewItems.length),l=this.findFirstSnapIndex(i),d=this.findFirstSnapIndex(s),h="number"==typeof l&&!this.viewItems[l].visible,c="number"==typeof d&&!this.viewItems[d].visible;h&&o[e]&&(r>0||this.startSnappingEnabled)?n.state=1:c&&t[e]&&(r<this.contentSize||this.endSnappingEnabled)?n.state=2:n.state=0}else n.state=l&&!d?1:!l&&d?2:3}}getSashPosition(e){let t=0;for(let i=0;i<this.sashItems.length;i++)if(t+=this.viewItems[i].size,this.sashItems[i].sash===e)return t;return 0}findFirstSnapIndex(e){for(const t of e){const e=this.viewItems[t];if(e.visible&&e.snap)return t}for(const t of e){const e=this.viewItems[t];if(e.visible&&e.maximumSize-e.minimumSize>0)return;if(!e.visible&&e.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=void 0===e?i.size:Math.min(e,i.size),t=void 0===t?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){var e;null===(e=this.sashDragState)||void 0===e||e.disposable.dispose(),(0,h.B9)(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[],super.dispose()}}},98892:(e,t,i)=>{i.d(t,{Z:()=>w,D:()=>C});var n=i(93794),o=i(25670),s=i(4669),r=i(93379),a=i.n(r),l=i(7795),d=i.n(l),h=i(90569),c=i.n(h),u=i(3565),g=i.n(u),p=i(19216),m=i.n(p),f=i(44589),_=i.n(f),v=i(16310),b={};b.styleTagTransform=_(),b.setAttributes=g(),b.insert=c().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m(),a()(v.Z,b),v.Z&&v.Z.locals&&v.Z.locals;const C={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class w extends n.${constructor(e){super(),this._onChange=this._register(new s.Q5),this.onChange=this._onChange.event,this._onKeyDown=this._register(new s.Q5),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...o.k.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())})),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),void e.stopPropagation();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}},93794:(e,t,i)=>{i.d(t,{$:()=>l});var n=i(65321),o=i(59069),s=i(7448),r=i(10553),a=i(5976);class l extends a.JT{onclick(e,t){this._register(n.nm(e,n.tw.CLICK,(e=>t(new s.n(e)))))}onmousedown(e,t){this._register(n.nm(e,n.tw.MOUSE_DOWN,(e=>t(new s.n(e)))))}onmouseover(e,t){this._register(n.nm(e,n.tw.MOUSE_OVER,(e=>t(new s.n(e)))))}onmouseleave(e,t){this._register(n.nm(e,n.tw.MOUSE_LEAVE,(e=>t(new s.n(e)))))}onkeydown(e,t){this._register(n.nm(e,n.tw.KEY_DOWN,(e=>t(new o.y(e)))))}onkeyup(e,t){this._register(n.nm(e,n.tw.KEY_UP,(e=>t(new o.y(e)))))}oninput(e,t){this._register(n.nm(e,n.tw.INPUT,t))}onblur(e,t){this._register(n.nm(e,n.tw.BLUR,t))}onfocus(e,t){this._register(n.nm(e,n.tw.FOCUS,t))}ignoreGesture(e){return r.o.ignoreTarget(e)}}},74741:(e,t,i)=>{i.d(t,{Wi:()=>l,Z0:()=>d,aU:()=>a,eZ:()=>c,wY:()=>h,xw:()=>u});var n=i(4669),o=i(5976),s=i(63580),r=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class a extends o.JT{constructor(e,t="",i="",o=!0,s){super(),this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=o,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return r(this,void 0,void 0,(function*(){this._actionCallback&&(yield this._actionCallback(e))}))}}class l extends o.JT{constructor(){super(...arguments),this._onWillRun=this._register(new n.Q5),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new n.Q5),this.onDidRun=this._onDidRun.event}run(e,t){return r(this,void 0,void 0,(function*(){if(!e.enabled)return;let i;this._onWillRun.fire({action:e});try{yield this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}))}runAction(e,t){return r(this,void 0,void 0,(function*(){yield e.run(t)}))}}class d{constructor(){this.id=d.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(const i of e)i.length&&(t=t.length?[...t,new d,...i]:i);return t}run(){return r(this,void 0,void 0,(function*(){}))}}d.ID="vs.actions.separator";class h{get actions(){return this._actions}constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}run(){return r(this,void 0,void 0,(function*(){}))}}class c extends a{constructor(){super(c.ID,s.NC("submenu.empty","(empty)"),void 0,!1)}}function u(e){var t,i;return{id:e.id,label:e.label,class:void 0,enabled:null===(t=e.enabled)||void 0===t||t,checked:null!==(i=e.checked)&&void 0!==i&&i,run:()=>r(this,void 0,void 0,(function*(){return e.run()})),tooltip:e.label}}c.ID="vs.actions.empty"},9488:(e,t,i)=>{function n(e,t=0){return e[e.length-(1+t)]}function o(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function s(e,t,i=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n<o;n++)if(!i(e[n],t[n]))return!1;return!0}function r(e,t){const i=e.length-1;t<i&&(e[t]=e[i]),e.pop()}function a(e,t,i){return function(n,o){let s=0,r=n-1;for(;s<=r;){const n=(s+r)/2|0,o=i(e[n],t);if(o<0)s=n+1;else{if(!(o>0))return n;r=n-1}}return-(s+1)}(e.length)}function l(e,t){let i=0,n=e.length;if(0===n)return 0;for(;i<n;){const o=Math.floor((i+n)/2);t(e[o])?n=o:i=o+1}return i}function d(e,t,i){if((e|=0)>=t.length)throw new TypeError("invalid index");const n=t[Math.floor(t.length*Math.random())],o=[],s=[],r=[];for(const e of t){const t=i(e,n);t<0?o.push(e):t>0?s.push(e):r.push(e)}return e<o.length?d(e,o,i):e<o.length+r.length?r[0]:d(e-(o.length+r.length),s,i)}function h(e,t){const i=[];let n;for(const o of e.slice(0).sort(t))n&&0===t(n[0],o)?n.push(o):(n=[o],i.push(n));return i}function c(e){return e.filter((e=>!!e))}function u(e){let t=0;for(let i=0;i<e.length;i++)e[i]&&(e[t]=e[i],t+=1);e.length=t}function g(e){return!Array.isArray(e)||0===e.length}function p(e){return Array.isArray(e)&&e.length>0}function m(e,t=(e=>e)){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function f(e,t){const i=_(e,t);if(-1!==i)return e[i]}function _(e,t){for(let i=e.length-1;i>=0;i--)if(t(e[i]))return i;return-1}function v(e,t){return e.length>0?e[0]:t}function b(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;e<t;e++)n.push(e);else for(let e=i;e>t;e--)n.push(e);return n}function C(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function w(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function y(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function S(e,t){for(const i of t)e.push(i)}function L(e){return Array.isArray(e)?e:[e]}function x(e,t){for(const i of e){const e=t(i);if(void 0!==e)return e}}function k(e,t,i,n){const o=N(e,t),s=e.splice(o,i);return function(e,t,i){const n=N(e,t),o=e.length,s=i.length;e.length=o+s;for(let t=o-1;t>=n;t--)e[t+s]=e[t];for(let t=0;t<s;t++)e[t+n]=i[t]}(e,o,n),s}function N(e,t){return t<0?Math.max(t+e.length,0):Math.min(t,e.length)}var D;function E(e,t){return(i,n)=>t(e(i),e(n))}function I(...e){return(t,i)=>{for(const n of e){const e=n(t,i);if(!D.isNeitherLessOrGreaterThan(e))return e}return D.neitherLessOrGreaterThan}}i.d(t,{BV:()=>R,Bq:()=>D,Dc:()=>A,EB:()=>m,Gb:()=>n,H9:()=>B,HW:()=>d,JH:()=>o,LS:()=>r,Of:()=>p,Rs:()=>u,VJ:()=>P,W$:()=>W,XY:()=>g,Xh:()=>v,Zv:()=>C,_2:()=>L,al:()=>y,bX:()=>x,dF:()=>f,db:()=>k,fS:()=>s,f_:()=>I,fv:()=>T,jV:()=>O,kX:()=>c,lG:()=>l,nW:()=>M,qr:()=>_,ry:()=>a,tQ:()=>F,tT:()=>E,vA:()=>S,vM:()=>h,w6:()=>b,zI:()=>w}),function(e){e.isLessThan=function(e){return e<0},e.isLessThanOrEqual=function(e){return e<=0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(D||(D={}));const T=(e,t)=>e-t,M=(e,t)=>T(e?1:0,t?1:0);function R(e){return(t,i)=>-e(t,i)}function A(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n<e.length;n++){const o=e[n];t(o,i)>0&&(i=o)}return i}function O(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n<e.length;n++){const o=e[n];t(o,i)>=0&&(i=o)}return i}function P(e,t){return A(e,((e,i)=>-t(e,i)))}function F(e,t){if(0===e.length)return-1;let i=0;for(let n=1;n<e.length;n++)t(e[n],e[i])>0&&(i=n);return i}class B{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class W{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new W((t=>this.iterate((i=>!e(i)||t(i)))))}map(e){return new W((t=>this.iterate((i=>t(e(i))))))}findLast(e){let t;return this.iterate((i=>(e(i)&&(t=i),!0))),t}findLastMaxBy(e){let t,i=!0;return this.iterate((n=>((i||D.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0))),t}}W.empty=new W((e=>{}))},35146:(e,t,i)=>{i.d(t,{DM:()=>a,eZ:()=>r,ok:()=>o,vE:()=>s});var n=i(17301);function o(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function s(e,t="Unreachable"){throw new Error(t)}function r(e){e()||(e(),(0,n.dL)(new n.he("Assertion Failed")))}function a(e,t){let i=0;for(;i<e.length-1;){if(!t(e[i],e[i+1]))return!1;i++}return!0}},15393:(e,t,i)=>{i.d(t,{Aq:()=>N,CR:()=>x,J8:()=>c,PG:()=>u,Ps:()=>b,To:()=>S,Ue:()=>L,Vg:()=>v,Vs:()=>_,_F:()=>C,eP:()=>g,jT:()=>k,pY:()=>y,rH:()=>f,vp:()=>m,zS:()=>E,zh:()=>w});var n=i(71050),o=i(17301),s=i(4669),r=i(5976),a=i(1432),l=i(5635),d=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},h=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(t=e[i](t)).done,t.value)}))}}};function c(e){return!!e&&"function"==typeof e.then}function u(e){const t=new n.A,i=e(t.token),s=new Promise(((e,n)=>{const s=t.token.onCancellationRequested((()=>{s.dispose(),t.dispose(),n(new o.FU)}));Promise.resolve(i).then((i=>{s.dispose(),t.dispose(),e(i)}),(e=>{s.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return s.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return s.finally(e)}}}function g(e,t,i){return new Promise(((n,o)=>{const s=t.onCancellationRequested((()=>{s.dispose(),n(i)}));e.then(n,o).finally((()=>s.dispose()))}))}class p{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)throw new Error("Throttler is disposed");if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{if(this.queuedPromise=null,this.isDisposed)return;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}dispose(){this.isDisposed=!0}}class m{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{var e;this.deferred=null,null===(e=this.doResolve)||void 0===e||e.call(this,null)};return this.deferred=t===l.n?(e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}})(i):((e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,i),this.completionPromise}isTriggered(){var e;return!!(null===(e=this.deferred)||void 0===e?void 0:e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&(null===(e=this.doReject)||void 0===e||e.call(this,new o.FU),this.completionPromise=null)}cancelTimeout(){var e;null===(e=this.deferred)||void 0===e||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class f{constructor(e){this.delayer=new m(e),this.throttler=new p}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function _(e,t){return t?new Promise(((i,n)=>{const s=setTimeout((()=>{r.dispose(),i()}),e),r=t.onCancellationRequested((()=>{clearTimeout(s),r.dispose(),n(new o.FU)}))})):u((t=>_(e,t)))}function v(e,t=0){const i=setTimeout(e,t);return(0,r.OF)((()=>clearTimeout(i)))}function b(e,t=(e=>!!e),i=null){let n=0;const o=e.length,s=()=>{if(n>=o)return Promise.resolve(i);const r=e[n++];return Promise.resolve(r()).then((e=>t(e)?Promise.resolve(e):s()))};return s()}class C{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class w{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class y{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;null===(e=this.runner)||void 0===e||e.call(this)}}let S;S="function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback?e=>{(0,a.fn)((()=>{if(t)return;const i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining:()=>Math.max(0,i-Date.now())}))}));let t=!1;return{dispose(){t||(t=!0)}}}:(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}};class L{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=S((()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class x{get isRejected(){var e;return 1===(null===(e=this.outcome)||void 0===e?void 0:e.outcome)}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}complete(e){return new Promise((t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()}))}error(e){return new Promise((t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()}))}cancel(){return this.error(new o.FU)}}var k;!function(e){e.settled=function(e){return d(this,void 0,void 0,(function*(){let t;const i=yield Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i}))},e.withAsyncBody=function(e){return new Promise(((t,i)=>d(this,void 0,void 0,(function*(){try{yield e(t,i)}catch(e){i(e)}}))))}}(k||(k={}));class N{static fromArray(e){return new N((t=>{t.emitMany(e)}))}static fromPromise(e){return new N((t=>d(this,void 0,void 0,(function*(){t.emitMany(yield e)}))))}static fromPromises(e){return new N((t=>d(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>d(this,void 0,void 0,(function*(){return t.emitOne(yield e)})))))}))))}static merge(e){return new N((t=>d(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>{var i,n,o;return d(this,void 0,void 0,(function*(){var s,r,a,l;try{for(i=!0,n=h(e);!(s=(o=yield n.next()).done);i=!0){l=o.value,i=!1;const e=l;t.emitOne(e)}}catch(e){r={error:e}}finally{try{i||s||!(a=n.return)||(yield a.call(n))}finally{if(r)throw r.error}}}))})))}))))}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new s.Q5,queueMicrotask((()=>d(this,void 0,void 0,(function*(){const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{yield Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))))}[Symbol.asyncIterator](){let e=0;return{next:()=>d(this,void 0,void 0,(function*(){for(;;){if(2===this._state)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(1===this._state)return{done:!0,value:void 0};yield s.ju.toPromise(this._onStateChanged.event)}}))}}static map(e,t){return new N((i=>d(this,void 0,void 0,(function*(){var n,o,s,r;try{for(var a,l=!0,d=h(e);!(n=(a=yield d.next()).done);l=!0){r=a.value,l=!1;const e=r;i.emitOne(t(e))}}catch(e){o={error:e}}finally{try{l||n||!(s=d.return)||(yield s.call(d))}finally{if(o)throw o.error}}}))))}map(e){return N.map(this,e)}static filter(e,t){return new N((i=>d(this,void 0,void 0,(function*(){var n,o,s,r;try{for(var a,l=!0,d=h(e);!(n=(a=yield d.next()).done);l=!0){r=a.value,l=!1;const e=r;t(e)&&i.emitOne(e)}}catch(e){o={error:e}}finally{try{l||n||!(s=d.return)||(yield s.call(d))}finally{if(o)throw o.error}}}))))}filter(e){return N.filter(this,e)}static coalesce(e){return N.filter(e,(e=>!!e))}coalesce(){return N.coalesce(this)}static toPromise(e){var t,i,n,o,s,r,a;return d(this,void 0,void 0,(function*(){const l=[];try{for(t=!0,i=h(e);n=yield i.next(),!(o=n.done);t=!0){a=n.value,t=!1;const e=a;l.push(e)}}catch(e){s={error:e}}finally{try{t||o||!(r=i.return)||(yield r.call(i))}finally{if(s)throw s.error}}return l}))}toPromise(){return N.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}N.EMPTY=N.fromArray([]);class D extends N{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function E(e){const t=new n.A,i=e(t.token);return new D(t,(e=>d(this,void 0,void 0,(function*(){var n,s,r,a;const l=t.token.onCancellationRequested((()=>{l.dispose(),t.dispose(),e.reject(new o.FU)}));try{try{for(var d,c=!0,u=h(i);!(n=(d=yield u.next()).done);c=!0){a=d.value,c=!1;const i=a;if(t.token.isCancellationRequested)return;e.emitOne(i)}}catch(e){s={error:e}}finally{try{c||n||!(r=u.return)||(yield r.call(u))}finally{if(s)throw s.error}}l.dispose(),t.dispose()}catch(i){l.dispose(),t.dispose(),e.reject(i)}}))))}},53060:(e,t,i)=>{i.d(t,{Ag:()=>d,Cg:()=>u,KN:()=>r,Q$:()=>c,T4:()=>h,mP:()=>a,oq:()=>l});var n=i(79579);const o="undefined"!=typeof Buffer;let s;new n.o((()=>new Uint8Array(256)));class r{static wrap(e){return o&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new r(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return o?this.buffer.toString():(s||(s=new TextDecoder),s.decode(this.buffer))}}function a(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function l(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function d(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function h(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function c(e,t){return e[t]}function u(e,t,i){e[i]=t}},701:(e,t,i)=>{i.d(t,{b:()=>o,t:()=>n});class n{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.fn(e)),this.lastCache}}class o{get cachedValues(){return this._map}constructor(e){this.fn=e,this._map=new Map}get(e){if(this._map.has(e))return this._map.get(e);const t=this.fn(e);return this._map.set(e,t),t}}},71050:(e,t,i)=>{i.d(t,{A:()=>a,T:()=>s});var n=i(4669);const o=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var s;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof r||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.ju.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o})}(s||(s={}));class r{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new n.Q5),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new r),this._token}cancel(){this._token?this._token instanceof r&&this._token.cancel():this._token=s.Cancelled}dispose(e=!1){var t;e&&this.cancel(),null===(t=this._parentListener)||void 0===t||t.dispose(),this._token?this._token instanceof r&&this._token.dispose():this._token=s.None}}},73046:(e,t,i)=>{i.d(t,{l:()=>a,u:()=>r});var n=i(98401);const o=Object.create(null);function s(e,t){if((0,n.HD)(t)){const i=o[t];if(void 0===i)throw new Error(`${e} references an unknown codicon: ${t}`);t=i}return o[e]=t,{id:e}}function r(){return o}const a={add:s("add",6e4),plus:s("plus",6e4),gistNew:s("gist-new",6e4),repoCreate:s("repo-create",6e4),lightbulb:s("lightbulb",60001),lightBulb:s("light-bulb",60001),repo:s("repo",60002),repoDelete:s("repo-delete",60002),gistFork:s("gist-fork",60003),repoForked:s("repo-forked",60003),gitPullRequest:s("git-pull-request",60004),gitPullRequestAbandoned:s("git-pull-request-abandoned",60004),recordKeys:s("record-keys",60005),keyboard:s("keyboard",60005),tag:s("tag",60006),tagAdd:s("tag-add",60006),tagRemove:s("tag-remove",60006),gitPullRequestLabel:s("git-pull-request-label",60006),person:s("person",60007),personFollow:s("person-follow",60007),personOutline:s("person-outline",60007),personFilled:s("person-filled",60007),gitBranch:s("git-branch",60008),gitBranchCreate:s("git-branch-create",60008),gitBranchDelete:s("git-branch-delete",60008),sourceControl:s("source-control",60008),mirror:s("mirror",60009),mirrorPublic:s("mirror-public",60009),star:s("star",60010),starAdd:s("star-add",60010),starDelete:s("star-delete",60010),starEmpty:s("star-empty",60010),comment:s("comment",60011),commentAdd:s("comment-add",60011),alert:s("alert",60012),warning:s("warning",60012),search:s("search",60013),searchSave:s("search-save",60013),logOut:s("log-out",60014),signOut:s("sign-out",60014),logIn:s("log-in",60015),signIn:s("sign-in",60015),eye:s("eye",60016),eyeUnwatch:s("eye-unwatch",60016),eyeWatch:s("eye-watch",60016),circleFilled:s("circle-filled",60017),primitiveDot:s("primitive-dot",60017),closeDirty:s("close-dirty",60017),debugBreakpoint:s("debug-breakpoint",60017),debugBreakpointDisabled:s("debug-breakpoint-disabled",60017),debugHint:s("debug-hint",60017),primitiveSquare:s("primitive-square",60018),edit:s("edit",60019),pencil:s("pencil",60019),info:s("info",60020),issueOpened:s("issue-opened",60020),gistPrivate:s("gist-private",60021),gitForkPrivate:s("git-fork-private",60021),lock:s("lock",60021),mirrorPrivate:s("mirror-private",60021),close:s("close",60022),removeClose:s("remove-close",60022),x:s("x",60022),repoSync:s("repo-sync",60023),sync:s("sync",60023),clone:s("clone",60024),desktopDownload:s("desktop-download",60024),beaker:s("beaker",60025),microscope:s("microscope",60025),vm:s("vm",60026),deviceDesktop:s("device-desktop",60026),file:s("file",60027),fileText:s("file-text",60027),more:s("more",60028),ellipsis:s("ellipsis",60028),kebabHorizontal:s("kebab-horizontal",60028),mailReply:s("mail-reply",60029),reply:s("reply",60029),organization:s("organization",60030),organizationFilled:s("organization-filled",60030),organizationOutline:s("organization-outline",60030),newFile:s("new-file",60031),fileAdd:s("file-add",60031),newFolder:s("new-folder",60032),fileDirectoryCreate:s("file-directory-create",60032),trash:s("trash",60033),trashcan:s("trashcan",60033),history:s("history",60034),clock:s("clock",60034),folder:s("folder",60035),fileDirectory:s("file-directory",60035),symbolFolder:s("symbol-folder",60035),logoGithub:s("logo-github",60036),markGithub:s("mark-github",60036),github:s("github",60036),terminal:s("terminal",60037),console:s("console",60037),repl:s("repl",60037),zap:s("zap",60038),symbolEvent:s("symbol-event",60038),error:s("error",60039),stop:s("stop",60039),variable:s("variable",60040),symbolVariable:s("symbol-variable",60040),array:s("array",60042),symbolArray:s("symbol-array",60042),symbolModule:s("symbol-module",60043),symbolPackage:s("symbol-package",60043),symbolNamespace:s("symbol-namespace",60043),symbolObject:s("symbol-object",60043),symbolMethod:s("symbol-method",60044),symbolFunction:s("symbol-function",60044),symbolConstructor:s("symbol-constructor",60044),symbolBoolean:s("symbol-boolean",60047),symbolNull:s("symbol-null",60047),symbolNumeric:s("symbol-numeric",60048),symbolNumber:s("symbol-number",60048),symbolStructure:s("symbol-structure",60049),symbolStruct:s("symbol-struct",60049),symbolParameter:s("symbol-parameter",60050),symbolTypeParameter:s("symbol-type-parameter",60050),symbolKey:s("symbol-key",60051),symbolText:s("symbol-text",60051),symbolReference:s("symbol-reference",60052),goToFile:s("go-to-file",60052),symbolEnum:s("symbol-enum",60053),symbolValue:s("symbol-value",60053),symbolRuler:s("symbol-ruler",60054),symbolUnit:s("symbol-unit",60054),activateBreakpoints:s("activate-breakpoints",60055),archive:s("archive",60056),arrowBoth:s("arrow-both",60057),arrowDown:s("arrow-down",60058),arrowLeft:s("arrow-left",60059),arrowRight:s("arrow-right",60060),arrowSmallDown:s("arrow-small-down",60061),arrowSmallLeft:s("arrow-small-left",60062),arrowSmallRight:s("arrow-small-right",60063),arrowSmallUp:s("arrow-small-up",60064),arrowUp:s("arrow-up",60065),bell:s("bell",60066),bold:s("bold",60067),book:s("book",60068),bookmark:s("bookmark",60069),debugBreakpointConditionalUnverified:s("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:s("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:s("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:s("debug-breakpoint-data-unverified",60072),debugBreakpointData:s("debug-breakpoint-data",60073),debugBreakpointDataDisabled:s("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:s("debug-breakpoint-log-unverified",60074),debugBreakpointLog:s("debug-breakpoint-log",60075),debugBreakpointLogDisabled:s("debug-breakpoint-log-disabled",60075),briefcase:s("briefcase",60076),broadcast:s("broadcast",60077),browser:s("browser",60078),bug:s("bug",60079),calendar:s("calendar",60080),caseSensitive:s("case-sensitive",60081),check:s("check",60082),checklist:s("checklist",60083),chevronDown:s("chevron-down",60084),dropDownButton:s("drop-down-button",60084),chevronLeft:s("chevron-left",60085),chevronRight:s("chevron-right",60086),chevronUp:s("chevron-up",60087),chromeClose:s("chrome-close",60088),chromeMaximize:s("chrome-maximize",60089),chromeMinimize:s("chrome-minimize",60090),chromeRestore:s("chrome-restore",60091),circle:s("circle",60092),circleOutline:s("circle-outline",60092),debugBreakpointUnverified:s("debug-breakpoint-unverified",60092),circleSlash:s("circle-slash",60093),circuitBoard:s("circuit-board",60094),clearAll:s("clear-all",60095),clippy:s("clippy",60096),closeAll:s("close-all",60097),cloudDownload:s("cloud-download",60098),cloudUpload:s("cloud-upload",60099),code:s("code",60100),collapseAll:s("collapse-all",60101),colorMode:s("color-mode",60102),commentDiscussion:s("comment-discussion",60103),compareChanges:s("compare-changes",60157),creditCard:s("credit-card",60105),dash:s("dash",60108),dashboard:s("dashboard",60109),database:s("database",60110),debugContinue:s("debug-continue",60111),debugDisconnect:s("debug-disconnect",60112),debugPause:s("debug-pause",60113),debugRestart:s("debug-restart",60114),debugStart:s("debug-start",60115),debugStepInto:s("debug-step-into",60116),debugStepOut:s("debug-step-out",60117),debugStepOver:s("debug-step-over",60118),debugStop:s("debug-stop",60119),debug:s("debug",60120),deviceCameraVideo:s("device-camera-video",60121),deviceCamera:s("device-camera",60122),deviceMobile:s("device-mobile",60123),diffAdded:s("diff-added",60124),diffIgnored:s("diff-ignored",60125),diffModified:s("diff-modified",60126),diffRemoved:s("diff-removed",60127),diffRenamed:s("diff-renamed",60128),diff:s("diff",60129),discard:s("discard",60130),editorLayout:s("editor-layout",60131),emptyWindow:s("empty-window",60132),exclude:s("exclude",60133),extensions:s("extensions",60134),eyeClosed:s("eye-closed",60135),fileBinary:s("file-binary",60136),fileCode:s("file-code",60137),fileMedia:s("file-media",60138),filePdf:s("file-pdf",60139),fileSubmodule:s("file-submodule",60140),fileSymlinkDirectory:s("file-symlink-directory",60141),fileSymlinkFile:s("file-symlink-file",60142),fileZip:s("file-zip",60143),files:s("files",60144),filter:s("filter",60145),flame:s("flame",60146),foldDown:s("fold-down",60147),foldUp:s("fold-up",60148),fold:s("fold",60149),folderActive:s("folder-active",60150),folderOpened:s("folder-opened",60151),gear:s("gear",60152),gift:s("gift",60153),gistSecret:s("gist-secret",60154),gist:s("gist",60155),gitCommit:s("git-commit",60156),gitCompare:s("git-compare",60157),gitMerge:s("git-merge",60158),githubAction:s("github-action",60159),githubAlt:s("github-alt",60160),globe:s("globe",60161),grabber:s("grabber",60162),graph:s("graph",60163),gripper:s("gripper",60164),heart:s("heart",60165),home:s("home",60166),horizontalRule:s("horizontal-rule",60167),hubot:s("hubot",60168),inbox:s("inbox",60169),issueClosed:s("issue-closed",60324),issueReopened:s("issue-reopened",60171),issues:s("issues",60172),italic:s("italic",60173),jersey:s("jersey",60174),json:s("json",60175),bracket:s("bracket",60175),kebabVertical:s("kebab-vertical",60176),key:s("key",60177),law:s("law",60178),lightbulbAutofix:s("lightbulb-autofix",60179),linkExternal:s("link-external",60180),link:s("link",60181),listOrdered:s("list-ordered",60182),listUnordered:s("list-unordered",60183),liveShare:s("live-share",60184),loading:s("loading",60185),location:s("location",60186),mailRead:s("mail-read",60187),mail:s("mail",60188),markdown:s("markdown",60189),megaphone:s("megaphone",60190),mention:s("mention",60191),milestone:s("milestone",60192),gitPullRequestMilestone:s("git-pull-request-milestone",60192),mortarBoard:s("mortar-board",60193),move:s("move",60194),multipleWindows:s("multiple-windows",60195),mute:s("mute",60196),noNewline:s("no-newline",60197),note:s("note",60198),octoface:s("octoface",60199),openPreview:s("open-preview",60200),package_:s("package",60201),paintcan:s("paintcan",60202),pin:s("pin",60203),play:s("play",60204),run:s("run",60204),plug:s("plug",60205),preserveCase:s("preserve-case",60206),preview:s("preview",60207),project:s("project",60208),pulse:s("pulse",60209),question:s("question",60210),quote:s("quote",60211),radioTower:s("radio-tower",60212),reactions:s("reactions",60213),references:s("references",60214),refresh:s("refresh",60215),regex:s("regex",60216),remoteExplorer:s("remote-explorer",60217),remote:s("remote",60218),remove:s("remove",60219),replaceAll:s("replace-all",60220),replace:s("replace",60221),repoClone:s("repo-clone",60222),repoForcePush:s("repo-force-push",60223),repoPull:s("repo-pull",60224),repoPush:s("repo-push",60225),report:s("report",60226),requestChanges:s("request-changes",60227),rocket:s("rocket",60228),rootFolderOpened:s("root-folder-opened",60229),rootFolder:s("root-folder",60230),rss:s("rss",60231),ruby:s("ruby",60232),saveAll:s("save-all",60233),saveAs:s("save-as",60234),save:s("save",60235),screenFull:s("screen-full",60236),screenNormal:s("screen-normal",60237),searchStop:s("search-stop",60238),server:s("server",60240),settingsGear:s("settings-gear",60241),settings:s("settings",60242),shield:s("shield",60243),smiley:s("smiley",60244),sortPrecedence:s("sort-precedence",60245),splitHorizontal:s("split-horizontal",60246),splitVertical:s("split-vertical",60247),squirrel:s("squirrel",60248),starFull:s("star-full",60249),starHalf:s("star-half",60250),symbolClass:s("symbol-class",60251),symbolColor:s("symbol-color",60252),symbolCustomColor:s("symbol-customcolor",60252),symbolConstant:s("symbol-constant",60253),symbolEnumMember:s("symbol-enum-member",60254),symbolField:s("symbol-field",60255),symbolFile:s("symbol-file",60256),symbolInterface:s("symbol-interface",60257),symbolKeyword:s("symbol-keyword",60258),symbolMisc:s("symbol-misc",60259),symbolOperator:s("symbol-operator",60260),symbolProperty:s("symbol-property",60261),wrench:s("wrench",60261),wrenchSubaction:s("wrench-subaction",60261),symbolSnippet:s("symbol-snippet",60262),tasklist:s("tasklist",60263),telescope:s("telescope",60264),textSize:s("text-size",60265),threeBars:s("three-bars",60266),thumbsdown:s("thumbsdown",60267),thumbsup:s("thumbsup",60268),tools:s("tools",60269),triangleDown:s("triangle-down",60270),triangleLeft:s("triangle-left",60271),triangleRight:s("triangle-right",60272),triangleUp:s("triangle-up",60273),twitter:s("twitter",60274),unfold:s("unfold",60275),unlock:s("unlock",60276),unmute:s("unmute",60277),unverified:s("unverified",60278),verified:s("verified",60279),versions:s("versions",60280),vmActive:s("vm-active",60281),vmOutline:s("vm-outline",60282),vmRunning:s("vm-running",60283),watch:s("watch",60284),whitespace:s("whitespace",60285),wholeWord:s("whole-word",60286),window:s("window",60287),wordWrap:s("word-wrap",60288),zoomIn:s("zoom-in",60289),zoomOut:s("zoom-out",60290),listFilter:s("list-filter",60291),listFlat:s("list-flat",60292),listSelection:s("list-selection",60293),selection:s("selection",60293),listTree:s("list-tree",60294),debugBreakpointFunctionUnverified:s("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:s("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:s("debug-breakpoint-function-disabled",60296),debugStackframeActive:s("debug-stackframe-active",60297),circleSmallFilled:s("circle-small-filled",60298),debugStackframeDot:s("debug-stackframe-dot",60298),debugStackframe:s("debug-stackframe",60299),debugStackframeFocused:s("debug-stackframe-focused",60299),debugBreakpointUnsupported:s("debug-breakpoint-unsupported",60300),symbolString:s("symbol-string",60301),debugReverseContinue:s("debug-reverse-continue",60302),debugStepBack:s("debug-step-back",60303),debugRestartFrame:s("debug-restart-frame",60304),callIncoming:s("call-incoming",60306),callOutgoing:s("call-outgoing",60307),menu:s("menu",60308),expandAll:s("expand-all",60309),feedback:s("feedback",60310),gitPullRequestReviewer:s("git-pull-request-reviewer",60310),groupByRefType:s("group-by-ref-type",60311),ungroupByRefType:s("ungroup-by-ref-type",60312),account:s("account",60313),gitPullRequestAssignee:s("git-pull-request-assignee",60313),bellDot:s("bell-dot",60314),debugConsole:s("debug-console",60315),library:s("library",60316),output:s("output",60317),runAll:s("run-all",60318),syncIgnored:s("sync-ignored",60319),pinned:s("pinned",60320),githubInverted:s("github-inverted",60321),debugAlt:s("debug-alt",60305),serverProcess:s("server-process",60322),serverEnvironment:s("server-environment",60323),pass:s("pass",60324),stopCircle:s("stop-circle",60325),playCircle:s("play-circle",60326),record:s("record",60327),debugAltSmall:s("debug-alt-small",60328),vmConnect:s("vm-connect",60329),cloud:s("cloud",60330),merge:s("merge",60331),exportIcon:s("export",60332),graphLeft:s("graph-left",60333),magnet:s("magnet",60334),notebook:s("notebook",60335),redo:s("redo",60336),checkAll:s("check-all",60337),pinnedDirty:s("pinned-dirty",60338),passFilled:s("pass-filled",60339),circleLargeFilled:s("circle-large-filled",60340),circleLarge:s("circle-large",60341),circleLargeOutline:s("circle-large-outline",60341),combine:s("combine",60342),gather:s("gather",60342),table:s("table",60343),variableGroup:s("variable-group",60344),typeHierarchy:s("type-hierarchy",60345),typeHierarchySub:s("type-hierarchy-sub",60346),typeHierarchySuper:s("type-hierarchy-super",60347),gitPullRequestCreate:s("git-pull-request-create",60348),runAbove:s("run-above",60349),runBelow:s("run-below",60350),notebookTemplate:s("notebook-template",60351),debugRerun:s("debug-rerun",60352),workspaceTrusted:s("workspace-trusted",60353),workspaceUntrusted:s("workspace-untrusted",60354),workspaceUnspecified:s("workspace-unspecified",60355),terminalCmd:s("terminal-cmd",60356),terminalDebian:s("terminal-debian",60357),terminalLinux:s("terminal-linux",60358),terminalPowershell:s("terminal-powershell",60359),terminalTmux:s("terminal-tmux",60360),terminalUbuntu:s("terminal-ubuntu",60361),terminalBash:s("terminal-bash",60362),arrowSwap:s("arrow-swap",60363),copy:s("copy",60364),personAdd:s("person-add",60365),filterFilled:s("filter-filled",60366),wand:s("wand",60367),debugLineByLine:s("debug-line-by-line",60368),inspect:s("inspect",60369),layers:s("layers",60370),layersDot:s("layers-dot",60371),layersActive:s("layers-active",60372),compass:s("compass",60373),compassDot:s("compass-dot",60374),compassActive:s("compass-active",60375),azure:s("azure",60376),issueDraft:s("issue-draft",60377),gitPullRequestClosed:s("git-pull-request-closed",60378),gitPullRequestDraft:s("git-pull-request-draft",60379),debugAll:s("debug-all",60380),debugCoverage:s("debug-coverage",60381),runErrors:s("run-errors",60382),folderLibrary:s("folder-library",60383),debugContinueSmall:s("debug-continue-small",60384),beakerStop:s("beaker-stop",60385),graphLine:s("graph-line",60386),graphScatter:s("graph-scatter",60387),pieChart:s("pie-chart",60388),bracketDot:s("bracket-dot",60389),bracketError:s("bracket-error",60390),lockSmall:s("lock-small",60391),azureDevops:s("azure-devops",60392),verifiedFilled:s("verified-filled",60393),newLine:s("newline",60394),layout:s("layout",60395),layoutActivitybarLeft:s("layout-activitybar-left",60396),layoutActivitybarRight:s("layout-activitybar-right",60397),layoutPanelLeft:s("layout-panel-left",60398),layoutPanelCenter:s("layout-panel-center",60399),layoutPanelJustify:s("layout-panel-justify",60400),layoutPanelRight:s("layout-panel-right",60401),layoutPanel:s("layout-panel",60402),layoutSidebarLeft:s("layout-sidebar-left",60403),layoutSidebarRight:s("layout-sidebar-right",60404),layoutStatusbar:s("layout-statusbar",60405),layoutMenubar:s("layout-menubar",60406),layoutCentered:s("layout-centered",60407),layoutSidebarRightOff:s("layout-sidebar-right-off",60416),layoutPanelOff:s("layout-panel-off",60417),layoutSidebarLeftOff:s("layout-sidebar-left-off",60418),target:s("target",60408),indent:s("indent",60409),recordSmall:s("record-small",60410),errorSmall:s("error-small",60411),arrowCircleDown:s("arrow-circle-down",60412),arrowCircleLeft:s("arrow-circle-left",60413),arrowCircleRight:s("arrow-circle-right",60414),arrowCircleUp:s("arrow-circle-up",60415),heartFilled:s("heart-filled",60420),map:s("map",60421),mapFilled:s("map-filled",60422),circleSmall:s("circle-small",60423),bellSlash:s("bell-slash",60424),bellSlashDot:s("bell-slash-dot",60425),commentUnresolved:s("comment-unresolved",60426),gitPullRequestGoToChanges:s("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:s("git-pull-request-new-changes",60428),searchFuzzy:s("search-fuzzy",60429),commentDraft:s("comment-draft",60430),send:s("send",60431),sparkle:s("sparkle",60432),insert:s("insert",60433),mic:s("mic",60434),dialogError:s("dialog-error","error"),dialogWarning:s("dialog-warning","warning"),dialogInfo:s("dialog-info","info"),dialogClose:s("dialog-close","close"),treeItemExpanded:s("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:s("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:s("tree-filter-on-type-off","list-selection"),treeFilterClear:s("tree-filter-clear","close"),treeItemLoading:s("tree-item-loading","loading"),menuSelection:s("menu-selection","check"),menuSubmenu:s("menu-submenu","chevron-right"),menuBarMore:s("menubar-more","more"),scrollbarButtonLeft:s("scrollbar-button-left","triangle-left"),scrollbarButtonRight:s("scrollbar-button-right","triangle-right"),scrollbarButtonUp:s("scrollbar-button-up","triangle-up"),scrollbarButtonDown:s("scrollbar-button-down","triangle-down"),toolBarMore:s("toolbar-more","more"),quickInputBack:s("quick-input-back","arrow-left")}},6626:(e,t,i)=>{i.d(t,{r:()=>n});class n{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}}},41264:(e,t,i)=>{function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{Il:()=>a,Oz:()=>s,VS:()=>o,tx:()=>r});class o{constructor(e,t,i,o=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class s{constructor(e,t,i,o){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,d=0;const h=(a+r)/2,c=r-a;if(c>0){switch(d=Math.min(h<=.5?c/(2*h):c/(2-2*h),1),r){case t:l=(i-n)/c+(i<n?6:0);break;case i:l=(n-t)/c+2;break;case n:l=(t-i)/c+4}l*=60,l=Math.round(l)}return new s(l,d,h,o)}static _hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:r}=e;let a,l,d;if(0===i)a=l=d=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;a=s._hue2rgb(o,e,t+1/3),l=s._hue2rgb(o,e,t),d=s._hue2rgb(o,e,t-1/3)}return new o(Math.round(255*a),Math.round(255*l),Math.round(255*d),r)}}class r{constructor(e,t,i,o){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),s=o-Math.min(t,i,n),a=0===o?0:s/o;let l;return l=0===s?0:o===t?((i-n)/s%6+6)%6:o===i?(n-t)/s+2:(t-i)/s+4,new r(Math.round(60*l),a,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r;let[d,h,c]=[0,0,0];return t<60?(d=r,h=a):t<120?(d=a,h=r):t<180?(h=r,c=a):t<240?(h=a,c=r):t<300?(d=a,c=r):t<=360&&(d=r,c=a),d=Math.round(255*(d+l)),h=Math.round(255*(h+l)),c=Math.round(255*(c+l)),new o(d,h,c,s)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:s.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof o)this.rgba=e;else if(e instanceof s)this._hsla=e,this.rgba=s.toRGBA(e);else{if(!(e instanceof r))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=r.toRGBA(e)}}equals(e){return!!e&&o.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)}getRelativeLuminance(){return n(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()<e.getRelativeLuminance()}lighten(e){return new a(new s(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new a(new s(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:t,g:i,b:n,a:s}=this.rgba;return new a(new o(t,i,n,s*e))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new a(new o(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}makeOpaque(e){if(this.isOpaque()||1!==e.rgba.a)return this;const{r:t,g:i,b:n,a:s}=this.rgba;return new a(new o(e.rgba.r-s*(e.rgba.r-t),e.rgba.g-s*(e.rgba.g-i),e.rgba.b-s*(e.rgba.b-n),1))}toString(){return this._toString||(this._toString=a.Format.CSS.format(this)),this._toString}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),o=t.getRelativeLuminance();return i=i*(o-n)/o,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;const n=e.getRelativeLuminance();return i=i*(n-t.getRelativeLuminance())/n,e.darken(i)}}a.white=new a(new o(255,255,255,1)),a.black=new a(new o(0,0,0,1)),a.red=new a(new o(255,0,0,1)),a.blue=new a(new o(0,0,255,1)),a.green=new a(new o(0,255,0,1)),a.cyan=new a(new o(0,255,255,1)),a.lightgrey=new a(new o(211,211,211,1)),a.transparent=new a(new o(0,0,0,0)),function(e){let t;!function(t){let i;!function(t){function i(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function n(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`},t.formatHSL=function(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)`:e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return`hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})`},t.formatHex=function(e){return`#${i(e.rgba.r)}${i(e.rgba.g)}${i(e.rgba.b)}`},t.formatHexA=function(t,n=!1){return n&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${i(t.rgba.r)}${i(t.rgba.g)}${i(t.rgba.b)}${i(Math.round(255*t.rgba.a))}`},t.format=function(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)},t.parseHex=function(t){const i=t.length;if(0===i)return null;if(35!==t.charCodeAt(0))return null;if(7===i){const i=16*n(t.charCodeAt(1))+n(t.charCodeAt(2)),s=16*n(t.charCodeAt(3))+n(t.charCodeAt(4)),r=16*n(t.charCodeAt(5))+n(t.charCodeAt(6));return new e(new o(i,s,r,1))}if(9===i){const i=16*n(t.charCodeAt(1))+n(t.charCodeAt(2)),s=16*n(t.charCodeAt(3))+n(t.charCodeAt(4)),r=16*n(t.charCodeAt(5))+n(t.charCodeAt(6)),a=16*n(t.charCodeAt(7))+n(t.charCodeAt(8));return new e(new o(i,s,r,a/255))}if(4===i){const i=n(t.charCodeAt(1)),s=n(t.charCodeAt(2)),r=n(t.charCodeAt(3));return new e(new o(16*i+i,16*s+s,16*r+r))}if(5===i){const i=n(t.charCodeAt(1)),s=n(t.charCodeAt(2)),r=n(t.charCodeAt(3)),a=n(t.charCodeAt(4));return new e(new o(16*i+i,16*s+s,16*r+r,(16*a+a)/255))}return null}}(i=t.CSS||(t.CSS={}))}(t=e.Format||(e.Format={}))}(a||(a={}))},73278:(e,t,i)=>{i.d(t,{Hl:()=>d,Ix:()=>l,SN:()=>c,Z0:()=>g,ZO:()=>a});var n=i(9488),o=i(53725),s=i(98e3),r=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function a(e){return{asString:()=>r(this,void 0,void 0,(function*(){return e})),asFile:()=>{},value:"string"==typeof e?e:void 0}}function l(e,t,i){const n={id:(0,s.R)(),name:e,uri:t,data:i};return{asString:()=>r(this,void 0,void 0,(function*(){return""})),asFile:()=>n,value:void 0}}class d{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return o.$.some(this,(([e,t])=>t.asFile()))&&t.push("files"),u(h(e),t)}get(e){var t;return null===(t=this._entries.get(this.toKey(e)))||void 0===t?void 0:t[0]}append(e,t){const 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(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return h(e)}}function h(e){return e.toLowerCase()}function c(e,t){return u(h(e),t.map(h))}function u(e,t){if("*/*"===e)return t.length>0;if(t.includes(e))return!0;const i=e.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!i)return!1;const[n,o,s]=i;return"*"===s&&t.some((e=>e.startsWith(o+"/")))}const g=Object.freeze({create:e=>(0,n.EB)(e.map((e=>e.toString()))).join("\r\n"),split:e=>e.split("\r\n"),parse:e=>g.split(e).filter((e=>!e.startsWith("#")))})},49898:(e,t,i)=>{function n(e,t,i){let n=null,o=null;if("function"==typeof i.value?(n="value",o=i.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",o=i.get),!o)throw new Error("not supported");const s=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[s]}}i.d(t,{H:()=>n})},2484:(e,t,i)=>{i.d(t,{Hs:()=>h,a$:()=>r});class n{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var o=i(89954);class s{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i<n;i++)t[i]=e.charCodeAt(i);return t}}function r(e,t,i){return new h(new s(e),new s(t)).ComputeDiff(i).changes}class a{static Assert(e,t){if(!e)throw new Error(t)}}class l{static Copy(e,t,i,n,o){for(let s=0;s<o;s++)i[n+s]=e[t+s]}static Copy2(e,t,i,n,o){for(let s=0;s<o;s++)i[n+s]=e[t+s]}}class d{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class h{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,o,s]=h._getElements(e),[r,a,l]=h._getElements(t);this._hasStrings=s&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(h._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i<n;i++)e[i]=(0,o.Cv)(t[i],0);return[t,e,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}ElementsAreStrictEqual(e,t){return!!this.ElementsAreEqual(e,t)&&h._getStrictElement(this._originalSequence,e)===h._getStrictElement(this._modifiedSequence,t)}static _getStrictElement(e,t){return"function"==typeof e.getStrictElement?e.getStrictElement(t):null}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,i,n,o){const s=[!1];let r=this.ComputeDiffRecursive(e,t,i,n,s);return o&&(r=this.PrettifyChanges(r)),{quitEarly:s[0],changes:r}}ComputeDiffRecursive(e,t,i,o,s){for(s[0]=!1;e<=t&&i<=o&&this.ElementsAreEqual(e,i);)e++,i++;for(;t>=e&&o>=i&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||i>o){let s;return i<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new n(e,0,i,o-i+1)]):e<=t?(a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[new n(e,t-e+1,i,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const r=[0],l=[0],d=this.ComputeRecursionPoint(e,t,i,o,r,l,s),h=r[0],c=l[0];if(null!==d)return d;if(!s[0]){const r=this.ComputeDiffRecursive(e,h,i,c,s);let a=[];return a=s[0]?[new n(h+1,t-(h+1)+1,c+1,o-(c+1)+1)]:this.ComputeDiffRecursive(h+1,t,c+1,o,s),this.ConcatenateChanges(r,a)}return[new n(e,t-e+1,i,o-i+1)]}WALKTRACE(e,t,i,o,s,r,a,l,h,c,u,g,p,m,f,_,v,b){let C=null,w=null,y=new d,S=t,L=i,x=p[0]-_[0]-o,k=-1073741824,N=this.m_forwardHistory.length-1;do{const t=x+e;t===S||t<L&&h[t-1]<h[t+1]?(m=(u=h[t+1])-x-o,u<k&&y.MarkNextChange(),k=u,y.AddModifiedElement(u+1,m),x=t+1-e):(m=(u=h[t-1]+1)-x-o,u<k&&y.MarkNextChange(),k=u-1,y.AddOriginalElement(u,m+1),x=t-1-e),N>=0&&(e=(h=this.m_forwardHistory[N])[0],S=1,L=h.length-1)}while(--N>=-1);if(C=y.getReverseChanges(),b[0]){let e=p[0]+1,t=_[0]+1;if(null!==C&&C.length>0){const i=C[C.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}w=[new n(e,g-e+1,t,f-t+1)]}else{y=new d,S=r,L=a,x=p[0]-_[0]-l,k=1073741824,N=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=x+s;e===S||e<L&&c[e-1]>=c[e+1]?(m=(u=c[e+1]-1)-x-l,u>k&&y.MarkNextChange(),k=u+1,y.AddOriginalElement(u+1,m+1),x=e+1-s):(m=(u=c[e-1])-x-l,u>k&&y.MarkNextChange(),k=u,y.AddModifiedElement(u+1,m+1),x=e-1-s),N>=0&&(s=(c=this.m_reverseHistory[N])[0],S=1,L=c.length-1)}while(--N>=-1);w=y.getChanges()}return this.ConcatenateChanges(C,w)}ComputeRecursionPoint(e,t,i,o,s,r,a){let d=0,h=0,c=0,u=0,g=0,p=0;e--,i--,s[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(o-i),f=m+1,_=new Int32Array(f),v=new Int32Array(f),b=o-i,C=t-e,w=e-i,y=t-o,S=(C-b)%2==0;_[b]=e,v[C]=t,a[0]=!1;for(let L=1;L<=m/2+1;L++){let m=0,x=0;c=this.ClipDiagonalBound(b-L,L,b,f),u=this.ClipDiagonalBound(b+L,L,b,f);for(let e=c;e<=u;e+=2){d=e===c||e<u&&_[e-1]<_[e+1]?_[e+1]:_[e-1]+1,h=d-(e-b)-w;const i=d;for(;d<t&&h<o&&this.ElementsAreEqual(d+1,h+1);)d++,h++;if(_[e]=d,d+h>m+x&&(m=d,x=h),!S&&Math.abs(e-C)<=L-1&&d>=v[e])return s[0]=d,r[0]=h,i<=v[e]&&L<=1448?this.WALKTRACE(b,c,u,w,C,g,p,y,_,v,d,t,s,h,o,r,S,a):null}const k=(m-e+(x-i)-L)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(m,k))return a[0]=!0,s[0]=m,r[0]=x,k>0&&L<=1448?this.WALKTRACE(b,c,u,w,C,g,p,y,_,v,d,t,s,h,o,r,S,a):(e++,i++,[new n(e,t-e+1,i,o-i+1)]);g=this.ClipDiagonalBound(C-L,L,C,f),p=this.ClipDiagonalBound(C+L,L,C,f);for(let n=g;n<=p;n+=2){d=n===g||n<p&&v[n-1]>=v[n+1]?v[n+1]-1:v[n-1],h=d-(n-C)-y;const l=d;for(;d>e&&h>i&&this.ElementsAreEqual(d,h);)d--,h--;if(v[n]=d,S&&Math.abs(n-b)<=L&&d<=_[n])return s[0]=d,r[0]=h,l>=_[n]&&L<=1448?this.WALKTRACE(b,c,u,w,C,g,p,y,_,v,d,t,s,h,o,r,S,a):null}if(L<=1447){let e=new Int32Array(u-c+2);e[0]=b-c+1,l.Copy2(_,c,e,1,u-c+1),this.m_forwardHistory.push(e),e=new Int32Array(p-g+2),e[0]=C-g+1,l.Copy2(v,g,e,1,p-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,c,u,w,C,g,p,y,_,v,d,t,s,h,o,r,S,a)}PrettifyChanges(e){for(let t=0;t<e.length;t++){const i=e[t],n=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,o=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,s=i.originalLength>0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength<n&&i.modifiedStart+i.modifiedLength<o&&(!s||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!r||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const e=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!e)break;i.originalStart++,i.modifiedStart++}const a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(let t=e.length-1;t>=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,o=i.modifiedStart+i.modifiedLength}const s=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,d=i.modifiedStart-e;if(t<n||d<o)break;if(s&&!this.OriginalElementsAreEqual(t,t+i.originalLength))break;if(r&&!this.ModifiedElementsAreEqual(d,d+i.modifiedLength))break;const h=(t===n&&d===o?5:0)+this._boundaryScore(t,i.originalLength,d,i.modifiedLength);h>l&&(l=h,a=e)}i.originalStart-=a,i.modifiedStart-=a;const d=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],d)&&(e[t-1]=d[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t<i;t++){const i=e[t-1],n=e[t],o=n.originalStart-i.originalStart-i.originalLength,s=i.originalStart,r=n.originalStart+n.originalLength,a=r-s,l=i.modifiedStart,d=n.modifiedStart+n.modifiedLength,h=d-l;if(o<5&&a<20&&h<20){const e=this._findBetterContiguousSequence(s,a,l,h,o);if(e){const[t,s]=e;t===i.originalStart+i.originalLength&&s===i.modifiedStart+i.modifiedLength||(i.originalLength=t-i.originalStart,i.modifiedLength=s-i.modifiedStart,n.originalStart=t+o,n.modifiedStart=s+o,n.originalLength=r-n.originalStart,n.modifiedLength=d-n.modifiedStart)}}}return e}_findBetterContiguousSequence(e,t,i,n,o){if(t<o||n<o)return null;const s=e+t-o+1,r=i+n-o+1;let a=0,l=0,d=0;for(let t=e;t<s;t++)for(let e=i;e<r;e++){const i=this._contiguousSequenceScore(t,e,o);i>0&&i>a&&(a=i,l=t,d=e)}return a>0?[l,d]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let o=0;o<i;o++){if(!this.ElementsAreEqual(e+o,t+o))return 0;n+=this._originalStringElements[e+o].length}return n}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){const i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return l.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],l.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return l.Copy(e,0,i,0,e.length),l.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const o=e.originalStart;let s=e.originalLength;const r=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n(o,s,r,a),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e<n)return e;const o=t%2==0;return e<0?o===(i%2==0)?0:1:o===((n-i-1)%2==0)?n-1:n-2}}},17301:(e,t,i)=>{i.d(t,{B8:()=>g,Cp:()=>s,F0:()=>h,FU:()=>d,L6:()=>u,b1:()=>c,dL:()=>o,he:()=>m,n2:()=>l,ri:()=>r});const n=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(p.isErrorNoTelemetry(e))throw new p(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function o(e){l(e)||n.onUnexpectedError(e)}function s(e){l(e)||n.onUnexpectedExternalError(e)}function r(e){if(e instanceof Error){const{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack,noTelemetry:p.isErrorNoTelemetry(e)}}return e}const a="Canceled";function l(e){return e instanceof d||e instanceof Error&&e.name===a&&e.message===a}class d extends Error{constructor(){super(a),this.name=this.message}}function h(){const e=new Error(a);return e.name=e.message,e}function c(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function u(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class g extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class p extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof p)return e;const t=new p;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class m extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,m.prototype)}}},4669:(e,t,i)=>{i.d(t,{D0:()=>_,E7:()=>C,K3:()=>f,Q5:()=>g,SZ:()=>v,Sp:()=>p,ZD:()=>w,ju:()=>n,z5:()=>b});var n,o=i(17301),s=i(88289),r=i(5976),a=i(91741),l=i(84013);!function(e){function t(e){return(t,i=null,n)=>{let o,s=!1;return o=e((e=>{if(!s)return o?o.dispose():s=!0,t.call(i,e)}),null,n),s&&o.dispose(),o}}function i(e,t,i){return a(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)),i)}function n(e,t,i){return a(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)),i)}function o(e,t,i){return a(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)),i)}function s(e,t,n,o){let s=n;return i(e,(e=>(s=t(s,e),s)),o)}function a(e,t){let i;const n=new g({onWillAddFirstListener(){i=e(n.fire,n)},onDidRemoveLastListener(){null==i||i.dispose()}});return null==t||t.add(n),n.event}function l(e,t,i=100,n=!1,o=!1,s,r){let a,l,d,h,c=0;const u=new g({leakWarningThreshold:s,onWillAddFirstListener(){a=e((e=>{c++,l=t(l,e),n&&!d&&(u.fire(l),l=void 0),h=()=>{const e=l;l=void 0,d=void 0,(!n||c>1)&&u.fire(e),c=0},"number"==typeof i?(clearTimeout(d),d=setTimeout(h,i)):void 0===d&&(d=0,queueMicrotask(h))}))},onWillRemoveListener(){o&&c>0&&(null==h||h())},onDidRemoveLastListener(){h=void 0,a.dispose()}});return null==r||r.add(u),u.event}function d(e,t=((e,t)=>e===t),i){let n,s=!0;return o(e,(e=>{const i=s||!t(e,n);return s=!1,n=e,i}),i)}e.None=()=>r.JT.None,e.defer=function(e,t){return l(e,(()=>{}),0,void 0,!0,void 0,t)},e.once=t,e.map=i,e.forEach=n,e.filter=o,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>(0,r.F8)(...e.map((e=>e((e=>t.call(i,e)),null,n))))},e.reduce=s,e.debounce=l,e.accumulate=function(t,i=0,n){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),i,void 0,!0,void 0,n)},e.latch=d,e.split=function(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]},e.buffer=function(e,t=!1,i=[]){let n=i.slice(),o=e((e=>{n?n.push(e):r.fire(e)}));const s=()=>{null==n||n.forEach((e=>r.fire(e))),n=null},r=new g({onWillAddFirstListener(){o||(o=e((e=>r.fire(e))))},onDidAddFirstListener(){n&&(t?setTimeout(s):s())},onDidRemoveLastListener(){o&&o.dispose(),o=null}});return r.event};class h{constructor(e){this.event=e,this.disposables=new r.SL}map(e){return new h(i(this.event,e,this.disposables))}forEach(e){return new h(n(this.event,e,this.disposables))}filter(e){return new h(o(this.event,e,this.disposables))}reduce(e,t){return new h(s(this.event,e,t,this.disposables))}latch(){return new h(d(this.event,void 0,this.disposables))}debounce(e,t=100,i=!1,n=!1,o){return new h(l(this.event,e,t,i,n,o,this.disposables))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){return t(this.event)(e,i,n)}dispose(){this.disposables.dispose()}}e.chain=function(e){return new h(e)},e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new g({onWillAddFirstListener:()=>e.on(t,n),onDidRemoveLastListener:()=>e.removeListener(t,n)});return o.event},e.fromDOMEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new g({onWillAddFirstListener:()=>e.addEventListener(t,n),onDidRemoveLastListener:()=>e.removeEventListener(t,n)});return o.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))},e.fromPromise=function(e){const t=new g;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event},e.runAndSubscribe=function(e,t){return t(void 0),e((e=>t(e)))},e.runAndSubscribeWithStore=function(e,t){let i=null;function n(e){null==i||i.dispose(),i=new r.SL,t(e,i)}n(void 0);const o=e((e=>n(e)));return(0,r.OF)((()=>{o.dispose(),null==i||i.dispose()}))};class c{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;const i={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new g(i),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}e.fromObservable=function(e,t){return new c(e,t).emitter.event},e.fromObservableLight=function(e){return t=>{let i=0,n=!1;const o={beginUpdate(){i++},endUpdate(){i--,0===i&&(e.reportChanges(),n&&(n=!1,t()))},handlePossibleChange(){},handleChange(){n=!0}};return e.addObserver(o),e.reportChanges(),{dispose(){e.removeObserver(o)}}}}}(n||(n={}));class d{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${d._idPool++}`,d.all.add(this)}start(e){this._stopWatch=new l.G,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}d.all=new Set,d._idPool=0;class h{constructor(e,t=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=t,this._warnCountdown=0}dispose(){var e;null===(e=this._stacks)||void 0===e||e.clear()}check(e,t){const i=this.threshold;if(i<=0||t<i)return;this._stacks||(this._stacks=new Map);const n=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,n+1),this._warnCountdown-=1,this._warnCountdown<=0){let e;this._warnCountdown=.5*i;let n=0;for(const[t,i]of this._stacks)(!e||n<i)&&(e=t,n=i);console.warn(`[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${n}):`),console.warn(e)}return()=>{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}}class c{static create(){var e;return new c(null!==(e=(new Error).stack)&&void 0!==e?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split("\n").slice(2).join("\n"))}}class u{constructor(e){this.value=e}}class g{constructor(e){var t,i,n,o,s;this._size=0,this._options=e,this._leakageMon=(null===(t=this._options)||void 0===t?void 0:t.leakWarningThreshold)?new h(null!==(n=null===(i=this._options)||void 0===i?void 0:i.leakWarningThreshold)&&void 0!==n?n:-1):void 0,this._perfMon=(null===(o=this._options)||void 0===o?void 0:o._profName)?new d(this._options._profName):void 0,this._deliveryQueue=null===(s=this._options)||void 0===s?void 0:s.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,(null===(e=this._deliveryQueue)||void 0===e?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),null===(i=null===(t=this._options)||void 0===t?void 0:t.onDidRemoveLastListener)||void 0===i||i.call(t),null===(n=this._leakageMon)||void 0===n||n.dispose())}get event(){var e;return null!==(e=this._event)&&void 0!==e||(this._event=(e,t,i)=>{var n,o,s,a,l;if(this._leakageMon&&this._size>3*this._leakageMon.threshold)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),r.JT.None;if(this._disposed)return r.JT.None;t&&(e=e.bind(t));const d=new u(e);let h;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(d.stack=c.create(),h=this._leakageMon.check(d.stack,this._size+1)),this._listeners?this._listeners instanceof u?(null!==(l=this._deliveryQueue)&&void 0!==l||(this._deliveryQueue=new m),this._listeners=[this._listeners,d]):this._listeners.push(d):(null===(o=null===(n=this._options)||void 0===n?void 0:n.onWillAddFirstListener)||void 0===o||o.call(n,this),this._listeners=d,null===(a=null===(s=this._options)||void 0===s?void 0:s.onDidAddFirstListener)||void 0===a||a.call(s,this)),this._size++;const g=(0,r.OF)((()=>{null==h||h(),this._removeListener(d)}));return i instanceof r.SL?i.add(g):Array.isArray(i)&&i.push(g),g}),this._event}_removeListener(e){var t,i,n,o;if(null===(i=null===(t=this._options)||void 0===t?void 0:t.onWillRemoveListener)||void 0===i||i.call(t,this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,null===(o=null===(n=this._options)||void 0===n?void 0:n.onDidRemoveLastListener)||void 0===o||o.call(n,this),void(this._size=0);const s=this._listeners,r=s.indexOf(e);if(-1===r)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,s[r]=void 0;const a=this._deliveryQueue.current===this;if(2*this._size<=s.length){let e=0;for(let t=0;t<s.length;t++)s[t]?s[e++]=s[t]:a&&(this._deliveryQueue.end--,e<this._deliveryQueue.i&&this._deliveryQueue.i--);s.length=e}}_deliver(e,t){var i;if(!e)return;const n=(null===(i=this._options)||void 0===i?void 0:i.onListenerError)||o.dL;if(n)try{e.value(t)}catch(e){n(e)}else e.value(t)}_deliverQueue(e){const t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,i,n,o;if((null===(t=this._deliveryQueue)||void 0===t?void 0:t.current)&&(this._deliverQueue(this._deliveryQueue),null===(i=this._perfMon)||void 0===i||i.stop()),null===(n=this._perfMon)||void 0===n||n.start(this._size),this._listeners)if(this._listeners instanceof u)this._deliver(this._listeners,e);else{const t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}null===(o=this._perfMon)||void 0===o||o.stop()}hasListeners(){return this._size>0}}const p=()=>new m;class m{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class f extends g{constructor(e){super(e),this._isPaused=0,this._eventQueue=new a.S,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class _ extends f{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class v extends g{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=null==e?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),1===this._queuedEvents.length&&queueMicrotask((()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach((e=>super.fire(e))),this._queuedEvents=[]})))}}class b{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new g({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),(0,r.OF)((0,s.I)((()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)})))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach((e=>this.hook(e)))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach((e=>this.unhook(e)))}hook(e){e.listener=e.event((e=>this.emitter.fire(e)))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}}class C{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}}class w{constructor(){this.listening=!1,this.inputEvent=n.None,this.inputEventListener=r.JT.None,this.emitter=new g({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},15527:(e,t,i)=>{i.d(t,{KM:()=>h,ej:()=>a,fn:()=>l,oP:()=>u,yj:()=>d});var n=i(88721),o=i(1432),s=i(97295);function r(e){return 47===e||92===e}function a(e){return e.replace(/[\\/]/g,n.KR.sep)}function l(e){return-1===e.indexOf("/")&&(e=a(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function d(e,t=n.KR.sep){if(!e)return"";const i=e.length,o=e.charCodeAt(0);if(r(o)){if(r(e.charCodeAt(1))&&!r(e.charCodeAt(2))){let n=3;const o=n;for(;n<i&&!r(e.charCodeAt(n));n++);if(o!==n&&!r(e.charCodeAt(n+1)))for(n+=1;n<i;n++)if(r(e.charCodeAt(n)))return e.slice(0,n+1).replace(/[\\/]/g,t)}return t}if(c(o)&&58===e.charCodeAt(1))return r(e.charCodeAt(2))?e.slice(0,2)+t:e.slice(0,2);let s=e.indexOf("://");if(-1!==s)for(s+=3;s<i;s++)if(r(e.charCodeAt(s)))return e.slice(0,s+1);return""}function h(e,t,i,o=n.ir){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(i){if(!(0,s.ok)(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===o&&i--,e.charAt(i)===o}return t.charAt(t.length-1)!==o&&(t+=o),0===e.indexOf(t)}function c(e){return e>=65&&e<=90||e>=97&&e<=122}function u(e,t=o.ED){return!!t&&c(e.charCodeAt(0))&&58===e.charCodeAt(1)}},75392:(e,t,i)=>{i.d(t,{CL:()=>j,EW:()=>q,Ji:()=>r,KZ:()=>y,Oh:()=>D,Sy:()=>d,XU:()=>E,ir:()=>l,jB:()=>I,l7:()=>G,mB:()=>T,mX:()=>$,or:()=>s});var n=i(43702),o=i(97295);function s(...e){return function(t,i){for(let n=0,o=e.length;n<o;n++){const o=e[n](t,i);if(o)return o}return null}}a.bind(void 0,!1);const r=a.bind(void 0,!0);function a(e,t,i){if(!i||i.length<t.length)return null;let n;return n=e?o.ok(i,t):0===i.indexOf(t),n?t.length>0?[{start:0,end:t.length}]:[]:null}function l(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function d(e,t){return h(e.toLowerCase(),t.toLowerCase(),0,0)}function h(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let o=null;return(o=h(e,t,i+1,n+1))?v({start:n,end:n+1},o):null}return h(e,t,i,n+1)}function c(e){return 97<=e&&e<=122}function u(e){return 65<=e&&e<=90}function g(e){return 48<=e&&e<=57}function p(e){return 32===e||9===e||10===e||13===e}const m=new Set;function f(e){return p(e)||m.has(e)}function _(e){return c(e)||u(e)||g(e)}function v(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function b(e,t){for(let i=t;i<e.length;i++){const t=e.charCodeAt(i);if(u(t)||g(t)||i>0&&!_(e.charCodeAt(i-1)))return i}return e.length}function C(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let o=null,s=n+1;for(o=C(e,t,i+1,n+1);!o&&(s=b(t,s))<t.length;)o=C(e,t,i+1,s),s++;return null===o?null:v({start:n,end:n+1},o)}}function w(e,t){if(!t)return null;if(0===(t=t.trim()).length)return null;if(!function(e){let t=0,i=0,n=0,o=0;for(let s=0;s<e.length;s++)n=e.charCodeAt(s),u(n)&&t++,c(n)&&i++,p(n)&&o++;return 0!==t&&0!==i||0!==o?t<=5:e.length<=30}(e))return null;if(t.length>60)return null;const i=function(e){let t=0,i=0,n=0,o=0,s=0;for(let r=0;r<e.length;r++)s=e.charCodeAt(r),u(s)&&t++,c(s)&&i++,_(s)&&n++,g(s)&&o++;return{upperPercent:t/e.length,lowerPercent:i/e.length,alphaPercent:n/e.length,numericPercent:o/e.length}}(t);if(!function(e){const{upperPercent:t,lowerPercent:i,alphaPercent:n,numericPercent:o}=e;return i>.2&&t<.8&&n>.6&&o<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,o=0;for(e=e.toLowerCase();o<t.length&&null===(n=C(e,t,0,o));)o=b(t,o+1);return n}function y(e,t,i=!1){if(!t||0===t.length)return null;let n=null,o=0;for(e=e.toLowerCase(),t=t.toLowerCase();o<t.length&&null===(n=S(e,t,0,o,i));)o=L(t,o+1);return n}function S(e,t,i,n,o){if(i===e.length)return[];if(n===t.length)return null;if((s=e.charCodeAt(i))===(r=t.charCodeAt(n))||f(s)&&f(r)){let s=null,r=n+1;if(s=S(e,t,i+1,n+1,o),!o)for(;!s&&(r=L(t,r))<t.length;)s=S(e,t,i+1,r,o),r++;return s?e.charCodeAt(i)!==t.charCodeAt(n)?s:v({start:n,end:n+1},s):null}return null;var s,r}function L(e,t){for(let i=t;i<e.length;i++)if(f(e.charCodeAt(i))||i>0&&f(e.charCodeAt(i-1)))return i;return e.length}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>m.add(e.charCodeAt(0))));const x=s(r,w,l),k=s(r,w,d),N=new n.z6(1e4);function D(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=N.get(e);n||(n=new RegExp(o.un(e),"i"),N.set(e,n));const s=n.exec(t);return s?[{start:s.index,end:s.index+s[0].length}]:i?k(e,t):x(e,t)}function E(e,t){const i=q(e,e.toLowerCase(),0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?T(i):null}function I(e,t,i,n,o,s){const r=Math.min(13,e.length);for(;i<r;i++){const r=q(e,t,i,n,o,s,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(r)return r}return[0,s]}function T(e){if(void 0===e)return[];const t=[],i=e[1];for(let n=e.length-1;n>1;n--){const o=e[n]+i,s=t[t.length-1];s&&s.end===o?s.end=o+1:t.push({start:o,end:o+1})}return t}const M=128;function R(){const e=[],t=[];for(let e=0;e<=M;e++)t[e]=0;for(let i=0;i<=M;i++)e.push(t.slice(0));return e}function A(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const O=A(2*M),P=A(2*M),F=R(),B=R(),W=R(),V=!1;function H(e,t,i,n,o){function s(e,t,i=" "){for(;e.length<t;)e=i+e;return e}let r=` | |${n.split("").map((e=>s(e,3))).join("|")}\n`;for(let n=0;n<=i;n++)r+=0===n?" |":`${t[n-1]}|`,r+=e[n].slice(0,o+1).map((e=>s(e.toString(),3))).join("|")+"\n";return r}function z(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!o.C8(i)}}function K(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function U(e,t,i){return t[e]!==i[e]}var j;!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(j||(j={}));class ${constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}function q(e,t,i,n,o,s,r=$.default){const a=e.length>M?M:e.length,l=n.length>M?M:n.length;if(i>=a||s>=l||a-i>l-s)return;if(!function(e,t,i,n,o,s,r=!1){for(;t<i&&o<s;)e[t]===n[o]&&(r&&(O[t]=o),t+=1),o+=1;return t===i}(t,i,a,o,s,l,!0))return;!function(e,t,i,n,o,s){let r=e-1,a=t-1;for(;r>=i&&a>=n;)o[r]===s[a]&&(P[r]=a,r--),a--}(a,l,i,s,t,o);let d=1,h=1,c=i,u=s;const g=[!1];for(d=1,c=i;c<a;d++,c++){const r=O[c],p=P[c],m=c+1<a?P[c+1]:l;for(h=r-s+1,u=r;u<m;h++,u++){let a=Number.MIN_SAFE_INTEGER,m=!1;u<=p&&(a=Z(e,t,c,i,n,o,u,l,s,0===F[d-1][h-1],g));let f=0;a!==Number.MAX_SAFE_INTEGER&&(m=!0,f=a+B[d-1][h-1]);const _=u>r,v=_?B[d][h-1]+(F[d][h-1]>0?-5:0):0,b=u>r+1&&F[d][h-1]>0,C=b?B[d][h-2]+(F[d][h-2]>0?-5:0):0;if(b&&(!_||C>=v)&&(!m||C>=f))B[d][h]=C,W[d][h]=3,F[d][h]=0;else if(_&&(!m||v>=f))B[d][h]=v,W[d][h]=2,F[d][h]=0;else{if(!m)throw new Error("not possible");B[d][h]=f,W[d][h]=1,F[d][h]=F[d-1][h-1]+1}}}if(V&&function(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(H(B,e,e.length,i,i.length)),console.log(H(W,e,e.length,i,i.length)),console.log(H(F,e,e.length,i,i.length))}(e,i,n,s),!g[0]&&!r.firstMatchCanBeWeak)return;d--,h--;const p=[B[d][h],s];let m=0,f=0;for(;d>=1;){let e=h;do{const t=W[d][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+d-1]===o[s+h-1]&&!U(e+s-1,n,o)&&m+1>F[d][e]&&(e=h),e===h?m++:m=1,f||(f=e),d--,h=e-1,p.push(h)}l===a&&r.boostFullMatch&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function Z(e,t,i,n,o,s,r,a,l,d,h){if(t[i]!==s[r])return Number.MIN_SAFE_INTEGER;let c=1,u=!1;return r===i-n?c=e[i]===o[r]?7:5:!U(r,o,s)||0!==r&&U(r-1,o,s)?!z(s,r)||0!==r&&z(s,r-1)?(z(s,r-1)||K(s,r-1))&&(c=5,u=!0):c=5:(c=e[i]===o[r]?7:5,u=!0),c>1&&i===n&&(h[0]=!0),u||(u=U(r,o,s)||z(s,r-1)||K(s,r-1)),i===n?r>l&&(c-=u?3:5):c+=d?u?2:0:u?0:1,r+1===a&&(c-=u?3:5),c}function G(e,t,i,n,o,s,r){return function(e,t,i,n,o,s,r,a){let l=q(e,t,i,n,o,s,a);if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;r<t;r++){const t=Q(e,r);if(t){const e=q(t,t.toLowerCase(),i,n,o,s,a);e&&(e[0]-=3,(!l||e[0]>l[0])&&(l=e))}}}return l}(e,t,i,n,o,s,0,r)}function Q(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}$.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}},88289:(e,t,i)=>{function n(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}i.d(t,{I:()=>n})},89954:(e,t,i)=>{i.d(t,{Cv:()=>a,SP:()=>s,vp:()=>o,yP:()=>c});var n=i(97295);function o(e){return s(e,0)}function s(e,t){switch(typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?(i=e,n=r(104579,n=t),i.reduce(((e,t)=>s(t,e)),n)):function(e,t){return t=r(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=a(i,t),s(e[i],t))),t)}(e,t);case"string":return a(e,t);case"boolean":return function(e,t){return r(e?433:863,t)}(e,t);case"number":return r(e,t);case"undefined":return r(937,t);default:return r(617,t)}var i,n}function r(e,t){return(t<<5)-t+e|0}function a(e,t){t=r(149417,t);for(let i=0,n=e.length;i<n;i++)t=r(e.charCodeAt(i),t);return t}function l(e,t,i=32){const n=i-t;return(e<<t|(~((1<<n)-1)&e)>>>n)>>>0}function d(e,t=0,i=e.byteLength,n=0){for(let o=0;o<i;o++)e[t+o]=n}function h(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length<t;)e=i+e;return e}((e>>>0).toString(16),t/4)}class c{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let o,s,r=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(o=a,s=-1,a=0):(o=e.charCodeAt(0),s=0);;){let l=o;if(n.ZG(o)){if(!(s+1<t)){a=o;break}{const t=e.charCodeAt(s+1);n.YK(t)?(s++,l=n.rL(o,t)):l=65533}}else n.YK(o)&&(l=65533);if(r=this._push(i,r,l),s++,!(s<t))break;o=e.charCodeAt(s)}this._buffLen=r,this._leftoverHighSurrogate=a}_push(e,t,i){return i<128?e[t++]=i:i<2048?(e[t++]=192|(1984&i)>>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),h(this._h0)+h(this._h1)+h(this._h2)+h(this._h3)+h(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,d(this._buff,this._buffLen),this._buffLen>56&&(this._step(),d(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=c._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,l(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,o,s=this._h0,r=this._h1,a=this._h2,d=this._h3,h=this._h4;for(let t=0;t<80;t++)t<20?(i=r&a|~r&d,n=1518500249):t<40?(i=r^a^d,n=1859775393):t<60?(i=r&a|r&d|a&d,n=2400959708):(i=r^a^d,n=3395469782),o=l(s,5)+i+h+n+e.getUint32(4*t,!1)&4294967295,h=d,d=a,a=l(r,30),r=s,s=o;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+d&4294967295,this._h4=this._h4+h&4294967295}}c._bigBlock32=new DataView(new ArrayBuffer(320))},59365:(e,t,i)=>{i.d(t,{CP:()=>d,Fr:()=>h,W5:()=>l,d9:()=>u,g_:()=>c,oR:()=>g,v1:()=>p});var n=i(17301),o=i(21212),s=i(95935),r=i(97295),a=i(70666);class l{constructor(e="",t=!1){var i,o,s;if(this.value=e,"string"!=typeof this.value)throw(0,n.b1)("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(o=t.supportThemeIcons)&&void 0!==o&&o,this.supportHtml=null!==(s=t.supportHtml)&&void 0!==s&&s)}appendText(e,t=0){var i;return this.value+=(i=this.supportThemeIcons?(0,o.Qo)(e):e,i.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")).replace(/([ \t]+)/g,((e,t)=>"&nbsp;".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp((0,r.ec)(t),"g");return e.replace(i,((t,i)=>"\\"!==e.charAt(i-1)?`\\${t}`:t))}}function d(e){return h(e)?!e.value:!Array.isArray(e)||e.every(d)}function h(e){return e instanceof l||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&"object"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function c(e,t){return e===t||!(!e||!t)&&e.value===t.value&&e.isTrusted===t.isTrusted&&e.supportThemeIcons===t.supportThemeIcons&&e.supportHtml===t.supportHtml&&(e.baseUri===t.baseUri||!!e.baseUri&&!!t.baseUri&&(0,s.Xy)(a.o.from(e.baseUri),a.o.from(t.baseUri)))}function u(e){return e.replace(/"/g,"&quot;")}function g(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):e}function p(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),o=e?e[1]:"",s=i?i[1]:"",r=isFinite(parseInt(s)),a=isFinite(parseInt(o));r&&t.push(`width="${s}"`),a&&t.push(`height="${o}"`)}return{href:e,dimensions:t}}},21212:(e,t,i)=>{i.d(t,{Gt:()=>_,Ho:()=>f,JL:()=>p,Qo:()=>d,f$:()=>c,x$:()=>g});var n=i(75392),o=i(97295),s=i(25670);const r="$(",a=new RegExp(`\\$\\(${s.k.iconNameExpression}(?:${s.k.iconModifierExpression})?\\)`,"g"),l=new RegExp(`(\\\\)?${a.source}`,"g");function d(e){return e.replace(l,((e,t)=>t?e:`\\${e}`))}const h=new RegExp(`\\\\${a.source}`,"g");function c(e){return e.replace(h,(e=>`\\${e}`))}const u=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function g(e){return-1===e.indexOf(r)?e:e.replace(u,((e,t,i,n)=>i?e:t||n||""))}function p(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}const m=new RegExp(`\\$\\(${s.k.iconNameCharacter}+\\)`,"g");function f(e){m.lastIndex=0;let t="";const i=[];let n=0;for(;;){const o=m.lastIndex,s=m.exec(e),r=e.substring(o,null==s?void 0:s.index);if(r.length>0){t+=r;for(let e=0;e<r.length;e++)i.push(n)}if(!s)break;n+=s[0].length}return{text:t,iconOffsets:i}}function _(e,t,i=!1){const{text:s,iconOffsets:r}=t;if(!r||0===r.length)return(0,n.Oh)(e,s,i);const a=(0,o.j3)(s," "),l=s.length-a.length,d=(0,n.Oh)(e,a,i);if(d)for(const e of d){const t=r[e.start+l]+l;e.start+=t,e.end+=t}return d}},44742:(e,t,i)=>{i.d(t,{R:()=>n,a:()=>o});class n{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const o=new n("id#")},77173:(e,t,i)=>{i.d(t,{F:()=>o});var n=i(4669);const o=new class{constructor(){this._onDidChange=new n.Q5,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}},53725:(e,t,i)=>{var n;i.d(t,{$:()=>n}),function(e){function t(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]}e.is=t;const i=Object.freeze([]);function*n(e){yield e}e.empty=function(){return i},e.single=n,e.wrap=function(e){return t(e)?e:n(e)},e.from=function(e){return e||i},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t<i;t++)yield e[t]},e.consume=function(t,i=Number.POSITIVE_INFINITY){const n=[];if(0===i)return[n,t];const o=t[Symbol.iterator]();for(let t=0;t<i;t++){const t=o.next();if(t.done)return[n,e.empty()];n.push(t.value)}return[n,{[Symbol.iterator]:()=>o}]}}(n||(n={}))},22258:(e,t,i)=>{i.d(t,{H_:()=>a,Vd:()=>u,gx:()=>m,kL:()=>p});class n{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new n,s=new n,r=new n,a=new Array(230),l={},d=[],h=Object.create(null),c=Object.create(null),u=[],g=[];for(let e=0;e<=193;e++)u[e]=-1;for(let e=0;e<=132;e++)g[e]=-1;var p;function m(e,t){return(e|(65535&t)<<16>>>0)>>>0}!function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],i=[],n=[];for(const e of t){const[t,p,m,f,_,v,b,C,w]=e;if(n[p]||(n[p]=!0,d[p]=m,h[m]=p,c[m.toLowerCase()]=p,t&&(u[p]=f,0!==f&&3!==f&&5!==f&&4!==f&&6!==f&&57!==f&&(g[f]=p))),!i[f]){if(i[f]=!0,!_)throw new Error(`String representation missing for key code ${f} around scan code ${m}`);o.define(f,_),s.define(f,C||_),r.define(f,w||C||_)}v&&(a[v]=f),b&&(l[b]=f)}g[3]=46}(),function(e){e.toString=function(e){return o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return r.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||r.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}}(p||(p={}))},8030:(e,t,i)=>{i.d(t,{X4:()=>r,jC:()=>a,r6:()=>l,xo:()=>s});var n=i(63580);class o{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=i(s);if(null===r)return null;n[o]=d(s,r,this.modifierLabels[e])}return n.join(" ")}}const s=new o({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:n.NC({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.NC({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.NC({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.NC({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.NC({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.NC({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.NC({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.NC({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),r=new o({ctrlKey:n.NC({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.NC({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.NC({key:"optKey.long",comment:["This is the long form for the Alt/Option key on the keyboard"]},"Option"),metaKey:n.NC({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:n.NC({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.NC({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.NC({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.NC({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.NC({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.NC({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.NC({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.NC({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),a=new o({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),l=new o({ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"});function d(e,t,i){if(null===t)return"";const n=[];return e.ctrlKey&&n.push(i.ctrlKey),e.shiftKey&&n.push(i.shiftKey),e.altKey&&n.push(i.altKey),e.metaKey&&n.push(i.metaKey),""!==t&&n.push(t),n.join(i.separator)}},8313:(e,t,i)=>{i.d(t,{$M:()=>r,Z9:()=>o,aZ:()=>l,f1:()=>d});var n=i(17301);function o(e,t){if("number"==typeof e){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new a(0!==n?[s(i,t),s(n,t)]:[s(i,t)])}{const i=[];for(let n=0;n<e.length;n++)i.push(s(e[n],t));return new a(i)}}function s(e,t){const i=!!(2048&e),n=!!(256&e);return new r(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}class r{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=o}equals(e){return e instanceof r&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class a{constructor(e){if(0===e.length)throw(0,n.b1)("chords");this.chords=e}}class l{constructor(e,t,i,n,o,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=o,this.keyAriaLabel=s}}class d{}},79579:(e,t,i)=>{i.d(t,{o:()=>n});class n{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},5976:(e,t,i)=>{i.d(t,{B9:()=>c,F8:()=>u,JT:()=>m,Jz:()=>v,L6:()=>_,OF:()=>g,SL:()=>p,Wf:()=>h,XK:()=>f,b2:()=>b,dk:()=>d});var n=i(88289),o=i(53725);let s=null;function r(e){return null==s||s.trackDisposable(e),e}function a(e){null==s||s.markAsDisposed(e)}function l(e,t){null==s||s.setParent(e,t)}function d(e){return null==s||s.markAsSingleton(e),e}function h(e){return"function"==typeof e.dispose&&0===e.dispose.length}function c(e){if(o.$.is(e)){const t=[];for(const i of e)if(i)try{i.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function u(...e){const t=g((()=>c(e)));return function(e,t){if(s)for(const i of e)s.setParent(i,t)}(e,t),t}function g(e){const t=r({dispose:(0,n.I)((()=>{a(t),e()}))});return t}class p{constructor(){this._toDispose=new Set,this._isDisposed=!1,r(this)}dispose(){this._isDisposed||(a(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{c(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return l(e,this),this._isDisposed?p.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}p.DISABLE_DISPOSED_WARNING=!1;class m{constructor(){this._store=new p,r(this),l(this._store,this)}dispose(){a(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}m.None=Object.freeze({dispose(){}});class f{constructor(){this._isDisposed=!1,r(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),e&&l(e,this),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,a(this),null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}}class _{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return 0==--this._counter&&this._disposable.dispose(),this}}class v{constructor(e){this.object=e}dispose(){}}class b{constructor(){this._store=new Map,this._isDisposed=!1,r(this)}dispose(){a(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{c(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){var n;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||null===(n=this._store.get(e))||void 0===n||n.dispose(),this._store.set(e,t)}deleteAndDispose(e){var t;null===(t=this._store.get(e))||void 0===t||t.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},91741:(e,t,i)=>{i.d(t,{S:()=>o});class n{constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}n.Undefined=new n(void 0);class o{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){let e=this._first;for(;e!==n.Undefined;){const t=e.next;e.prev=n.Undefined,e.next=n.Undefined,e=t}this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==n.Undefined;)yield e.element,e=e.next}}},43702:(e,t,i)=>{var n,o;i.d(t,{Y9:()=>r,z6:()=>l});class s{constructor(e,t){this.uri=e,this.value=t}}class r{constructor(e,t){this[n]="ResourceMap",e instanceof r?(this.map=new Map(e.map),this.toKey=null!=t?t:r.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:r.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),new s(e,t)),this}get(e){var t;return null===(t=this.map.get(this.toKey(e)))||void 0===t?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(const[t,i]of this.map)e(i.value,i.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}r.defaultToKey=e=>e.toString();class a{constructor(){this[o]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(o=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class l extends a{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},23897:(e,t,i)=>{i.d(t,{Pz:()=>s,Qc:()=>r});var n=i(53060),o=i(70666);function s(e){return JSON.stringify(e,a)}function r(e){let t=JSON.parse(e);return t=l(t),t}function a(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:t.flags}:t}function l(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return o.o.revive(e);case 2:return new RegExp(e.source,e.flags);case 16:return new Date(e.source)}if(e instanceof n.KN||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i<e.length;++i)e[i]=l(e[i],t+1);else for(const i in e)Object.hasOwnProperty.call(e,i)&&(e[i]=l(e[i],t+1))}return e}},81170:(e,t,i)=>{i.d(t,{v:()=>n});const n=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},66663:(e,t,i)=>{i.d(t,{Gi:()=>d,WX:()=>a,lg:()=>n});var n,o=i(17301),s=i(1432),r=i(70666);!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm"}(n||(n={}));const a=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${n.vscodeRemoteResource}`}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return o.dL(t),e}const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&-1===i.indexOf("[")&&(i=`[${i}]`);const a=this._ports[t],l=this._connectionTokens[t];let d=`path=${encodeURIComponent(e.path)}`;return"string"==typeof l&&(d+=`&tkn=${encodeURIComponent(l)}`),r.o.from({scheme:s.$L?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${a}`,path:this._remoteResourcesPath,query:d})}};class l{uriToBrowserUri(e){return e.scheme===n.vscodeRemote?a.rewrite(e):e.scheme===n.file&&(s.tY||s.n2&&s.li.origin===`${n.vscodeFileResource}://${l.FALLBACK_AUTHORITY}`)?e.with({scheme:n.vscodeFileResource,authority:e.authority||l.FALLBACK_AUTHORITY,query:null,fragment:null}):e}}l.FALLBACK_AUTHORITY="vscode-app";const d=new l;var h;!function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const i="vscode-coi";e.getHeadersFromQuery=function(e){let n;"string"==typeof e?n=new URL(e).searchParams:e instanceof URL?n=e.searchParams:r.o.isUri(e)&&(n=new URL(e.toString(!0)).searchParams);const o=null==n?void 0:n.get(i);if(o)return t.get(o)},e.addSearchParam=function(e,t,n){if(!globalThis.crossOriginIsolated)return;const o=t&&n?"3":n?"2":"1";e instanceof URLSearchParams?e.set(i,o):e[i]=o}}(h||(h={}))},59870:(e,t,i)=>{function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{N:()=>s,nM:()=>o,uZ:()=>n});class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class s{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}},36248:(e,t,i)=>{i.d(t,{$E:()=>c,I8:()=>o,IU:()=>u,_A:()=>s,fS:()=>h,jB:()=>d,rs:()=>a});var n=i(98401);function o(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.entries(e).forEach((([e,i])=>{t[e]=i&&"object"==typeof i?o(i):i})),t}function s(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(r.call(e,i)){const o=e[i];"object"!=typeof o||Object.isFrozen(o)||(0,n.fU)(o)||t.push(o)}}return e}const r=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if((0,n.Jp)(e))return e;const o=t(e);if(void 0!==o)return o;if(Array.isArray(e)){const n=[];for(const o of e)n.push(l(o,t,i));return n}if((0,n.Kn)(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(const o in e)r.call(e,o)&&(n[o]=l(e[o],t,i));return i.delete(e),n}return e}function d(e,t,i=!0){return(0,n.Kn)(e)?((0,n.Kn)(t)&&Object.keys(t).forEach((o=>{o in e?i&&((0,n.Kn)(e[o])&&(0,n.Kn)(t[o])?d(e[o],t[o],i):e[o]=t[o]):e[o]=t[o]})),e):t}function h(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(!h(e[i],t[i]))return!1}else{const o=[];for(n in e)o.push(n);o.sort();const s=[];for(n in t)s.push(n);if(s.sort(),!h(o,s))return!1;for(i=0;i<o.length;i++)if(!h(e[o[i]],t[o[i]]))return!1}return!0}function c(e){const t=[];for(const i of function(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}(e))"function"==typeof e[i]&&t.push(i);return t}function u(e,t){const i=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},n={};for(const t of e)n[t]=i(t);return n}},9849:(e,t,i)=>{let n;i.d(t,{EH:()=>L,nJ:()=>x,UV:()=>S,gp:()=>k,Dz:()=>D,nK:()=>_,aK:()=>b,bk:()=>v,Be:()=>C,DN:()=>u,$g:()=>F,rD:()=>T,GN:()=>O,aq:()=>R,uh:()=>h,c8:()=>a,PS:()=>r,F_:()=>I});class o{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e){return n((t=>e(this.read(t),t)),(()=>{const t=d(e);if(void 0!==t)return t;const i=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(e.toString());return i?`${this.debugName}.${i[2]}`:`${this.debugName} (mapped)`}))}}class s extends o{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function r(e,t){const i=new l(e,t);try{e(i)}finally{i.finish()}}function a(e,t,i){e?t(e):r(t,i)}class l{constructor(e,t){var i;this._fn=e,this._getDebugName=t,this.updatingObservers=[],null===(i=void 0)||void 0===i||i.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():d(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){var e;const t=this.updatingObservers;this.updatingObservers=null;for(const{observer:e,observable:i}of t)e.endUpdate(i);null===(e=void 0)||void 0===e||e.handleEndTransaction()}}function d(e){const t=e.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t),n=i?i[1]:void 0;return null==n?void 0:n.trim()}function h(e,t){return new c(e,t)}class c extends s{constructor(e,t){super(),this.debugName=e,this._value=t}get(){return this._value}set(e,t,i){var n;if(this._value===e)return;let o;t||(t=o=new l((()=>{}),(()=>`Setting ${this.debugName}`)));try{const o=this._value;this._setValue(e),null===(n=void 0)||void 0===n||n.handleObservableChanged(this,{oldValue:o,newValue:e,change:i,didChange:!0,hadValue:!0});for(const e of this.observers)t.updateObserver(e,this),e.handleChange(this,i)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function u(e,t){return new g(e,t)}class g extends c{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;null===(e=this._value)||void 0===e||e.dispose()}}var p=i(17301),m=i(5976);const f=(e,t)=>e===t;function _(e,t){return new w(t,e,void 0,void 0,void 0,f)}function v(e,t){var i;return new w(e.debugName,t,void 0,void 0,void 0,null!==(i=e.equalityComparer)&&void 0!==i?i:f)}function b(e,t,i){return new w(e,i,t.createEmptyChangeSummary,t.handleChange,void 0,f)}function C(e,t){const i=new m.SL;return new w(e,(e=>(i.clear(),t(e,i))),void 0,void 0,(()=>i.dispose()),f)}!function(e){n=e}(_);class w extends s{get debugName(){return this._debugName?"function"==typeof this._debugName?this._debugName():this._debugName:d(this._computeFn)||"(anonymous)"}constructor(e,t,i,n,o=void 0,s){var r,a;super(),this._debugName=e,this._computeFn=t,this.createChangeSummary=i,this._handleChange=n,this._handleLastObserverRemoved=o,this._equalityComparator=s,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=null===(r=this.createChangeSummary)||void 0===r?void 0:r.call(this),null===(a=void 0)||void 0===a||a.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),null===(e=this._handleLastObserverRemoved)||void 0===e||e.call(this)}get(){var e;if(0===this.observers.size){const t=this._computeFn(this,null===(e=this.createChangeSummary)||void 0===e?void 0:e.call(this));return this.onLastObserverRemoved(),t}do{if(1===this.state)for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break;1===this.state&&(this.state=3),this._recomputeIfNeeded()}while(3!==this.state);return this.value}_recomputeIfNeeded(){var e,t;if(3===this.state)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i;const n=0!==this.state,o=this.value;this.state=3;const s=this.changeSummary;this.changeSummary=null===(e=this.createChangeSummary)||void 0===e?void 0:e.call(this);try{this.value=this._computeFn(this,s)}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}const r=n&&!this._equalityComparator(o,this.value);if(null===(t=void 0)||void 0===t||t.handleDerivedRecomputed(this,{oldValue:o,newValue:this.value,change:void 0,didChange:r,hadValue:n}),r)for(const e of this.observers)e.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const e of this.observers)e.handlePossibleChange(this);if(t)for(const e of this.observers)e.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}if(this.updateCount<0)throw new p.he}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),n=3===this.state;if(i&&(1===this.state||n)&&(this.state=2,n))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}var y=i(35146);function S(e,t){return new N(e.debugName,t,void 0,void 0)}function L(e){return new N(void 0,e,void 0,void 0)}function x(e,t){return new N(e.debugName,t,e.createEmptyChangeSummary,e.handleChange)}function k(e){const t=new m.SL,i=S({debugName:()=>d(e)||"(anonymous)"},(i=>{t.clear(),e(i,t)}));return(0,m.OF)((()=>{i.dispose(),t.dispose()}))}class N{get debugName(){if("string"==typeof this._debugName)return this._debugName;if("function"==typeof this._debugName){const e=this._debugName();if(void 0!==e)return e}const e=d(this._runFn);return void 0!==e?e:"(anonymous)"}constructor(e,t,i,n){var o,s;this._debugName=e,this._runFn=t,this.createChangeSummary=i,this._handleChange=n,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=null===(o=this.createChangeSummary)||void 0===o?void 0:o.call(this),null===(s=void 0)||void 0===s||s.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var e,t,i;if(3===this.state)return;const n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n,this.state=3;try{if(!this.disposed){null===(e=void 0)||void 0===e||e.handleAutorunTriggered(this);const i=this.changeSummary;this.changeSummary=null===(t=this.createChangeSummary)||void 0===t?void 0:t.call(this),this._runFn(this,i)}}finally{null===(i=void 0)||void 0===i||i.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,y.eZ)((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}function D(e){return new E(e)}!function(e){e.Observer=N}(L||(L={}));class E extends o{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function I(e,t){return new Promise((i=>{let n=!1,o=!1;const s=L((r=>{const a=e.read(r);t(a)&&(n?s.dispose():o=!0,i(a))}));n=!0,o&&s.dispose()}))}function T(e,t){return new M(e,t)}class M extends s{constructor(e,t){super(),this.event=e,this._getValue=t,this.hasValue=!1,this.handleEvent=e=>{var t;const i=this._getValue(e),n=!this.hasValue||this.value!==i;null===(t=void 0)||void 0===t||t.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:i,change:void 0,didChange:n,hadValue:this.hasValue}),n&&(this.value=i,this.hasValue&&r((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")})),this.hasValue=!0)}}getDebugName(){return d(this._getValue)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}function R(e,t){return new A(e,t)}!function(e){e.Observer=M}(T||(T={}));class A extends s{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{r((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>this.debugName))}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function O(e){return new P(e)}class P extends s{constructor(e){super(),this.debugName=e}trigger(e,t){if(e)for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t);else r((e=>{this.trigger(e,t)}),(()=>`Trigger signal ${this.debugName}`))}get(){}}function F(e,t){const i=new B(null!=t&&t);return e.addObserver(i),t&&e.reportChanges(),(0,m.OF)((()=>{e.removeObserver(i)}))}class B{constructor(e){this.forceRecompute=e,this.counter=0}beginUpdate(e){this.counter++}endUpdate(e){this.counter--,0===this.counter&&this.forceRecompute&&e.reportChanges()}handlePossibleChange(e){}handleChange(e,t){}}},88721:(e,t,i)=>{i.d(t,{EZ:()=>N,XX:()=>k,DZ:()=>D,Fv:()=>S,KR:()=>y,Gf:()=>x,DB:()=>L,ir:()=>E,Ku:()=>C});var n=i(1432);let o;if(void 0!==n.li.vscode&&void 0!==n.li.vscode.process){const e=n.li.vscode.process;o={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else o="undefined"!=typeof process?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd()}:{get platform(){return n.ED?"win32":n.dz?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const s=o.cwd,r=o.env,a=o.platform,l=46,d=47,h=92,c=58;class u extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${o} ${n} of type ${t}`;s+=". Received type "+typeof i,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function g(e,t){if("string"!=typeof e)throw new u(t,"string",e)}const p="win32"===a;function m(e){return e===d||e===h}function f(e){return e===d}function _(e){return e>=65&&e<=90||e>=97&&e<=122}function v(e,t,i,n){let o="",s=0,r=-1,a=0,h=0;for(let c=0;c<=e.length;++c){if(c<e.length)h=e.charCodeAt(c);else{if(n(h))break;h=d}if(n(h)){if(r===c-1||1===a);else if(2===a){if(o.length<2||2!==s||o.charCodeAt(o.length-1)!==l||o.charCodeAt(o.length-2)!==l){if(o.length>2){const e=o.lastIndexOf(i);-1===e?(o="",s=0):(o=o.slice(0,e),s=o.length-1-o.lastIndexOf(i)),r=c,a=0;continue}if(0!==o.length){o="",s=0,r=c,a=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",s=2)}else o.length>0?o+=`${i}${e.slice(r+1,c)}`:o=e.slice(r+1,c),s=c-r-1;r=c,a=0}else h===l&&-1!==a?++a:a=-1}return o}function b(e,t){!function(e,t){if(null===e||"object"!=typeof e)throw new u("pathObject","Object",e)}(t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const C={resolve(...e){let t="",i="",n=!1;for(let o=e.length-1;o>=-1;o--){let a;if(o>=0){if(a=e[o],g(a,"path"),0===a.length)continue}else 0===t.length?a=s():(a=r[`=${t}`]||s(),(void 0===a||a.slice(0,2).toLowerCase()!==t.toLowerCase()&&a.charCodeAt(2)===h)&&(a=`${t}\\`));const l=a.length;let d=0,u="",p=!1;const f=a.charCodeAt(0);if(1===l)m(f)&&(d=1,p=!0);else if(m(f))if(p=!0,m(a.charCodeAt(1))){let e=2,t=e;for(;e<l&&!m(a.charCodeAt(e));)e++;if(e<l&&e!==t){const i=a.slice(t,e);for(t=e;e<l&&m(a.charCodeAt(e));)e++;if(e<l&&e!==t){for(t=e;e<l&&!m(a.charCodeAt(e));)e++;e!==l&&e===t||(u=`\\\\${i}\\${a.slice(t,e)}`,d=e)}}}else d=1;else _(f)&&a.charCodeAt(1)===c&&(u=a.slice(0,2),d=2,l>2&&m(a.charCodeAt(2))&&(p=!0,d=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(i=`${a.slice(d)}\\${i}`,n=p,p&&t.length>0)break}return i=v(i,!n,"\\",m),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){g(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const s=e.charCodeAt(0);if(1===t)return f(s)?"\\":e;if(m(s))if(o=!0,m(e.charCodeAt(1))){let o=2,s=o;for(;o<t&&!m(e.charCodeAt(o));)o++;if(o<t&&o!==s){const r=e.slice(s,o);for(s=o;o<t&&m(e.charCodeAt(o));)o++;if(o<t&&o!==s){for(s=o;o<t&&!m(e.charCodeAt(o));)o++;if(o===t)return`\\\\${r}\\${e.slice(s)}\\`;o!==s&&(i=`\\\\${r}\\${e.slice(s,o)}`,n=o)}}}else n=1;else _(s)&&e.charCodeAt(1)===c&&(i=e.slice(0,2),n=2,t>2&&m(e.charCodeAt(2))&&(o=!0,n=3));let r=n<t?v(e.slice(n),!o,"\\",m):"";return 0!==r.length||o||(r="."),r.length>0&&m(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?o?`\\${r}`:r:o?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){g(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return m(i)||t>2&&_(i)&&e.charCodeAt(1)===c&&m(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n<e.length;++n){const o=e[n];g(o,"path"),o.length>0&&(void 0===t?t=i=o:t+=`\\${o}`)}if(void 0===t)return".";let n=!0,o=0;if("string"==typeof i&&m(i.charCodeAt(0))){++o;const e=i.length;e>1&&m(i.charCodeAt(1))&&(++o,e>2&&(m(i.charCodeAt(2))?++o:n=!1))}if(n){for(;o<t.length&&m(t.charCodeAt(o));)o++;o>=2&&(t=`\\${t.slice(o)}`)}return C.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";const i=C.resolve(e),n=C.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let o=0;for(;o<e.length&&e.charCodeAt(o)===h;)o++;let s=e.length;for(;s-1>o&&e.charCodeAt(s-1)===h;)s--;const r=s-o;let a=0;for(;a<t.length&&t.charCodeAt(a)===h;)a++;let l=t.length;for(;l-1>a&&t.charCodeAt(l-1)===h;)l--;const d=l-a,c=r<d?r:d;let u=-1,p=0;for(;p<c;p++){const i=e.charCodeAt(o+p);if(i!==t.charCodeAt(a+p))break;i===h&&(u=p)}if(p!==c){if(-1===u)return n}else{if(d>c){if(t.charCodeAt(a+p)===h)return n.slice(a+p+1);if(2===p)return n.slice(a+p)}r>c&&(e.charCodeAt(o+p)===h?u=p:2===p&&(u=3)),-1===u&&(u=0)}let m="";for(p=o+u+1;p<=s;++p)p!==s&&e.charCodeAt(p)!==h||(m+=0===m.length?"..":"\\..");return a+=u,m.length>0?`${m}${n.slice(a,l)}`:(n.charCodeAt(a)===h&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=C.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===h){if(t.charCodeAt(1)===h){const e=t.charCodeAt(2);if(63!==e&&e!==l)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(_(t.charCodeAt(0))&&t.charCodeAt(1)===c&&t.charCodeAt(2)===h)return`\\\\?\\${t}`;return e},dirname(e){g(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return m(o)?e:".";if(m(o)){if(i=n=1,m(e.charCodeAt(1))){let o=2,s=o;for(;o<t&&!m(e.charCodeAt(o));)o++;if(o<t&&o!==s){for(s=o;o<t&&m(e.charCodeAt(o));)o++;if(o<t&&o!==s){for(s=o;o<t&&!m(e.charCodeAt(o));)o++;if(o===t)return e;o!==s&&(i=n=o+1)}}}}else _(o)&&e.charCodeAt(1)===c&&(i=t>2&&m(e.charCodeAt(2))?3:2,n=i);let s=-1,r=!0;for(let i=t-1;i>=n;--i)if(m(e.charCodeAt(i))){if(!r){s=i;break}}else r=!1;if(-1===s){if(-1===i)return".";s=i}return e.slice(0,s)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,o=-1,s=!0;if(e.length>=2&&_(e.charCodeAt(0))&&e.charCodeAt(1)===c&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(m(l)){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(m(e.charCodeAt(i))){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){g(e,"path");let t=0,i=-1,n=0,o=-1,s=!0,r=0;e.length>=2&&e.charCodeAt(1)===c&&_(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(m(t)){if(!s){n=a+1;break}}else-1===o&&(s=!1,o=a+1),t===l?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===o||0===r||1===r&&i===o-1&&i===n+1?"":e.slice(i,o)},format:b.bind(null,"\\"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return m(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(m(o)){if(n=1,m(e.charCodeAt(1))){let t=2,o=t;for(;t<i&&!m(e.charCodeAt(t));)t++;if(t<i&&t!==o){for(o=t;t<i&&m(e.charCodeAt(t));)t++;if(t<i&&t!==o){for(o=t;t<i&&!m(e.charCodeAt(t));)t++;t===i?n=t:t!==o&&(n=t+1)}}}}else if(_(o)&&e.charCodeAt(1)===c){if(i<=2)return t.root=t.dir=e,t;if(n=2,m(e.charCodeAt(2))){if(3===i)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let s=-1,r=n,a=-1,d=!0,h=e.length-1,u=0;for(;h>=n;--h)if(o=e.charCodeAt(h),m(o)){if(!d){r=h+1;break}}else-1===a&&(d=!1,a=h+1),o===l?-1===s?s=h:1!==u&&(u=1):-1!==s&&(u=-1);return-1!==a&&(-1===s||0===u||1===u&&s===a-1&&s===r+1?t.base=t.name=e.slice(r,a):(t.name=e.slice(r,s),t.base=e.slice(r,a),t.ext=e.slice(s,a))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},w=(()=>{if(p){const e=/\\/g;return()=>{const t=s().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>s()})(),y={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:w();g(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===d)}return t=v(t,!i,"/",f),i?`/${t}`:t.length>0?t:"."},normalize(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===d,i=e.charCodeAt(e.length-1)===d;return 0===(e=v(e,!t,"/",f)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(g(e,"path"),e.length>0&&e.charCodeAt(0)===d),join(...e){if(0===e.length)return".";let t;for(let i=0;i<e.length;++i){const n=e[i];g(n,"path"),n.length>0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":y.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";if((e=y.resolve(e))===(t=y.resolve(t)))return"";const i=e.length,n=i-1,o=t.length-1,s=n<o?n:o;let r=-1,a=0;for(;a<s;a++){const i=e.charCodeAt(1+a);if(i!==t.charCodeAt(1+a))break;i===d&&(r=a)}if(a===s)if(o>s){if(t.charCodeAt(1+a)===d)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>s&&(e.charCodeAt(1+a)===d?r=a:0===a&&(r=0));let l="";for(a=1+r+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==d||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+r)}`},toNamespacedPath:e=>e,dirname(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===d;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===d){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===d){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===d){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){g(e,"path");let t=-1,i=0,n=-1,o=!0,s=0;for(let r=e.length-1;r>=0;--r){const a=e.charCodeAt(r);if(a!==d)-1===n&&(o=!1,n=r+1),a===l?-1===t?t=r:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){i=r+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===i+1?"":e.slice(t,n)},format:b.bind(null,"/"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===d;let n;i?(t.root="/",n=1):n=0;let o=-1,s=0,r=-1,a=!0,h=e.length-1,c=0;for(;h>=n;--h){const t=e.charCodeAt(h);if(t!==d)-1===r&&(a=!1,r=h+1),t===l?-1===o?o=h:1!==c&&(c=1):-1!==o&&(c=-1);else if(!a){s=h+1;break}}if(-1!==r){const n=0===s&&i?1:s;-1===o||0===c||1===c&&o===r-1&&o===s+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,o),t.base=e.slice(n,r),t.ext=e.slice(o,r))}return s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};y.win32=C.win32=C,y.posix=C.posix=y;const S=p?C.normalize:y.normalize,L=p?C.resolve:y.resolve,x=p?C.relative:y.relative,k=p?C.dirname:y.dirname,N=p?C.basename:y.basename,D=p?C.extname:y.extname,E=p?C.sep:y.sep},1432:(e,t,i)=>{i.d(t,{$L:()=>I,ED:()=>k,G6:()=>U,IJ:()=>D,OS:()=>B,dK:()=>O,dz:()=>N,fn:()=>F,gn:()=>M,i7:()=>z,li:()=>w,n2:()=>T,r:()=>H,tY:()=>E,tq:()=>R,un:()=>j,vU:()=>K});var n,o=i(63580);const s="en";let r,a,l=!1,d=!1,h=!1,c=!1,u=!1,g=!1,p=!1,m=!1,f=!1,_=!1,v=s,b=null,C=null;const w="object"==typeof self?self:"object"==typeof i.g?i.g:{};let y;void 0!==w.vscode&&void 0!==w.vscode.process?y=w.vscode.process:"undefined"!=typeof process&&(y=process);const S="string"==typeof(null===(n=null==y?void 0:y.versions)||void 0===n?void 0:n.electron),L=S&&"renderer"===(null==y?void 0:y.type);if("object"!=typeof navigator||L)if("object"==typeof y){l="win32"===y.platform,d="darwin"===y.platform,h="linux"===y.platform,c=h&&!!y.env.SNAP&&!!y.env.SNAP_REVISION,p=S,f=!!y.env.CI||!!y.env.BUILD_ARTIFACTSTAGINGDIRECTORY,r=s,v=s;const e=y.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];r=t.locale,b=t.osLocale,v=i||s,C=t._translationsConfigFile}catch(e){}u=!0}else console.error("Unable to resolve platform.");else a=navigator.userAgent,l=a.indexOf("Windows")>=0,d=a.indexOf("Macintosh")>=0,m=(a.indexOf("Macintosh")>=0||a.indexOf("iPad")>=0||a.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,h=a.indexOf("Linux")>=0,_=(null==a?void 0:a.indexOf("Mobi"))>=0,g=!0,r=o.aj(o.NC({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"))||s,v=r,b=navigator.language;let x=0;d?x=1:l?x=3:h&&(x=2);const k=l,N=d,D=h,E=u,I=g,T=g&&"function"==typeof w.importScripts,M=m,R=_,A=a,O=v,P="function"==typeof w.postMessage&&!w.importScripts,F=(()=>{if(P){const e=[];w.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i<n;i++){const n=e[i];if(n.id===t.data.vscodeScheduleAsyncWork)return e.splice(i,1),void n.callback()}}));let t=0;return i=>{const n=++t;e.push({id:n,callback:i}),w.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),B=d||m?2:l?1:3;let W=!0,V=!1;function H(){if(!V){V=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);W=513===t[0]}return W}const z=!!(A&&A.indexOf("Chrome")>=0),K=!!(A&&A.indexOf("Firefox")>=0),U=!!(!z&&A&&A.indexOf("Safari")>=0),j=!!(A&&A.indexOf("Edg/")>=0);A&&A.indexOf("Android")},61134:(e,t,i)=>{var n;i.d(t,{e:()=>n}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},s={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(s)||n.push(s),n}}(n||(n={}))},95935:(e,t,i)=>{i.d(t,{AH:()=>v,DZ:()=>m,EZ:()=>p,Hx:()=>g,SF:()=>c,Vb:()=>S,Vo:()=>_,XX:()=>f,Xy:()=>u,i3:()=>C,lX:()=>b,z_:()=>d});var n=i(15527),o=i(66663),s=i(88721),r=i(1432),a=i(97295),l=i(70666);function d(e){return(0,l.q)(e,!0)}class h{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:(0,a.qu)(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===o.lg.file)return n.KM(d(e),d(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(w(e.authority,t.authority))return n.KM(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.o.joinPath(e,...t)}basenameOrAuthority(e){return p(e)||e.authority}basename(e){return s.KR.basename(e.path)}extname(e){return s.KR.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===o.lg.file?t=l.o.file(s.XX(d(e))).path:(t=s.KR.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===o.lg.file?l.o.file(s.Fv(d(e))).path:s.KR.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!w(e.authority,t.authority))return;if(e.scheme===o.lg.file){const i=s.Gf(d(e),d(t));return r.ED?n.ej(i):i}let i=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,a.length);e<t&&(i.charCodeAt(e)===a.charCodeAt(e)||i.charAt(e).toLowerCase()===a.charAt(e).toLowerCase());e++);i=a.substr(0,e)+i.substr(e)}return s.KR.relative(i,a)}resolvePath(e,t){if(e.scheme===o.lg.file){const i=l.o.file(s.DB(d(e),t));return e.with({authority:i.authority,path:i.path})}return t=n.fn(t),e.with({path:s.KR.resolve(e.path,t)})}isAbsolutePath(e){return!!e.path&&"/"===e.path[0]}isEqualAuthority(e,t){return e===t||void 0!==e&&void 0!==t&&(0,a.qq)(e,t)}hasTrailingPathSeparator(e,t=s.ir){if(e.scheme===o.lg.file){const i=d(e);return i.length>n.yj(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=s.ir){return y(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=s.ir){let i=!1;if(e.scheme===o.lg.file){const o=d(e);i=void 0!==o&&o.length===n.yj(o).length&&o[o.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||y(e,t)?e:e.with({path:e.path+"/"})}}const c=new h((()=>!1)),u=(new h((e=>e.scheme!==o.lg.file||!r.IJ)),new h((e=>!0)),c.isEqual.bind(c)),g=(c.isEqualOrParent.bind(c),c.getComparisonKey.bind(c),c.basenameOrAuthority.bind(c)),p=c.basename.bind(c),m=c.extname.bind(c),f=c.dirname.bind(c),_=c.joinPath.bind(c),v=c.normalizePath.bind(c),b=c.relativePath.bind(c),C=c.resolvePath.bind(c),w=(c.isAbsolutePath.bind(c),c.isEqualAuthority.bind(c)),y=c.hasTrailingPathSeparator.bind(c);var S;c.removeTrailingPathSeparator.bind(c),c.addTrailingPathSeparator.bind(c),function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(S||(S={}))},76633:(e,t,i)=>{i.d(t,{Rm:()=>r});var n=i(4669),o=i(5976);class s{constructor(e,t,i,n,o,s,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,o|=0,s|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),o<0&&(o=0),r+o>s&&(r=s-o),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=o,this.scrollHeight=s,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new s(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new s(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:o,heightChanged:s,scrollHeightChanged:r,scrollTopChanged:a}}}class r extends o.JT{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new n.Q5),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new s(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var i;const n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),null===(i=this._smoothScrolling)||void 0===i||i.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new d(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=d.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}hasPendingScrollAnimation(){return Boolean(this._smoothScrolling)}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*(1-(n=1-t,Math.pow(n,3)));var n}}class d{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let r,a;return e<t?(r=e+.75*i,a=t-.75*i):(r=e-.75*i,a=t+.75*i),n=l(e,r),o=l(a,t),s=.33,function(e){return e<s?n(e/s):o((e-s)/(1-s))}}var n,o,s;return l(e,t)}dispose(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const t=(e-this.startTime)/this.duration;if(t<1){const e=this.scrollLeft(t),i=this.scrollTop(t);return new a(e,i,!1)}return new a(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,t,i){return d.start(e,t,i)}static start(e,t,i){i+=10;const n=Date.now()-10;return new d(e,t,n,i)}}},14603:(e,t,i)=>{i.d(t,{Z:()=>s});var n,o=i(97295);!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(n||(n={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(s){return s?o.qq(t,s)?e.Error:o.qq(i,s)||o.qq("warn",s)?e.Warning:o.qq(n,s)?e.Info:e.Ignore:e.Ignore},e.toString=function(o){switch(o){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(n||(n={}));const s=n},84013:(e,t,i)=>{i.d(t,{G:()=>o});const n=globalThis.performance&&"function"==typeof globalThis.performance.now;class o{static create(e){return new o(e)}constructor(e){this._now=n&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}},97295:(e,t,i)=>{i.d(t,{$i:()=>j,B4:()=>oe,C8:()=>G,GF:()=>f,HO:()=>V,IO:()=>_,J_:()=>H,K7:()=>Z,Kw:()=>J,LC:()=>b,Mh:()=>T,P1:()=>M,PJ:()=>X,Qe:()=>$,R1:()=>m,T5:()=>k,TT:()=>S,Ut:()=>K,V8:()=>C,W1:()=>B,WU:()=>l,YK:()=>A,YU:()=>d,ZG:()=>R,ZH:()=>P,ZK:()=>se,ab:()=>q,c1:()=>Q,df:()=>D,ec:()=>h,fy:()=>c,j3:()=>u,j_:()=>x,m5:()=>r,mK:()=>N,oH:()=>ie,oL:()=>g,ok:()=>I,ow:()=>w,qq:()=>E,qu:()=>y,rL:()=>O,uS:()=>Y,un:()=>p,uq:()=>v,vH:()=>W,vU:()=>re,zY:()=>L});var n,o=i(701),s=i(79579);function r(e){return!e||"string"!=typeof e||0===e.trim().length}const a=/{(\d+)}/g;function l(e,...t){return 0===t.length?e:e.replace(a,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function d(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}}))}function h(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function c(e,t=" "){return g(u(e,t),t)}function u(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function g(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,s=-1;for(;s=e.lastIndexOf(t,o-1),-1!==s&&s+i===o;){if(0===s)return"";o=s}return e.substring(0,o)}function p(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function m(e){return e.replace(/\*/g,"")}function f(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=h(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function _(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function v(e){return e.split(/\r\n|\r|\n/)}function b(e){for(let t=0,i=e.length;t<i;t++){const i=e.charCodeAt(t);if(32!==i&&9!==i)return t}return-1}function C(e,t=0,i=e.length){for(let n=t;n<i;n++){const i=e.charCodeAt(n);if(32!==i&&9!==i)return e.substring(t,n)}return e.substring(t,i)}function w(e,t=e.length-1){for(let i=t;i>=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function y(e,t){return e<t?-1:e>t?1:0}function S(e,t,i=0,n=e.length,o=0,s=t.length){for(;i<n&&o<s;i++,o++){const n=e.charCodeAt(i),s=t.charCodeAt(o);if(n<s)return-1;if(n>s)return 1}const r=n-i,a=s-o;return r<a?-1:r>a?1:0}function L(e,t){return x(e,t,0,e.length,0,t.length)}function x(e,t,i=0,n=e.length,o=0,s=t.length){for(;i<n&&o<s;i++,o++){let r=e.charCodeAt(i),a=t.charCodeAt(o);if(r===a)continue;if(r>=128||a>=128)return S(e.toLowerCase(),t.toLowerCase(),i,n,o,s);N(r)&&(r-=32),N(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=s-o;return r<a?-1:r>a?1:0}function k(e){return e>=48&&e<=57}function N(e){return e>=97&&e<=122}function D(e){return e>=65&&e<=90}function E(e,t){return e.length===t.length&&0===x(e,t)}function I(e,t){const i=t.length;return!(t.length>e.length)&&0===x(e,t,0,i)}function T(e,t){const i=Math.min(e.length,t.length);let n;for(n=0;n<i;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return i}function M(e,t){const i=Math.min(e.length,t.length);let n;const o=e.length-1,s=t.length-1;for(n=0;n<i;n++)if(e.charCodeAt(o-n)!==t.charCodeAt(s-n))return n;return i}function R(e){return 55296<=e&&e<=56319}function A(e){return 56320<=e&&e<=57343}function O(e,t){return t-56320+(e-55296<<10)+65536}function P(e,t,i){const n=e.charCodeAt(i);if(R(n)&&i+1<t){const t=e.charCodeAt(i+1);if(A(t))return O(n,t)}return n}class F{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=function(e,t){const i=e.charCodeAt(t-1);if(A(i)&&t>1){const n=e.charCodeAt(t-2);if(R(n))return O(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=P(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class B{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new F(e,t)}nextGraphemeLength(){const e=te.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const i=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());if(ee(n,o)){t.setOffset(i);break}n=o}return t.offset-i}prevGraphemeLength(){const e=te.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const i=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());if(ee(o,n)){t.setOffset(i);break}n=o}return i-t.offset}eol(){return this._iterator.eol()}}function W(e,t){return new B(e,t).nextGraphemeLength()}function V(e,t){return new B(e,t).prevGraphemeLength()}function H(e,t){t>0&&A(e.charCodeAt(t))&&t--;const i=t+W(e,t);return[i-V(e,i),i]}let z;function K(e){return z||(z=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/),z.test(e)}const U=/^[\t\n\r\x20-\x7E]*$/;function j(e){return U.test(e)}const $=/[\u2028\u2029]/;function q(e){return $.test(e)}function Z(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function G(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const Q=String.fromCharCode(65279);function Y(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function J(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function X(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function ee(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class te{static getInstance(){return te._INSTANCE||(te._INSTANCE=new te),te._INSTANCE}constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(e<t[3*n])n*=2;else{if(!(e>t[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function ie(e,t){if(0===e)return 0;const i=function(e,t){const i=new F(t,e);let n=i.prevCodePoint();for(;ne(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!G(n))return;let o=i.offset;return o>0&&8205===i.prevCodePoint()&&(o=i.offset),o}(e,t);if(void 0!==i)return i;const n=new F(t,e);return n.prevCodePoint(),n.offset}function ne(e){return 127995<=e&&e<=127999}te._INSTANCE=null;const oe=" ";class se{static getInstance(e){return n.cache.get(Array.from(e))}static getLocales(){return n._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}n=se,se.ambiguousCharacterData=new s.o((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))),se.cache=new o.t((e=>{function t(e){const t=new Map;for(let i=0;i<e.length;i+=2)t.set(e[i],e[i+1]);return t}function i(e,t){if(!e)return t;const i=new Map;for(const[n,o]of e)t.has(n)&&i.set(n,o);return i}const o=n.ambiguousCharacterData.value;let s,r=e.filter((e=>!e.startsWith("_")&&e in o));0===r.length&&(r=["_default"]);for(const e of r)s=i(s,t(o[e]));const a=function(e,t){const i=new Map(e);for(const[e,n]of t)i.set(e,n);return i}(t(o._common),s);return new n(a)})),se._locales=new s.o((()=>Object.keys(n.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))));class re{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(re.getRawData())),this._data}static isInvisibleCharacter(e){return re.getData().has(e)}static get codePoints(){return re.getData()}}re._data=void 0},5635:(e,t,i)=>{i.d(t,{n:()=>n});const n=Symbol("MicrotaskDelay")},4767:(e,t,i)=>{i.d(t,{Id:()=>d});var n=i(97295);class o{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){return e.charCodeAt(0)-this._value.charCodeAt(this._pos)}value(){return this._value[this._pos]}}class s{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++)if(46===this._value.charCodeAt(this._to)){if(!e)break;this._from++}else e=!1;return this}cmp(e){return this._caseSensitive?(0,n.TT)(e,this._value,0,e.length,this._from,this._to):(0,n.j_)(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class r{constructor(e=!0,t=!0){this._splitOnBackslash=e,this._caseSensitive=t}reset(e){this._from=0,this._to=0,this._value=e,this._valueLen=e.length;for(let t=e.length-1;t>=0;t--,this._valueLen--){const e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let e=!0;for(;this._to<this._valueLen;this._to++){const t=this._value.charCodeAt(this._to);if(47===t||this._splitOnBackslash&&92===t){if(!e)break;this._from++}else e=!1}return this}cmp(e){return this._caseSensitive?(0,n.TT)(e,this._value,0,e.length,this._from,this._to):(0,n.j_)(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class a{constructor(e,t){this._ignorePathCasing=e,this._ignoreQueryAndFragment=t,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new r(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(e)||(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(1===this._states[this._stateIdx])return(0,n.zY)(e,this._value.scheme);if(2===this._states[this._stateIdx])return(0,n.zY)(e,this._value.authority);if(3===this._states[this._stateIdx])return this._pathIterator.cmp(e);if(4===this._states[this._stateIdx])return(0,n.qu)(e,this._value.query);if(5===this._states[this._stateIdx])return(0,n.qu)(e,this._value.fragment);throw new Error}value(){if(1===this._states[this._stateIdx])return this._value.scheme;if(2===this._states[this._stateIdx])return this._value.authority;if(3===this._states[this._stateIdx])return this._pathIterator.value();if(4===this._states[this._stateIdx])return this._value.query;if(5===this._states[this._stateIdx])return this._value.fragment;throw new Error}}class l{constructor(){this.height=1}rotateLeft(){const e=this.right;return this.right=e.left,e.left=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){const e=this.left;return this.left=e.right,e.right=this,this.updateHeight(),e.updateHeight(),e}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var e,t;return null!==(t=null===(e=this.left)||void 0===e?void 0:e.height)&&void 0!==t?t:0}get heightRight(){var e,t;return null!==(t=null===(e=this.right)||void 0===e?void 0:e.height)&&void 0!==t?t:0}}class d{static forUris(e=(()=>!1),t=(()=>!1)){return new d(new a(e,t))}static forStrings(){return new d(new o)}static forConfigKeys(){return new d(new s)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new l,this._root.segment=i.value());const o=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new l,n.left.segment=i.value()),o.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new l,n.right.segment=i.value()),o.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new l,n.mid.segment=i.value()),o.push([0,n]),n=n.mid}}const s=n.value;n.value=t,n.key=e;for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i<-1||i>1){const i=o[e][0],n=o[e+1][0];if(1===i&&1===n)o[e][1]=t.rotateLeft();else if(-1===i&&-1===n)o[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=o[e+1][1]=o[e+1][1].rotateRight(),o[e][1]=t.rotateLeft();else{if(-1!==i||1!==n)throw new Error;t.left=o[e+1][1]=o[e+1][1].rotateLeft(),o[e][1]=t.rotateRight()}if(e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}return s}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),o=[];let s=this._root;for(;s;){const e=n.cmp(s.segment);if(e>0)o.push([-1,s]),s=s.left;else if(e<0)o.push([1,s]),s=s.right;else{if(!n.hasNext())break;n.next(),o.push([0,s]),s=s.mid}}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){const e=this._min(s.right);if(e.key){const{key:t,value:i,segment:n}=e;this._delete(e.key,!1),s.key=t,s.value=i,s.segment=n}}else{const e=null!==(i=s.left)&&void 0!==i?i:s.right;if(o.length>0){const[t,i]=o[o.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),o[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),o[e][1]=t.rotateRight()),e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;for(;n;){const e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!i.hasNext())return n.mid?this._entries(n.mid):t?n.value:void 0;i.next(),n=n.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}},25670:(e,t,i)=>{i.d(t,{k:()=>o});var n,o,s=i(73046);!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(n||(n={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){const n=t.exec(e.id);if(!n)return i(s.l.error);const[,o,r]=n,a=["codicon","codicon-"+o];return r&&a.push("codicon-modifier-"+r.substring(1)),a}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")},e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||n.isThemeColor(e.color))};const o=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){const t=o.exec(e);if(!t)return;const[,i]=t;return{id:i}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)}}(o||(o={}))},98401:(e,t,i)=>{function n(e){return"string"==typeof e}function o(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){const t=Object.getPrototypeOf(Uint8Array);return"object"==typeof e&&e instanceof t}function r(e){return"number"==typeof e&&!isNaN(e)}function a(e){return!!e&&"function"==typeof e[Symbol.iterator]}function l(e){return!0===e||!1===e}function d(e){return void 0===e}function h(e){return!c(e)}function c(e){return d(e)||null===e}function u(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function g(e){if(c(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function p(e){return"function"==typeof e}function m(e,t){const i=Math.min(e.length,t.length);for(let n=0;n<i;n++)f(e[n],t[n])}function f(e,t){if(n(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(p(t)){try{if(e instanceof t)return}catch(e){}if(!c(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}i.d(t,{$K:()=>h,D8:()=>m,HD:()=>n,Jp:()=>c,Kn:()=>o,TW:()=>a,cW:()=>g,fU:()=>s,hj:()=>r,jn:()=>l,mf:()=>p,o8:()=>d,p_:()=>u})},85427:(e,t,i)=>{function n(e){return e<0?0:e>255?255:0|e}function o(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,{A:()=>o,K:()=>n})},70666:(e,t,i)=>{i.d(t,{o:()=>c,q:()=>_});var n=i(88721),o=i(1432);const s=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//,l="",d="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(e){return e instanceof c||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}constructor(e,t,i,n,o,h=!1){"object"==typeof e?(this.scheme=e.scheme||l,this.authority=e.authority||l,this.path=e.path||l,this.query=e.query||l,this.fragment=e.fragment||l):(this.scheme=function(e,t){return e||t?e:"file"}(e,h),this.authority=t||l,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,i||l),this.query=n||l,this.fragment=o||l,function(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,h))}get fsPath(){return _(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=l),void 0===i?i=this.authority:null===i&&(i=l),void 0===n?n=this.path:null===n&&(n=l),void 0===o?o=this.query:null===o&&(o=l),void 0===s?s=this.fragment:null===s&&(s=l),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&s===this.fragment?this:new g(t,i,n,o,s)}static parse(e,t=!1){const i=h.exec(e);return i?new g(i[2]||l,w(i[4]||l),w(i[5]||l),w(i[7]||l),w(i[9]||l),t):new g(l,l,l,l,l)}static file(e){let t=l;if(o.ED&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){const i=e.indexOf(d,2);-1===i?(t=e.substring(2),e=d):(t=e.substring(2,i),e=e.substring(i)||d)}return new g("file",t,e,l,l)}static from(e,t){return new g(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=o.ED&&"file"===e.scheme?c.file(n.Ku.join(_(e,!0),...t)).path:n.KR.join(e.path,...t),e.with({path:i})}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){var t,i;if(e){if(e instanceof c)return e;{const n=new g(e);return n._formatted=null!==(t=e.external)&&void 0!==t?t:null,n._fsPath=e._sep===u&&null!==(i=e.fsPath)&&void 0!==i?i:null,n}}return e}}const u=o.ED?1:void 0;class g extends c{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=_(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=u),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(e,t,i){let n,o=-1;for(let s=0;s<e.length;s++){const r=e.charCodeAt(s);if(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),void 0!==n&&(n+=e.charAt(s));else{void 0===n&&(n=e.substr(0,s));const t=p[r];void 0!==t?(-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),n+=t):-1===o&&(o=s)}}return-1!==o&&(n+=encodeURIComponent(e.substring(o))),void 0!==n?n:e}function f(e){let t;for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);35===n||63===n?(void 0===t&&(t=e.substr(0,i)),t+=p[n]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function _(e,t){let i;return i=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,o.ED&&(i=i.replace(/\//g,"\\")),i}function v(e,t){const i=t?f:m;let n="",{scheme:o,authority:s,path:r,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(s||"file"===o)&&(n+=d,n+=d),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?n+=i(s,!1,!0):(n+=i(s.substr(0,e),!1,!0),n+=s.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:m(l,!1,!1)),n}function b(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}const C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(e){return e.match(C)?e.replace(C,(e=>b(e))):e}},98e3:(e,t,i)=>{i.d(t,{R:()=>n});const n=function(){if("object"==typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let e;e="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(256*Math.random());return e};const t=new Uint8Array(16),i=[];for(let e=0;e<256;e++)i.push(e.toString(16).padStart(2,"0"));return function(){e(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128;let n=0,o="";return o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o+="-",o+=i[t[n++]],o+=i[t[n++]],o+="-",o+=i[t[n++]],o+=i[t[n++]],o+="-",o+=i[t[n++]],o+=i[t[n++]],o+="-",o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o+=i[t[n++]],o}}()},25552:(e,t,i)=>{i.d(t,{H:()=>g});var n=i(91902),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},d={};l(d,n,"default");var h={},c={},u=class{static getOrCreate(e){return c[e]||(c[e]=new u(e)),c[e]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t}))}load(){return this._loadingTriggered||(this._loadingTriggered=!0,h[this._languageId].loader().then((e=>this._lazyLoadPromiseResolve(e)),(e=>this._lazyLoadPromiseReject(e)))),this._lazyLoadPromise}};function g(e){const t=e.id;h[t]=e,d.languages.register(e);const i=u.getOrCreate(t);d.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),d.languages.onLanguageEncountered(t,(async()=>{const e=await i.load();d.languages.setLanguageConfiguration(t,e.conf)}))}},29126:(e,t,i)=>{(0,i(25552).H)({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>i.e(848).then(i.bind(i,40848))})},89808:(e,t,i)=>{(0,i(25552).H)({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>i.e(4386).then(i.bind(i,54386))})},13598:(e,t,i)=>{(0,i(25552).H)({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>i.e(1471).then(i.bind(i,31471))})},52042:(e,t,i)=>{(0,i(25552).H)({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>i.e(4129).then(i.bind(i,84129))})},50497:(e,t,i)=>{(0,i(25552).H)({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>i.e(7131).then(i.bind(i,47131))})},11336:(e,t,i)=>{(0,i(25552).H)({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>i.e(1448).then(i.bind(i,11448))})},76334:(e,t,i)=>{(0,i(25552).H)({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>i.e(3036).then(i.bind(i,33036))})},30253:(e,t,i)=>{(0,i(25552).H)({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>i.e(1147).then(i.bind(i,21147))})},47940:(e,t,i)=>{var n=i(25552);(0,n.H)({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>i.e(1960).then(i.bind(i,71960))}),(0,n.H)({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>i.e(1960).then(i.bind(i,71960))})},18162:(e,t,i)=>{(0,i(25552).H)({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>i.e(8719).then(i.bind(i,18719))})},79556:(e,t,i)=>{(0,i(25552).H)({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>i.e(8946).then(i.bind(i,68946))})},56292:(e,t,i)=>{(0,i(25552).H)({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>i.e(2075).then(i.bind(i,62075))})},30282:(e,t,i)=>{(0,i(25552).H)({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>i.e(6423).then(i.bind(i,56423))})},42429:(e,t,i)=>{(0,i(25552).H)({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>i.e(9343).then(i.bind(i,39343))})},24129:(e,t,i)=>{(0,i(25552).H)({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>i.e(5849).then(i.bind(i,25849))})},88765:(e,t,i)=>{(0,i(25552).H)({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>i.e(2814).then(i.bind(i,12814))})},43814:(e,t,i)=>{(0,i(25552).H)({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>i.e(2240).then(i.bind(i,92240))})},45067:(e,t,i)=>{(0,i(25552).H)({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>i.e(4188).then(i.bind(i,14188))})},21589:(e,t,i)=>{var n=i(25552);(0,n.H)({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagAutoInterpolationDollar))}),(0,n.H)({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagAngleInterpolationDollar))}),(0,n.H)({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagBracketInterpolationDollar))}),(0,n.H)({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagAngleInterpolationBracket))}),(0,n.H)({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagBracketInterpolationBracket))}),(0,n.H)({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagAutoInterpolationDollar))}),(0,n.H)({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>i.e(5880).then(i.bind(i,5880)).then((e=>e.TagAutoInterpolationBracket))})},97820:(e,t,i)=>{(0,i(25552).H)({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>i.e(6241).then(i.bind(i,96241))})},40927:(e,t,i)=>{(0,i(25552).H)({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>i.e(249).then(i.bind(i,80249))})},26220:(e,t,i)=>{(0,i(25552).H)({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>i.e(6489).then(i.bind(i,66489))})},1526:(e,t,i)=>{(0,i(25552).H)({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>i.e(5703).then(i.bind(i,15703))})},64091:(e,t,i)=>{(0,i(25552).H)({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>i.e(3632).then(i.bind(i,53632))})},40902:(e,t,i)=>{(0,i(25552).H)({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>i.e(2571).then(i.bind(i,2571))})},17476:(e,t,i)=>{(0,i(25552).H)({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>i.e(2798).then(i.bind(i,59607))})},16745:(e,t,i)=>{(0,i(25552).H)({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>i.e(7043).then(i.bind(i,61410))})},43763:(e,t,i)=>{(0,i(25552).H)({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>i.e(1134).then(i.bind(i,41134))})},46595:(e,t,i)=>{(0,i(25552).H)({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>i.e(4946).then(i.bind(i,34946))})},36831:(e,t,i)=>{(0,i(25552).H)({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>i.e(4368).then(i.bind(i,84368))})},66079:(e,t,i)=>{(0,i(25552).H)({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>i.e(5593).then(i.bind(i,35593))})},90158:(e,t,i)=>{(0,i(25552).H)({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>i.e(4912).then(i.bind(i,99060))})},38698:(e,t,i)=>{(0,i(25552).H)({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>i.e(4028).then(i.bind(i,94028))})},82665:(e,t,i)=>{(0,i(25552).H)({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>i.e(911).then(i.bind(i,20911))})},51944:(e,t,i)=>{(0,i(25552).H)({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>i.e(8906).then(i.bind(i,38906))})},77365:(e,t,i)=>{(0,i(25552).H)({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>i.e(2954).then(i.bind(i,42954))})},37562:(e,t,i)=>{(0,i(25552).H)({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>i.e(4456).then(i.bind(i,4456))})},6595:(e,t,i)=>{(0,i(25552).H)({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>i.e(854).then(i.bind(i,60854))})},75769:(e,t,i)=>{(0,i(25552).H)({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>i.e(9398).then(i.bind(i,79398))})},51714:(e,t,i)=>{(0,i(25552).H)({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>i.e(1961).then(i.bind(i,31961))})},86935:(e,t,i)=>{(0,i(25552).H)({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>i.e(9537).then(i.bind(i,79537))})},62893:(e,t,i)=>{(0,i(25552).H)({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>i.e(6082).then(i.bind(i,86082))})},27616:(e,t,i)=>{(0,i(25552).H)({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>i.e(8084).then(i.bind(i,98084))})},83335:(e,t,i)=>{(0,i(25552).H)({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>i.e(8070).then(i.bind(i,8070))})},46266:(e,t,i)=>{(0,i(25552).H)({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>i.e(996).then(i.bind(i,20996))})},89723:(e,t,i)=>{(0,i(25552).H)({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>i.e(7835).then(i.bind(i,47835))})},55788:(e,t,i)=>{(0,i(25552).H)({id:"pla",extensions:[".pla"],loader:()=>i.e(3682).then(i.bind(i,23682))})},48746:(e,t,i)=>{(0,i(25552).H)({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>i.e(8180).then(i.bind(i,48180))})},94992:(e,t,i)=>{(0,i(25552).H)({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>i.e(4407).then(i.bind(i,94407))})},16563:(e,t,i)=>{(0,i(25552).H)({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>i.e(7562).then(i.bind(i,47410))})},57296:(e,t,i)=>{(0,i(25552).H)({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>i.e(3760).then(i.bind(i,63760))})},85098:(e,t,i)=>{(0,i(25552).H)({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>i.e(2892).then(i.bind(i,22892))})},83187:(e,t,i)=>{(0,i(25552).H)({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>i.e(7287).then(i.bind(i,37287))})},12026:(e,t,i)=>{(0,i(25552).H)({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>i.e(9400).then(i.bind(i,69400))})},76194:(e,t,i)=>{(0,i(25552).H)({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>i.e(2140).then(i.bind(i,22140))})},5566:(e,t,i)=>{(0,i(25552).H)({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>i.e(3499).then(i.bind(i,76424))})},26254:(e,t,i)=>{(0,i(25552).H)({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>i.e(1259).then(i.bind(i,91259))})},5734:(e,t,i)=>{(0,i(25552).H)({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>i.e(6449).then(i.bind(i,56449))})},40191:(e,t,i)=>{(0,i(25552).H)({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>i.e(1065).then(i.bind(i,71065))})},93127:(e,t,i)=>{(0,i(25552).H)({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>i.e(9684).then(i.bind(i,69684))})},34483:(e,t,i)=>{(0,i(25552).H)({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>i.e(8715).then(i.bind(i,8715))})},40840:(e,t,i)=>{(0,i(25552).H)({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>i.e(5062).then(i.bind(i,95062))})},37266:(e,t,i)=>{(0,i(25552).H)({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>i.e(180).then(i.bind(i,90180))})},2375:(e,t,i)=>{(0,i(25552).H)({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>i.e(2060).then(i.bind(i,32060))})},96461:(e,t,i)=>{(0,i(25552).H)({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>i.e(525).then(i.bind(i,90525))})},76628:(e,t,i)=>{(0,i(25552).H)({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>i.e(8670).then(i.bind(i,88670))})},40185:(e,t,i)=>{(0,i(25552).H)({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>i.e(1156).then(i.bind(i,87295))})},27776:(e,t,i)=>{(0,i(25552).H)({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>i.e(3919).then(i.bind(i,63919))})},28118:(e,t,i)=>{(0,i(25552).H)({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>i.e(5962).then(i.bind(i,85962))})},96337:(e,t,i)=>{(0,i(25552).H)({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>i.e(7778).then(i.bind(i,27778))})},87530:(e,t,i)=>{(0,i(25552).H)({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>i.e(6587).then(i.bind(i,86587))})},25929:(e,t,i)=>{(0,i(25552).H)({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>i.e(2911).then(i.bind(i,42911))})},17918:(e,t,i)=>{var n=i(25552);(0,n.H)({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>i.e(1886).then(i.bind(i,81886))}),(0,n.H)({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>i.e(1886).then(i.bind(i,81886))})},6205:(e,t,i)=>{(0,i(25552).H)({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>i.e(7637).then(i.bind(i,57637))})},46837:(e,t,i)=>{(0,i(25552).H)({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>i.e(8424).then(i.bind(i,98424))})},88307:(e,t,i)=>{(0,i(25552).H)({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>i.e(6713).then(i.bind(i,96717))})},58203:(e,t,i)=>{(0,i(25552).H)({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>i.e(9907).then(i.bind(i,39907))})},67077:(e,t,i)=>{(0,i(25552).H)({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>i.e(147).then(i.bind(i,40147))})},81905:(e,t,i)=>{(0,i(25552).H)({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>i.e(4902).then(i.bind(i,4902))})},94199:(e,t,i)=>{(0,i(25552).H)({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>i.e(3585).then(i.bind(i,23585))})},52136:(e,t,i)=>{i.d(t,{N:()=>o});var n=i(38626);function o(e,t){e instanceof n.Z?(e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setFontVariationSettings(t.fontVariationSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.fontVariationSettings=t.fontVariationSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}},54534:(e,t,i)=>{i.d(t,{I:()=>s});var n=i(5976),o=i(4669);class s extends n.JT{constructor(e,t){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,n=!1;const o=()=>{if(i&&!n)try{i=!1,n=!0,t()}finally{requestAnimationFrame((()=>{n=!1,o()}))}};this._resizeObserver=new ResizeObserver((t=>{e=t&&t[0]&&t[0].contentRect?t[0].contentRect:null,i=!0,o()})),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}},27231:(e,t,i)=>{i.d(t,{g:()=>g});var n=i(16268),o=i(4669),s=i(5976),r=i(52136);class a{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class l{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");(0,r.N)(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");(0,r.N)(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");(0,r.N)(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const o=[];for(const e of this._requests){let s;0===e.type&&(s=t),2===e.type&&(s=i),1===e.type&&(s=n),s.appendChild(document.createElement("br"));const r=document.createElement("span");l._render(r,e),s.appendChild(r),o.push(r)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e<t;e++){const t=this._requests[e],i=this._testElements[e];t.fulfill(i.offsetWidth/256)}}}var d=i(64141),h=i(27374);class c extends s.JT{constructor(){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._cache=new u,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new u,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=window.setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new h.pR({pixelRatio:n.Tz.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,i,n){const o=new a(e,t);return i.push(o),null==n||n.push(o),o}_actualReadFontInfo(e){const t=[],i=[],o=this._createRequest("n",0,t,i),s=this._createRequest("",0,t,null),r=this._createRequest(" ",0,t,i),a=this._createRequest("0",0,t,i),c=this._createRequest("1",0,t,i),u=this._createRequest("2",0,t,i),g=this._createRequest("3",0,t,i),p=this._createRequest("4",0,t,i),m=this._createRequest("5",0,t,i),f=this._createRequest("6",0,t,i),_=this._createRequest("7",0,t,i),v=this._createRequest("8",0,t,i),b=this._createRequest("9",0,t,i),C=this._createRequest("→",0,t,i),w=this._createRequest("→",0,t,null),y=this._createRequest("·",0,t,i),S=this._createRequest(String.fromCharCode(11825),0,t,null),L="|/-_ilm%";for(let e=0,n=8;e<n;e++)this._createRequest(L.charAt(e),0,t,i),this._createRequest(L.charAt(e),1,t,i),this._createRequest(L.charAt(e),2,t,i);!function(e,t){new l(e,t).read()}(e,t);const x=Math.max(a.width,c.width,u.width,g.width,p.width,m.width,f.width,_.width,v.width,b.width);let k=e.fontFeatureSettings===d.n0.OFF;const N=i[0].width;for(let e=1,t=i.length;k&&e<t;e++){const t=N-i[e].width;if(t<-.001||t>.001){k=!1;break}}let D=!0;return k&&w.width!==N&&(D=!1),w.width>C.width&&(D=!1),new h.pR({pixelRatio:n.Tz.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:k,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:D,spaceWidth:r.width,middotWidth:y.width,wsmiddotWidth:S.width,maxDigitWidth:x},!0)}}class u{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map((e=>this._values[e]))}}const g=new c},37940:(e,t,i)=>{i.d(t,{n:()=>o});var n=i(4669);const o=new class{constructor(){this._tabFocusTerminal=!1,this._tabFocusEditor=!1,this._onDidChangeTabFocus=new n.Q5,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(e){return"terminalFocus"===e?this._tabFocusTerminal:this._tabFocusEditor}setTabFocusMode(e,t){"terminalFocus"===t?this._tabFocusTerminal=e:this._tabFocusEditor=e,this._onDidChangeTabFocus.fire()}}},35715:(e,t,i)=>{i.d(t,{Fz:()=>b,Nl:()=>_,RA:()=>f,Tj:()=>w,b6:()=>C,pd:()=>n});var n,o=i(16268),s=i(65321),r=i(4850),a=i(59069),l=i(50795),d=i(15393),h=i(4669),c=i(5976),u=i(81170),g=i(97295),p=i(15887),m=i(3860);!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(n||(n={}));const f={forceCopyWithSyntaxHighlighting:!1};class _{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}_.INSTANCE=new _;class v{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}class b extends c.JT{get textAreaState(){return this._textAreaState}constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new h.Q5),this.onFocus=this._onFocus.event,this._onBlur=this._register(new h.Q5),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new h.Q5),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new h.Q5),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new h.Q5),this.onCut=this._onCut.event,this._onPaste=this._register(new h.Q5),this.onPaste=this._onPaste.event,this._onType=this._register(new h.Q5),this.onType=this._onType.event,this._onCompositionStart=this._register(new h.Q5),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new h.Q5),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new h.Q5),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new h.Q5),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new d.pY((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new d.pY((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=p.un.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let o=null;this._register(this._textArea.onKeyDown((e=>{const t=new a.y(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),o=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new a.y(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{p.al&&console.log("[compositionstart]",e);const t=new v;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&o&&o.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===o.code||"ArrowLeft"===o.code))return p.al&&console.log("[compositionstart] Handling long press case on macOS + arrow key",e),t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{p.al&&console.log("[compositionupdate]",e);const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=p.un.readFromTextArea(this._textArea,this._textAreaState),i=p.un.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p.un.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{p.al&&console.log("[compositionend]",e);const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=p.un.readFromTextArea(this._textArea,this._textAreaState),t=p.un.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p.un.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(p.al&&console.log("[input]",e),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=p.un.readFromTextArea(this._textArea,this._textAreaState),i=p.un.deduceInput(this._textAreaState,t,2===this._OS);(0!==i.replacePrevCharCnt||1!==i.text.length||!g.ZG(i.text.charCodeAt(0))&&127!==i.text.charCodeAt(0))&&(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=C.getTextData(e.clipboardData);t&&(i=i||_.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return s.nm(document,"selectionchange",(t=>{if(l.B.onSelectionChange(),!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const o=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100)return;if(!this._textAreaState.selection)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const d=this._textAreaState.deduceEditorPosition(r),h=this._host.deduceModelPosition(d[0],d[1],d[2]),c=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(c[0],c[1],c[2]),g=new m.Y(h.lineNumber,h.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(g)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._currentComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};_.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&C.setTextData(e.clipboardData,t.text,t.html,i)}}const C={getTextData(e){const t=e.getData(u.v.text);let i=null;const n=e.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return 0===t.length&&null===i&&e.files.length>0?[Array.prototype.slice.call(e.files,0).map((e=>e.name)).join("\n"),null]:[t,i]},setTextData(e,t,i,n){e.setData(u.v.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}};class w extends c.JT{constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new r.Y(this._actual,"keydown")).event,this.onKeyUp=this._register(new r.Y(this._actual,"keyup")).event,this.onCompositionStart=this._register(new r.Y(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new r.Y(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new r.Y(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new r.Y(this._actual,"beforeinput")).event,this.onInput=this._register(new r.Y(this._actual,"input")).event,this.onCut=this._register(new r.Y(this._actual,"cut")).event,this.onCopy=this._register(new r.Y(this._actual,"copy")).event,this.onPaste=this._register(new r.Y(this._actual,"paste")).event,this.onFocus=this._register(new r.Y(this._actual,"focus")).event,this.onBlur=this._register(new r.Y(this._actual,"blur")).event,this._onSyntheticTap=this._register(new h.Q5),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown((()=>l.B.onKeyDown()))),this._register(this.onBeforeInput((()=>l.B.onBeforeInput()))),this._register(this.onInput((()=>l.B.onInput()))),this._register(this.onKeyUp((()=>l.B.onKeyUp()))),this._register(s.nm(this._actual,n.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=s.Ay(this._actual);return e?e.activeElement===this._actual:!!s.Uw(this._actual)&&document.activeElement===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let r=null;const a=s.Ay(n);r=a?a.activeElement:document.activeElement;const l=r===n,d=n.selectionStart,h=n.selectionEnd;if(l&&d===t&&h===i)o.vU&&window.parent!==window&&n.focus();else{if(l)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(o.vU&&window.parent!==window&&n.focus());try{const e=s.vL(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),s._0(n,e)}catch(e){}}}}},15887:(e,t,i)=>{i.d(t,{al:()=>s,ee:()=>a,un:()=>r});var n=i(97295),o=i(24314);const s=!1;class r{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),o=e.getSelectionEnd();let s;return t&&i.substring(0,n)===t.value.substring(0,t.selectionStart)&&(s=t.newlineCountBeforeSelection),new r(i,n,o,null,s)}collapseSelection(){return this.selectionStart===this.value.length?this:new r(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){s&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,i,n,o,s,r,a,l;if(e<=this.selectionStart){const n=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(null!==(i=null===(t=this.selection)||void 0===t?void 0:t.getStartPosition())&&void 0!==i?i:null,n,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(null!==(o=null===(n=this.selection)||void 0===n?void 0:n.getEndPosition())&&void 0!==o?o:null,t,1)}const d=this.value.substring(this.selectionStart,e);if(-1===d.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(null!==(r=null===(s=this.selection)||void 0===s?void 0:s.getStartPosition())&&void 0!==r?r:null,d,1);const h=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(null!==(l=null===(a=this.selection)||void 0===a?void 0:a.getEndPosition())&&void 0!==l?l:null,h,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;for(;-1!==(o=t.indexOf("\n",o+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};s&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));const o=Math.min(n.Mh(e.value,t.value),e.selectionStart,t.selectionStart),r=Math.min(n.P1(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),a=e.value.substring(o,e.value.length-r),l=t.value.substring(o,t.value.length-r),d=e.selectionStart-o,h=e.selectionEnd-o,c=t.selectionStart-o,u=t.selectionEnd-o;if(s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${a}>, selectionStart: ${d}, selectionEnd: ${h}`),console.log(`AFTER DIFFING CURRENT STATE: <${l}>, selectionStart: ${c}, selectionEnd: ${u}`)),c===u){const t=e.selectionStart-o;return s&&console.log(`REMOVE PREVIOUS: ${t} chars`),{text:l,replacePrevCharCnt:t,replaceNextCharCnt:0,positionDelta:0}}return{text:l,replacePrevCharCnt:h-d,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(s&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(n.Mh(e.value,t.value),e.selectionEnd),o=Math.min(n.P1(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(i,e.value.length-o),a=t.value.substring(i,t.value.length-o),l=e.selectionStart-i,d=e.selectionEnd-i,h=t.selectionStart-i,c=t.selectionEnd-i;return s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${l}, selectionEnd: ${d}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${h}, selectionEnd: ${c}`)),{text:a,replacePrevCharCnt:d,replaceNextCharCnt:r.length-d,positionDelta:c-a.length}}}r.EMPTY=new r("",0,0,null,void 0);class a{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new o.e(n,1,s+1,1)}static fromEditorSelection(e,t,i,n){const s=500,l=a._getPageOfLine(t.startLineNumber,i),d=a._getRangeForPage(l,i),h=a._getPageOfLine(t.endLineNumber,i),c=a._getRangeForPage(h,i);let u=d.intersectRanges(new o.e(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(u,1)>s){const t=e.modifyPosition(u.getEndPosition(),-500);u=o.e.fromPositions(t,u.getEndPosition())}const g=e.getValueInRange(u,1),p=e.getLineCount(),m=e.getLineMaxColumn(p);let f=c.intersectRanges(new o.e(t.endLineNumber,t.endColumn,p,m));if(n&&e.getValueLengthInRange(f,1)>s){const t=e.modifyPosition(f.getStartPosition(),s);f=o.e.fromPositions(f.getStartPosition(),t)}const _=e.getValueInRange(f,1);let v;if(l===h||l+1===h)v=e.getValueInRange(t,1);else{const i=d.intersectRanges(t),n=c.intersectRanges(t);v=e.getValueInRange(i,1)+String.fromCharCode(8230)+e.getValueInRange(n,1)}return n&&v.length>1e3&&(v=v.substring(0,s)+String.fromCharCode(8230)+v.substring(v.length-s,v.length)),new r(g+v+_,g.length,g.length+v.length,t,u.endLineNumber-u.startLineNumber)}}},69317:(e,t,i)=>{i.d(t,{wk:()=>N,Ox:()=>m});var n=i(63580),o=i(16268),s=i(98401),r=i(56346),a=i(16830),l=i(17122),d=i(55343),h=i(50187),c=i(24314);class u{static columnSelect(e,t,i,n,o,s){const r=Math.abs(o-i)+1,a=i>o,l=n>s,u=n<s,g=[];for(let o=0;o<r;o++){const r=i+(a?-o:o),p=e.columnFromVisibleColumn(t,r,n),m=e.columnFromVisibleColumn(t,r,s),f=e.visibleColumnFromColumn(t,new h.L(r,p)),_=e.visibleColumnFromColumn(t,new h.L(r,m));if(u){if(f>s)continue;if(_<n)continue}if(l){if(_>n)continue;if(f<s)continue}g.push(new d.rS(new c.e(r,p,r,p),0,0,new h.L(r,m),0))}if(0===g.length)for(let e=0;e<r;e++){const n=i+(a?-e:e),o=t.getLineMaxColumn(n);g.push(new d.rS(new c.e(n,o,n,o),0,0,new h.L(n,o),0))}return{viewStates:g,reversed:a,fromLineNumber:i,fromVisualColumn:n,toLineNumber:o,toVisualColumn:s}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>0&&n--,u.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),s=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=o;i<=s;i++){const o=t.getLineMaxColumn(i),s=e.visibleColumnFromColumn(t,new h.L(i,o));n=Math.max(n,s)}let r=i.toViewVisualColumn;return r<n&&r++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,r)}static columnSelectUp(e,t,i,n){const o=n?e.pageSize:1,s=Math.max(1,i.toViewLineNumber-o);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,s,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){const o=n?e.pageSize:1,s=Math.min(t.getLineCount(),i.toViewLineNumber+o);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,s,i.toViewVisualColumn)}}var g,p,m,f=i(29436),_=i(28108),v=i(51336),b=i(29102),C=i(93983),w=i(49989);class y extends a._l{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}}!function(e){e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:function(e){if(!s.Kn(e))return!1;const t=e;return!(!s.HD(t.to)||!s.o8(t.by)&&!s.HD(t.by)||!s.o8(t.value)&&!s.hj(t.value)||!s.o8(t.revealCursor)&&!s.jn(t.revealCursor))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},e.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"},e.parse=function(t){let i,n;switch(t.to){case e.RawDirection.Up:i=1;break;case e.RawDirection.Right:i=2;break;case e.RawDirection.Down:i=3;break;case e.RawDirection.Left:i=4;break;default:return null}switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Page:n=3;break;case e.RawUnit.HalfPage:n=4;break;case e.RawUnit.Editor:n=5;break;case e.RawUnit.Column:n=6;break;default:n=2}return{direction:i,unit:n,value:Math.floor(t.value||1),revealCursor:!!t.revealCursor,select:!!t.select}}}(g||(g={})),function(e){e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:function(e){if(!s.Kn(e))return!1;const t=e;return!(!s.hj(t.lineNumber)&&!s.HD(t.lineNumber)||!s.o8(t.at)&&!s.HD(t.at))},schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(p||(p={}));class S{constructor(e){e.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(l.$).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(l.$).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){return this.runEditorCommand(e,t,i)||!0}}!function(e){class t extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){t.position&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&2!==t.revealType&&e.revealPrimaryCursor(t.source,!0,!0))}}e.MoveTo=(0,a.fK)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.fK)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends y{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);null!==i&&(e.setCursorStates(t.source,3,i.viewStates.map((e=>d.Vi.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source))}}e.ColumnSelect=(0,a.fK)(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){if(void 0===n.position||void 0===n.viewPosition||void 0===n.mouseColumn)return null;const o=e.model.validatePosition(n.position),s=e.coordinatesConverter.validateViewPosition(new h.L(n.viewPosition.lineNumber,n.viewPosition.column),o),r=n.doColumnSelect?i.fromViewLineNumber:s.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return u.columnSelect(e.cursorConfig,e,r,a,s.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectRight(e.cursorConfig,e,i)}});class s extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=(0,a.fK)(new s({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.fK)(new s({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=(0,a.fK)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.fK)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3596,linux:{primary:0}}}));class m extends y{constructor(){super({id:"cursorMove",precondition:void 0,description:_.N.description})}runCoreEditorCommand(e,t){const i=_.N.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,m._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return _.P.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return _.P.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=m,e.CursorMove=(0,a.fK)(new m);class f extends y{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=(0,a.fK)(new f({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.fK)(new f({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1039}})),e.CursorRight=(0,a.fK)(new f({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.fK)(new f({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1041}})),e.CursorUp=(0,a.fK)(new f({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.fK)(new f({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.fK)(new f({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.fK)(new f({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1035}})),e.CursorDown=(0,a.fK)(new f({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.fK)(new f({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.fK)(new f({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.fK)(new f({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.fK)(new class extends y{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;let i;i=t.wholeLine?_.P.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):_.P.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,s=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;i<r;i++){const r=n[i];if((!o||r.modelState.selection.containsPosition(o))&&(!s||r.viewState.selection.containsPosition(s)))return n.splice(i,1),e.model.pushStackElement(),void e.setCursorStates(t.source,3,n)}}n.push(i),e.model.pushStackElement(),e.setCursorStates(t.source,3,n)}}),e.LastCursorMoveToSelect=(0,a.fK)(new class extends y{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0);o[i]=_.P.moveTo(e,n[i],!0,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class v extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToBeginningOfLine(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorHome=(0,a.fK)(new v({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),e.CursorHomeSelect=(0,a.fK)(new v({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class C extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i],o=n.modelState.position.lineNumber;t[i]=d.Vi.fromModelState(n.modelState.move(this._inSelectionMode,o,1,0))}return t}}e.CursorLineStart=(0,a.fK)(new C({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:287}}})),e.CursorLineStartSelect=(0,a.fK)(new C({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:1311}}}));class w extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToEndOfLine(e,e.getCursorStates(),this._inSelectionMode,t.sticky||!1)),e.revealPrimaryCursor(t.source,!0)}}e.CursorEnd=(0,a.fK)(new w({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:0,kbExpr:b.u.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:n.NC("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),e.CursorEndSelect=(0,a.fK)(new w({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:0,kbExpr:b.u.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:n.NC("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class L extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e,e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e,t){const i=[];for(let n=0,o=t.length;n<o;n++){const o=t[n],s=o.modelState.position.lineNumber,r=e.model.getLineMaxColumn(s);i[n]=d.Vi.fromModelState(o.modelState.move(this._inSelectionMode,s,r,0))}return i}}e.CursorLineEnd=(0,a.fK)(new L({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:291}}})),e.CursorLineEndSelect=(0,a.fK)(new L({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:1315}}}));class x extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToBeginningOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorTop=(0,a.fK)(new x({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2062,mac:{primary:2064}}})),e.CursorTopSelect=(0,a.fK)(new x({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3086,mac:{primary:3088}}}));class k extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.moveToEndOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorBottom=(0,a.fK)(new k({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2061,mac:{primary:2066}}})),e.CursorBottomSelect=(0,a.fK)(new k({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3085,mac:{primary:3090}}}));class N extends y{constructor(){super({id:"editorScroll",precondition:void 0,description:g.description})}determineScrollMethod(e){return[6].includes(e.unit)&&[4,2].includes(e.direction)?this._runHorizontalEditorScroll.bind(this):[1,2,3,4,5,6].includes(e.unit)&&[1,3].includes(e.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(e,t){const i=g.parse(t);if(!i)return;const n=this.determineScrollMethod(i);n&&n(e,t.source,i)}_runVerticalEditorScroll(e,t,i){const n=this._computeDesiredScrollTop(e,i);if(i.revealCursor){const o=e.getCompletelyVisibleViewRangeAtScrollTop(n);e.setCursorStates(t,3,[_.P.findPositionInViewportIfOutside(e,e.getPrimaryCursorState(),o,i.select)])}e.viewLayout.setScrollPosition({scrollTop:n},0)}_computeDesiredScrollTop(e,t){if(1===t.unit){const i=e.viewLayout.getFutureViewport(),n=e.getCompletelyVisibleViewRangeAtScrollTop(i.top),o=e.coordinatesConverter.convertViewRangeToModelRange(n);let s;s=1===t.direction?Math.max(1,o.startLineNumber-t.value):Math.min(e.model.getLineCount(),o.startLineNumber+t.value);const r=e.coordinatesConverter.convertModelPositionToViewPosition(new h.L(s,1));return e.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber)}if(5===t.unit){let i=0;return 3===t.direction&&(i=e.model.getLineCount()-e.cursorConfig.pageSize),e.viewLayout.getVerticalOffsetForLineNumber(i)}let i;i=3===t.unit?e.cursorConfig.pageSize*t.value:4===t.unit?Math.round(e.cursorConfig.pageSize/2)*t.value:t.value;const n=(1===t.direction?-1:1)*i;return e.viewLayout.getCurrentScrollTop()+n*e.cursorConfig.lineHeight}_runHorizontalEditorScroll(e,t,i){const n=this._computeDesiredScrollLeft(e,i);e.viewLayout.setScrollPosition({scrollLeft:n},0)}_computeDesiredScrollLeft(e,t){const i=(4===t.direction?-1:1)*t.value;return e.viewLayout.getCurrentScrollLeft()+i*e.cursorConfig.typicalHalfwidthCharacterWidth}}e.EditorScrollImpl=N,e.EditorScroll=(0,a.fK)(new N),e.ScrollLineUp=(0,a.fK)(new class extends y{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Up,by:g.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollPageUp=(0,a.fK)(new class extends y{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Up,by:g.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollEditorTop=(0,a.fK)(new class extends y{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Up,by:g.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollLineDown=(0,a.fK)(new class extends y{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Down,by:g.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollPageDown=(0,a.fK)(new class extends y{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Down,by:g.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollEditorBottom=(0,a.fK)(new class extends y{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Down,by:g.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollLeft=(0,a.fK)(new class extends y{constructor(){super({id:"scrollLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Left,by:g.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:i.source})}}),e.ScrollRight=(0,a.fK)(new class extends y{constructor(){super({id:"scrollRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus}})}runCoreEditorCommand(t,i){e.EditorScroll.runCoreEditorCommand(t,{to:g.RawDirection.Right,by:g.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:i.source})}});class D extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){t.position&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.word(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position)]),2!==t.revealType&&e.revealPrimaryCursor(t.source,!0,!0))}}e.WordSelect=(0,a.fK)(new D({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),e.WordSelectDrag=(0,a.fK)(new D({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),e.LastCursorWordSelect=(0,a.fK)(new class extends y{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0),s=n[i];o[i]=_.P.word(e,s,s.modelState.hasSelection(),t.position),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class E extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){t.position&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.line(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),2!==t.revealType&&e.revealPrimaryCursor(t.source,!1,!0))}}e.LineSelect=(0,a.fK)(new E({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),e.LineSelectDrag=(0,a.fK)(new E({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class I extends y{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){if(!t.position)return;const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0);o[i]=_.P.line(e,n[i],this._inSelectionMode,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}}e.LastCursorLineSelect=(0,a.fK)(new I({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),e.LastCursorLineSelectDrag=(0,a.fK)(new I({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),e.CancelSelection=(0,a.fK)(new class extends y{constructor(){super({id:"cancelSelection",precondition:b.u.hasNonEmptySelection,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.cancelSelection(e,e.getPrimaryCursorState())]),e.revealPrimaryCursor(t.source,!0)}}),e.RemoveSecondaryCursors=(0,a.fK)(new class extends y{constructor(){super({id:"removeSecondaryCursors",precondition:b.u.hasMultipleSelections,kbOpts:{weight:1,kbExpr:b.u.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[e.getPrimaryCursorState()]),e.revealPrimaryCursor(t.source,!0),(0,r.i7)(n.NC("removedCursor","Removed secondary cursors"))}}),e.RevealLine=(0,a.fK)(new class extends y{constructor(){super({id:"revealLine",precondition:void 0,description:p.description})}runCoreEditorCommand(e,t){const i=t,n=i.lineNumber||0;let o="number"==typeof n?n+1:parseInt(n)+1;o<1&&(o=1);const s=e.model.getLineCount();o>s&&(o=s);const r=new c.e(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case p.RawAtArgument.Top:a=3;break;case p.RawAtArgument.Center:a=1;break;case p.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends S{constructor(){super(a.Sq)}runDOMCommand(){o.vU&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[_.P.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.fK)(new class extends y{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){t.selection&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[d.Vi.fromModelSelection(t.selection)]))}})}(m||(m={}));const L=C.Ao.and(b.u.textInputFocus,b.u.columnSelection);function x(e,t){w.W.registerKeybindingRule({id:e,primary:t,when:L,weight:1})}function k(e){return e.register(),e}var N;x(m.CursorColumnSelectLeft.id,1039),x(m.CursorColumnSelectRight.id,1041),x(m.CursorColumnSelectUp.id,1040),x(m.CursorColumnSelectPageUp.id,1035),x(m.CursorColumnSelectDown.id,1042),x(m.CursorColumnSelectPageDown.id,1036),function(e){class t extends a._l{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.fK)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u6.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.fK)(new class extends t{constructor(){super({id:"outdent",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:C.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u6.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.fK)(new class extends t{constructor(){super({id:"tab",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:C.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u6.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.fK)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=f.A.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.fK)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=f.A.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends S{constructor(){super(a.n_)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(89))return t.getModel().undo()}},e.Redo=new class extends S{constructor(){super(a.kz)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(89))return t.getModel().redo()}}}(N||(N={}));class D extends a.mY{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(l.$).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function E(e,t){k(new D("default:"+e,e)),k(new D(e,e,t))}E("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),E("replacePreviousChar"),E("compositionType"),E("compositionStart"),E("compositionEnd"),E("paste"),E("cut")},19701:(e,t,i)=>{i.d(t,{B:()=>d,L:()=>u});var n=i(23547),o=i(73278),s=i(81170),r=i(70666),a=i(16021),l=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function d(e){const t=new o.Hl;for(const i of e.items){const e=i.type;if("string"===i.kind){const n=new Promise((e=>i.getAsString(e)));t.append(e,(0,o.ZO)(n))}else if("file"===i.kind){const n=i.getAsFile();n&&t.append(e,h(n))}}return t}function h(e){const t=e.path?r.o.parse(e.path):void 0;return(0,o.Ix)(e.name,t,(()=>l(this,void 0,void 0,(function*(){return new Uint8Array(yield e.arrayBuffer())}))))}const c=Object.freeze([a.Km.EDITORS,a.Km.FILES,n.g.RESOURCES,n.g.INTERNAL_URI_LIST]);function u(e,t=!1){const i=d(e),a=i.get(n.g.INTERNAL_URI_LIST);if(a)i.replace(s.v.uriList,a);else if(t||!i.has(s.v.uriList)){const t=[];for(const i of e.items){const e=i.getAsFile();if(e){const i=e.path;try{i?t.push(r.o.file(i).toString()):t.push(r.o.parse(e.name,!0).toString())}catch(e){}}}t.length&&i.replace(s.v.uriList,(0,o.ZO)(o.Z0.create(t)))}for(const e of c)i.delete(e);return i}},65520:(e,t,i)=>{i.d(t,{CL:()=>o,Pi:()=>r,QI:()=>s});var n=i(96518);function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.ICodeEditor}function s(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.IDiffEditor}function r(e){return o(e)?e:s(e)?e.getModifiedEditor():function(e){return!!e&&"object"==typeof e&&"function"==typeof e.onDidChangeActiveEditor}(e)&&o(e.activeCodeEditor)?e.activeCodeEditor:null}},29994:(e,t,i)=>{i.d(t,{AL:()=>v,N5:()=>f,Pp:()=>p,YN:()=>d,gy:()=>m,kG:()=>g,rU:()=>h,t7:()=>b,tC:()=>_});var n=i(65321),o=i(93911),s=i(7448),r=i(15393),a=i(5976),l=i(73910);class d{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new h(this.x-window.scrollX,this.y-window.scrollY)}}class h{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new d(this.clientX+window.scrollX,this.clientY+window.scrollY)}}class c{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class u{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function g(e){const t=n.i(e);return new c(t.left,t.top,t.width,t.height)}function p(e,t,i){const n=t.width/e.offsetWidth,o=t.height/e.offsetHeight,s=(i.x-t.x)/n,r=(i.y-t.y)/o;return new u(s,r)}class m extends s.n{constructor(e,t,i){super(e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new d(this.posx,this.posy),this.editorPos=g(i),this.relativePos=p(i,this.editorPos,this.pos)}}class f{constructor(e){this._editorViewDomNode=e}_create(e){return new m(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return n.nm(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return n.nm(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return n.nm(e,n.tw.MOUSE_DOWN,(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.nm(e,n.tw.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onMouseLeave(e,t){return n.nm(e,n.tw.MOUSE_LEAVE,(e=>{t(this._create(e))}))}onMouseMove(e,t){return n.nm(e,"mousemove",(e=>t(this._create(e))))}}class _{constructor(e){this._editorViewDomNode=e}_create(e){return new m(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return n.nm(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.nm(e,n.tw.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onPointerLeave(e,t){return n.nm(e,n.tw.POINTER_LEAVE,(e=>{t(this._create(e))}))}onPointerMove(e,t){return n.nm(e,"pointermove",(e=>t(this._create(e))))}}class v extends a.JT{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new o.C),this._keydownListener=null}startMonitoring(e,t,i,o,s){this._keydownListener=n.mu(document,"keydown",(e=>{e.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,(e=>{o(new m(e,!0,this._editorViewDomNode))}),(e=>{this._keydownListener.dispose(),s(e)}))}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class b{constructor(e){this._editor=e,this._instanceId=++b._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new r.pY((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const o=this._counter++;i=new C(t,`dyn-rule-${this._instanceId}-${o}`,n.OO(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}b._idPool=0;class C{constructor(e,t,i,o){this.key=e,this.className=t,this.properties=o,this._referenceCount=0,this._styleElement=n.dS(i),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const e in t){const n=t[e];let o;o="object"==typeof n?(0,l.n_1)(n.id):n,i+=`\n\t${w(e)}: ${o};`}return i+="\n}",i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function w(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}},16830:(e,t,i)=>{i.d(t,{AJ:()=>C,QG:()=>I,Qr:()=>D,R6:()=>S,Sq:()=>P,Uc:()=>n,_K:()=>T,_l:()=>y,fK:()=>N,jY:()=>L,kz:()=>O,mY:()=>b,n_:()=>A,rn:()=>E,sb:()=>k,x1:()=>x});var n,o=i(63580),s=i(70666),r=i(17122),a=i(50187),l=i(73733),d=i(88216),h=i(84144),c=i(94565),u=i(93983),g=i(72065),p=i(49989),m=i(89872),f=i(10829),_=i(98401),v=i(43557);class b{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?u.Ao.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};p.W.registerKeybindingRule(i)}}c.P.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){h.BH.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class C extends b{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e].implementation===i)return void this._implementations.splice(e,1)}}}runCommand(e,t){const i=e.get(v.VZ),n=e.get(u.i6);i.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const o of this._implementations){if(o.when){const e=n.getContext(document.activeElement);if(!o.when.evaluate(e))continue}const s=o.implementation(e,t);if(s){if(i.trace(`Command '${this.id}' was handled by '${o.name}'.`),"boolean"==typeof s)return;return s}}i.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class w extends b{constructor(e,t){super(t),this.command=e}runCommand(e,t){return this.command.runCommand(e,t)}}class y extends b{static bindToContribution(e){return class extends y{constructor(e){super(e),this._callback=e.handler}runEditorCommand(t,i,n){const o=e(i);o&&this._callback(o,n)}}}static runEditorCommand(e,t,i,n){const o=e.get(r.$),s=o.getFocusedCodeEditor()||o.getActiveCodeEditor();if(s)return s.invokeWithinContext((e=>{if(e.get(u.i6).contextMatchesRules(null!=i?i:void 0))return n(e,s,t)}))}runCommand(e,t){return y.runEditorCommand(e,t,this.precondition,((e,t,i)=>this.runEditorCommand(e,t,i)))}}class S extends y{static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=h.eH.EditorContext),t.title||(t.title=e.label),t.when=u.Ao.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(S.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(f.b).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class L extends S{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e][1]===t)return void this._implementations.splice(e,1)}}}run(e,t,i){for(const n of this._implementations){const o=n[1](e,t,i);if(o){if("boolean"==typeof o)return;return o}}}}class x extends h.Ke{run(e,...t){const i=e.get(r.$),n=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(n)return n.invokeWithinContext((e=>{var i,o;const s=e.get(u.i6),r=e.get(v.VZ);if(s.contextMatchesRules(null!==(i=this.desc.precondition)&&void 0!==i?i:void 0))return this.runEditorCommand(e,n,...t);r.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,null===(o=this.desc.precondition)||void 0===o?void 0:o.serialize())}))}}function k(e,t){c.P.registerCommand(e,(function(e,...i){const n=e.get(g.TG),[o,r]=i;(0,_.p_)(s.o.isUri(o)),(0,_.p_)(a.L.isIPosition(r));const h=e.get(l.q).getModel(o);if(h){const e=a.L.lift(r);return n.invokeFunction(t,h,e,...i.slice(2))}return e.get(d.S).createModelReference(o).then((e=>new Promise(((o,s)=>{try{o(n.invokeFunction(t,e.object.textEditorModel,a.L.lift(r),i.slice(2)))}catch(e){s(e)}})).finally((()=>{e.dispose()}))))}))}function N(e){return M.INSTANCE.registerEditorCommand(e),e}function D(e){const t=new e;return M.INSTANCE.registerEditorAction(t),t}function E(e){return M.INSTANCE.registerEditorAction(e),e}function I(e){M.INSTANCE.registerEditorAction(e)}function T(e,t,i){M.INSTANCE.registerEditorContribution(e,t,i)}!function(e){e.getEditorCommand=function(e){return M.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return M.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return M.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return M.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return M.INSTANCE.getDiffEditorContributions()}}(n||(n={}));class M{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function R(e){return e.register(),e}M.INSTANCE=new M,m.B.add("editor.contributions",M.INSTANCE);const A=R(new C({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"1_do",title:o.NC({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:h.eH.CommandPalette,group:"",title:o.NC("undo","Undo"),order:1}]}));R(new w(A,{id:"default:undo",precondition:void 0}));const O=R(new C({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"1_do",title:o.NC({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:h.eH.CommandPalette,group:"",title:o.NC("redo","Redo"),order:1}]}));R(new w(O,{id:"default:redo",precondition:void 0}));const P=R(new C({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:h.eH.MenubarSelectionMenu,group:"1_basic",title:o.NC({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:h.eH.CommandPalette,group:"",title:o.NC("selectAll","Select All"),order:1}]}))},66007:(e,t,i)=>{i.d(t,{Gl:()=>l,fo:()=>a,vu:()=>r});var n=i(72065),o=i(70666),s=i(98401);const r=(0,n.yh)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(l.is(e))return l.lift(e);if(d.is(e))return d.lift(e);throw new Error("Unsupported edit")}))}}class l extends a{static is(e){return e instanceof l||(0,s.Kn)(e)&&o.o.isUri(e.resource)&&(0,s.Kn)(e.textEdit)}static lift(e){return e instanceof l?e:new l(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class d extends a{static is(e){return e instanceof d||(0,s.Kn)(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof d?e:new d(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},17122:(e,t,i)=>{i.d(t,{$:()=>n});const n=(0,i(72065).yh)("codeEditorService")},35034:(e,t,i)=>{i.d(t,{Q8:()=>Ne,eu:()=>we});var n=i(15393),o=i(5976),s=i(17301),r=i(4669),a=i(36248),l=i(1432),d=i(97295);let h=!1;function c(e){l.$L&&(h||(h=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class u{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.method=i,this.args=n,this.type=0}}class g{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class p{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.eventName=i,this.arg=n,this.type=2}}class m{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class f{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class _{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const i=String(++this._lastSentReq);return new Promise(((n,o)=>{this._pendingReplies[i]={resolve:n,reject:o},this._send(new u(this._workerId,i,e,t))}))}listen(e,t){let i=null;const n=new r.Q5({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new p(this._workerId,i,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new f(this._workerId,i)),i=null}});return n.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then((e=>{this._send(new g(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,s.ri)(e.detail)),this._send(new g(this._workerId,t,void 0,(0,s.ri)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.eventName,e.arg)((e=>{this._send(new m(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let i=0;i<e.args.length;i++)e.args[i]instanceof ArrayBuffer&&t.push(e.args[i]);else 1===e.type&&e.res instanceof ArrayBuffer&&t.push(e.res);this._handler.sendMessage(e,t)}}class v extends o.JT{constructor(e,t,i){super();let n=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",(e=>{this._protocol.handleMessage(e)}),(e=>{null==n||n(e)}))),this._protocol=new _({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(e){return Promise.reject(e)}},handleEvent:(e,t)=>{if(C(e)){const n=i[e].call(i,t);if("function"!=typeof n)throw new Error(`Missing dynamic event ${e} on main thread host.`);return n}if(b(e)){const t=i[e];if("function"!=typeof t)throw new Error(`Missing event ${e} on main thread host.`);return t}throw new Error(`Malformed event name ${e}`)}}),this._protocol.setWorkerId(this._worker.getId());let o=null;const s=globalThis.require;void 0!==s&&"function"==typeof s.getConfig?o=s.getConfig():void 0!==globalThis.requirejs&&(o=globalThis.requirejs.s.contexts._.config);const r=(0,a.$E)(i);this._onModuleLoaded=this._protocol.sendMessage("$initialize",[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,r]);const l=(e,t)=>this._request(e,t),d=(e,t)=>this._protocol.listen(e,t);this._lazyProxy=new Promise(((e,i)=>{n=i,this._onModuleLoaded.then((t=>{e(function(e,t,i){const n=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o=e=>function(t){return i(e,t)},s={};for(const t of e)C(t)?s[t]=o(t):b(t)?s[t]=i(t,void 0):s[t]=n(t);return s}(t,l,d))}),(e=>{i(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((i,n)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(i,n)}),n)}))}_onError(e,t){console.error(e),console.info(t)}}function b(e){return"o"===e[0]&&"n"===e[1]&&d.df(e.charCodeAt(2))}function C(e){return/^onDynamic/.test(e)&&d.df(e.charCodeAt(9))}const w=(0,i(77514).Z)("defaultWorkerFactory",{createScriptURL:e=>e});class y{constructor(e,t,i,n,o){this.id=t,this.label=i;const s=function(e){const t=globalThis.MonacoEnvironment;if(t){if("function"==typeof t.getWorker)return t.getWorker("workerMain.js",e);if("function"==typeof t.getWorkerUrl){const i=t.getWorkerUrl("workerMain.js",e);return new Worker(w?w.createScriptURL(i):i,{name:e})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}(i);"function"==typeof s.then?this.worker=s:this.worker=Promise.resolve(s),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=o,"function"==typeof e.addEventListener&&e.addEventListener("error",o)}))}getId(){return this.id}postMessage(e,t){var i;null===(i=this.worker)||void 0===i||i.then((i=>{try{i.postMessage(e,t)}catch(e){(0,s.dL)(e),(0,s.dL)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:e}))}}))}dispose(){var e;null===(e=this.worker)||void 0===e||e.then((e=>e.terminate())),this.worker=null}}class S{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++S.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new y(e,n,this._label||"anonymous"+n,t,(e=>{c(e),this._webWorkerFailedBeforeError=e,i(e)}))}}S.LAST_WORKER_ID=0;var L=i(24314),x=i(51381),k=i(2484),N=i(70666),D=i(50187),E=i(90310);class I{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new D.L(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;n<t;n++)i[n]=this._lines[n].length+e;this._lineStarts=new E.oQ(i)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}}_acceptInsertText(e,t){if(0===t.length)return;const i=(0,d.uq)(t);if(1===i.length)return void this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]+this._lines[e.lineNumber-1].substring(e.column-1));i[i.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]);const n=new Uint32Array(i.length-1);for(let t=1;t<i.length;t++)this._lines.splice(e.lineNumber+t-1,0,i[t]),n[t-1]=i[t].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,n)}}var T=i(270),M=i(44906);class R{constructor(e,t,i){const n=new Uint8Array(e*t);for(let o=0,s=e*t;o<s;o++)n[o]=i;this._data=n,this.rows=e,this.cols=t}get(e,t){return this._data[e*this.cols+t]}set(e,t,i){this._data[e*this.cols+t]=i}}class A{constructor(e){let t=0,i=0;for(let n=0,o=e.length;n<o;n++){const[o,s,r]=e[n];s>t&&(t=s),o>i&&(i=o),r>i&&(i=r)}t++,i++;const n=new R(i,t,0);for(let t=0,i=e.length;t<i;t++){const[i,o,s]=e[t];n.set(i,o,s)}this._states=n,this._maxCharCode=t}nextState(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)}}let O=null,P=null;class F{static _createLink(e,t,i,n,o){let s=o-1;do{const i=t.charCodeAt(s);if(2!==e.get(i))break;s--}while(s>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(s);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&s--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:s+2},url:t.substring(n,s+1)}}static computeLinks(e,t=function(){return null===O&&(O=new A([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),O}()){const i=function(){if(null===P){P=new M.N(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t<e.length;t++)P.set(e.charCodeAt(t),1);const t=".,;:";for(let e=0;e<t.length;e++)P.set(t.charCodeAt(e),2)}return P}(),n=[];for(let o=1,s=e.getLineCount();o<=s;o++){const s=e.getLineContent(o),r=s.length;let a=0,l=0,d=0,h=1,c=!1,u=!1,g=!1,p=!1;for(;a<r;){let e=!1;const r=s.charCodeAt(a);if(13===h){let t;switch(r){case 40:c=!0,t=0;break;case 41:t=c?0:1;break;case 91:g=!0,u=!0,t=0;break;case 93:g=!1,t=u?0:1;break;case 123:p=!0,t=0;break;case 125:t=p?0:1;break;case 39:case 34:case 96:t=d===r?1:39===d||34===d||96===d?0:1;break;case 42:t=42===d?1:0;break;case 124:t=124===d?1:0;break;case 32:t=g?0:1;break;default:t=i.get(r)}1===t&&(n.push(F._createLink(i,s,o,l,a)),e=!0)}else if(12===h){let t;91===r?(u=!0,t=0):t=i.get(r),1===t?e=!0:h=13}else h=t.nextState(h,r),0===h&&(e=!0);e&&(h=1,c=!1,u=!1,p=!1,l=a+1,d=r),a++}13===h&&n.push(F._createLink(i,s,o,l,r))}return n}}class B{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,i,n,o){if(e&&t){const i=this.doNavigateValueSet(t,o);if(i)return{range:e,value:i}}if(i&&n){const e=this.doNavigateValueSet(n,o);if(e)return{range:i,value:e}}return null}doNavigateValueSet(e,t){const i=this.numberReplace(e,t);return null!==i?i:this.textReplace(e,t)}numberReplace(e,t){const i=Math.pow(10,e.length-(e.lastIndexOf(".")+1));let n=Number(e);const o=parseFloat(e);return isNaN(n)||isNaN(o)||n!==o?null:0!==n||t?(n=Math.floor(n*i),n+=t?i:-i,String(n/i)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,i){let n=null;for(let o=0,s=e.length;null===n&&o<s;o++)n=this.valueSetReplace(e[o],t,i);return n}valueSetReplace(e,t,i){let n=e.indexOf(t);return n>=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}B.INSTANCE=new B;var W=i(20927),V=i(84013),H=i(31446),z=i(60652),K=i(35146),U=i(45463);class j{computeDiff(e,t,i){var n;const o=new Y(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),s=[];let r=null;for(const e of o.changes){let t,i;t=0===e.originalEndLineNumber?new U.z(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new U.z(e.originalStartLineNumber,e.originalEndLineNumber+1),i=0===e.modifiedEndLineNumber?new U.z(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new U.z(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let o=new z.f0(t,i,null===(n=e.charChanges)||void 0===n?void 0:n.map((e=>new z.iy(new L.e(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new L.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));r&&(r.modifiedRange.endLineNumberExclusive!==o.modifiedRange.startLineNumber&&r.originalRange.endLineNumberExclusive!==o.originalRange.startLineNumber||(o=new z.f0(r.originalRange.join(o.originalRange),r.modifiedRange.join(o.modifiedRange),r.innerChanges&&o.innerChanges?r.innerChanges.concat(o.innerChanges):void 0),s.pop())),s.push(o),r=o}return(0,K.eZ)((()=>(0,K.DM)(s,((e,t)=>t.originalRange.startLineNumber-e.originalRange.endLineNumberExclusive==t.modifiedRange.startLineNumber-e.modifiedRange.endLineNumberExclusive&&e.originalRange.endLineNumberExclusive<t.originalRange.startLineNumber&&e.modifiedRange.endLineNumberExclusive<t.modifiedRange.startLineNumber)))),new z.hZ(s,[],o.quitEarly)}}function $(e,t,i,n){return new k.Hs(e,t,i).ComputeDiff(n)}class q{constructor(e){const t=[],i=[];for(let n=0,o=e.length;n<o;n++)t[n]=J(e[n],1),i[n]=X(e[n],1);this.lines=e,this._startColumns=t,this._endColumns=i}getElements(){const e=[];for(let t=0,i=this.lines.length;t<i;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,t,i){const n=[],o=[],s=[];let r=0;for(let a=t;a<=i;a++){const t=this.lines[a],l=e?this._startColumns[a]:1,d=e?this._endColumns[a]:t.length+1;for(let e=l;e<d;e++)n[r]=t.charCodeAt(e-1),o[r]=a+1,s[r]=e,r++;!e&&a<i&&(n[r]=10,o[r]=a+1,s[r]=t.length+1,r++)}return new Z(n,o,s)}}class Z{constructor(e,t,i){this._charCodes=e,this._lineNumbers=t,this._columns=i}toString(){return"["+this._charCodes.map(((e,t)=>(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class G{constructor(e,t,i,n,o,s,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=o,this.modifiedStartColumn=s,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),o=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1),a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),d=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),h=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new G(n,o,s,r,a,l,d,h)}}class Q{constructor(e,t,i,n,o){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=o}static createFromDiffResult(e,t,i,n,o,s,r){let a,l,d,h,c;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(d=n.getStartLineNumber(t.modifiedStart)-1,h=0):(d=n.getStartLineNumber(t.modifiedStart),h=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const s=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=$(s,a,o,!0).changes;r&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n<o;n++){const o=e[n],s=o.originalStart-(i.originalStart+i.originalLength),r=o.modifiedStart-(i.modifiedStart+i.modifiedLength);Math.min(s,r)<3?(i.originalLength=o.originalStart+o.originalLength-i.originalStart,i.modifiedLength=o.modifiedStart+o.modifiedLength-i.modifiedStart):(t.push(o),i=o)}return t}(e)),c=[];for(let t=0,i=e.length;t<i;t++)c.push(G.createFromDiffChange(e[t],s,a))}}return new Q(a,l,d,h,c)}}class Y{constructor(e,t,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new q(e),this.modified=new q(t),this.continueLineDiff=ee(i.maxComputationTime),this.continueCharDiff=ee(0===i.maxComputationTime?0:Math.min(i.maxComputationTime,5e3))}computeDiff(){if(1===this.original.lines.length&&0===this.original.lines[0].length)return 1===this.modified.lines.length&&0===this.modified.lines[0].length?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(1===this.modified.lines.length&&0===this.modified.lines[0].length)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const e=$(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,i=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const e=[];for(let i=0,n=t.length;i<n;i++)e.push(Q.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[i],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:i,changes:e}}const n=[];let o=0,s=0;for(let e=-1,i=t.length;e<i;e++){const r=e+1<i?t[e+1]:null,a=r?r.originalStart:this.originalLines.length,l=r?r.modifiedStart:this.modifiedLines.length;for(;o<a&&s<l;){const e=this.originalLines[o],t=this.modifiedLines[s];if(e!==t){{let i=J(e,1),r=J(t,1);for(;i>1&&r>1&&e.charCodeAt(i-2)===t.charCodeAt(r-2);)i--,r--;(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,s+1,1,r)}{let i=X(e,1),r=X(t,1);const a=e.length+1,l=t.length+1;for(;i<a&&r<l&&e.charCodeAt(i-1)===e.charCodeAt(r-1);)i++,r++;(i<a||r<l)&&this._pushTrimWhitespaceCharChange(n,o+1,i,a,s+1,r,l)}}o++,s++}r&&(n.push(Q.createFromDiffResult(this.shouldIgnoreTrimWhitespace,r,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),o+=r.originalLength,s+=r.modifiedLength)}return{quitEarly:i,changes:n}}_pushTrimWhitespaceCharChange(e,t,i,n,o,s,r){if(this._mergeTrimWhitespaceCharChange(e,t,i,n,o,s,r))return;let a;this.shouldComputeCharChanges&&(a=[new G(t,i,t,n,o,s,o,r)]),e.push(new Q(t,t,o,o,a))}_mergeTrimWhitespaceCharChange(e,t,i,n,o,s,r){const a=e.length;if(0===a)return!1;const l=e[a-1];return 0!==l.originalEndLineNumber&&0!==l.modifiedEndLineNumber&&(l.originalEndLineNumber===t&&l.modifiedEndLineNumber===o?(this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new G(t,i,t,n,o,s,o,r)),!0):l.originalEndLineNumber+1===t&&l.modifiedEndLineNumber+1===o&&(l.originalEndLineNumber=t,l.modifiedEndLineNumber=o,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new G(t,i,t,n,o,s,o,r)),!0))}}function J(e,t){const i=d.LC(e);return-1===i?t:i+1}function X(e,t){const i=d.ow(e);return-1===i?t:i+2}function ee(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}var te=i(18790);var ie=i(41264);function ne(e){const t=[];for(const i of e){const e=Number(i);(e||0===e&&""!==i.replace(/\s/g,""))&&t.push(e)}return t}function oe(e,t,i,n){return{red:e/255,blue:i/255,green:t/255,alpha:n}}function se(e,t){const i=t.index,n=t[0].length;if(!i)return;const o=e.positionAt(i);return{startLineNumber:o.lineNumber,startColumn:o.column,endLineNumber:o.lineNumber,endColumn:o.column+n}}function re(e,t){if(!e)return;const i=ie.Il.Format.CSS.parseHex(t);return i?{range:e,color:oe(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a)}:void 0}function ae(e,t,i){if(!e||1!==t.length)return;const n=ne(t[0].values());return{range:e,color:oe(n[0],n[1],n[2],i?n[3]:1)}}function le(e,t,i){if(!e||1!==t.length)return;const n=ne(t[0].values()),o=new ie.Il(new ie.Oz(n[0],n[1]/100,n[2]/100,i?n[3]:1));return{range:e,color:oe(o.rgba.r,o.rgba.g,o.rgba.b,o.rgba.a)}}function de(e,t){return"string"==typeof e?[...e.matchAll(t)]:e.findMatches(t)}var he=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class ce extends I{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let i=0;i<this._lines.length;i++){const n=this._lines[i],o=this.offsetAt(new D.L(i+1,1)),s=n.matchAll(e);for(const e of s)(e.index||0===e.index)&&(e.index=e.index+o),t.push(e)}return t}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){const i=(0,T.t2)(e.column,(0,T.eq)(t),this._lines[e.lineNumber-1],0);return i?new L.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){const t=this._lines,i=this._wordenize.bind(this);let n=0,o="",s=0,r=[];return{*[Symbol.iterator](){for(;;)if(s<r.length){const e=o.substring(r[s].start,r[s].end);s+=1,yield e}else{if(!(n<t.length))break;o=t[n],r=i(o,e),s=0,n+=1}}}}getLineWords(e,t){const i=this._lines[e-1],n=this._wordenize(i,t),o=[];for(const e of n)o.push({word:i.substring(e.start,e.end),startColumn:e.start+1,endColumn:e.end+1});return o}_wordenize(e,t){const i=[];let n;for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)i.push({start:n.index,end:n.index+n[0].length});return i}getValueInRange(e){if((e=this._validateRange(e)).startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);const t=this._eol,i=e.startLineNumber-1,n=e.endLineNumber-1,o=[];o.push(this._lines[i].substring(e.startColumn-1));for(let e=i+1;e<n;e++)o.push(this._lines[e]);return o.push(this._lines[n].substring(0,e.endColumn-1)),o.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();const t=this._lineStarts.getIndexOf(e),i=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,i)}}_validateRange(e){const t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),i=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||i.lineNumber!==e.endLineNumber||i.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}:e}_validatePosition(e){if(!D.L.isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:i}=e,n=!1;if(t<1)t=1,i=1,n=!0;else if(t>this._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class ue{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new ce(N.o.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeUnicodeHighlights(e,t,i){return he(this,void 0,void 0,(function*(){const n=this._getModel(e);return n?H.a.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}))}computeDiff(e,t,i,n){return he(this,void 0,void 0,(function*(){const o=this._getModel(e),s=this._getModel(t);return o&&s?ue.computeDiff(o,s,i,n):null}))}static computeDiff(e,t,i,n){const o="advanced"===n?new te.a7:new j,s=e.getLinesContent(),r=t.getLinesContent(),a=o.computeDiff(s,r,i);function l(e){return e.map((e=>{var t;return[e.originalRange.startLineNumber,e.originalRange.endLineNumberExclusive,e.modifiedRange.startLineNumber,e.modifiedRange.endLineNumberExclusive,null===(t=e.innerChanges)||void 0===t?void 0:t.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]}))}return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.hitTimeout,changes:l(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,l(e.changes)]))}}static _modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++)if(e.getLineContent(n)!==t.getLineContent(n))return!1;return!0}computeMoreMinimalEdits(e,t,i){return he(this,void 0,void 0,(function*(){const n=this._getModel(e);if(!n)return t;const o=[];let s;t=t.slice(0).sort(((e,t)=>e.range&&t.range?L.e.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));for(let{range:e,text:r,eol:a}of t){if("number"==typeof a&&(s=a),L.e.isEmpty(e)&&!r)continue;const t=n.getValueInRange(e);if(r=r.replace(/\r\n|\n|\r/g,n.eol),t===r)continue;if(Math.max(r.length,t.length)>ue._diffLimit){o.push({range:e,text:r});continue}const l=(0,k.a$)(t,r,i),d=n.offsetAt(L.e.lift(e).getStartPosition());for(const e of l){const t=n.positionAt(d+e.originalStart),i=n.positionAt(d+e.originalStart+e.originalLength),s={text:r.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}};n.getValueInRange(s.range)!==s.text&&o.push(s)}}return"number"==typeof s&&o.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),o}))}computeLinks(e){return he(this,void 0,void 0,(function*(){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?F.computeLinks(e):[]}(t):null}))}computeDefaultDocumentColors(e){return he(this,void 0,void 0,(function*(){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getValue&&"function"==typeof e.positionAt?function(e){const t=[],i=de(e,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(i.length>0)for(const n of i){const i=n.filter((e=>void 0!==e)),o=i[1],s=i[2];if(!s)continue;let r;if("rgb"===o){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;r=ae(se(e,n),de(s,t),!1)}else if("rgba"===o){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=ae(se(e,n),de(s,t),!0)}else if("hsl"===o){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;r=le(se(e,n),de(s,t),!1)}else if("hsla"===o){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=le(se(e,n),de(s,t),!0)}else"#"===o&&(r=re(se(e,n),o+s));r&&t.push(r)}return t}(e):[]}(t):null}))}textualSuggest(e,t,i,n){return he(this,void 0,void 0,(function*(){const o=new V.G,s=new RegExp(i,n),r=new Set;e:for(const i of e){const e=this._getModel(i);if(e)for(const i of e.words(s))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>ue._suggestionsLimit))break e}return{words:Array.from(r),duration:o.elapsed()}}))}computeWordRanges(e,t,i,n){return he(this,void 0,void 0,(function*(){const o=this._getModel(e);if(!o)return Object.create(null);const s=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;e<t.endLineNumber;e++){const t=o.getLineWords(e,s);for(const i of t){if(!isNaN(Number(i.word)))continue;let t=r[i.word];t||(t=[],r[i.word]=t),t.push({startLineNumber:e,startColumn:i.startColumn,endLineNumber:e,endColumn:i.endColumn})}}return r}))}navigateValueSet(e,t,i,n,o){return he(this,void 0,void 0,(function*(){const s=this._getModel(e);if(!s)return null;const r=new RegExp(n,o);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});const a=s.getValueInRange(t),l=s.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},r);if(!l)return null;const d=s.getValueInRange(l);return B.INSTANCE.navigateValueSet(t,a,l,d,i)}))}loadForeignModule(e,t,i){const n={host:(0,a.IU)(i,((e,t)=>this._host.fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(n,t),Promise.resolve((0,a.$E)(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}ue._diffLimit=1e5,ue._suggestionsLimit=1e4,"function"==typeof importScripts&&(globalThis.monaco=(0,W.O)());var ge=i(73733),pe=i(71765),me=i(9488),fe=i(43557),_e=i(71922),ve=function(e,t){return function(i,n){t(i,n,e)}},be=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function Ce(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let we=class extends o.JT{constructor(e,t,i,n,o){super(),this._modelService=e,this._workerManager=this._register(new Se(this._modelService,n)),this._logService=i,this._register(o.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(e,t)=>Ce(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(o.completionProvider.register("*",new ye(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return Ce(this._modelService,e)}computedUnicodeHighlights(e,t,i){return this._workerManager.withWorker().then((n=>n.computedUnicodeHighlights(e,t,i)))}computeDiff(e,t,i,n){return be(this,void 0,void 0,(function*(){const o=yield this._workerManager.withWorker().then((o=>o.computeDiff(e,t,i,n)));return o?{identical:o.identical,quitEarly:o.quitEarly,changes:s(o.changes),moves:o.moves.map((e=>new z.y0(new z.Qy(new U.z(e[0],e[1]),new U.z(e[2],e[3])),s(e[4]))))}:null;function s(e){return e.map((e=>{var t;return new z.f0(new U.z(e[0],e[1]),new U.z(e[2],e[3]),null===(t=e[4])||void 0===t?void 0:t.map((e=>new z.iy(new L.e(e[0],e[1],e[2],e[3]),new L.e(e[4],e[5],e[6],e[7])))))}))}}))}computeMoreMinimalEdits(e,t,i=!1){if((0,me.Of)(t)){if(!Ce(this._modelService,e))return Promise.resolve(t);const o=V.G.create(),s=this._workerManager.withWorker().then((n=>n.computeMoreMinimalEdits(e,t,i)));return s.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),o.elapsed()))),Promise.race([s,(0,n.Vs)(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return Ce(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return Ce(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}};we=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ve(0,ge.q),ve(1,pe.V),ve(2,fe.VZ),ve(3,x.c_),ve(4,_e.p)],we);class ye{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return be(this,void 0,void 0,(function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestionsMode)Ce(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())Ce(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestionsMode&&t.getLanguageId()!==e.getLanguageId()||n.push(t.uri));if(0===n.length)return;const o=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(t),r=s?new L.e(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):L.e.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),d=yield l.textualSuggest(n,null==s?void 0:s.word,o);return d?{duration:d.duration,suggestions:d.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}))}}class Se extends o.JT{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new n.zh).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4)),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new Ne(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class Le extends o.JT{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const e=new n.zh;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,o.B9)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){const e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>6e4&&t.push(i);for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new o.SL;s.add(i.onDidChangeContent((e=>{this._proxy.acceptModelChanged(n.toString(),e)}))),s.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),s.add((0,o.OF)((()=>{this._proxy.acceptRemovedModel(n)}))),this._syncedModels[n]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,o.B9)(t)}}class xe{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class ke{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class Ne extends o.JT{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new S(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new v(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new ke(this)))}catch(e){c(e),this._worker=new xe(new ue(new ke(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(c(e),this._worker=new xe(new ue(new ke(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new Le(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return be(this,void 0,void 0,(function*(){return this._disposed?Promise.reject((0,s.F0)()):this._getProxy().then((i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i)))}))}computedUnicodeHighlights(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeUnicodeHighlights(e.toString(),t,i)))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then((o=>o.computeDiff(e.toString(),t.toString(),i,n)))}computeMoreMinimalEdits(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeMoreMinimalEdits(e.toString(),t,i)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then((t=>t.computeDefaultDocumentColors(e.toString())))}textualSuggest(e,t,i){return be(this,void 0,void 0,(function*(){const n=yield this._withSyncedResources(e),o=i.source,s=i.flags;return n.textualSuggest(e.map((e=>e.toString())),t,o,s)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then((i=>{const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const o=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),s=o.source,r=o.flags;return i.computeWordRanges(e.toString(),t,s,r)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{const o=this._modelService.getModel(e);if(!o)return null;const s=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId()).getWordDefinition(),r=s.source,a=s.flags;return n.navigateValueSet(e.toString(),t,i,r,a)}))}dispose(){super.dispose(),this._disposed=!0}}},43407:(e,t,i)=>{i.d(t,{Z:()=>n});class n{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new n(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const o=e.getVisibleRanges();if(o.length>0){t=o[0].getStartPosition();const n=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-n}return new n(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,o){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=o}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}},7031:(e,t,i)=>{i.d(t,{CH:()=>d,CR:()=>a,D4:()=>l,u7:()=>s,xh:()=>o,yu:()=>r});class n{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class o extends n{constructor(e,t,i){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class s{constructor(e,t,i,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i,this.continuesOnNextLine=n}}class r{static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i<n;i++){const n=e[i];t[i]=new r(n.left,n.width)}return t}constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}toString(){return`[${this.left},${this.width}]`}}class a{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class l{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class d{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}},60571:(e,t,i)=>{i.d(t,{Nt:()=>m,ob:()=>p,dL:()=>C});var n=i(16268),o=i(38626),s=i(1432),r=i(7031);class a{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,o){const s=this._createRange();try{return s.setStart(e,t),s.setEnd(i,n),s.getClientRects()}catch(e){return null}finally{this._detachRange(s,o)}}static _mergeAdjacentRanges(e){if(1===e.length)return e;e.sort(r.CR.compare);const t=[];let i=0,n=e[0];for(let o=1,s=e.length;o<s;o++){const s=e[o];n.left+n.width+.9>=s.left?n.width=Math.max(n.width,s.left+s.width-n.left):(t[i++]=n,n=s)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let o=0,s=e.length;o<s;o++){const s=e[o];n[o]=new r.CR(Math.max(0,(s.left-t)/i),s.width/i)}return this._mergeAdjacentRanges(n)}static readHorizontalRanges(e,t,i,n,o,s){const r=e.children.length-1;if(0>r)return null;if((t=Math.min(r,Math.max(0,t)))===(n=Math.min(r,Math.max(0,n)))&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(i,s.clientRectDeltaLeft,s.clientRectScale)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let a=e.children[t].firstChild,l=e.children[n].firstChild;if(a&&l||(!a&&0===i&&t>0&&(a=e.children[t-1].firstChild,i=1073741824),!l&&0===o&&n>0&&(l=e.children[n-1].firstChild,o=1073741824)),!a||!l)return null;i=Math.min(a.textContent.length,Math.max(0,i)),o=Math.min(l.textContent.length,Math.max(0,o));const d=this._readClientRects(a,i,l,o,s.endNode);return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,s.clientRectDeltaLeft,s.clientRectScale)}}var l=i(92550),d=i(91557),h=i(92321),c=i(64141);const u=!!s.tY||!(s.IJ||n.vU||n.G6);let g=!0;class p{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(49),o=i.get(37);this.renderWhitespace="off"===o?i.get(97):"none",this.renderControlCharacters=i.get(92),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(32),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(65),this.stopRenderingLineAfter=i.get(115),this.fontLigatures=i.get(50)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class m{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,o.X)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!(0,h.c3)(this._options.themeType)&&"selection"!==this._options.renderWhitespace||(this._isMaybeInvalid=!0,0))}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=i.getViewLineRenderingData(e),s=this._options,r=l.Kp.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if((0,h.c3)(s.themeType)||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumber<e||i.startLineNumber>e)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t<n&&((0,h.c3)(s.themeType)&&r.push(new l.Kp(t,n,"inline-selected-text",0)),"selection"===this._options.renderWhitespace&&(a||(a=[]),a.push(new d.zG(t-1,n-1))))}}const p=new d.IJ(s.useMonospaceOptimizations,s.canUseHalfwidthRightwardsArrow,o.content,o.continuesWithWrappedLine,o.isBasicASCII,o.containsRTL,o.minColumn-1,o.tokens,r,o.tabSize,o.startVisibleColumn,s.spaceWidth,s.middotWidth,s.wsmiddotWidth,s.stopRenderingLineAfter,s.renderWhitespace,s.renderControlCharacters,s.fontLigatures!==c.n0.OFF,a);if(this._renderedViewLine&&this._renderedViewLine.input.equals(p))return!1;n.appendString('<div style="top:'),n.appendString(String(t)),n.appendString("px;height:"),n.appendString(String(this._options.lineHeight)),n.appendString('px;" class="'),n.appendString(m.CLASS_NAME),n.appendString('">');const _=(0,d.d1)(p,n);n.appendString("</div>");let v=null;return g&&u&&o.isBasicASCII&&s.useMonospaceOptimizations&&0===_.containsForeignElements&&(v=new f(this._renderedViewLine?this._renderedViewLine.domNode:null,p,_.characterMapping)),v||(v=b(this._renderedViewLine?this._renderedViewLine.domNode:null,p,_.characterMapping,_.containsRTL,_.containsForeignElements)),this._renderedViewLine=v,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof f}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof f?this._renderedViewLine.monospaceAssumptionsAreValid():g}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof f&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const o=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==o&&t>o+1&&i>o+1)return new r.CH(!0,[new r.CR(this.getWidth(n),0)]);-1!==o&&t>o+1&&(t=o+1),-1!==o&&i>o+1&&(i=o+1);const s=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return s&&s.length>0?new r.CH(!1,s):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}m.CLASS_NAME="view-line";class f{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let e=0;e<n;e++)this._keyColumnPixelOffsetCache[e]=-1}else this._keyColumnPixelOffsetCache=null;this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(e){if(!this.domNode||this.input.lineContent.length<300){const e=this._characterMapping.getHorizontalOffset(this._characterMapping.length);return Math.round(this._charWidth*e)}return-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,null==e||e.markDidDomLayout()),this._cachedWidth}getWidthIsFast(){return this.input.lineContent.length<300||-1!==this._cachedWidth}monospaceAssumptionsAreValid(){if(!this.domNode)return g;if(this.input.lineContent.length<300){const e=this.getWidth(null),t=this.domNode.domNode.firstChild.offsetWidth;Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),g=!1)}return g}toSlowRenderedLine(){return b(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const o=this._getColumnPixelOffset(e,t,n),s=this._getColumnPixelOffset(e,i,n);return[new r.CR(o,s-o)]}_getColumnPixelOffset(e,t,i){if(t<=300){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const n=Math.floor((t-1)/300)-1,o=300*(n+1)+1;let s=-1;if(this._keyColumnPixelOffsetCache&&(s=this._keyColumnPixelOffsetCache[n],-1===s&&(s=this._actualReadPixelOffset(e,o,i),this._keyColumnPixelOffsetCache[n]=s)),-1===s){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const r=this._characterMapping.getHorizontalOffset(o),a=this._characterMapping.getHorizontalOffset(t);return s+this._charWidth*(a-r)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),o=a.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return o&&0!==o.length?o[0].left:-1}getColumnOfNodeOffset(e,t){return C(this._characterMapping,e,t)}}class _{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,null==e||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const o=this._readPixelOffset(this.domNode,e,t,n);if(-1===o)return null;const s=this._readPixelOffset(this.domNode,e,i,n);return-1===s?null:[new r.CR(o,s-o)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,o){if(i===n){const n=this._readPixelOffset(e,t,i,o);return-1===n?null:[new r.CR(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,o)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth(n);const t=this._getReadingTarget(e);return t.firstChild?(n.markDidDomLayout(),t.firstChild.offsetWidth):0}if(null!==this._pixelOffsetCache){const o=this._pixelOffsetCache[i];if(-1!==o)return o;const s=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=s,s}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=a.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth(n);const o=this._characterMapping.getDomPosition(i),s=a.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n);if(!s||0===s.length)return-1;const r=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getHorizontalOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new r.CR(0,this.getWidth(n))];const o=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(i);return a.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,n)}getColumnOfNodeOffset(e,t){return C(this._characterMapping,e,t)}}class v extends _{_readVisibleRangesForRange(e,t,i,n,o){const s=super._readVisibleRangesForRange(e,t,i,n,o);if(!s||0===s.length||i===n||1===i&&n===this._characterMapping.length)return s;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,o);if(-1!==i){const e=s[s.length-1];e.left<i&&(e.width=i-e.left)}}return s}}const b=n.Pf?function(e,t,i,n,o){return new v(e,t,i,n,o)}:function(e,t,i,n,o){return new _(e,t,i,n,o)};function C(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return e.getColumn(new d.Nd(o,i),n)}},42095:(e,t,i)=>{i.d(t,{Gm:()=>Ps});var n=i(36357),o=i(16830);let s=class{constructor(e,t){}dispose(){}};var r,a;s.ID="editor.contrib.markerDecorations",s=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(r=1,a=n.i,function(e,t){a(e,t,r)})],s),(0,o._K)(s.ID,s,0);var l=i(93379),d=i.n(l),h=i(7795),c=i.n(h),u=i(90569),g=i.n(u),p=i(3565),m=i.n(p),f=i(19216),_=i.n(f),v=i(44589),b=i.n(v),C=i(97337),w={};w.styleTagTransform=b(),w.setAttributes=m(),w.insert=g().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=_(),d()(C.Z,w),C.Z&&C.Z.locals&&C.Z.locals;var y=i(63580),S=i(65321),L=i(17301),x=i(4669),k=i(5976),N=i(66663),D=i(16268),E=i(9488),I=i(36248),T=i(1432),M=i(54534),R=i(27231);class A{constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=A._read(e,this.key);this.migrate(t,(t=>A._read(e,t)),((t,i)=>A._write(e,t,i)))}static _read(e,t){if(void 0===e)return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const o=t.substring(0,n);return e[o]=e[o]||{},void this._write(e[o],t.substring(n+1),i)}e[t]=i}}function O(e,t){A.items.push(new A(e,t))}function P(e,t){O(e,((i,n,o)=>{if(void 0!==i)for(const[n,s]of t)if(i===n)return void o(e,s)}))}A.items=[],P("wordWrap",[[!0,"on"],[!1,"off"]]),P("lineNumbers",[[!0,"on"],[!1,"off"]]),P("cursorBlinking",[["visible","solid"]]),P("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),P("renderLineHighlight",[[!0,"line"],[!1,"none"]]),P("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),P("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),P("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),P("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),P("autoIndent",[[!1,"advanced"],[!0,"full"]]),P("matchBrackets",[[!0,"always"],[!1,"never"]]),P("renderFinalNewline",[[!0,"on"],[!1,"off"]]),P("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),O("autoClosingBrackets",((e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),void 0===t("autoClosingQuotes")&&i("autoClosingQuotes","never"),void 0===t("autoSurround")&&i("autoSurround","never"))})),O("renderIndentGuides",((e,t,i)=>{void 0!==e&&(i("renderIndentGuides",void 0),void 0===t("guides.indentation")&&i("guides.indentation",!!e))})),O("highlightActiveIndentGuide",((e,t,i)=>{void 0!==e&&(i("highlightActiveIndentGuide",void 0),void 0===t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))}));const F={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};O("suggest.filteredTypes",((e,t,i)=>{if(e&&"object"==typeof e){for(const n of Object.entries(F))!1===e[n[0]]&&void 0===t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1);i("suggest.filteredTypes",void 0)}})),O("quickSuggestions",((e,t,i)=>{if("boolean"==typeof e){const t=e?"on":"off";i("quickSuggestions",{comments:t,strings:t,other:t})}})),O("experimental.stickyScroll.enabled",((e,t,i)=>{"boolean"==typeof e&&(i("experimental.stickyScroll.enabled",void 0),void 0===t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))})),O("experimental.stickyScroll.maxLineCount",((e,t,i)=>{"number"==typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),void 0===t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))}));var B=i(37940),W=i(64141),V=i(82334),H=i(27374),z=i(31106);let K=class extends k.JT{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new x.Q5),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new x.Q5),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new W.LJ,this.isSimpleWidget=e,this._containerObserver=this._register(new M.I(i,t.dimension)),this._rawOptions=Z(t),this._validatedOptions=q.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(12)&&this._containerObserver.startObserving(),this._register(V.C.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(B.n.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(R.g.onDidChange((()=>this._recomputeOptions()))),this._register(D.Tz.onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=q.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=H.E4.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:B.n.getTabFocusMode("editorFocus"),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return q.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:U(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:D.Pf||D.vU,pixelRatio:D.Tz.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return R.g.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=Z(e);q.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=q.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};function U(){let e="";return D.G6||D.MG||(e+="no-user-select "),D.G6&&(e+="no-minimap-shadow ",e+="enable-user-select "),T.dz&&(e+="mac "),e}K=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,z.F)],K);class j{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class ${constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class q{static validateOptions(e){const t=new j;for(const i of W.Bc){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new $;for(const n of W.Bc)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&E.fS(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!q._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of W.Bc){const s=!q._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=s,s&&(n=!0)}return n?new W.Bb(i):null}static applyUpdate(e,t){let i=!1;for(const n of W.Bc)if(t.hasOwnProperty(n.name)){const o=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=o.newValue,i=i||o.didChange}return i}}function Z(e){const t=I.I8(e);return function(e){A.items.forEach((t=>t.apply(e)))}(t),t}var G=i(17122),Q=i(3860),Y=i(24314),J=i(38626),X=i(10553),ee=i(7448),te=i(29994);class ie extends k.JT{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i<n;i++){const n=e[i];switch(n.type){case 0:this.onCompositionStart(n)&&(t=!0);break;case 1:this.onCompositionEnd(n)&&(t=!0);break;case 2:this.onConfigurationChanged(n)&&(t=!0);break;case 3:this.onCursorStateChanged(n)&&(t=!0);break;case 4:this.onDecorationsChanged(n)&&(t=!0);break;case 5:this.onFlushed(n)&&(t=!0);break;case 6:this.onFocusChanged(n)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(n)&&(t=!0);break;case 8:this.onLineMappingChanged(n)&&(t=!0);break;case 9:this.onLinesChanged(n)&&(t=!0);break;case 10:this.onLinesDeleted(n)&&(t=!0);break;case 11:this.onLinesInserted(n)&&(t=!0);break;case 12:this.onRevealRangeRequest(n)&&(t=!0);break;case 13:this.onScrollChanged(n)&&(t=!0);break;case 15:this.onTokensChanged(n)&&(t=!0);break;case 14:this.onThemeChanged(n)&&(t=!0);break;case 16:this.onTokensColorsChanged(n)&&(t=!0);break;case 17:this.onZonesChanged(n)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(n)}}t&&(this._shouldRender=!0)}}class ne extends ie{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class oe{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)}static collect(e,t){const i=[];let n=0;for(;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;const o=new Uint8Array(n);for(let e=0;e<n;e++)o[e]=i[n-e-1];return o}}var se,re=i(60571),ae=i(50187),le=i(7988),de=i(47128);class he{constructor(e=null){this.hitTarget=e,this.type=0}}class ce{constructor(e,t,i){this.position=e,this.spanNode=t,this.injectedText=i,this.type=1}}!function(e){e.createFromDOMInfo=function(e,t,i){const n=e.getPositionFromDOMInfo(t,i);return n?new ce(n,t,null):new he(t)}}(se||(se={}));class ue{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}}class ge{static _deduceRage(e,t=null){return!t&&e?new Y.e(e.lineNumber,e.column,e.lineNumber,e.column):null!=t?t:null}static createUnknown(e,t,i){return{type:0,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createTextarea(e,t){return{type:1,element:e,mouseColumn:t,position:null,range:null}}static createMargin(e,t,i,n,o,s){return{type:e,element:t,mouseColumn:i,position:n,range:o,detail:s}}static createViewZone(e,t,i,n,o){return{type:e,element:t,mouseColumn:i,position:n,range:this._deduceRage(n),detail:o}}static createContentText(e,t,i,n,o){return{type:6,element:e,mouseColumn:t,position:i,range:this._deduceRage(i,n),detail:o}}static createContentEmpty(e,t,i,n){return{type:7,element:e,mouseColumn:t,position:i,range:this._deduceRage(i),detail:n}}static createContentWidget(e,t,i){return{type:9,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createScrollbar(e,t,i){return{type:11,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createOverlayWidget(e,t,i){return{type:12,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createOutsideEditor(e,t,i,n){return{type:13,element:null,mouseColumn:e,position:t,range:this._deduceRage(t),outsidePosition:i,outsideDistance:n}}static _typeToString(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}}class pe{static isTextArea(e){return 2===e.length&&3===e[0]&&6===e[1]}static isChildOfViewLines(e){return e.length>=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowGuard(e){return e.length>=1&&3===e[0]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class me{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(142),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(65),this.stickyTabStops=n.get(114),this.typicalHalfwidthCharacterWidth=n.get(49).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return me.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,o=e.viewModel.getLineCount();let s,r=null,a=null;return i.afterLineNumber!==o&&(a=new ae.L(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new ae.L(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),s=null===a?r:null===r?a:t<n?r:a,{viewZoneId:i.id,afterLineNumber:i.afterLineNumber,positionBefore:r,positionAfter:a,position:s}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const e=this._context.viewModel.getLineCount(),t=this._context.viewModel.getLineMaxColumn(e);return{range:new Y.e(e,t,e,t),isAfterLines:!0}}const t=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.viewModel.getLineMaxColumn(t);return{range:new Y.e(t,1,t,i),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,t){return me._findAttribute(e,t,this._viewHelper.viewDomNode)}static _findAttribute(e,t,i){for(;e&&e!==document.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===i)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}getPositionFromDOMInfo(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class fe{constructor(e,t,i,n){this.editorPos=t,this.pos=i,this.relativePos=n,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+this.relativePos.x-e.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<e.layoutInfo.contentLeft&&this.relativePos.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Ce._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class _e extends fe{constructor(e,t,i,n,o){super(e,t,i,n),this._ctx=e,o?(this.target=o,this.targetPath=oe.collect(o,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?le.i.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return ge.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return ge.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,t,i,n){return ge.createMargin(e,this.target,this._getMouseColumn(t),t,i,n)}fulfillViewZone(e,t,i){return ge.createViewZone(e,this.target,this._getMouseColumn(t),t,i)}fulfillContentText(e,t,i){return ge.createContentText(this.target,this._getMouseColumn(e),e,t,i)}fulfillContentEmpty(e,t){return ge.createContentEmpty(this.target,this._getMouseColumn(e),e,t)}fulfillContentWidget(e){return ge.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return ge.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return ge.createOverlayWidget(this.target,this._getMouseColumn(),e)}withTarget(e){return new _e(this._ctx,this.editorPos,this.pos,this.relativePos,e)}}const ve={isAfterLines:!0};function be(e){return{isAfterLines:!1,horizontalDistanceToText:e}}class Ce{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=oe.collect(t,this._viewHelper.viewDomNode);return!(!pe.isChildOfContentWidgets(i)&&!pe.isChildOfOverflowingContentWidgets(i)&&!pe.isChildOfOverlayWidgets(i))}createMouseTarget(e,t,i,n,o){const s=new me(this._context,this._viewHelper,e),r=new _e(s,t,i,n,o);try{const e=Ce._createMouseTarget(s,r,!1);if(6===e.type&&s.stickyTabStops&&null!==e.position){const t=Ce._snapToSoftTabBoundary(e.position,s.viewModel),i=Y.e.fromPositions(t,t).plusRange(e.range);return r.fulfillContentText(t,i,e.detail)}return e}catch(e){return r.fulfillUnknown()}}static _createMouseTarget(e,t,i){if(null===t.target){if(i)return t.fulfillUnknown();const n=Ce._doHitTest(e,t);return 1===n.type?Ce.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}const n=t;let o=null;return pe.isChildOfOverflowGuard(t.targetPath)||pe.isChildOfOverflowingContentWidgets(t.targetPath)||(o=o||t.fulfillUnknown()),o=o||Ce._hitTestContentWidget(e,n),o=o||Ce._hitTestOverlayWidget(e,n),o=o||Ce._hitTestMinimap(e,n),o=o||Ce._hitTestScrollbarSlider(e,n),o=o||Ce._hitTestViewZone(e,n),o=o||Ce._hitTestMargin(e,n),o=o||Ce._hitTestViewCursor(e,n),o=o||Ce._hitTestTextArea(e,n),o=o||Ce._hitTestViewLines(e,n,i),o=o||Ce._hitTestScrollbar(e,n),o||t.fulfillUnknown()}static _hitTestContentWidget(e,t){if(pe.isChildOfContentWidgets(t.targetPath)||pe.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillContentWidget(i):t.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,t){if(pe.isChildOfOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillOverlayWidget(i):t.fulfillUnknown()}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const e of i)if(t.target===e.domNode)return t.fulfillContentText(e.position,null,{mightBeForeignElement:!1,injectedText:null})}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,o=t.mouseVerticalOffset;for(const s of i){if(n<s.contentLeft)continue;if(n>s.contentLeft+s.width)continue;const i=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(i<=o&&o<=i+s.height)return t.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return pe.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.relativePos.x);const s={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,s):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,s):(o-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,s)))}return null}static _hitTestViewLines(e,t,i){if(!pe.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new ae.L(1,1),ve);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new ae.L(i,n),ve)}if(i){if(pe.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),o=be(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new ae.L(i,1),o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=be(t.mouseContentHorizontalOffset-n),s=new ae.L(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(s,o)}}return t.fulfillUnknown()}const n=Ce._doHitTest(e,t);return 1===n.type?Ce.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(pe.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ae.L(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(pe.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ae.L(i,n))}}return null}static _hitTestScrollbar(e,t){if(pe.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ae.L(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(142),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return Ce._getMouseColumn(n,t.get(49).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,o){const s=n.lineNumber,r=n.column,a=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>a){const e=be(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const l=e.visibleRangeForPosition(s,r);if(!l)return t.fulfillUnknown(n);const d=l.left;if(Math.abs(t.mouseContentHorizontalOffset-d)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!o,injectedText:o});const h=[];if(h.push({offset:l.left,column:r}),r>1){const t=e.visibleRangeForPosition(s,r-1);t&&h.push({offset:t.left,column:r-1})}if(r<e.viewModel.getLineMaxColumn(s)){const t=e.visibleRangeForPosition(s,r+1);t&&h.push({offset:t.left,column:r+1})}h.sort(((e,t)=>e.offset-t.offset));const c=t.pos.toClientCoordinates(),u=i.getBoundingClientRect(),g=u.left<=c.clientX&&c.clientX<=u.right;let p=null;for(let e=1;e<h.length;e++){const i=h[e-1],o=h[e];if(i.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=o.offset){p=new Y.e(s,i.column,s,o.column),n=Math.abs(i.offset-t.mouseContentHorizontalOffset)<Math.abs(o.offset-t.mouseContentHorizontalOffset)?new ae.L(s,i.column):new ae.L(s,o.column);break}}return t.fulfillContentText(n,p,{mightBeForeignElement:!g||!!o,injectedText:o})}static _doHitTestWithCaretRangeFromPoint(e,t){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.getVerticalOffsetForLineNumber(i),o=n+e.lineHeight;if(!(i===e.viewModel.getLineCount()&&t.mouseVerticalOffset>o)){const i=Math.floor((n+o)/2);let s=t.pos.y+(i-t.mouseVerticalOffset);s<=t.editorPos.y&&(s=t.editorPos.y+1),s>=t.editorPos.y+t.editorPos.height&&(s=t.editorPos.y+t.editorPos.height-1);const r=new te.YN(t.pos.x,s),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=S.Ay(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild;)o=o.lastChild;const e=o.getBoundingClientRect(),i=`${window.getComputedStyle(o,null).getPropertyValue("font-style")} ${window.getComputedStyle(o,null).getPropertyValue("font-variant")} ${window.getComputedStyle(o,null).getPropertyValue("font-weight")} ${window.getComputedStyle(o,null).getPropertyValue("font-size")}/${window.getComputedStyle(o,null).getPropertyValue("line-height")} ${window.getComputedStyle(o,null).getPropertyValue("font-family")}`,s=o.innerText;let r,a=e.left,l=0;if(t>e.left+e.width)l=s.length;else{const e=we.getInstance();for(let n=0;n<s.length+1;n++){if(r=e.getCharWidth(s.charAt(n),i)/2,a+=r,t<a){l=n;break}a+=r}}n.setStart(o.firstChild,l),n.setEnd(o.firstChild,l)}return n}(i,t.clientX,t.clientY):i.caretRangeFromPoint(t.clientX,t.clientY):document.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return new he;const o=n.startContainer;if(o.nodeType===o.TEXT_NODE){const t=o.parentNode,i=t?t.parentNode:null,s=i?i.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===re.Nt.CLASS_NAME?se.createFromDOMInfo(e,t,n.startOffset):new he(o.parentNode)}if(o.nodeType===o.ELEMENT_NODE){const t=o.parentNode,i=t?t.parentNode:null;return(i&&i.nodeType===i.ELEMENT_NODE?i.className:null)===re.Nt.CLASS_NAME?se.createFromDOMInfo(e,o,o.textContent.length):new he(o)}return new he}static _doHitTestWithCaretPositionFromPoint(e,t){const i=document.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const t=i.offsetNode.parentNode,n=t?t.parentNode:null,o=n?n.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===re.Nt.CLASS_NAME?se.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new he(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const t=i.offsetNode.parentNode,n=t&&t.nodeType===t.ELEMENT_NODE?t.className:null,o=t?t.parentNode:null,s=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(n===re.Nt.CLASS_NAME){const t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t)return se.createFromDOMInfo(e,t,0)}else if(s===re.Nt.CLASS_NAME)return se.createFromDOMInfo(e,i.offsetNode,0)}return new he(i.offsetNode)}static _snapToSoftTabBoundary(e,t){const i=t.getLineContent(e.lineNumber),{tabSize:n}=t.model.getOptions(),o=de.l.atomicPosition(i,e.column-1,n,2);return-1!==o?new ae.L(e.lineNumber,o+1):e}static _doHitTest(e,t){let i=new he;if("function"==typeof document.caretRangeFromPoint?i=this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates())),1===i.type){const t=e.viewModel.getInjectedTextAt(i.position),n=e.viewModel.normalizePosition(i.position,2);!t&&n.equals(i.position)||(i=new ce(n,i.spanNode,t))}return i}}class we{static getInstance(){return we._INSTANCE||(we._INSTANCE=new we),we._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,t){const i=e+t;if(this._cache[i])return this._cache[i];const n=this._canvas.getContext("2d");n.font=t;const o=n.measureText(e).width;return this._cache[i]=o,o}}we._INSTANCE=null;var ye=i(64117);class Se extends ie{constructor(e,t,i){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new Ce(this._context,i),this._mouseDownOperation=this._register(new Le(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,((e,t)=>this._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(142).height;const n=new te.N5(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,(e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=S.nm(document,"mousemove",(e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new te.gy(e,!1,this.viewHelper.viewDomNode))})))}))),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));let o=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>{o=t}))),this._register(S.nm(this.viewHelper.viewDomNode,S.tw.POINTER_UP,(e=>{this._mouseDownOperation.onPointerUp()}))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e,o)))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=ye.Io.INSTANCE;let t=0,i=V.C.getZoomLevel(),n=!1,o=0;function s(e){return T.dz?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(S.nm(this.viewHelper.viewDomNode,S.tw.MOUSE_WHEEL,(r=>{if(this.viewController.emitMouseWheel(r),!this._context.configuration.options.get(74))return;const a=new ee.q(r);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(s(r)){const e=V.C.getZoomLevel(),t=a.deltaY>0?1:-1;V.C.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=V.C.getZoomLevel(),n=s(r),o=0),t=Date.now(),o+=a.deltaY,n&&(V.C.setZoomLevel(i+o/5),a.preventDefault(),a.stopPropagation())}),{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(142)){const e=this._context.configuration.options.get(142).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new te.rU(e,t).toPageCoordinates(),n=(0,te.kG)(this.viewHelper.viewDomNode);if(i.y<n.y||i.y>n.y+n.height||i.x<n.x||i.x>n.x+n.width)return null;const o=(0,te.Pp)(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,o,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=S.Ay(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),this._mouseDownOperation.isActive()||e.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=(new Date).getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e,t){const i=this._createMouseTarget(e,!0),n=6===i.type||7===i.type,o=2===i.type||3===i.type||4===i.type,s=3===i.type,r=this._context.configuration.options.get(107),a=8===i.type||5===i.type,l=9===i.type;let d=e.leftButton||e.middleButton;T.dz&&e.leftButton&&e.ctrlKey&&(d=!1);const h=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(d&&(n||s&&r))h(),this._mouseDownOperation.start(i.type,e,t);else if(o)e.preventDefault();else if(a){const n=i.detail;d&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(h(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(h(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class Le extends k.JT{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=o,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new te.AL(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new xe(this._context,this._viewHelper,this._mouseTargetFactory,((e,t,i)=>this._dispatchMouse(e,t,i)))),this._mouseState=new Ne,this._currentSelection=new Q.Y(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13!==t.type||"above"!==t.outsidePosition&&"below"!==t.outsidePosition?(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)):this._topBottomDragScrolling.start(t,e))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const o=this._context.configuration.options;if(!o.get(89)&&o.get(34)&&!o.get(21)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!1);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posy<t.y){const i=t.y-e.posy,s=Math.max(n.getCurrentScrollTop()-i,0),r=me.getZoneAtCoord(this._context,s);if(r){const e=this._helpPositionJumpOverViewZone(r);if(e)return ge.createOutsideEditor(o,e,"above",i)}const a=n.getLineNumberAtVerticalOffset(s);return ge.createOutsideEditor(o,new ae.L(a,1),"above",i)}if(e.posy>t.y+t.height){const s=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=me.getZoneAtCoord(this._context,r);if(a){const e=this._helpPositionJumpOverViewZone(a);if(e)return ge.createOutsideEditor(o,e,"below",s)}const l=n.getLineNumberAtVerticalOffset(r);return ge.createOutsideEditor(o,new ae.L(l,i.getLineMaxColumn(l)),"below",s)}const s=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posx<t.x){const i=t.x-e.posx;return ge.createOutsideEditor(o,new ae.L(s,1),"left",i)}if(e.posx>t.x+t.width){const n=e.posx-t.x-t.width;return ge.createOutsideEditor(o,new ae.L(s,i.getLineMaxColumn(s)),"right",n)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return ge.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new ae.L(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class xe extends k.JT{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new ke(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class ke extends k.JT{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=o,this._mouseEvent=s,this._lastTime=Date.now(),this._animationFrameDisposable=S.jL((()=>this._execute()))}dispose(){this._animationFrameDisposable.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(65),t=this._context.configuration.options.get(142).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(65),t=this._getScrollSpeed()*(this._tick()/1e3)*e,i="above"===this._position.outsidePosition?-t:t;this._context.viewModel.viewLayout.deltaScrollNow(0,i),this._viewHelper.renderNow();const n=this._context.viewLayout.getLinesViewportData(),o="above"===this._position.outsidePosition?n.startLineNumber:n.endLineNumber;let s;{const e=(0,te.kG)(this._viewHelper.viewDomNode),t=this._context.configuration.options.get(142).horizontalScrollbarHeight,i=new te.YN(this._mouseEvent.pos.x,e.y+e.height-t-.1),n=(0,te.Pp)(this._viewHelper.viewDomNode,e,i);s=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),e,i,n,null)}s.position&&s.position.lineNumber===o||(s="above"===this._position.outsidePosition?ge.createOutsideEditor(this._position.mouseColumn,new ae.L(o,1),"above",this._position.outsideDistance):ge.createOutsideEditor(this._position.mouseColumn,new ae.L(o,this._context.viewModel.getLineMaxColumn(o)),"below",this._position.outsideDistance)),this._dispatchMouse(s,!0,2),this._animationFrameDisposable=S.jL((()=>this._execute()))}}class Ne{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>Ne.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}Ne.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var De=i(10161),Ee=i(35715);class Ie extends Se{constructor(e,t,i){super(e,t,i),this._register(X.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(S.nm(this.viewHelper.linesContentDomNode,X.t.Tap,(e=>this.onTap(e)))),this._register(S.nm(this.viewHelper.linesContentDomNode,X.t.Change,(e=>this.onChange(e)))),this._register(S.nm(this.viewHelper.linesContentDomNode,X.t.Contextmenu,(e=>this._onContextMenu(new te.gy(e,!1,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(S.nm(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new te.tC(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>this._onMouseDown(e,t))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new te.gy(e,!1,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===t.type&&null!==t.detail.injectedText})}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class Te extends Se{constructor(e,t,i){super(e,t,i),this._register(X.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(S.nm(this.viewHelper.linesContentDomNode,X.t.Tap,(e=>this.onTap(e)))),this._register(S.nm(this.viewHelper.linesContentDomNode,X.t.Change,(e=>this.onChange(e)))),this._register(S.nm(this.viewHelper.linesContentDomNode,X.t.Contextmenu,(e=>this._onContextMenu(new te.gy(e,!1,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new te.gy(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(Ee.pd.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class Me extends k.JT{constructor(e,t,i){super(),T.gn&&De.D.pointerEvents?this.handler=this._register(new Ie(e,t,i)):window.TouchEvent?this.handler=this._register(new Te(e,t,i)):this.handler=this._register(new Se(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Re=i(40504),Ae={};Ae.styleTagTransform=b(),Ae.setAttributes=m(),Ae.insert=g().bind(null,"head"),Ae.domAPI=c(),Ae.insertStyleElement=_(),d()(Re.Z,Ae),Re.Z&&Re.Z.locals&&Re.Z.locals;var Oe=i(97295),Pe=i(52136),Fe=i(15887),Be=i(6184),We={};We.styleTagTransform=b(),We.setAttributes=m(),We.insert=g().bind(null,"head"),We.domAPI=c(),We.insertStyleElement=_(),d()(Be.Z,We),Be.Z&&Be.Z.locals&&Be.Z.locals;class Ve extends ie{}var He=i(97781),ze=i(8625);class Ke extends Ve{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ae.L(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(65);const t=e.get(66);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(93);const i=e.get(142);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ae.L(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?'<span class="relative-current-line-number">'+i+"</span>":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=T.IJ?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._context.viewModel.getLineCount(),s=[];for(let e=i;e<=n;e++){const n=e-i,r=this._getLineRenderLineNumber(e);if(!r){s[n]="";continue}let a="";if(e===o&&0===this._context.viewModel.getLineLength(e)){if("off"===this._renderFinalNewline){s[n]="";continue}"dimmed"===this._renderFinalNewline&&(a=" dimmed-line-number")}e===this._activeLineNumber&&(a=" active-line-number"),s[n]=`<div class="${Ke.CLASS_NAME}${t}${a}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${r}</div>`}this._renderResult=s}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Ke.CLASS_NAME="line-numbers",(0,He.Ic)(((e,t)=>{const i=e.getColor(ze.hw),n=e.getColor(ze.Bj);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}));var Ue=i(11596),je={};je.styleTagTransform=b(),je.setAttributes=m(),je.insert=g().bind(null,"head"),je.domAPI=c(),je.insertStyleElement=_(),d()(Ue.Z,je),Ue.Z&&Ue.Z.locals&&Ue.Z.locals;class $e extends ne{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(142);this._canUseLayerHinting=!t.get(31),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,J.X)(document.createElement("div")),this._domNode.setClassName($e.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,J.X)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName($e.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(142);return this._canUseLayerHinting=!t.get(31),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}$e.CLASS_NAME="glyph-margin",$e.OUTER_CLASS_NAME="margin";var qe=i(24929),Ze=i(31185),Ge=i(96887),Qe=i(41264),Ye=i(77173),Je=i(91847);class Xe{constructor(e,t,i,n,o){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=o,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new ae.L(this.modelLineNumber,this.distanceToModelLineStart+1),i=new ae.L(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(this._previousPresentation=e||{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const et=D.vU;let tt=class extends ne{constructor(e,t,i,n){super(e),this._keybindingService=n,this._primaryCursorPosition=new ae.L(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const o=this._context.configuration.options,s=o.get(142);this._setAccessibilityOptions(o),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._contentHeight=s.height,this._fontInfo=o.get(49),this._lineHeight=o.get(65),this._emptySelectionClipboard=o.get(36),this._copyWithSyntaxHighlighting=o.get(24),this._visibleTextArea=null,this._selections=[new Q.Y(1,1,1,1)],this._modelSelections=[new Q.Y(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,J.X)(document.createElement("textarea")),oe.write(this.textArea,6),this.textArea.setClassName(`inputarea ${Ze.S}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:r}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=r*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(o)),this.textArea.setAttribute("aria-required",o.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(o.get(122))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",y.NC("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",o.get(89)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,J.X)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const a={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t),getValueLengthInRange:(e,t)=>this._context.viewModel.getValueLengthInRange(e,t),modifyPosition:(e,t)=>this._context.viewModel.modifyPosition(e,t)},l={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,T.ED),t=this._context.viewModel.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,o=Array.isArray(e)?e.join(t):e;let s,r=null;if(Ee.RA.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&o.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,r=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:o,html:s,mode:r}},getScreenReaderContent:()=>{if(1===this._accessibilitySupport){const e=this._selections[0];if(T.dz&&e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new Fe.un(i,i.length,i.length,Y.e.fromPositions(t),0)}const t=500;if(T.dz&&!e.isEmpty()&&a.getValueLengthInRange(e,0)<t){const t=a.getValueInRange(e,0);return new Fe.un(t,0,t.length,e,0)}if(D.G6&&!e.isEmpty()){const e="vscode-placeholder";return new Fe.un(e,0,e.length,null,void 0)}return Fe.un.EMPTY}if(D.Dt){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new Fe.un(i,n,n,Y.e.fromPositions(t),0)}return Fe.un.EMPTY}return Fe.ee.fromEditorSelection(a,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},d=this._register(new Ee.Tj(this.textArea.domNode));this._textAreaInput=this._register(new Ee.Fz(l,d,T.OS,{isAndroid:D.Dt,isChrome:D.i7,isFirefox:D.vU,isSafari:D.G6})),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?(Fe.al&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):(Fe.al&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:o}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),o=e.substring(n+1),s=o.lastIndexOf("\t"),r=o.length-s-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),d=a.column-1-l,h=o.substring(0,o.length-l),{tabSize:c}=this._context.viewModel.model.getOptions(),u=function(e,t,i){if(0===e.length)return 0;const n=document.createElement("div");n.style.position="absolute",n.style.top="-50000px",n.style.width="50000px";const o=document.createElement("span");(0,Pe.N)(o,t),o.style.whiteSpace="pre",o.style.tabSize=i*t.spaceWidth+"px",o.append(e),n.appendChild(o),document.body.appendChild(n);const s=o.offsetWidth;return document.body.removeChild(n),s}(h,this._fontInfo,c);return{distanceToModelLineStart:d,widthOfHiddenTextBefore:u}})(),{distanceToModelLineEnd:s}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),o=-1===n?e:e.substring(0,n),s=o.indexOf("\t"),r=-1===s?o.length:o.length-s-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,r);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,Y.e.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new Xe(this._context,i.startLineNumber,n,o,s),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Ze.S} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${Ze.S}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.viewModel.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.viewModel.setHasFocus(!1)}))),this._register(Ye.F.onDidChange((()=>{this._ensureReadOnlyAttribute()})))}writeScreenReaderContent(e){this._textAreaInput.writeScreenReaderContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,qe.u)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,o=e.column,s=!0,r=e.column,a=0;for(;a<50&&(n||s);){if(n&&o<=1&&(n=!1),n){const e=t.charCodeAt(o-2);0!==i.get(e)?n=!1:o--}if(s&&r>t.length&&(s=!1),s){const e=t.charCodeAt(r-1);0!==i.get(e)?s=!1:r++}a++}return[t.substring(o-1,r-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,qe.u)(this._context.configuration.options.get(128));let n=e.column,o=0;for(;n>1;){const s=t.charCodeAt(n-2);if(0!==i.get(s)||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Oe.ZG(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){var t,i,n;if(1===e.get(2)){const e=null===(t=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))||void 0===t?void 0:t.getAriaLabel(),o=null===(i=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))||void 0===i?void 0:i.getAriaLabel(),s=null===(n=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))||void 0===n?void 0:n.getAriaLabel(),r=y.NC("accessibilityModeOff","The editor is not accessible at this time.");return e?y.NC("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",r,e):o?y.NC("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",r,o):s?y.NC("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",r,s):r}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===W.BH.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(142).wrappingColumn;if(-1!==i&&1!==this._accessibilitySupport){const t=e.get(49);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(i*t.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=et?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(142);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(49),this._lineHeight=t.get(65),this._emptySelectionClipboard=t.get(36),this._copyWithSyntaxHighlighting=t.get(24),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=n*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(122))),(e.hasChanged(33)||e.hasChanged(89))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!Ye.F.enabled||e.get(33)&&e.get(89)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new ae.L(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),null===(t=this._visibleTextArea)||void 0===t||t.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const o=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,s=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(a<this._contentLeft){const e=this._contentLeft-a;a+=e,r+=e,l-=e}l>this._contentWidth&&(l=this._contentWidth);const d=this._context.viewModel.getViewLineData(i.lineNumber),h=d.tokens.findTokenIndexAtOffset(i.column-1),c=h===d.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(c?d.tokens.getPresentation(h):null);this.textArea.domNode.scrollTop=s*this._lineHeight,this.textArea.domNode.scrollLeft=r,this._doRender({lastRenderPosition:null,top:o,left:a,width:l,height:this._lineHeight,useCover:!1,color:(Ge.RW.getColorMap()||[])[u.foreground],italic:u.italic,bold:u.bold,underline:u.underline,strikethrough:u.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(t<this._contentLeft||t>this._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const i=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(i<0||i>this._contentHeight)this._renderAtTopLeft();else if(T.dz){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const n=null!==(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)&&void 0!==e?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:et?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;for(;i=e.indexOf("\n",i+1),-1!==i;)t++;return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:et?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;(0,Pe.N)(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?Qe.Il.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(56)?i.setClassName("monaco-editor-background textAreaCover "+$e.OUTER_CLASS_NAME):0!==n.get(66).renderType?i.setClassName("monaco-editor-background textAreaCover "+Ke.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};tt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,Je.d)],tt);var it=i(69317);class nt{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){it.Ox.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new ae.L(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(76)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(76)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const t=this.configuration.options,i=T.IJ&&t.get(105),n=t.get(21);e.middleButton&&!i?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position,e.revealType):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount>=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){it.Ox.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){it.Ox.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),it.Ox.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),it.Ox.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){it.Ox.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){it.Ox.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){it.Ox.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){it.Ox.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){it.Ox.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){it.Ox.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){it.Ox.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){it.Ox.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){it.Ox.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class ot{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;null===(t=this.onKeyDown)||void 0===t||t.call(this,e)}emitKeyUp(e){var t;null===(t=this.onKeyUp)||void 0===t||t.call(this,e)}emitContextMenu(e){var t;null===(t=this.onContextMenu)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;null===(t=this.onMouseMove)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;null===(t=this.onMouseLeave)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;null===(t=this.onMouseDown)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;null===(t=this.onMouseUp)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;null===(t=this.onMouseDrag)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;null===(t=this.onMouseDrop)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;null===(e=this.onMouseDropCanceled)||void 0===e||e.call(this)}emitMouseWheel(e){var t;null===(t=this.onMouseWheel)||void 0===t||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return ot.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i=Object.assign({},e);return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),5!==i.type&&8!==i.type||(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new ae.L(e.afterLineNumber,1)).lineNumber}}}var st=i(77514),rt=i(50072);class at{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new L.he("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(t<i){const i=t-e+1;return this._rendLineNumberStart-=i,null}if(e>n)return null;let o=0,s=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===s?(o=i,s=1):s++)}if(e<i){let n=0;n=t<i?t-e+1:i-e,this._rendLineNumberStart-=n}return this._lines.splice(o,s)}onLinesChanged(e,t){const i=e+t-1;if(0===this.getCount())return!1;const n=this.getStartLineNumber(),o=this.getEndLineNumber();let s=!1;for(let t=e;t<=i;t++)t>=n&&t<=o&&(this._lines[t-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);const s=[];for(let e=0;e<i;e++)s[e]=this._createLine();const r=e-this._rendLineNumberStart,a=this._lines.slice(0,r),l=this._lines.slice(r,this._lines.length-i),d=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=a.concat(s).concat(l),d}onTokensChanged(e){if(0===this.getCount())return!1;const t=this.getStartLineNumber(),i=this.getEndLineNumber();let n=!1;for(let o=0,s=e.length;o<s;o++){const s=e[o];if(s.toLineNumber<t||s.fromLineNumber>i)continue;const r=Math.max(t,s.fromLineNumber),a=Math.min(i,s.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class lt{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new at((()=>this._host.createVisibleLine()))}_createDomNode(){const e=(0,J.X)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(142)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onLinesInserted(e){const t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){const t=this._linesCollection._get(),i=new dt(this.domNode.domNode,this._host,e),n={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},o=i.render(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(o.rendLineNumberStart,o.lines)}}class dt{constructor(e,t,i){this.domNode=e,this.host=t,this.viewportData=i}render(e,t,i,n){const o={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(o.rendLineNumberStart+o.linesLength-1<t||i<o.rendLineNumberStart){o.rendLineNumberStart=t,o.linesLength=i-t+1,o.lines=[];for(let e=t;e<=i;e++)o.lines[e-t]=this.host.createVisibleLine();return this._finishRendering(o,!0,n),o}if(this._renderUntouchedLines(o,Math.max(t-o.rendLineNumberStart,0),Math.min(i-o.rendLineNumberStart,o.linesLength-1),n,t),o.rendLineNumberStart>t){const e=t,s=Math.min(i,o.rendLineNumberStart-1);e<=s&&(this._insertLinesBefore(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart<t){const e=Math.min(o.linesLength,t-o.rendLineNumberStart);e>0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1<i){const e=o.rendLineNumberStart+o.linesLength,s=i;e<=s&&(this._insertLinesAfter(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart+o.linesLength-1>i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1-e+1;t>0&&(this._removeLinesAfter(o,t),o.linesLength-=t)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const s=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){const t=s+e;r[e].layoutLine(t,n[t-o])}}_insertLinesBefore(e,t,i,n,o){const s=[];let r=0;for(let e=t;e<=i;e++)s[r++]=this.host.createVisibleLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i<t;i++){const t=e.lines[i].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(0,t)}_insertLinesAfter(e,t,i,n,o){const s=[];let r=0;for(let e=t;e<=i;e++)s[r++]=this.host.createVisibleLine();e.lines=e.lines.concat(s)}_removeLinesAfter(e,t){const i=e.linesLength-t;for(let n=0;n<t;n++){const t=e.lines[i+n].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(i,t)}_finishRenderingNewLines(e,t,i,n){dt._ttPolicy&&(i=dt._ttPolicy.createHTML(i));const o=this.domNode.lastChild;t||!o?this.domNode.innerHTML=i:o.insertAdjacentHTML("afterend",i);let s=this.domNode.lastChild;for(let t=e.linesLength-1;t>=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");dt._ttPolicy&&(t=dt._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;t<e.linesLength;t++){const o=e.lines[t];if(i[t]){const e=n.firstChild,t=o.getDomNode();t.parentNode.replaceChild(e,t),o.setDomNode(e)}}}_finishRendering(e,t,i){const n=dt._sb,o=e.linesLength,s=e.lines,r=e.rendLineNumberStart,a=[];{n.reset();let l=!1;for(let e=0;e<o;e++){const t=s[e];a[e]=!1,t.getDomNode()||t.renderLine(e+r,i[e],this.viewportData,n)&&(a[e]=!0,l=!0)}l&&this._finishRenderingNewLines(e,t,n.build(),a)}{n.reset();let t=!1;const l=[];for(let e=0;e<o;e++){const o=s[e];(l[e]=!1,a[e])||o.renderLine(e+r,i[e],this.viewportData,n)&&(l[e]=!0,t=!0)}t&&this._finishRenderingInvalidLines(e,n.build(),l)}}}dt._ttPolicy=(0,st.Z)("editorViewLayer",{createHTML:e=>e}),dt._sb=new rt.HT(1e5);class ht extends ne{constructor(e){super(e),this._visibleLines=new lt(this),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options.get(49);(0,Pe.N)(this.domNode,t),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;e<t;e++)if(this._dynamicOverlays[e].shouldRender())return!0;return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++)this._dynamicOverlays[e].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new ct(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onConfigurationChanged(e);const n=this._context.configuration.options.get(49);return(0,Pe.N)(this.domNode,n),!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){const t=this._dynamicOverlays.filter((e=>e.shouldRender()));for(let i=0,n=t.length;i<n;i++){const n=t[i];n.prepareRender(e),n.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class ct{constructor(e,t){this._configuration=e,this._lineHeight=this._configuration.options.get(65),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=(0,J.X)(e)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(e){this._lineHeight=this._configuration.options.get(65)}renderLine(e,t,i,n){let o="";for(let t=0,n=this._dynamicOverlays.length;t<n;t++)o+=this._dynamicOverlays[t].render(i.startLineNumber,e);return this._renderedContent!==o&&(this._renderedContent=o,n.appendString('<div style="position:absolute;top:'),n.appendString(String(t)),n.appendString("px;width:100%;height:"),n.appendString(String(this._lineHeight)),n.appendString('px;">'),n.appendString(o),n.appendString("</div>"),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class ut extends ht{constructor(e){super(e);const t=this._context.configuration.options.get(142);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(142);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class gt extends ht{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(142);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,Pe.N)(this.domNode,t.get(49))}onConfigurationChanged(e){const t=this._context.configuration.options;(0,Pe.N)(this.domNode,t.get(49));const i=t.get(142);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class pt extends ne{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=(0,J.X)(document.createElement("div")),oe.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,J.X)(document.createElement("div")),oe.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){const e=Object.keys(this._widgets);for(const t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){const t=new mt(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n,o){this._widgets[e.getId()].setPosition(t,i,n,o),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class mt{constructor(e,t,i){this._primaryAnchor=new ft(null,null),this._secondaryAnchor=new ft(null,null),this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=(0,J.X)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,o=n.get(142);this._fixedOverflowWidgets=n.get(41),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=n.get(65),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(65),e.hasChanged(142)){const e=t.get(142);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,i){function n(e,t,i){if(!e)return new ft(null,null);const n=t.model.validatePosition(e);if(t.coordinatesConverter.modelPositionIsVisible(n)){const o=t.coordinatesConverter.convertModelPositionToViewPosition(n,null!=i?i:void 0);return new ft(e,o)}return new ft(e,null)}this._affinity=e,this._primaryAnchor=n(t,this._context.viewModel,this._affinity),this._secondaryAnchor=n(i,this._context.viewModel,this._affinity)}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(e,t,i,n){this._setPosition(n,e,t),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const o=e.top,s=o,r=e.top+e.height,a=o-i,l=s>=i,d=r,h=n.viewportHeight-r>=i;let c=e.left;return c+t>n.scrollLeft+n.viewportWidth&&(c=n.scrollLeft+n.viewportWidth-t),c<n.scrollLeft&&(c=n.scrollLeft),{fitsAbove:l,aboveTop:a,fitsBelow:h,belowTop:d,left:c}}_layoutHorizontalSegmentInPage(e,t,i,n){const o=Math.max(15,t.left-n),s=Math.min(t.left+t.width+n,e.width-15);let r=t.left+i-window.scrollX;if(r+n>s){const e=r-(s-n);r-=e,i-=e}if(r<o){const e=r-o;r-=e,i-=e}return[i,r]}_layoutBoxInPage(e,t,i,n){const o=e.top-i,s=e.top+e.height,r=S.i(this._viewDomNode.domNode),a=r.top+o-window.scrollY,l=r.top+s-window.scrollY,d=S.D6(document.body),[h,c]=this._layoutHorizontalSegmentInPage(d,r,e.left-n.scrollLeft+this._contentLeft,t),u=a>=22,g=l+i<=d.height-22;return this._fixedOverflowWidgets?{fitsAbove:u,aboveTop:Math.max(a,22),fitsBelow:g,belowTop:l,left:c}:{fitsAbove:u,aboveTop:o,fitsBelow:g,belowTop:s,left:h}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new _t(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,i;return{primary:n(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),secondary:n((null===(t=this._secondaryAnchor.viewPosition)||void 0===t?void 0:t.lineNumber)===(null===(i=this._primaryAnchor.viewPosition)||void 0===i?void 0:i.lineNumber)?this._secondaryAnchor.viewPosition:null,this._affinity,this._lineHeight)};function n(t,i,n){if(!t)return null;const o=e.visibleRangeForPosition(t);if(!o)return null;const s=1===t.column&&3===i?0:o.left,r=e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop;return new vt(r,s,n)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(49);let o=t.left;return o=o<e.left?Math.max(o,e.left-i+n.typicalFullwidthCharacterWidth):Math.min(o,e.left+i-n.typicalFullwidthCharacterWidth),new vt(e.top,o,e.height)}_prepareRenderWidget(e){if(!this._preference||0===this._preference.length)return null;const{primary:t,secondary:i}=this._getAnchorsCoordinates(e);if(!t)return null;if(-1===this._cachedDomNodeOffsetWidth||-1===this._cachedDomNodeOffsetHeight){let e=null;if("function"==typeof this._actual.beforeRender&&(e=bt(this._actual.beforeRender,this._actual)),e)this._cachedDomNodeOffsetWidth=e.width,this._cachedDomNodeOffsetHeight=e.height;else{const e=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(e.width),this._cachedDomNodeOffsetHeight=Math.round(e.height)}}const n=this._reduceAnchorCoordinates(t,i,this._cachedDomNodeOffsetWidth);let o;o=this.allowEditorOverflow?this._layoutBoxInPage(n,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e):this._layoutBoxInViewport(n,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e);for(let e=1;e<=2;e++)for(const t of this._preference)if(1===t){if(!o)return null;if(2===e||o.fitsAbove)return{coordinate:new _t(o.aboveTop,o.left),position:1}}else{if(2!==t)return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new _t(n.top,n.left)),position:0}:{coordinate:new _t(n.top,n.left),position:0};if(!o)return null;if(2===e||o.fitsBelow)return{coordinate:new _t(o.belowTop,o.left),position:2}}return null}onBeforeRender(e){this._primaryAnchor.viewPosition&&this._preference&&(this._primaryAnchor.viewPosition.lineNumber<e.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&bt(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&bt(this._actual.afterRender,this._actual,this._renderData.position)}}class ft{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class _t{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class vt{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function bt(e,t,...i){try{return e.call(t,...i)}catch(e){return null}}var Ct=i(91260),wt={};wt.styleTagTransform=b(),wt.setAttributes=m(),wt.insert=g().bind(null,"head"),wt.domAPI=c(),wt.insertStyleElement=_(),d()(Ct.Z,wt),Ct.Z&&Ct.Z.locals&&Ct.Z.locals;var yt=i(92321);class St extends Ve{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(142);this._lineHeight=t.get(65),this._renderLineHighlight=t.get(94),this._renderLineHighlightOnlyWhenFocus=t.get(95),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Q.Y(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map((e=>e.positionLineNumber));t.sort(((e,t)=>e-t)),E.fS(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(142);return this._lineHeight=t.get(65),this._renderLineHighlight=t.get(94),this._renderLineHighlightOnlyWhenFocus=t.get(95),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let s=0;const r=[];for(let e=i;e<=n;e++){const n=e-i;for(;s<o&&this._cursorLineNumbers[s]<e;)s++;s<o&&this._cursorLineNumbers[s]===e?r[n]=t:r[n]=""}this._renderData=r}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class Lt extends St{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class xt extends St{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,He.Ic)(((e,t)=>{const i=e.getColor(ze.Kh);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(ze.Mm)){const i=e.getColor(ze.Mm);i&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),(0,yt.c3)(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));var kt=i(71329),Nt={};Nt.styleTagTransform=b(),Nt.setAttributes=m(),Nt.insert=g().bind(null,"head"),Nt.domAPI=c(),Nt.insertStyleElement=_(),d()(kt.Z,Nt),kt.Z&&kt.Z.locals&&kt.Z.locals;var Dt=i(7031);class Et extends Ve{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(65),this._typicalHalfwidthCharacterWidth=t.get(49).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(65),this._typicalHalfwidthCharacterWidth=t.get(49).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e];o.options.className&&(i[n++]=o)}i=i.sort(((e,t)=>{if(e.options.zIndex<t.options.zIndex)return-1;if(e.options.zIndex>t.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return i<n?-1:i>n?1:Y.e.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,r=[];for(let e=o;e<=s;e++)r[e-o]="";this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let e=0,r=t.length;e<r;e++){const r=t[e];if(!r.options.isWholeLine)continue;const a='<div class="cdr '+r.options.className+'" style="left:0;width:100%;height:'+n+'px;"></div>',l=Math.max(r.range.startLineNumber,o),d=Math.min(r.range.endLineNumber,s);for(let e=l;e<=d;e++)i[e-o]+=a}}_renderNormalDecorations(e,t,i){var n;const o=String(this._lineHeight),s=e.visibleRange.startLineNumber;let r=null,a=!1,l=null,d=!1;for(let h=0,c=t.length;h<c;h++){const c=t[h];if(c.options.isWholeLine)continue;const u=c.options.className,g=Boolean(c.options.showIfCollapsed);let p=c.range;g&&1===p.endColumn&&p.endLineNumber!==p.startLineNumber&&(p=new Y.e(p.startLineNumber,p.startColumn,p.endLineNumber-1,this._context.viewModel.getLineMaxColumn(p.endLineNumber-1))),r===u&&a===g&&Y.e.areIntersectingOrTouching(l,p)?l=Y.e.plusRange(l,p):(null!==r&&this._renderNormalDecoration(e,l,r,d,a,o,s,i),r=u,a=g,l=p,d=null!==(n=c.options.shouldFillLineOnLineBreak)&&void 0!==n&&n)}null!==r&&this._renderNormalDecoration(e,l,r,d,a,o,s,i)}_renderNormalDecoration(e,t,i,n,o,s,r,a){const l=e.linesVisibleRangesForRange(t,"findMatch"===i);if(l)for(let e=0,t=l.length;e<t;e++){const t=l[e];if(t.outsideRenderedLine)continue;const d=t.lineNumber-r;if(o&&1===t.ranges.length){const e=t.ranges[0];if(e.width<this._typicalHalfwidthCharacterWidth){const i=Math.round(e.left+e.width/2),n=Math.max(0,Math.round(i-this._typicalHalfwidthCharacterWidth/2));t.ranges[0]=new Dt.yu(n,this._typicalHalfwidthCharacterWidth)}}for(let e=0,o=t.ranges.length;e<o;e++){const r=n&&t.continuesOnNextLine&&1===o,l=t.ranges[e],h='<div class="cdr '+i+'" style="left:'+String(l.left)+(r?"px;width:100%;height:":"px;width:"+String(l.width)+"px;height:")+s+'px;"></div>';a[d]+=h}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class It extends ne{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,s=o.get(101),r=o.get(73),a=o.get(39),l=o.get(104),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,He.m6)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new ye.$Z(t.domNode,d,this._context.viewLayout.getScrollable())),oe.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,J.X)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(S.nm(i.domNode,"scroll",(e=>h(i.domNode,!0,!0)))),this._register(S.nm(t.domNode,"scroll",(e=>h(t.domNode,!0,!1)))),this._register(S.nm(n.domNode,"scroll",(e=>h(n.domNode,!0,!1)))),this._register(S.nm(this.scrollbarDomNode.domNode,"scroll",(e=>h(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(142);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(71).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(101)||e.hasChanged(73)||e.hasChanged(39)){const e=this._context.configuration.options,t=e.get(101),i=e.get(73),n=e.get(39),o=e.get(104),s={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(s)}return e.hasChanged(142)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,He.m6)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}var Tt=i(86848),Mt={};Mt.styleTagTransform=b(),Mt.setAttributes=m(),Mt.insert=g().bind(null,"head"),Mt.domAPI=c(),Mt.insertStyleElement=_(),d()(Tt.Z,Mt),Tt.Z&&Tt.Z.locals&&Tt.Z.locals;var Rt=i(98401),At=i(1516),Ot=i(65094);class Pt extends Ve{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(143),n=t.get(49);this._lineHeight=t.get(65),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(15),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143),n=t.get(49);return this._lineHeight=t.get(65),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(15),!0}onCursorStateChanged(e){var t;const i=e.selections[0].getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(i))&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,i,n,o;if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=e.scrollWidth,l=this._lineHeight,d=this._primaryPosition,h=this.getGuidesByLine(s,Math.min(r+1,this._context.viewModel.getLineCount()),d),c=[];for(let d=s;d<=r;d++){const r=d-s,u=h[r];let g="";const p=null!==(i=null===(t=e.visibleRangeForPosition(new ae.L(d,1)))||void 0===t?void 0:t.left)&&void 0!==i?i:0;for(const t of u){const i=-1===t.column?p+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new ae.L(d,t.column)).left;if(i>a||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const s=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(null!==(o=null===(n=e.visibleRangeForPosition(new ae.L(d,t.horizontalLine.endColumn)))||void 0===n?void 0:n.left)&&void 0!==o?o:i+this._spaceWidth)-i:this._spaceWidth;g+=`<div class="core-guide ${t.className} ${s}" style="left:${i}px;height:${l}px;width:${r}px"></div>`}c[r]=g}this._renderResult=c}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?Ot.s6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?Ot.s6.EnabledForActive:Ot.s6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,o=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let s=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);s=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),d=[];for(let i=e;i<=t;i++){const t=new Array;d.push(t);const h=n?n[i-e]:[],c=new E.H9(h),u=o?o[i-e]:0;for(let e=1;e<=u;e++){const n=(e-1)*l+1,o=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===h.length)&&s<=i&&i<=r&&e===a;t.push(...c.takeWhile((e=>e.visibleColumn<n))||[]);const d=c.peek();d&&d.visibleColumn===n&&!d.horizontalLine||t.push(new Ot.UO(n,-1,"core-guide-indent lvl-"+(e-1)%30+(o?" indent-active":""),null,-1,-1))}t.push(...c.takeWhile((e=>!0))||[])}return d}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Ft(e){if(!e||!e.isTransparent())return e}(0,He.Ic)(((e,t)=>{const i=[{bracketColor:ze.zJ,guideColor:ze.oV,guideColorActive:ze.Qb},{bracketColor:ze.Vs,guideColor:ze.m$,guideColorActive:ze.m3},{bracketColor:ze.CE,guideColor:ze.DS,guideColorActive:ze.To},{bracketColor:ze.UP,guideColor:ze.lS,guideColorActive:ze.L7},{bracketColor:ze.r0,guideColor:ze.Jn,guideColorActive:ze.HV},{bracketColor:ze.m1,guideColor:ze.YF,guideColorActive:ze.f9}],n=new At.W,o=[{indentColor:ze.gS,indentColorActive:ze.qe},{indentColor:ze.Tf,indentColorActive:ze.Xy},{indentColor:ze.H_,indentColorActive:ze.cK},{indentColor:ze.h1,indentColorActive:ze.N8},{indentColor:ze.vP,indentColorActive:ze.zd},{indentColor:ze.e9,indentColorActive:ze.ll}],s=i.map((t=>{var i,n;const o=e.getColor(t.bracketColor),s=e.getColor(t.guideColor),r=e.getColor(t.guideColorActive),a=Ft(null!==(i=Ft(s))&&void 0!==i?i:null==o?void 0:o.transparent(.3)),l=Ft(null!==(n=Ft(r))&&void 0!==n?n:o);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(Rt.$K),r=o.map((t=>{const i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),o=Ft(i),s=Ft(n);if(o&&s)return{indentColor:o,indentColorActive:s}})).filter(Rt.$K);if(s.length>0){for(let e=0;e<30;e++){const i=s[e%s.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}));var Bt=i(15393),Wt=i(89565),Vt={};Vt.styleTagTransform=b(),Vt.setAttributes=m(),Vt.insert=g().bind(null,"head"),Vt.domAPI=c(),Vt.insertStyleElement=_(),d()(Wt.Z,Vt),Wt.Z&&Wt.Z.locals&&Wt.Z.locals;class Ht{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class zt{constructor(){this._currentVisibleRange=new Y.e(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Kt{constructor(e,t,i,n,o,s,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=o,this.stopScrollTop=s,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class Ut{constructor(e,t,i,n,o){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=o,this.type="selections";let s=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,i=t.length;e<i;e++){const i=t[e];s=Math.min(s,i.startLineNumber),r=Math.max(r,i.endLineNumber)}this.minLineNumber=s,this.maxLineNumber=r}}class jt extends ne{constructor(e,t){super(e),this._linesContent=t,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new lt(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration,n=this._context.configuration.options,o=n.get(49),s=n.get(143);this._lineHeight=n.get(65),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=s.isViewportWrapping,this._revealHorizontalRightPadding=n.get(98),this._cursorSurroundingLines=n.get(28),this._cursorSurroundingLinesStyle=n.get(29),this._canUseLayerHinting=!n.get(31),this._viewLineOptions=new re.ob(i,this._context.theme.type),oe.write(this.domNode,7),this.domNode.setClassName(`view-lines ${Ze.S}`),(0,Pe.N)(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new Bt.pY((()=>{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new Bt.pY((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new zt,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(113).enabled,this._maxNumberStickyLines=n.get(113).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new re.Nt(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(143)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(49),n=t.get(143);return this._lineHeight=t.get(65),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(98),this._cursorSurroundingLines=t.get(28),this._cursorSurroundingLinesStyle=t.get(29),this._canUseLayerHinting=!t.get(31),this._stickyScrollEnabled=t.get(113).enabled,this._maxNumberStickyLines=t.get(113).maxLineCount,(0,Pe.N)(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(142)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new re.ob(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Kt(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Ut(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<t||e.scrollTop>i)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new ae.L(n,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(n<o||n>s)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const a=this._context.viewModel.getLineMinColumn(n);return r<a&&(r=a),new ae.L(n,r)}_getViewLineDomNode(e){for(;e&&1===e.nodeType;){if(e.className===re.Nt.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)if(e===this._visibleLines.getVisibleLine(n).getDomNode())return n;return-1}getLineWidth(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();if(e<t||e>i)return-1;const n=new Ht(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),o}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=Y.e.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const o=[];let s=0;const r=new Ht(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ae.L(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(e<l||e>d)continue;const h=e===n.startLineNumber?n.startColumn:1,c=e!==n.endLineNumber,u=c?this._context.viewModel.getLineMaxColumn(e):n.endColumn,g=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,h,u,r);if(g){if(t&&e<i){const t=a;a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ae.L(e+1,1)).lineNumber,t!==a&&(g.ranges[g.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}o[s++]=new Dt.u7(g.outsideRenderedLine,e,Dt.yu.from(g.ranges),c)}}return this._updateLineWidthsSlowIfDomDidLayout(r),0===s?null:o}_visibleRangesForLineRange(e,t,i){if(this.shouldRender())return null;if(e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber())return null;const n=new Ht(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),o}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new Dt.D4(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,o=!0;for(let s=t;s<=i;s++){const t=this._visibleLines.getVisibleLine(s);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth(null)):o=!1}return o&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth(null);n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),T.IJ&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,i,n,o,s){const r=e.top,a=e.height,l=r+a;let d,h,c;if(o&&o.length>0){let e=o[0].startLineNumber,t=o[0].endLineNumber;for(let i=1,n=o.length;i<n;i++){const n=o[i];e=Math.min(e,n.startLineNumber),t=Math.max(t,n.endLineNumber)}d=!1,h=this._context.viewLayout.getVerticalOffsetForLineNumber(e),c=this._context.viewLayout.getVerticalOffsetForLineNumber(t)+this._lineHeight}else{if(!n)return-1;d=!0,h=this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber),c=this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber)+this._lineHeight}let u,g=0,p=0;if("mouse"!==t&&!i||"default"!==this._cursorSurroundingLinesStyle){const e=Math.min(a/this._lineHeight/2,this._cursorSurroundingLines);g=this._stickyScrollEnabled?Math.max(e,this._maxNumberStickyLines)*this._lineHeight:e*this._lineHeight,p=Math.max(0,e-1)*this._lineHeight}else i||(g=this._lineHeight);if(i||0!==s&&4!==s||(p+=this._lineHeight),h-=g,c+=p,c-h>a){if(!d)return-1;u=h}else if(5===s||6===s)if(6===s&&r<=h&&c<=l)u=r;else{const e=h-Math.max(5*this._lineHeight,.2*a),t=c-a;u=Math.max(t,e)}else if(1===s||2===s)if(2===s&&r<=h&&c<=l)u=r;else{const e=(h+c)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(r,l,h,c,3===s,4===s);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(142),n=t.left,o=n+t.width-i.verticalScrollbarWidth;let s=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)s=Math.min(s,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)s=Math.min(s,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}return e.minimalReveal||(s=Math.max(0,s-jt.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,o,s,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,o,s){o=!!o,s=!!s;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)<r?o?i:s?Math.max(0,n-r):i<e?i:n>t?Math.max(0,n-r):e:i}}jt.HORIZONTAL_EXTRA_PX=30;var $t=i(74444),qt={};qt.styleTagTransform=b(),qt.setAttributes=m(),qt.insert=g().bind(null,"head"),qt.domAPI=c(),qt.insertStyleElement=_(),d()($t.Z,qt),$t.Z&&$t.Z.locals&&$t.Z.locals;var Zt=i(64827),Gt={};Gt.styleTagTransform=b(),Gt.setAttributes=m(),Gt.insert=g().bind(null,"head"),Gt.domAPI=c(),Gt.insertStyleElement=_(),d()(Zt.Z,Gt),Zt.Z&&Zt.Z.locals&&Zt.Z.locals;class Qt{constructor(e,t,i,n){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i),this.zIndex=null!=n?n:0}}class Yt{constructor(e,t){this.className=e,this.zIndex=t}}class Jt{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class Xt extends Ve{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-e]=new Jt;if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1));let o=null,s=0;for(let r=0,a=i.length;r<a;r++){const a=i[r],l=a.className,d=a.zIndex;let h=Math.max(a.startLineNumber,e)-e;const c=Math.min(a.endLineNumber,t)-e;o===l?(h=Math.max(s+1,h),s=Math.max(s,c)):(o=l,s=c);for(let e=h;e<=s;e++)n[e].add(new Yt(l,d))}return n}}class ei extends ne{constructor(e){super(e),this._widgets={},this._context=e;const t=this._context.configuration.options,i=t.get(142);this.domNode=(0,J.X)(document.createElement("div")),this.domNode.setClassName("glyph-margin-widgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this._lineHeight=t.get(65),this._glyphMargin=t.get(56),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._glyphMarginDecorationLaneCount=i.glyphMarginDecorationLaneCount,this._managedDomNodes=[],this._decorationGlyphsToRender=[]}dispose(){this._managedDomNodes=[],this._decorationGlyphsToRender=[],this._widgets={},super.dispose()}getWidgets(){return Object.values(this._widgets)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(142);return this._lineHeight=t.get(65),this._glyphMargin=t.get(56),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._glyphMarginDecorationLaneCount=i.glyphMarginDecorationLaneCount,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}addWidget(e){const t=(0,J.X)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:e.getPosition(),domNode:t,renderInfo:null},t.setPosition("absolute"),t.setDisplay("none"),t.setAttribute("widgetId",e.getId()),this.domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return!(i.preference.lane===t.lane&&i.preference.zIndex===t.zIndex&&Y.e.equalsRange(i.preference.range,t.range)||(i.preference=t,this.setShouldRender(),0))}removeWidget(e){var t;const i=e.getId();if(this._widgets[i]){const e=this._widgets[i].domNode.domNode;delete this._widgets[i],null===(t=e.parentNode)||void 0===t||t.removeChild(e),this.setShouldRender()}}_collectDecorationBasedGlyphRenderRequest(e,t){var i,n,o;const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=e.getDecorationsInViewport();for(const e of a){const a=e.options.glyphMarginClassName;if(!a)continue;const l=Math.max(e.range.startLineNumber,s),d=Math.min(e.range.endLineNumber,r),h=Math.min(null!==(n=null===(i=e.options.glyphMargin)||void 0===i?void 0:i.position)&&void 0!==n?n:1,this._glyphMarginDecorationLaneCount),c=null!==(o=e.options.zIndex)&&void 0!==o?o:0;for(let e=l;e<=d;e++)t.push(new ti(e,h,c,a))}}_collectWidgetBasedGlyphRenderRequest(e,t){const i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(const e of Object.values(this._widgets)){const o=e.preference.range;if(o.endLineNumber<i||o.startLineNumber>n)continue;const s=Math.max(o.startLineNumber,i),r=Math.min(e.preference.lane,this._glyphMarginDecorationLaneCount);t.push(new ii(s,r,e.preference.zIndex,e))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.lane===t.lane?e.zIndex===t.zIndex?t.type===e.type?0===e.type&&0===t.type?e.className<t.className?-1:1:0:t.type-e.type:t.zIndex-e.zIndex:e.lane-t.lane:e.lineNumber-t.lineNumber)),t}prepareRender(e){if(!this._glyphMargin)return void(this._decorationGlyphsToRender=[]);for(const e of Object.values(this._widgets))e.renderInfo=null;const t=new E.H9(this._collectSortedGlyphRenderRequests(e)),i=[];for(;t.length>0;){const e=t.peek();if(!e)break;const n=t.takeWhile((t=>t.lineNumber===e.lineNumber&&t.lane===e.lane));if(!n||0===n.length)break;const o=n[0];if(0===o.type){const e=[];for(const t of n){if(t.zIndex!==o.zIndex||t.type!==o.type)break;0!==e.length&&e[e.length-1]===t.className||e.push(t.className)}i.push(o.accept(e.join(" ")))}else o.widget.renderInfo={lineNumber:o.lineNumber,lane:o.lane}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const e of Object.values(this._widgets))e.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const e=this._managedDomNodes.pop();null==e||e.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(i.renderInfo){const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],o=this._glyphMarginLeft+(i.renderInfo.lane-1)*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(o),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;i<this._decorationGlyphsToRender.length;i++){const n=this._decorationGlyphsToRender[i],o=e.viewportData.relativeVerticalOffset[n.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+(n.lane-1)*this._lineHeight;let r;i<this._managedDomNodes.length?r=this._managedDomNodes[i]:(r=(0,J.X)(document.createElement("div")),this._managedDomNodes.push(r),this.domNode.appendChild(r)),r.setClassName("cgmr codicon "+n.combinedClassName),r.setPosition("absolute"),r.setTop(o),r.setLeft(s),r.setWidth(t),r.setHeight(this._lineHeight)}for(;this._managedDomNodes.length>this._decorationGlyphsToRender.length;){const e=this._managedDomNodes.pop();null==e||e.domNode.remove()}}}class ti{constructor(e,t,i,n){this.lineNumber=e,this.lane=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new ni(this.lineNumber,this.lane,e)}}class ii{constructor(e,t,i,n){this.lineNumber=e,this.lane=t,this.zIndex=i,this.widget=n,this.type=1}}class ni{constructor(e,t,i){this.lineNumber=e,this.lane=t,this.combinedClassName=i}}class oi extends Xt{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(142);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(142);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e],s=o.options.linesDecorationsClassName,r=o.options.zIndex;s&&(i[n++]=new Qt(o.range.startLineNumber,o.range.endLineNumber,s,r));const a=o.options.firstLineDecorationClassName;a&&(i[n++]=new Qt(o.range.startLineNumber,o.range.startLineNumber,a,r))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o='" style="left:'+this._decorationsLeft.toString()+"px;width:"+this._decorationsWidth.toString()+'px;"></div>',s=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i].getDecorations();let a="";for(const e of r)a+='<div class="cldr '+e.className+o;s[i]=a}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var si=i(29364),ri={};ri.styleTagTransform=b(),ri.setAttributes=m(),ri.insert=g().bind(null,"head"),ri.domAPI=c(),ri.insertStyleElement=_(),d()(si.Z,ri),si.Z&&si.Z.locals&&si.Z.locals;class ai extends Xt{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e],s=o.options.marginClassName,r=o.options.zIndex;s&&(i[n++]=new Qt(o.range.startLineNumber,o.range.endLineNumber,s,r))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o=[];for(let e=t;e<=i;e++){const i=e-t,s=n[i].getDecorations();let r="";for(const e of s)r+='<div class="cmdr '+e.className+'" style=""></div>';o[i]=r}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var li=i(40563),di={};di.styleTagTransform=b(),di.setAttributes=m(),di.insert=g().bind(null,"head"),di.domAPI=c(),di.insertStyleElement=_(),d()(li.Z,di),li.Z&&li.Z.locals&&li.Z.locals;var hi=i(93911);class ci{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=ci._clamp(e),this.g=ci._clamp(t),this.b=ci._clamp(i),this.a=ci._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}ci.Empty=new ci(0,0,0,0);class ui extends k.JT{static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,k.dk)(new ui)),this._INSTANCE}constructor(){super(),this._onDidChange=new x.Q5,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Ge.RW.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}_updateColorMap(){const e=Ge.RW.getColorMap();if(!e)return this._colors=[ci.Empty],void(this._backgroundIsLight=!0);this._colors=[ci.Empty];for(let t=1;t<e.length;t++){const i=e[t].rgba;this._colors[t]=new ci(i.r,i.g,i.b,Math.round(255*i.a))}const t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}ui._INSTANCE=null;var gi=i(1118),pi=i(73910);const mi=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var fi=i(85427);class _i{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=_i.soften(e,.8),this.charDataLight=_i.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=(0,fi.K)(e[n]*t);return i}renderChar(e,t,i,n,o,s,r,a,l,d,h){const c=1*this.scale,u=2*this.scale,g=h?1:u;if(t+c>e.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=d?this.charDataLight:this.charDataNormal,m=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),f=4*e.width,_=r.r,v=r.g,b=r.b,C=o.r-_,w=o.g-v,y=o.b-b,S=Math.max(s,a),L=e.data;let x=m*c*u,k=i*f+4*t;for(let e=0;e<g;e++){let e=k;for(let t=0;t<c;t++){const t=p[x++]/255*(s/255);L[e++]=_+C*t,L[e++]=v+w*t,L[e++]=b+y*t,L[e++]=S}k+=f}}blockRenderChar(e,t,i,n,o,s,r,a){const l=1*this.scale,d=2*this.scale,h=a?1:d;if(t+l>e.width||i+h>e.height)return void console.warn("bad render request outside image data");const c=4*e.width,u=o/255*.5,g=s.r,p=s.g,m=s.b,f=g+(n.r-g)*u,_=p+(n.g-p)*u,v=m+(n.b-m)*u,b=Math.max(o,r),C=e.data;let w=i*c+4*t;for(let e=0;e<h;e++){let e=w;for(let t=0;t<l;t++)C[e++]=f,C[e++]=_,C[e++]=v,C[e++]=b;w+=c}}}var vi=i(88289);const bi={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},Ci=e=>{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=bi[e[i]]<<4|15&bi[e[i+1]];return t},wi={1:(0,vi.I)((()=>Ci("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,vi.I)((()=>Ci("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class yi{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=wi[e]?new _i(wi[e](),e):yi.createFromSampleData(yi.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of mi)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");const i=yi._downsample(e,t);return new _i(i,t)}static _downsampleChar(e,t,i,n,o){const s=1*o,r=2*o;let a=n,l=0;for(let n=0;n<r;n++){const o=n/r*16,d=(n+1)/r*16;for(let n=0;n<s;n++){const r=n/s*10,h=(n+1)/s*10;let c=0,u=0;for(let i=o;i<d;i++){const n=t+3840*Math.floor(i),o=1-(i-Math.floor(i));for(let t=r;t<h;t++){const i=1-(t-Math.floor(t)),s=n+4*Math.floor(t),r=i*o;u+=r,c+=e[s]*e[s+3]/255*r}}const g=c/u;l=Math.max(l,g),i[a++]=(0,fi.K)(g)}}return l}static _downsample(e,t){const i=2*t*1*t,n=96*i,o=new Uint8ClampedArray(n);let s=0,r=0,a=0;for(let n=0;n<96;n++)a=Math.max(a,this._downsampleChar(e,r,o,s,t)),s+=i,r+=40;if(a>0){const e=255/a;for(let t=0;t<n;t++)o[t]*=e}return o}}var Si=i(84973);class Li{constructor(e,t,i){const n=e.options,o=n.get(140),s=n.get(142),r=s.minimap,a=n.get(49),l=n.get(71);this.renderMinimap=r.renderMinimap,this.size=l.size,this.minimapHeightIsEditorHeight=r.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(103),this.paddingTop=n.get(82).top,this.paddingBottom=n.get(82).bottom,this.showSlider=l.showSlider,this.autohide=l.autohide,this.pixelRatio=o,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(65),this.minimapLeft=r.minimapLeft,this.minimapWidth=r.minimapWidth,this.minimapHeight=s.height,this.canvasInnerWidth=r.minimapCanvasInnerWidth,this.canvasInnerHeight=r.minimapCanvasInnerHeight,this.canvasOuterWidth=r.minimapCanvasOuterWidth,this.canvasOuterHeight=r.minimapCanvasOuterHeight,this.isSampling=r.minimapIsSampling,this.editorHeight=s.height,this.fontScale=r.minimapScale,this.minimapLineHeight=r.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,vi.I)((()=>yi.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=Li._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=Li._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(pi.kVY);return i?new ci(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(pi.Itd);return t?ci._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class xi{constructor(e,t,i,n,o,s,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=s,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,o,s,r,a,l,d,h){const c=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,o-e.lineHeight-e.paddingBottom));const i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),s=n/(d-o),h=l*s,c=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),g=Math.floor(e.paddingTop/e.lineHeight);return new xi(l,d,c,s,h,i,g,1,Math.min(r,u))}let m;if(s&&i!==r){const e=i-t+1;m=Math.floor(e*u/c)}else{const e=o/p;m=Math.floor(e*u/c)}const f=Math.floor(e.paddingTop/p);let _,v=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const e=o/p;v=Math.max(v,e-1)}_=v>0?(f+r+v-o/p-1)*u/c:Math.max(0,(f+r)*u/c-m),_=Math.min(e.minimapHeight-m,_);const b=_/(d-o),C=l*b;if(g>=f+r+v)return new xi(l,d,_>0,b,C,m,f,1,r);{let i,o;i=t>1?t+f:Math.max(1,l/p);let s=Math.max(1,Math.floor(i-C*c/u));s<f?(o=f-s+1,s=1):(o=0,s=Math.max(1,s-f)),h&&h.scrollHeight===d&&(h.scrollTop>l&&(s=Math.min(s,h.startLineNumber),o=Math.max(o,h.topPaddingLineCount)),h.scrollTop<l&&(s=Math.max(s,h.startLineNumber),o=Math.min(o,h.topPaddingLineCount)));const a=Math.min(r,s-o+g-1),_=(l-n)/p;let v;return v=l>=e.paddingTop?(t-s+o+_)*u/c:l/e.paddingTop*(o+_)*u/c,new xi(l,d,!0,b,v,m,o,s,a)}}}class ki{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}ki.INVALID=new ki(-1);class Ni{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new at((()=>ki.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e<i;e++)if(-1===t[e].dy)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){const e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class Di{constructor(e,t,i,n){this._backgroundFillData=Di._createBackgroundFillData(t,i,n),this._buffers=[e.createImageData(t,i),e.createImageData(t,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,i){const n=i.r,o=i.g,s=i.b,r=i.a,a=new Uint8ClampedArray(e*t*4);let l=0;for(let i=0;i<t;i++)for(let t=0;t<e;t++)a[l]=n,a[l+1]=o,a[l+2]=s,a[l+3]=r,l+=4;return a}}class Ei{static compute(e,t,i){if(0===e.renderMinimap||!e.isSampling)return[null,[]];const{minimapLineCount:n}=W.gk.computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:e.scrollBeyondLastLine,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:e.editorHeight,lineHeight:e.lineHeight,pixelRatio:e.pixelRatio}),o=t/n,s=o/2;if(!i||0===i.minimapLines.length){const e=[];if(e[0]=1,n>1){for(let t=0,i=n-1;t<i;t++)e[t]=Math.round(t*o+s);e[n-1]=t}return[new Ei(o,e),[]]}const r=i.minimapLines,a=r.length,l=[];let d=0,h=0,c=1,u=[],g=null;for(let e=0;e<n;e++){const i=Math.max(c,Math.round(e*o)),p=Math.max(i,Math.round((e+1)*o));for(;d<a&&r[d]<i;){if(u.length<10){const e=d+1+h;g&&"deleted"===g.type&&g._oldIndex===d-1?g.deleteToLineNumber++:(g={type:"deleted",_oldIndex:d,deleteFromLineNumber:e,deleteToLineNumber:e},u.push(g)),h--}d++}let m;if(d<a&&r[d]<=p)m=r[d],d++;else if(m=0===e?1:e+1===n?t:Math.round(e*o+s),u.length<10){const t=d+1+h;g&&"inserted"===g.type&&g._i===e-1?g.insertToLineNumber++:(g={type:"inserted",_i:e,insertFromLineNumber:t,insertToLineNumber:t},u.push(g)),h++}l[e]=m,c=m}if(u.length<10)for(;d<a;){const e=d+1+h;g&&"deleted"===g.type&&g._oldIndex===d-1?g.deleteToLineNumber++:(g={type:"deleted",_oldIndex:d,deleteFromLineNumber:e,deleteToLineNumber:e},u.push(g)),h--,d++}else u=[{type:"flush"}];return[new Ei(o,l),u]}constructor(e,t){this.samplingRatio=e,this.minimapLines=t}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e)-1;for(;i>0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1<this.minimapLines.length&&this.minimapLines[n+1]<=t;)n++;if(i===n){const n=this.minimapLines[i];if(n<e||n>t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]<e.fromLineNumber);o--)this.minimapLines[o]<=e.toLineNumber?(this.minimapLines[o]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,o),n=Math.max(n,o)):this.minimapLines[o]-=t;return[i,n]}onLinesInserted(e){const t=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]<e.fromLineNumber);i--)this.minimapLines[i]+=t}}class Ii extends ne{constructor(e){super(e),this.tokensColorTracker=ui.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new Li(this._context.configuration,this._context.theme,this.tokensColorTracker);const[t]=Ei.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new Ti(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const e=new Li(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(e)&&(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return!!e.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(this._samplingState){const t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.fromLineNumber+e.count-1);return!!t&&this._actual.onLinesChanged(t[0],t[1]-t[0]+1)}return this._actual.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){if(this._samplingState){const[t,i]=this._samplingState.onLinesDeleted(e);return t<=i&&this._actual.onLinesChanged(t+1,i-t+1),this._shouldCheckSampling=!0,!0}return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber)}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged()}onThemeChanged(e){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(this._samplingState){const t=[];for(const i of e.ranges){const e=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);e&&t.push({fromLineNumber:e[0],toLineNumber:e[1]})}return!!t.length&&this._actual.onTokensChanged(t)}return this._actual.onTokensChanged(e.ranges)}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),i=this._samplingState.modelLineToMinimapLine(i));const n={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=Ei.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let o=0,s=t-e+1;o<s;o++)i[o]?n[o]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[e+o-1]):n[o]=null;return n}return this._context.viewModel.getMinimapLinesRenderingData(e,t,i).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState){this._minimapSelections=[];for(const e of this._selections){const[t,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new Q.Y(t,e.startColumn,i,e.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const n=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];i=new Y.e(n,1,o,this._context.viewModel.getLineMaxColumn(o))}else i=new Y.e(e,1,t,this._context.viewModel.getLineMaxColumn(t));const n=this._context.viewModel.getMinimapDecorationsInRange(i);if(this._samplingState){const e=[];for(const t of n){if(!t.options.minimap)continue;const i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),o=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new gi.$l(new Y.e(n,i.startColumn,o,i.endColumn),t.options))}return e}return n}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new Y.e(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class Ti extends k.JT{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(pi.ov3),this._domNode=(0,J.X)(document.createElement("div")),oe.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,J.X)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,J.X)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,J.X)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,J.X)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,J.X)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=S.mu(this._domNode.domNode,S.tw.POINTER_DOWN,(e=>{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(0===e.button&&this._lastRenderData){const t=S.i(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderPointerMoveMonitor=new hi.C,this._sliderPointerDownListener=S.mu(this._slider.domNode,S.tw.POINTER_DOWN,(e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)})),this._gestureDisposable=X.o.addTarget(this._domNode.domNode),this._sliderTouchStartListener=S.nm(this._domNode.domNode,X.t.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=S.nm(this._domNode.domNode,X.t.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=S.mu(this._domNode.domNode,X.t.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i){if(!(e.target&&e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const o=(e,o)=>{const s=S.i(this._domNode.domNode),r=Math.min(Math.abs(o-n),Math.abs(o-s.left),Math.abs(o-s.left-s.width));if(T.ED&&r>140)return void this._model.setScrollTop(i.scrollTop);const a=e-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(a))};e.pageY!==t&&o(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>o(e.pageY,e.pageX)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Di(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(pi.ov3),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=xi.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(Y.e.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,s=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const d=new Mi(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,d,e,s),this._renderDecorationsLineHighlights(l,i,d,e,s);const h=new Mi(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,h,e,s,a,r,n),this._renderDecorationsHighlights(l,i,h,e,s,a,r,n)}}_renderSelectionLineHighlights(e,t,i,n,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,r=0;for(const a of t){const t=n.intersectWithViewport(a);if(!t)continue;const[l,d]=t;for(let e=l;e<=d;e++)i.set(e,!0);const h=n.getYForLineNumber(l,o),c=n.getYForLineNumber(d,o);r>=h||(r>s&&e.fillRect(W.y0,s,e.canvas.width,r-s),s=h),r=c}r>s&&e.fillRect(W.y0,s,e.canvas.width,r-s)}_renderDecorationsLineHighlights(e,t,i,n,o){const s=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||l.position!==Si.F5.Inline)continue;const d=n.intersectWithViewport(a.range);if(!d)continue;const[h,c]=d,u=l.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=s.get(u.toString());g||(g=u.transparent(.5).toString(),s.set(u.toString(),g)),e.fillStyle=g;for(let t=h;t<=c;t++){if(i.has(t))continue;i.set(t,!0);const s=n.getYForLineNumber(h,o);e.fillRect(W.y0,s,e.canvas.width,o)}}}_renderSelectionsHighlights(e,t,i,n,o,s,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=n.intersectWithViewport(l);if(!t)continue;const[d,h]=t;for(let t=d;t<=h;t++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,t,o,o,s,r,a)}}_renderDecorationsHighlights(e,t,i,n,o,s,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const d=n.intersectWithViewport(l.range);if(!d)continue;const[h,c]=d,u=t.getColor(this._theme.value);if(u&&!u.isTransparent())for(let d=h;d<=c;d++)switch(t.position){case Si.F5.Inline:this.renderDecorationOnLine(e,i,l.range,u,n,d,o,o,s,r,a);continue;case Si.F5.Gutter:{const t=n.getYForLineNumber(d,o),i=2;this.renderDecoration(e,u,i,t,2,o);continue}}}}renderDecorationOnLine(e,t,i,n,o,s,r,a,l,d,h){const c=o.getYForLineNumber(s,a);if(c+r<0||c>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===s?i.startColumn:1,m=g===s?i.endColumn:this._model.getLineMaxColumn(s),f=this.getXOffsetForPosition(t,s,p,l,d,h),_=this.getXOffsetForPosition(t,s,m,l,d,h);this.renderDecoration(e,n,f,c,_-f,r)}getXOffsetForPosition(e,t,i,n,o,s){if(1===i)return W.y0;if((i-1)*o>=s)return s;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[W.y0];let a=W.y0;for(let e=1;e<i.length+1;e++){const t=i.charCodeAt(e-1),l=a+(9===t?n*o:Oe.K7(t)?2*o:o);if(l>=s){r[e]=s;break}r[e]=l,a=l}e.set(t,r)}return i-1<r.length?r[i-1]:s}renderDecoration(e,t,i,n,o,s){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,o,s)}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new Ni(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;const[s,r,a]=Ti._renderUntouchedLines(o,e.topPaddingLineCount,t,i,n,this._lastRenderData),l=this._model.getMinimapLinesRenderingData(t,i,a),d=this._model.getOptions().tabSize,h=this._model.options.defaultBackgroundColor,c=this._model.options.backgroundColor,u=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),m=this._model.options.renderMinimap,f=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=(1===m?2:3)*_,C=n>b?Math.floor((n-b)/2):0,w=c.a/255,y=new ci(Math.round((c.r-h.r)*w+h.r),Math.round((c.g-h.g)*w+h.g),Math.round((c.b-h.b)*w+h.b),255);let S=e.topPaddingLineCount*n;const L=[];for(let e=0,s=i-t+1;e<s;e++)a[e]&&Ti._renderLine(o,y,c.a,p,m,v,g,u,f,S,C,d,l[e],_,n),L[e]=new ki(S),S+=n;const x=-1===s?0:s,k=(-1===r?o.height:r)-x;return this._canvas.domNode.getContext("2d").putImageData(o,0,0,0,x,o.width,k),new Ni(e,o,L)}static _renderUntouchedLines(e,t,i,n,o,s){const r=[];if(!s){for(let e=0,t=n-i+1;e<t;e++)r[e]=!0;return[-1,-1,r]}const a=s._get(),l=a.imageData.data,d=a.rendLineNumberStart,h=a.lines,c=h.length,u=e.width,g=e.data,p=(n-i+1)*o*u*4;let m=-1,f=-1,_=-1,v=-1,b=-1,C=-1,w=t*o;for(let e=i;e<=n;e++){const t=e-i,n=e-d,s=n>=0&&n<c?h[n].dy:-1;if(-1===s){r[t]=!0,w+=o;continue}const a=s*u*4,y=(s+o)*u*4,S=w*u*4,L=(w+o)*u*4;v===a&&C===S?(v=y,C=L):(-1!==_&&(g.set(l.subarray(_,v),b),-1===m&&0===_&&_===b&&(m=v),-1===f&&v===p&&_===b&&(f=_)),_=a,v=y,b=S,C=L),r[t]=!1,w+=o}return-1!==_&&(g.set(l.subarray(_,v),b),-1===m&&0===_&&_===b&&(m=v),-1===f&&v===p&&_===b&&(f=_)),[-1===m?-1:m/(4*u),-1===f?-1:f/(4*u),r]}static _renderLine(e,t,i,n,o,s,r,a,l,d,h,c,u,g,p){const m=u.content,f=u.tokens,_=e.width-s,v=1===p;let b=W.y0,C=0,w=0;for(let u=0,p=f.getCount();u<p;u++){const p=f.getEndOffset(u),y=f.getForeground(u),S=r.getColor(y);for(;C<p;C++){if(b>_)return;const r=m.charCodeAt(C);if(9===r){const e=c-(C+w)%c;w+=e-1,b+=e*s}else if(32===r)b+=s;else{const c=Oe.K7(r)?2:1;for(let u=0;u<c;u++)if(2===o?l.blockRenderChar(e,b,d+h,S,a,t,i,v):l.renderChar(e,b,d+h,r,S,a,t,i,g,n,v),b+=s,b>_)return}}}}}class Mi{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;e<t;e++)this._values[e]=i}has(e){return this.get(e)!==this._defaultValue}set(e,t){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}var Ri=i(59822),Ai={};Ai.styleTagTransform=b(),Ai.setAttributes=m(),Ai.insert=g().bind(null,"head"),Ai.domAPI=c(),Ai.insertStyleElement=_(),d()(Ri.Z,Ai),Ri.Z&&Ri.Z.locals&&Ri.Z.locals;class Oi extends ne{constructor(e){super(e);const t=this._context.configuration.options.get(142);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=(0,J.X)(document.createElement("div")),oe.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(142);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=(0,J.X)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference===t?(this._updateMaxMinWidth(),!1):(i.preference=t,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,t;let i=0;const n=Object.keys(this._widgets);for(let o=0,s=n.length;o<s;o++){const s=n[o],r=null===(t=(e=this._widgets[s].widget).getMinContentWidthInPx)||void 0===t?void 0:t.call(e);void 0!==r&&(i=Math.max(i,r))}this._context.viewLayout.setOverlayWidgetsMinWidth(i)}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.setTop("")}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];this._renderWidget(this._widgets[i])}}}class Pi{constructor(e,t){const i=e.options;this.lineHeight=i.get(65),this.pixelRatio=i.get(140),this.overviewRulerLanes=i.get(81),this.renderBorder=i.get(80);const n=t.getColor(ze.zw);this.borderColor=n?n.toString():null,this.hideCursor=i.get(58);const o=t.getColor(ze.n0);this.cursorColor=o?o.transparent(.7).toString():null,this.themeType=t.type;const s=i.get(71),r=s.enabled,a=s.side,l=t.getColor(ze.e_),d=Ge.RW.getDefaultBackground();this.backgroundColor=l||(r&&"right"===a?d:null);const h=i.get(142).overviewRuler;this.top=h.top,this.right=h.right,this.domWidth=h.width,this.domHeight=h.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[c,u]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=c,this.w=u}_initLanes(e,t,i){const n=t-e;if(i>=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,s=e+t;return[[0,e,s,e,e+t+o,e,s,e],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&Qe.Il.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class Fi extends ne{constructor(e){super(e),this._domNode=(0,J.X)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Ge.RW.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Pi(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t<i;t++)this._cursorPositions[t]=e.selections[t].getPosition();return this._cursorPositions.sort(ae.L.compare),!0}onDecorationsChanged(e){return!!e.affectsOverviewRuler}onFlushed(e){return!0}onScrollChanged(e){return e.scrollHeightChanged}onZonesChanged(e){return!0}onThemeChanged(e){return this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render()}_render(){const e=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes)return this._domNode.setBackgroundColor(e?Qe.Il.Format.CSS.formatHexA(e):""),void this._domNode.setDisplay("none");this._domNode.setDisplay("block");const t=this._settings.canvasWidth,i=this._settings.canvasHeight,n=this._settings.lineHeight,o=this._context.viewLayout,s=i/this._context.viewLayout.getScrollHeight(),r=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme),a=6*this._settings.pixelRatio|0,l=a/2|0,d=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(d.fillStyle=Qe.Il.Format.CSS.formatHexA(e),d.fillRect(0,0,t,i)):(d.clearRect(0,0,t,i),d.fillStyle=Qe.Il.Format.CSS.formatHexA(e),d.fillRect(0,0,t,i)):d.clearRect(0,0,t,i);const h=this._settings.x,c=this._settings.w;r.sort(gi.SQ.cmp);for(const e of r){const t=e.color,r=e.data;d.fillStyle=t;let u=0,g=0,p=0;for(let e=0,t=r.length/3;e<t;e++){const t=r[3*e],m=r[3*e+1],f=r[3*e+2];let _=o.getVerticalOffsetForLineNumber(m)*s|0,v=(o.getVerticalOffsetForLineNumber(f)+n)*s|0;if(v-_<a){let e=(_+v)/2|0;e<l?e=l:e+l>i&&(e=i-l),_=e-l,v=e+l}_>p+1||t!==u?(0!==e&&d.fillRect(h[u],g,c[u],p-g),u=t,g=_,p=v):v>p&&(p=v)}d.fillRect(h[u],g,c[u],p-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,t=e/2|0,n=this._settings.x[7],r=this._settings.w[7];d.fillStyle=this._settings.cursorColor;let a=-100,l=-100;for(let h=0,c=this._cursorPositions.length;h<c;h++){const c=this._cursorPositions[h];let u=o.getVerticalOffsetForLineNumber(c.lineNumber)*s|0;u<t?u=t:u+t>i&&(u=i-t);const g=u-t,p=g+e;g>l+1?(0!==h&&d.fillRect(n,a,r,l-a),a=g,l=p):p>l&&(l=p)}d.fillRect(n,a,r,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,i),d.stroke(),d.moveTo(0,0),d.lineTo(t,0),d.stroke())}}var Bi=i(30665);class Wi extends ie{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,J.X)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Bi.Tj((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(65)),this._zoneManager.setPixelRatio(i.get(140)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(65)&&(this._zoneManager.setLineHeight(t.get(65)),this._render()),e.hasChanged(140)&&(this._zoneManager.setPixelRatio(t.get(140)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,s=0,r=0;for(const a of t){const t=a.colorId,l=a.from,d=a.to;t!==o?(e.fillRect(0,s,n,r-s),o=t,e.fillStyle=i[o],s=l,r=d):r>=l?r=Math.max(r,d):(e.fillRect(0,s,n,r-s),s=l,r=d)}e.fillRect(0,s,n,r-s)}}var Vi=i(29443),Hi={};Hi.styleTagTransform=b(),Hi.setAttributes=m(),Hi.insert=g().bind(null,"head"),Hi.domAPI=c(),Hi.insertStyleElement=_(),d()(Vi.Z,Hi),Vi.Z&&Vi.Z.locals&&Vi.Z.locals;class zi extends ne{constructor(e){super(e),this.domNode=(0,J.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(49).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(49).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e<t){const{tabSize:i}=this._context.viewModel.model.getOptions(),n=i;let o=t-e;for(;o>0;){const e=(0,J.X)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t<i;t++){const i=this._renderedRulers[t],n=this._rulers[t];i.setBoxShadow(n.color?`1px 0 0 0 ${n.color} inset`:""),i.setHeight(Math.min(e.scrollHeight,1e6)),i.setLeft(n.column*this._typicalHalfwidthCharacterWidth)}}}var Ki=i(39649),Ui={};Ui.styleTagTransform=b(),Ui.setAttributes=m(),Ui.insert=g().bind(null,"head"),Ui.domAPI=c(),Ui.insertStyleElement=_(),d()(Ki.Z,Ui),Ki.Z&&Ki.Z.locals&&Ki.Z.locals;class ji extends ne{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(101);this._useShadows=t.useShadows,this._domNode=(0,J.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(142);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(101);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}var $i=i(52595),qi={};qi.styleTagTransform=b(),qi.setAttributes=m(),qi.insert=g().bind(null,"head"),qi.domAPI=c(),qi.insertStyleElement=_(),d()($i.Z,qi),$i.Z&&$i.Z.locals&&$i.Z.locals;class Zi{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class Gi{constructor(e,t){this.lineNumber=e,this.ranges=t}}function Qi(e){return new Zi(e)}function Yi(e){return new Gi(e.lineNumber,e.ranges.map(Qi))}class Ji extends Ve{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(65),this._roundedSelection=t.get(99),this._typicalHalfwidthCharacterWidth=t.get(49).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(65),this._roundedSelection=t.get(99),this._typicalHalfwidthCharacterWidth=t.get(49).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t<i;t++)if(e[t].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,s=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e<i.length;e++)i[e].lineNumber===n&&(o=i[e].ranges[0]);const r=t[t.length-1].lineNumber;if(r===e.endLineNumber)for(let e=i.length-1;!s&&e>=0;e--)i[e].lineNumber===r&&(s=i[e].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(let e=0,i=t.length;e<i;e++){const r=t[e].ranges[0],a=r.left,l=r.left+r.width,d={top:0,bottom:0},h={top:0,bottom:0};if(e>0){const i=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;Xi(a-i)<n?d.top=2:a>i&&(d.top=1),Xi(l-o)<n?h.top=2:i<l&&l<o&&(h.top=1)}else o&&(d.top=o.startStyle.top,h.top=o.endStyle.top);if(e+1<i){const i=t[e+1].ranges[0].left,o=t[e+1].ranges[0].left+t[e+1].ranges[0].width;Xi(a-i)<n?d.bottom=2:i<a&&a<o&&(d.bottom=1),Xi(l-o)<n?h.bottom=2:l<o&&(h.bottom=1)}else s&&(d.bottom=s.startStyle.bottom,h.bottom=s.endStyle.bottom);r.startStyle=d,r.endStyle=h}}_getVisibleRangesWithStyle(e,t,i){const n=(t.linesVisibleRangesForRange(e,!0)||[]).map(Yi);return!this._visibleRangesHaveGaps(n)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(t.visibleRange,n,i),n}_createSelectionPiece(e,t,i,n,o){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;left:"+n.toString()+"px;width:"+o.toString()+"px;height:"+t+'px;"></div>'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,s=this._lineHeight.toString(),r=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let d=0,h=n.length;d<h;d++){const h=n[d],c=h.lineNumber,u=c-t,g=!i||c!==l&&c!==a?s:r,p=i&&c===a?1:0;let m="",f="";for(let e=0,t=h.ranges.length;e<t;e++){const t=h.ranges[e];if(o){const e=t.startStyle,i=t.endStyle;if(1===e.top||1===e.bottom){m+=this._createSelectionPiece(p,g,Ji.SELECTION_CLASS_NAME,t.left-Ji.ROUNDED_PIECE_WIDTH,Ji.ROUNDED_PIECE_WIDTH);let i=Ji.EDITOR_BACKGROUND_CLASS_NAME;1===e.top&&(i+=" "+Ji.SELECTION_TOP_RIGHT),1===e.bottom&&(i+=" "+Ji.SELECTION_BOTTOM_RIGHT),m+=this._createSelectionPiece(p,g,i,t.left-Ji.ROUNDED_PIECE_WIDTH,Ji.ROUNDED_PIECE_WIDTH)}if(1===i.top||1===i.bottom){m+=this._createSelectionPiece(p,g,Ji.SELECTION_CLASS_NAME,t.left+t.width,Ji.ROUNDED_PIECE_WIDTH);let e=Ji.EDITOR_BACKGROUND_CLASS_NAME;1===i.top&&(e+=" "+Ji.SELECTION_TOP_LEFT),1===i.bottom&&(e+=" "+Ji.SELECTION_BOTTOM_LEFT),m+=this._createSelectionPiece(p,g,e,t.left+t.width,Ji.ROUNDED_PIECE_WIDTH)}}let i=Ji.SELECTION_CLASS_NAME;if(o){const e=t.startStyle,n=t.endStyle;0===e.top&&(i+=" "+Ji.SELECTION_TOP_LEFT),0===e.bottom&&(i+=" "+Ji.SELECTION_BOTTOM_LEFT),0===n.top&&(i+=" "+Ji.SELECTION_TOP_RIGHT),0===n.bottom&&(i+=" "+Ji.SELECTION_BOTTOM_RIGHT)}f+=this._createSelectionPiece(p,g,i,t.left,t.width)}e[u][0]+=m,e[u][1]+=f}}prepareRender(e){const t=[],i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let e=i;e<=n;e++)t[e-i]=["",""];const o=[];for(let n=0,s=this._selections.length;n<s;n++){const s=this._selections[n];if(s.isEmpty()){o[n]=null;continue}const r=this._getVisibleRangesWithStyle(s,e,this._previousFrameVisibleRangesWithStyle[n]);o[n]=r,this._actualRenderOneSelection(t,i,this._selections.length>1,r)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Xi(e){return e<0?-e:e}Ji.SELECTION_CLASS_NAME="selected-text",Ji.SELECTION_TOP_LEFT="top-left-radius",Ji.SELECTION_BOTTOM_LEFT="bottom-left-radius",Ji.SELECTION_TOP_RIGHT="top-right-radius",Ji.SELECTION_BOTTOM_RIGHT="bottom-right-radius",Ji.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",Ji.ROUNDED_PIECE_WIDTH=10,(0,He.Ic)(((e,t)=>{const i=e.getColor(pi.yb5);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}));var en=i(4057),tn={};tn.styleTagTransform=b(),tn.setAttributes=m(),tn.insert=g().bind(null,"head"),tn.domAPI=c(),tn.insertStyleElement=_(),d()(en.Z,tn),en.Z&&en.Z.locals&&en.Z.locals;class nn{constructor(e,t,i,n,o,s,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=o,this.textContent=s,this.textContentClassName=r}}class on{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(49);this._cursorStyle=t.get(27),this._lineHeight=t.get(65),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(30),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,J.X)(document.createElement("div")),this._domNode.setClassName(`cursor ${Ze.S}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,Pe.N)(this._domNode,i),this._domNode.setDisplay("none"),this._position=new ae.L(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(49);return this._cursorStyle=t.get(27),this._lineHeight=t.get(65),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(30),this._typicalHalfwidthCharacterWidth),(0,Pe.N)(this._domNode,i),!0}onCursorPositionChanged(e,t){return this._domNode.domNode.style.transitionProperty=t?"none":"",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,o]=Oe.J_(i,t-1);return[new ae.L(e,n+1),i.substring(n,o)]}_prepareRender(e){let t="",i="";const[n,o]=this._getGraphemeAwarePosition();if(this._cursorStyle===W.d2.Line||this._cursorStyle===W.d2.LineThin){const s=e.visibleRangeForPosition(n);if(!s||s.outsideRenderedLine)return null;let r;this._cursorStyle===W.d2.Line?(r=S.Uh(this._lineCursorWidth>0?this._lineCursorWidth:2),r>2&&(t=o,i=this._getTokenClassName(n))):r=S.Uh(1);let a=s.left,l=0;r>=2&&a>=1&&(l=1,a-=l);const d=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new nn(d,a,l,r,this._lineHeight,t,i)}const s=e.linesVisibleRangesForRange(new Y.e(n.lineNumber,n.column,n.lineNumber,n.column+o.length),!1);if(!s||0===s.length)return null;const r=s[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const a=r.ranges[0],l="\t"===o||a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===W.d2.Block&&(t=o,i=this._getTokenClassName(n));let d=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return this._cursorStyle!==W.d2.Underline&&this._cursorStyle!==W.d2.UnderlineThin||(d+=this._lineHeight-2,h=2),new nn(d,a.left,0,l,h,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${Ze.S} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class sn extends ne{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(89),this._cursorBlinking=t.get(25),this._cursorStyle=t.get(27),this._cursorSmoothCaretAnimation=t.get(26),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new on(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,J.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Bt._F,this._cursorFlatBlinkInterval=new Bt.zh,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(89),this._cursorBlinking=t.get(25),this._cursorStyle=t.get(27),this._cursorSmoothCaretAnimation=t.get(26),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t,i){const n=this._secondaryCursors.length!==t.length||"explicit"===this._cursorSmoothCaretAnimation&&3!==i;if(this._primaryCursor.onCursorPositionChanged(e,n),this._updateBlinking(),this._secondaryCursors.length<t.length){const e=t.length-this._secondaryCursors.length;for(let t=0;t<e;t++){const e=new on(this._context);this._domNode.domNode.insertBefore(e.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(e)}}else if(this._secondaryCursors.length>t.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t<e;t++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let e=0;e<t.length;e++)this._secondaryCursors[e].onCursorPositionChanged(t[e],n)}onCursorStateChanged(e){const t=[];for(let i=0,n=e.selections.length;i<n;i++)t[i]=e.selections[i].getPosition();this._onCursorPositionChanged(t[0],t.slice(1),e.reason);const i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const t=t=>{for(let i=0,n=e.ranges.length;i<n;i++)if(e.ranges[i].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[i].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(const e of this._secondaryCursors)if(t(e.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._isComposingInput?0:this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),t=0===e,i=5===e;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),t||i||(1===e?this._cursorFlatBlinkInterval.cancelAndSet((()=>{this._isVisible?this._hide():this._show()}),sn.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),sn.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case W.d2.Line:e+=" cursor-line-style";break;case W.d2.Block:e+=" cursor-block-style";break;case W.d2.Underline:e+=" cursor-underline-style";break;case W.d2.LineThin:e+=" cursor-line-thin-style";break;case W.d2.BlockOutline:e+=" cursor-block-outline-style";break;case W.d2.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return"on"!==this._cursorSmoothCaretAnimation&&"explicit"!==this._cursorSmoothCaretAnimation||(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].prepareRender(e)}render(e){const t=[];let i=0;const n=this._primaryCursor.render(e);n&&(t[i++]=n);for(let n=0,o=this._secondaryCursors.length;n<o;n++){const o=this._secondaryCursors[n].render(e);o&&(t[i++]=o)}this._renderData=t}getLastRenderData(){return this._renderData}}sn.BLINK_INTERVAL=500,(0,He.Ic)(((e,t)=>{const i=e.getColor(ze.n0);if(i){let n=e.getColor(ze.fY);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),(0,yt.c3)(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const rn=()=>{throw new Error("Invalid change accessor")};class an extends ne{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(142);this._lineHeight=t.get(65),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,J.X)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,J.X)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let o=0,s=n.length;o<s;o++){const s=n[o],r=this._zones[s],a=this._computeWhitespaceProps(r.delegate);r.isInHiddenArea=a.isInHiddenArea;const l=t.get(s);!l||l.afterLineNumber===a.afterViewLineNumber&&l.height===a.heightInPx||(e.changeOneWhitespace(s,a.afterViewLineNumber,a.heightInPx),this._safeCallOnComputedHeight(r.delegate,a.heightInPx),i=!0)}})),i}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(142);return this._lineHeight=t.get(65),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(65)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){var t,i;return null!==(i=null!==(t=e.ordinal)&&void 0!==t?t:e.afterColumn)&&void 0!==i?i:1e4}_computeWhitespaceProps(e){if(0===e.afterLineNumber)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};let t,i;if(void 0!==e.afterColumn)t=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{const i=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new ae.L(i,this._context.viewModel.model.getLineMaxColumn(i))}i=t.column===this._context.viewModel.model.getLineMaxColumn(t.lineNumber)?this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber+1,column:1}):this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber,column:t.column+1});const n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t,e.afterColumnAffinity,!0),o=e.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(i);return{isInHiddenArea:!o,afterViewLineNumber:n.lineNumber,heightInPx:o?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.viewModel.changeWhitespace((i=>{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{return e(t)}catch(e){(0,L.dL)(e)}}(e,n),n.addZone=rn,n.removeZone=rn,n.layoutZone=rn})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,J.X)(t.domNode),marginDomNode:t.marginDomNode?(0,J.X)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,L.dL)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,L.dL)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);const o=Object.keys(this._zones);for(let t=0,n=o.length;t<n;t++){const n=o[t],s=this._zones[n];let r=0,a=0,l="none";i.hasOwnProperty(n)?(r=i[n].verticalOffset-e.bigNumbersDelta,a=i[n].height,l="block",s.isVisible||(s.domNode.setAttribute("monaco-visible-view-zone","true"),s.isVisible=!0),this._safeCallOnDomNodeTop(s.delegate,e.getScrolledTopFromAbsoluteTop(i[n].verticalOffset))):(s.isVisible&&(s.domNode.removeAttribute("monaco-visible-view-zone"),s.isVisible=!1),this._safeCallOnDomNodeTop(s.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),s.domNode.setTop(r),s.domNode.setHeight(a),s.domNode.setDisplay(l),s.marginDomNode&&(s.marginDomNode.setTop(r),s.marginDomNode.setHeight(a),s.marginDomNode.setDisplay(l))}n&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}class ln{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class dn{constructor(e,t,i){this.configuration=e,this.theme=new ln(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}class hn{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new Y.e(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}var cn=i(29463),un={};un.styleTagTransform=b(),un.setAttributes=m(),un.insert=g().bind(null,"head"),un.domAPI=c(),un.insertStyleElement=_(),d()(cn.Z,un),cn.Z&&cn.Z.locals&&cn.Z.locals;class gn extends ne{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,J.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1;const t=this._context.configuration.options.get(142),i=t.contentWidth-t.verticalScrollbarWidth;this.contentWidth!==i&&(this.contentWidth=i,e=!0);const n=t.contentLeft;return this.contentLeft!==n&&(this.contentLeft=n,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){var t;let i=0;const n=e.getDecorationsInViewport();for(const o of n){if(!o.options.blockClassName)continue;let n,s,r=this.blocks[i];r||(r=this.blocks[i]=(0,J.X)(document.createElement("div")),this.domNode.appendChild(r)),o.options.blockIsAfterEnd?(n=e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!1),s=e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!0)):(n=e.getVerticalOffsetForLineNumber(o.range.startLineNumber,!0),s=o.range.isEmpty()&&!o.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(o.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!0));const[a,l,d,h]=null!==(t=o.options.blockPadding)&&void 0!==t?t:[0,0,0,0];r.setClassName("blockDecorations-block "+o.options.blockClassName),r.setLeft(this.contentLeft-h),r.setWidth(this.contentWidth+h+l),r.setTop(n-e.scrollTop-a),r.setHeight(s-n+a+d),i++}for(let e=i;e<this.blocks.length;e++)this.blocks[e].domNode.remove();this.blocks.length=i}}var pn=i(50795),mn=i(19991),fn={};fn.styleTagTransform=b(),fn.setAttributes=m(),fn.insert=g().bind(null,"head"),fn.domAPI=c(),fn.insertStyleElement=_(),d()(mn.Z,fn),mn.Z&&mn.Z.locals&&mn.Z.locals;var _n=i(91557);class vn extends Ve{constructor(e){super(),this._context=e,this._options=new bn(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=new bn(this._context.configuration);return this._options.equals(t)?e.hasChanged(142):(this._options=t,!0)}onCursorStateChanged(e){return this._selection=e.selections,"selection"===this._options.renderWhitespace}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if("none"===this._options.renderWhitespace)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber-t+1,n=new Array(i);for(let e=0;e<i;e++)n[e]=!0;const o=this._context.viewModel.getMinimapLinesRenderingData(e.viewportData.startLineNumber,e.viewportData.endLineNumber,n);this._renderResult=[];for(let t=e.viewportData.startLineNumber;t<=e.viewportData.endLineNumber;t++){const i=t-e.viewportData.startLineNumber,n=o.data[i];let s=null;if("selection"===this._options.renderWhitespace){const e=this._selection;for(const i of e){if(i.endLineNumber<t||i.startLineNumber>t)continue;const e=i.startLineNumber===t?i.startColumn:n.minColumn,o=i.endLineNumber===t?i.endColumn:n.maxColumn;e<o&&(s||(s=[]),s.push(new _n.zG(e-1,o-1)))}}this._renderResult[i]=this._applyRenderWhitespace(e,t,s,n)}}_applyRenderWhitespace(e,t,i,n){if("selection"===this._options.renderWhitespace&&!i)return"";if("trailing"===this._options.renderWhitespace&&n.continuesWithWrappedLine)return"";const o=this._context.theme.getColor(ze.dI),s=this._options.renderWithSVG,r=n.content,a=-1===this._options.stopRenderingLineAfter?r.length:Math.min(this._options.stopRenderingLineAfter,r.length),l=n.continuesWithWrappedLine,d=n.minColumn-1,h="boundary"===this._options.renderWhitespace,c="trailing"===this._options.renderWhitespace,u=this._options.lineHeight,g=this._options.middotWidth,p=this._options.wsmiddotWidth,m=this._options.spaceWidth,f=Math.abs(p-m)<Math.abs(g-m)?11825:183,_=this._options.canUseHalfwidthRightwardsArrow;let v,b="",C=!1,w=Oe.LC(r);-1===w?(C=!0,w=a,v=a):v=Oe.ow(r);let y=0,S=i&&i[y],L=0;for(let n=d;n<a;n++){const o=r.charCodeAt(n);if(S&&n>=S.endOffset&&(y++,S=i&&i[y]),9!==o&&32!==o)continue;if(c&&!C&&n<=v)continue;if(h&&n>=w&&n<=v&&32===o){const e=n-1>=0?r.charCodeAt(n-1):0,t=n+1<a?r.charCodeAt(n+1):0;if(32!==e&&32!==t)continue}if(h&&l&&n===a-1){const e=n-1>=0?r.charCodeAt(n-1):0;if(32===o&&32!==e&&9!==e)continue}if(i&&(!S||S.startOffset>n||S.endOffset<=n))continue;const d=e.visibleRangeForPosition(new ae.L(t,n+1));d&&(s?(L=Math.max(L,d.left),b+=9===o?this._renderArrow(u,m,d.left):`<circle cx="${(d.left+m/2).toFixed(2)}" cy="${(u/2).toFixed(2)}" r="${(m/7).toFixed(2)}" />`):b+=9===o?`<div class="mwh" style="left:${d.left}px;height:${u}px;">${_?String.fromCharCode(65515):String.fromCharCode(8594)}</div>`:`<div class="mwh" style="left:${d.left}px;height:${u}px;">${String.fromCharCode(f)}</div>`)}return s?(L=Math.round(L+m),`<svg style="position:absolute;width:${L}px;height:${u}px" viewBox="0 0 ${L} ${u}" xmlns="http://www.w3.org/2000/svg" fill="${o}">`+b+"</svg>"):b}_renderArrow(e,t,i){const n=e/2,o=i,s={x:0,y:t/7/2},r={x:.8*t,y:s.y},a={x:r.x-.2*r.x,y:r.y+.2*r.x},l={x:a.x+.1*r.x,y:a.y+.1*r.x},d={x:l.x+.35*r.x,y:l.y-.35*r.x};return`<path d="M ${[s,r,a,l,d,{x:d.x,y:-d.y},{x:l.x,y:-l.y},{x:a.x,y:-a.y},{x:r.x,y:-r.y},{x:s.x,y:-s.y}].map((e=>`${(o+e.x).toFixed(2)} ${(n+e.y).toFixed(2)}`)).join(" L ")}" />`}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class bn{constructor(e){const t=e.options,i=t.get(49),n=t.get(37);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(97),this.renderWithSVG=!0):(this.renderWhitespace=t.get(97),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(65),this.stopRenderingLineAfter=t.get(115)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}var Cn=i(72065);let wn=class extends ie{constructor(e,t,i,n,o,s,r){super(),this._instantiationService=r,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new Q.Y(1,1,1,1)],this._renderAnimationFrame=null;const a=new nt(t,n,o,e);this._context=new dn(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(tt,this._context,a,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,J.X)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,J.X)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,J.X)(document.createElement("div")),oe.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new It(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new jt(this._context,this._linesContent),this._viewZones=new an(this._context),this._viewParts.push(this._viewZones);const l=new Fi(this._context);this._viewParts.push(l);const d=new ji(this._context);this._viewParts.push(d);const h=new ut(this._context);this._viewParts.push(h),h.addDynamicOverlay(new Lt(this._context)),h.addDynamicOverlay(new Ji(this._context)),h.addDynamicOverlay(new Pt(this._context)),h.addDynamicOverlay(new Et(this._context)),h.addDynamicOverlay(new vn(this._context));const c=new gt(this._context);this._viewParts.push(c),c.addDynamicOverlay(new xt(this._context)),c.addDynamicOverlay(new ai(this._context)),c.addDynamicOverlay(new oi(this._context)),c.addDynamicOverlay(new Ke(this._context)),this._glyphMarginWidgets=new ei(this._context),this._viewParts.push(this._glyphMarginWidgets);const u=new $e(this._context);u.getDomNode().appendChild(this._viewZones.marginDomNode),u.getDomNode().appendChild(c.getDomNode()),u.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(u),this._contentWidgets=new pt(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new sn(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new Oi(this._context),this._viewParts.push(this._overlayWidgets);const g=new zi(this._context);this._viewParts.push(g);const p=new gn(this._context);this._viewParts.push(p);const m=new Ii(this._context);if(this._viewParts.push(m),l){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(l.getDomNode(),e.insertBefore)}this._linesContent.appendChild(h.getDomNode()),this._linesContent.appendChild(g.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(d.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(m.getDomNode()),this._overflowGuardContainer.appendChild(p.domNode),this.domNode.appendChild(this._overflowGuardContainer),s?s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new Me(this._context,a,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._shouldRecomputeGlyphMarginLanes&&(this._shouldRecomputeGlyphMarginLanes=!1,this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount())),pn.B.onRenderStart(),this._renderNow()}_computeGlyphMarginLaneCount(){const e=this._context.viewModel.model;let t=[];t=t.concat(e.getAllMarginDecorations().map((e=>{var t,i;const n=null!==(i=null===(t=e.options.glyphMargin)||void 0===t?void 0:t.position)&&void 0!==i?i:Si.U.Left;return{range:e.range,lane:n}}))),t=t.concat(this._glyphMarginWidgets.getWidgets().map((t=>({range:e.validateRange(t.preference.range),lane:t.preference.lane})))),t.sort(((e,t)=>Y.e.compareRangesUsingStarts(e.range,t.range)));let i=null,n=null;for(const e of t)if(e.lane===Si.U.Left&&(!i||Y.e.compareRangesUsingEnds(i,e.range)<0)&&(i=e.range),e.lane===Si.U.Right&&(!n||Y.e.compareRangesUsingEnds(n,e.range)<0)&&(n=e.range),i&&n){if(i.endLineNumber<n.startLineNumber){i=null;continue}if(n.endLineNumber<i.startLineNumber){n=null;continue}return 2}return 1}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new ue(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new ae.L(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options.get(142);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(139)+" "+(0,He.m6)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=S.lI(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{return e()}catch(e){(0,L.dL)(e)}}((()=>this._actualRender()))}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!S.Uw(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new hn(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new Dt.xh(this._context.viewLayout,i,this._viewLines);for(const t of e)t.prepareRender(n);for(const t of e)t.render(n),t.onDidRender()}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new ae.L(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?ot.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new Wi(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,i,n,o,s,r,a,l;this._contentWidgets.setWidgetPosition(e.widget,null!==(i=null===(t=e.position)||void 0===t?void 0:t.position)&&void 0!==i?i:null,null!==(o=null===(n=e.position)||void 0===n?void 0:n.secondaryPosition)&&void 0!==o?o:null,null!==(r=null===(s=e.position)||void 0===s?void 0:s.preference)&&void 0!==r?r:null,null!==(l=null===(a=e.position)||void 0===a?void 0:a.positionAffinity)&&void 0!==l?l:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};wn=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(6,Cn.TG)],wn);var yn=i(30653),Sn=i(96518),Ln=i(29102),xn=i(13961),kn=i(55343);class Nn{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new kn.rS(new Y.e(1,1,1,1),0,0,new ae.L(1,1),0),new kn.rS(new Y.e(1,1,1,1),0,0,new ae.L(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new kn.Vi(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?Q.Y.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):Q.Y.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),o=t.selectionStart.getEndPosition(),s=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,s),a=this._validatePositionWithCache(e,o,n,r);return i.equals(s)&&n.equals(r)&&o.equals(a)?t:new kn.rS(Y.e.fromPositions(r,a),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-r.column,s,t.leftoverVisibleColumns+i.column-s.column)}_setState(e,t,i){if(i&&(i=Nn._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),s=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new kn.rS(i,t.selectionStartKind,n,o,s)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new kn.rS(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new kn.rS(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new ae.L(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new ae.L(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new Y.e(n.lineNumber,n.column,o.lineNumber,o.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new kn.rS(s,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class Dn{constructor(e){this.context=e,this.cursors=[new Nn(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map((e=>e.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((e=>e.asCursorState()))}getViewPositions(){return this.cursors.map((e=>e.viewState.position))}getTopMostViewPosition(){return(0,E.VJ)(this.cursors,(0,E.tT)((e=>e.viewState.position),ae.L.compare)).viewState.position}getBottomMostViewPosition(){return(0,E.jV)(this.cursors,(0,E.tT)((e=>e.viewState.position),ae.L.compare)).viewState.position}getSelections(){return this.cursors.map((e=>e.modelState.selection))}getViewSelections(){return this.cursors.map((e=>e.viewState.selection))}setSelections(e){this.setStates(kn.Vi.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(t<i){const e=i-t;for(let t=0;t<e;t++)this._addSecondaryCursor()}else if(t>i){const e=t-i;for(let t=0;t<e;t++)this._removeSecondaryCursor(this.cursors.length-2)}for(let t=0;t<i;t++)this.cursors[t+1].setState(this.context,e[t].modelState,e[t].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new Nn(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return 1===this.cursors.length||0===this.lastAddedCursorIndex?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;i<n;i++)t.push({index:i,selection:e[i].modelState.selection});t.sort((0,E.tT)((e=>e.selection),Y.e.compareRangesUsingStarts));for(let i=0;i<t.length-1;i++){const n=t[i],o=t[i+1],s=n.selection,r=o.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let a;if(a=r.isEmpty()||s.isEmpty()?r.getStartPosition().isBeforeOrEqual(s.getEndPosition()):r.getStartPosition().isBefore(s.getEndPosition()),a){const s=n.index<o.index?i:i+1,r=n.index<o.index?i+1:i,a=t[r].index,l=t[s].index,d=t[r].selection,h=t[s].selection;if(!d.equalsSelection(h)){const i=d.plusRange(h),n=d.selectionStartLineNumber===d.startLineNumber&&d.selectionStartColumn===d.startColumn,o=h.selectionStartLineNumber===h.startLineNumber&&h.selectionStartColumn===h.startColumn;let r,c;a===this.lastAddedCursorIndex?(r=n,this.lastAddedCursorIndex=l):r=o,c=r?new Q.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new Q.Y(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn),t[s].selection=c;const u=kn.Vi.fromModelSelection(c);e[l].setState(this.context,u.modelState,u.viewState)}for(const e of t)e.index>a&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class En{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}var In=i(29436),Tn=i(51336),Mn=i(14706);class Rn{constructor(){this.type=0}}class An{constructor(){this.type=1}}class On{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class Pn{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class Fn{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0)}}class Bn{constructor(){this.type=5}}class Wn{constructor(e){this.type=6,this.isFocused=e}}class Vn{constructor(){this.type=7}}class Hn{constructor(){this.type=8}}class zn{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class Kn{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class Un{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class jn{constructor(e,t,i,n,o,s,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=o,this.revealHorizontal=s,this.scrollType=r,this.type=12}}class $n{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class qn{constructor(e){this.theme=e,this.type=14}}class Zn{constructor(e){this.type=15,this.ranges=e}}class Gn{constructor(){this.type=16}}class Qn{constructor(){this.type=17}}class Yn extends k.JT{constructor(){super(),this._onEvent=this._register(new x.Q5),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t<i;t++){const i=this._outgoingEvents[t].kind===e.kind?this._outgoingEvents[t].attemptToMerge(e):null;if(i)return void(this._outgoingEvents[t]=i)}this._outgoingEvents.push(e)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t<i;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)}removeViewEventHandler(e){for(let t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}}beginEmitViewEvents(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new Jn),this._collector}endEmitViewEvents(){if(this._collectorCnt--,0===this._collectorCnt){const e=this._collector.outgoingEvents,t=this._collector.viewEvents;this._collector=null;for(const t of e)this._addOutgoingEvent(t);t.length>0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class Jn{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class Xn{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new Xn(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class eo{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new eo(this.oldHasFocus,e.hasFocus)}}class to{constructor(e,t,i,n,o,s,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=s,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}attemptToMerge(e){return e.kind!==this.kind?null:new to(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class io{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class no{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class oo{constructor(e,t,i,n,o,s,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=s,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(!e[n].equalsSelection(t[n]))return!1;return!0}isNoOp(){return oo._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(e){return e.kind!==this.kind?null:new oo(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class so{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class ro{constructor(e){this.event=e,this.kind=7}isNoOp(){return!1}attemptToMerge(e){return null}}class ao{constructor(e){this.event=e,this.kind=8}isNoOp(){return!1}attemptToMerge(e){return null}}class lo{constructor(e){this.event=e,this.kind=9}isNoOp(){return!1}attemptToMerge(e){return null}}class ho{constructor(e){this.event=e,this.kind=10}isNoOp(){return!1}attemptToMerge(e){return null}}class co{constructor(e){this.event=e,this.kind=11}isNoOp(){return!1}attemptToMerge(e){return null}}class uo{constructor(e){this.event=e,this.kind=12}isNoOp(){return!1}attemptToMerge(e){return null}}class go extends k.JT{constructor(e,t,i,n){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new En(this._model,this._viewModel,this._coordinatesConverter,n),this._cursors=new Dn(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,k.B9)(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new En(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const e=this._cursors.getSelections();for(let t=0;t<this._autoClosedActions.length;t++){const i=this._autoClosedActions[t];i.isValid(e)||(i.dispose(),this._autoClosedActions.splice(t,1),t--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,t,i,n){let o=!1;const s=this.context.cursorConfig.multiCursorLimit;null!==n&&n.length>s&&(n=n.slice(0,s),o=!0);const r=po.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,o,s){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=Y.e.fromPositions(r[0],r[0]),e.emitViewEvent(new jn(t,i,a,l,n,o,s))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push({inSelectionMode:!n.isEmpty(),selectionStart:{lineNumber:n.selectionStartLineNumber,column:n.selectionStartColumn},position:{lineNumber:n.positionLineNumber,column:n.positionColumn}})}return e}restoreState(e,t){const i=[];for(let e=0,n=t.length;e<n;e++){const n=t[e];let o=1,s=1;n.position&&n.position.lineNumber&&(o=n.position.lineNumber),n.position&&n.position.column&&(s=n.position.column);let r=o,a=s;n.selectionStart&&n.selectionStart.lineNumber&&(r=n.selectionStart.lineNumber),n.selectionStart&&n.selectionStart.column&&(a=n.selectionStart.column),i.push({selectionStartLineNumber:r,selectionStartColumn:a,positionLineNumber:o,positionColumn:s})}this.setStates(e,"restoreState",0,kn.Vi.fromModelSelections(i)),this.revealPrimary(e,"restoreState",!1,0,!0,1)}onModelContentChanged(e,t){if(t instanceof Mn.D8){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(e,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{const i=t.rawContentChangedEvent;if(this._knownModelVersionId=i.versionId,this._isHandling)return;const n=i.containsEvent(1);if(this._prevEditOperationType=0,n)this._cursors.dispose(),this._cursors=new Dn(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&i.resultingSelection&&i.resultingSelection.length>0){const t=kn.Vi.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,t)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,kn.Vi.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,kn.Vi.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let o=0,s=e.length;o<s;o++)i.push({range:e[o],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),n.push({range:t[o],options:{description:"auto-closed-enclosing",stickiness:1}});const o=this._model.deltaDecorations([],i),s=this._model.deltaDecorations([],n);this._autoClosedActions.push(new mo(this._model,o,s))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const t=fo.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);const i=[],n=[];for(let t=0;t<e.commands.length;t++){const o=e.commands[t];o instanceof Tn.g_&&o.enclosingRange&&o.closeCharacterRange&&(i.push(o.closeCharacterRange),n.push(o.enclosingRange))}i.length>0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const s=po.from(this._model,this);if(s.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new Pn(a,r,i)),!n||n.cursorState.length!==s.cursorState.length||s.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new oo(a,r,l,s.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n.text||n.text.indexOf("\n")>=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const s=o[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(s);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-o[2].length-1,d=n.text.lastIndexOf(a,l-1);if(-1===d)return null;t.push([d,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);const s=[],r=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(o)for(let t=0,i=o.length;t<i;t++){const[i,n]=o[t],a=e[t],l=a.range.startLineNumber,d=a.range.startColumn-1+i,h=a.range.startColumn-1+n;s.push(new Y.e(l,h+1,l,h+2)),r.push(new Y.e(l,d+1,l,h+2))}const t=n(e);return t&&(this._isHandling=!0),t}));a&&(this._isHandling=!1,this.setSelections(e,t,a,0)),s.length>0&&this._pushAutoClosedAction(s,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=po.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,L.dL)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return mo.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new vo(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit((()=>{"keyboard"===t&&this._executeEditOperation(Tn.u6.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i<e;){const e=Oe.vH(t,i),n=t.substr(i,e);this._executeEditOperation(Tn.u6.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),n)),i+=e}}else this._executeEditOperation(Tn.u6.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))}),e,i)}compositionType(e,t,i,n,o,s){if(0!==t.length||0!==i||0!==n)this._executeEdit((()=>{this._executeEditOperation(Tn.u6.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))}),e,s);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new Q.Y(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,s,t,0)}}paste(e,t,i,n,o){this._executeEdit((()=>{this._executeEditOperation(Tn.u6.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(In.A.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new kn.Tp(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new kn.Tp(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}class po{static from(e,t){return new po(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class mo{static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){const t=[];for(let e=0;e<this._autoClosedEnclosingDecorations.length;e++){const i=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[e]);if(i&&(t.push(i),i.startLineNumber!==i.endLineNumber))return!1}t.sort(Y.e.compareRangesUsingStarts),e.sort(Y.e.compareRangesUsingStarts);for(let i=0;i<e.length;i++){if(i>=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class fo{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let e=0,t=n.trackedRanges.length;e<t;e++)n.model._setTrackedRange(n.trackedRanges[e],null,0);return o}static _innerExecuteCommands(e,t){if(this._arrayIsEmpty(t))return null;const i=this._getEditOperations(e,t);if(0===i.operations.length)return null;const n=i.operations,o=this._getLoserCursorMap(n);if(o.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const s=[];for(let e=0,t=n.length;e<t;e++)o.hasOwnProperty(n[e].identifier.major.toString())||s.push(n[e]);i.hadTrackedEditOperation&&s.length>0&&(s[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,s,(i=>{const n=[];for(let t=0;t<e.selectionsBefore.length;t++)n[t]=[];for(const e of i)e.identifier&&n[e.identifier.major].push(e);const o=(e,t)=>e.identifier.minor-t.identifier.minor,s=[];for(let i=0;i<e.selectionsBefore.length;i++)n[i].length>0?(n[i].sort(o),s[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new Q.Y(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new Q.Y(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):s[i]=e.selectionsBefore[i];return s}));r||(r=e.selectionsBefore);const a=[];for(const e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)r.splice(e,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t<i;t++)if(e[t])return!1;return!0}static _getEditOperations(e,t){let i=[],n=!1;for(let o=0,s=t.length;o<s;o++){const s=t[o];if(s){const t=this._getEditOperationsFromCommand(e,o,s);i=i.concat(t.operations),n=n||t.hadTrackedEditOperation}}return{operations:i,hadTrackedEditOperation:n}}static _getEditOperationsFromCommand(e,t,i){const n=[];let o=0;const s=(e,s,r=!1)=>{Y.e.isEmpty(e)&&""===s||n.push({identifier:{major:t,minor:o++},range:e,text:s,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let r=!1;const a={addEditOperation:s,addTrackedEditOperation:(e,t,i)=>{r=!0,s(e,t,i)},trackSelection:(t,i)=>{const n=Q.Y.liftSelection(t);let o;if(n.isEmpty())if("boolean"==typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const s=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,o);return e.trackedRanges[s]=r,e.trackedRangesDirection[s]=n.getDirection(),s.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return(0,L.dL)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-Y.e.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;i<e.length;i++){const n=e[i-1],o=e[i];if(Y.e.getStartPosition(n.range).isBefore(Y.e.getEndPosition(o.range))){let s;s=n.identifier.major>o.identifier.major?n.identifier.major:o.identifier.major,t[s.toString()]=!0;for(let t=0;t<e.length;t++)e[t].identifier.major===s&&(e.splice(t,1),t<i&&i--,t--);i>0&&i--}}return t}}class _o{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class vo{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new _o(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=vo._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=vo._capture(e,t);if(!i)return null;if(this._original.length!==i.length)return null;const n=[];for(let e=0,t=this._original.length;e<t;e++)n.push(vo._deduceOutcome(this._original[e],i[e]));return n}static _deduceOutcome(e,t){const i=Math.min(e.startSelection,t.startSelection,Oe.Mh(e.text,t.text)),n=Math.min(e.text.length-e.endSelection,t.text.length-t.endSelection,Oe.P1(e.text,t.text)),o=e.text.substring(i,e.text.length-n),s=t.text.substring(i,t.text.length-n);return new Tn.Nu(o,e.startSelection-i,e.endSelection-i,s,t.startSelection-i,t.endSelection-i)}}var bo=i(68801),Co=i(82963),wo=i(76633);class yo{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class So{constructor(e,t,i,n,o){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=o,this.prefixSum=0}}class Lo{constructor(e,t,i,n){this._instanceId=Oe.PJ(++Lo.INSTANCE_COUNT),this._pendingChanges=new yo,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,o=e.length;for(;n<o;){const s=n+o>>>1;t===e[s].afterLineNumber?i<e[s].ordinal?o=s:n=s+1:t<e[s].afterLineNumber?o=s:n=s+1}return n}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,t){this._paddingTop=e,this._paddingBottom=t}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let t=!1;try{e({insertWhitespace:(e,i,n,o)=>{t=!0,e|=0,i|=0,n|=0,o|=0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new So(s,e,i,n,o)),s},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const s=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=s(this._arr).concat(s(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=Lo.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;i<n;i++)if(t[i].id===e)return i;return-1}_changeOneWhitespace(e,t,i){const n=this._findWhitespaceIndex(e);if(-1!==n&&(this._arr[n].height!==i&&(this._arr[n].height=i,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)),this._arr[n].afterLineNumber!==t)){const e=this._arr[n];this._removeWhitespace(n),e.afterLineNumber=t,this._insertWhitespace(e)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount-=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const n=this._arr[i].afterLineNumber;e<=n&&n<=t?this._arr[i].afterLineNumber=e-1:n>t&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i<n;i++)e<=this._arr[i].afterLineNumber&&(this._arr[i].afterLineNumber+=t-e+1)}getWhitespacesTotalHeight(){return this._checkPendingChanges(),0===this._arr.length?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e|=0;let t=Math.max(0,this._prefixSumValidIndex+1);0===t&&(this._arr[0].prefixSum=this._arr[0].height,t++);for(let i=t;i<=e;i++)this._arr[i].prefixSum=this._arr[i-1].prefixSum+this._arr[i].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){return this._checkPendingChanges(),this._lineHeight*this._lineCount+this.getWhitespacesTotalHeight()+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e);return-1===t?0:this.getWhitespacesAccumulatedHeight(t)}_findLastWhitespaceBeforeLineNumber(e){e|=0;const t=this._arr;let i=0,n=t.length-1;for(;i<=n;){const o=i+((n-i|0)/2|0)|0;if(t[o].afterLineNumber<e){if(o+1>=t.length||t[o+1].afterLineNumber>=e)return o;i=o+1|0}else n=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t<this._arr.length?t:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e|=0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e,t=!1){let i;return this._checkPendingChanges(),i=(e|=0)>1?this._lineHeight*(e-1):0,i+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0))+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){return this._checkPendingChanges(),e|=0,this._lineHeight*e+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0))+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;t<i;t++)e=Math.max(e,this._arr[t].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){return this._checkPendingChanges(),e>this.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e<this._paddingTop)}isInBottomPadding(e){return 0!==this._paddingBottom&&(this._checkPendingChanges(),e>=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;for(;n<o;){const t=(n+o)/2|0,s=0|this.getVerticalOffsetForLineNumber(t);if(e>=s+i)n=t+1;else{if(e>=s)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let s=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,d;-1===r?(r=a,d=s+1,l=0):(d=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let h=o,c=h;const u=5e5;let g=0;o>=u&&(g=Math.floor(o/u)*u,g=Math.floor(g/i)*i,c-=g);const p=[],m=e+(t-e)/2;let f=-1;for(let e=n;e<=s;e++){for(-1===f&&(h<=m&&m<h+i||h>m)&&(f=e),h+=i,p[e-n]=c,c+=i;d===e;)c+=l,h+=l,r++,r>=a?d=s+1:(d=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(h>=t){s=e;break}}-1===f&&(f=s);const _=0|this.getVerticalOffsetForLineNumber(s);let v=n,b=s;return v<b&&o<e&&v++,v<b&&_+i>t&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t<i;){const n=Math.floor((t+i)/2),o=this.getVerticalOffsetForWhitespaceIndex(n);if(e>=o+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const o=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}Lo.INSTANCE_COUNT=0;class xo{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class ko extends k.JT{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new x.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new xo(0,0,0,0),this._scrollable=this._register(new wo.Rm({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new Xn(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class No extends k.JT{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(142),s=n.get(82);this._linesLayout=new Lo(t,n.get(65),s.top,s.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new ko(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new xo(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(112)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(65)&&this._linesLayout.setLineHeight(t.get(65)),e.hasChanged(82)){const e=t.get(82);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(142)){const e=t.get(142),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),s=o.contentWidth;this._scrollable.setScrollDimensions(new xo(i,o.contentWidth,n,this._getContentHeight(i,n,s)))}else this._updateHeight();e.hasChanged(112)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(101);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(103)?o+=Math.max(0,t-n.get(65)-n.get(82).bottom):o+=this._getHorizontalScrollbarHeight(e,i),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new xo(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new gi.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new gi.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(143),n=e.get(49),o=e.get(142);if(i.isViewportWrapping){const i=e.get(71);return t>o.contentWidth+n.typicalHalfwidthCharacterWidth&&i.enabled&&"right"===i.side?t+o.verticalScrollbarWidth:t}{const i=e.get(102)*n.typicalHalfwidthCharacterWidth,s=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+i+o.verticalScrollbarWidth,s,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new xo(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var Do=i(30168),Eo=i(77378);function Io(e,t){return null===e?t?Mo.INSTANCE:Ro.INSTANCE:new To(e,t)}class To{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,o=this._projectionData.breakOffsets[i];let s;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new Mn.gk(0,0,e+1,this._projectionData.injectionOptions[t],0)));s=Mn.gk.applyInjectedText(e.getLineContent(t),i).substring(n,o)}else s=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(s=Oo(this._projectionData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,o,s,r){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,d=a.injectionOptions;let h,c=null;if(l){c=[];let e=0,t=0;for(let i=0;i<a.getOutputLineCount();i++){const n=new Array;c[i]=n;const o=i>0?a.breakOffsets[i-1]:0,s=a.breakOffsets[i];for(;t<l.length;){const r=d[t].content.length,h=l[t]+e,c=h+r;if(h>s)break;if(o<c){const e=d[t];if(e.inlineClassName){const t=i>0?a.wrappedTextIndentLength:0,r=t+Math.max(h-o,0),l=t+Math.min(c-o,s-o);r!==l&&n.push(new gi.Wx(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(c<=s))break;e+=r,t++}}}h=l?e.tokenization.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:d[t].content,tokenMetadata:Eo.A.defaultTokenMetadata})))):e.tokenization.getLineTokens(t);for(let e=i;e<i+n;e++){const t=o+e-i;s[t]?r[t]=this._getViewLineData(h,c?c[e]:null,e):r[t]=null}}_getViewLineData(e,t,i){this._assertVisible();const n=this._projectionData,o=i>0?n.wrappedTextIndentLength:0,s=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(s,r,o);let l=a.getLineContent();i>0&&(l=Oo(n.wrappedTextIndentLength)+l);const d=this._projectionData.getMinOutputOffset(i)+1,h=l.length+1,c=i+1<this.getViewLineCount(),u=0===i?0:n.breakOffsetsVisibleColumn[i-1];return new gi.IP(l,c,d,h,u,a,t)}getModelColumnOfViewPosition(e,t){return this._assertVisible(),this._projectionData.translateToInputOffset(e,t-1)+1}getViewPositionOfModelPosition(e,t,i=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(t-1,i).toPosition(e)}getViewLineNumberOfModelPosition(e,t){return this._assertVisible(),e+this._projectionData.translateToOutputPosition(t-1).outputLineIndex}normalizePosition(e,t,i){const n=t.lineNumber-e;return this._projectionData.normalizeOutputPosition(e,t.column-1,i).toPosition(n)}getInjectedTextAt(e,t){return this._projectionData.getInjectedText(e,t-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class Mo{constructor(){}isVisible(){return!0}setVisible(e){return e?this:Ro.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){const n=e.tokenization.getLineTokens(t),o=n.getLineContent();return new gi.IP(o,!1,1,o.length+1,0,n.inflate(),null)}getViewLinesData(e,t,i,n,o,s,r){s[o]?r[o]=this.getViewLineData(e,t,0):r[o]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new ae.L(e,t)}getViewLineNumberOfModelPosition(e,t){return e}normalizePosition(e,t,i){return t}getInjectedTextAt(e,t){return null}}Mo.INSTANCE=new Mo;class Ro{constructor(){}isVisible(){return!1}setVisible(e){return e?Mo.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw new Error("Not supported")}getViewLineLength(e,t,i){throw new Error("Not supported")}getViewLineMinColumn(e,t,i){throw new Error("Not supported")}getViewLineMaxColumn(e,t,i){throw new Error("Not supported")}getViewLineData(e,t,i){throw new Error("Not supported")}getViewLinesData(e,t,i,n,o,s,r){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}normalizePosition(e,t,i){throw new Error("Not supported")}getInjectedTextAt(e,t){throw new Error("Not supported")}}Ro.INSTANCE=new Ro;const Ao=[""];function Oo(e){if(e>=Ao.length)for(let t=1;t<=e;t++)Ao[t]=Po(t);return Ao[e]}function Po(e){return new Array(e+1).join(" ")}var Fo=i(90310);class Bo{constructor(e,t,i,n,o,s,r,a,l,d){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=o,this.tabSize=s,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this.wordBreak=d,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Ho(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),o=i.length,s=this.createLineBreaksComputer(),r=new E.H9(Mn.gk.fromDecorations(n));for(let e=0;e<o;e++){const n=r.takeWhile((t=>t.lineNumber===e+1));s.addRequest(i[e],n,t?t[e]:null)}const a=s.finalize(),l=[],d=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Y.e.compareRangesUsingStarts);let h=1,c=0,u=-1,g=u+1<d.length?c+1:o+2;for(let e=0;e<o;e++){const t=e+1;t===g&&(u++,h=d[u].startLineNumber,c=d[u].endLineNumber,g=u+1<d.length?c+1:o+2);const i=t>=h&&t<=c,n=Io(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new Fo.Ck(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=function(e){if(0===e.length)return[];const t=e.slice();t.sort(Y.e.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,s=t.length;e<s;e++){const s=t[e];s.startLineNumber>o+1?(i.push(new Y.e(n,1,o,1)),n=s.startLineNumber,o=s.endLineNumber):s.endLineNumber>o&&(o=s.endLineNumber)}return i.push(new Y.e(n,1,o,1)),i}(e.map((e=>this.model.validateRange(e)))),i=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Y.e.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n<t.length;n++)if(!t[n].equalsRange(i[n])){e=!0;break}if(!e)return!1}const n=t.map((e=>({range:e,options:xn.qx.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const o=t;let s=1,r=0,a=-1,l=a+1<o.length?r+1:this.modelLineProjections.length+2,d=!1;for(let e=0;e<this.modelLineProjections.length;e++){const t=e+1;t===l&&(a++,s=o[a].startLineNumber,r=o[a].endLineNumber,l=a+1<o.length?r+1:this.modelLineProjections.length+2);let i=!1;if(t>=s&&t<=r?this.modelLineProjections[e].isVisible()&&(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!1),i=!0):(d=!0,this.modelLineProjections[e].isVisible()||(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!0),i=!0)),i){const t=this.modelLineProjections[e].getViewLineCount();this.projectedModelLineLineCounts.setValue(e,t)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,o){const s=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n,d=this.wordBreak===o;if(s&&r&&a&&l&&d)return!1;const h=s&&r&&!a&&l&&d;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=o;let c=null;if(h){c=[];for(let e=0,t=this.modelLineProjections.length;e<t;e++)c[e]=this.modelLineProjections[e].getProjectionData()}return this._constructLines(!1,c),!0}createLineBreaksComputer(){return("advanced"===this.wrappingStrategy?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent,this.wordBreak)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,i){if(!e||e<=this._validModelVersionId)return null;const n=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,o=this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections.splice(t-1,i-t+1),this.projectedModelLineLineCounts.removeValues(t-1,i-t+1),new Kn(n,o)}onModelLinesInserted(e,t,i,n){if(!e||e<=this._validModelVersionId)return null;const o=t>2&&!this.modelLineProjections[t-2].isVisible(),s=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let r=0;const a=[],l=[];for(let e=0,t=n.length;e<t;e++){const t=Io(n[e],!o);a.push(t);const i=t.getViewLineCount();r+=i,l[e]=i}return this.modelLineProjections=this.modelLineProjections.slice(0,t-1).concat(a).concat(this.modelLineProjections.slice(t-1)),this.projectedModelLineLineCounts.insertValues(t-1,l),new Un(s,s+r-1)}onModelLineChanged(e,t,i){if(null!==e&&e<=this._validModelVersionId)return[!1,null,null,null];const n=t-1,o=this.modelLineProjections[n].getViewLineCount(),s=Io(i,this.modelLineProjections[n].isVisible());this.modelLineProjections[n]=s;const r=this.modelLineProjections[n].getViewLineCount();let a=!1,l=0,d=-1,h=0,c=-1,u=0,g=-1;return o>r?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=l+r-1,u=d+1,g=u+(o-r)-1,a=!0):o<r?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=l+o-1,h=d+1,c=h+(r-o)-1,a=!0):(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=l+r-1),this.projectedModelLineLineCounts.setValue(n,r),[a,l<=d?new zn(l,d-l+1):null,h<=c?new Un(h,c):null,u<=g?new Kn(u,g):null]}acceptVersionId(e){this._validModelVersionId=e,1!==this.modelLineProjections.length||this.modelLineProjections[0].isVisible()||this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(e){if(e<1)return 1;const t=this.getViewLineCount();return e>t?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,o.lineNumber,s.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new Wo(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new ae.L(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new ae.L(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),o=new Array;let s=this.getModelStartPositionOfViewLine(i),r=new Array;for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){const t=this.modelLineProjections[e-1];if(t.isVisible()){const o=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,s=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=o;t<s;t++)r.push(new Wo(e,t))}if(!t.isVisible()&&s){const t=new ae.L(e-1,this.model.getLineMaxColumn(e-1)+1),i=Y.e.fromPositions(s,t);o.push(new Vo(i,r)),r=[],s=null}else t.isVisible()&&!s&&(s=new ae.L(e,1))}if(s){const e=Y.e.fromPositions(s,this.getModelEndPositionOfViewLine(n));o.push(new Vo(e,r))}return o}getViewLinesBracketGuides(e,t,i,n){const o=i?this.convertViewPositionToModelPosition(i.lineNumber,i.column):null,s=[];for(const i of this.getViewLineInfosGroupedByModelRanges(e,t)){const e=i.modelRange.startLineNumber,t=this.model.guides.getLinesBracketGuides(e,i.modelRange.endLineNumber,o,n);for(const n of i.viewLines){const i=t[n.modelLineNumber-e].map((e=>{if(-1!==e.forWrappedLinesAfterColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesAfterColumn).lineNumber>=n.modelLineWrappedLineIdx)return;if(-1!==e.forWrappedLinesBeforeOrAtColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesBeforeOrAtColumn).lineNumber<n.modelLineWrappedLineIdx)return;if(!e.horizontalLine)return e;let t=-1;if(-1!==e.column){const i=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.column);if(i.lineNumber===n.modelLineWrappedLineIdx)t=i.column;else if(i.lineNumber<n.modelLineWrappedLineIdx)t=this.getMinColumnOfViewLine(n);else if(i.lineNumber>n.modelLineWrappedLineIdx)return}const i=this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn),o=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.horizontalLine.endColumn);return o.lineNumber===n.modelLineWrappedLineIdx?new Ot.UO(e.visibleColumn,t,e.className,new Ot.vW(e.horizontalLine.top,i.column),-1,-1):o.lineNumber<n.modelLineWrappedLineIdx||-1!==e.visibleColumn?void 0:new Ot.UO(e.visibleColumn,t,e.className,new Ot.vW(e.horizontalLine.top,this.getMaxColumnOfViewLine(n)),-1,-1)}));s.push(i.filter((e=>!!e)))}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[];const s=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1;let d=null;for(let e=a;e<=l;e++){const t=this.modelLineProjections[e];if(t.isVisible()){const n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),o=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=o-n+1;let h=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(h=0===n?1:2),s.push(l),r.push(h),null===d&&(d=new ae.L(e+1,0))}else null!==d&&(o=o.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,e)),d=null)}null!==d&&(o=o.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,n.lineNumber)),d=null);const h=t-e+1,c=new Array(h);let u=0;for(let e=0,t=o.length;e<t;e++){let t=o[e];const i=Math.min(h-u,s[e]),n=r[e];let a;a=2===n?0:1===n?1:i;for(let e=0;e<i;e++)e===a&&(t=0),c[u++]=t}return c}getViewLineContent(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineContent(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineLength(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineLength(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineMinColumn(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineMinColumn(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineMaxColumn(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineMaxColumn(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineData(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineData(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLinesData(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const n=this.projectedModelLineLineCounts.getIndexOf(e-1);let o=e;const s=n.index,r=n.remainder,a=[];for(let n=s,l=this.model.getLineCount();n<l;n++){const l=this.modelLineProjections[n];if(!l.isVisible())continue;const d=n===s?r:0;let h=l.getViewLineCount()-d,c=!1;if(o+h>t&&(c=!0,h=t-o+1),l.getViewLinesData(this.model,n+1,d,h,o-e,i,a),o+=h,c)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),o=n.index,s=n.remainder,r=this.modelLineProjections[o],a=r.getViewLineMinColumn(this.model,o+1,s),l=r.getViewLineMaxColumn(this.model,o+1,s);t<a&&(t=a),t>l&&(t=l);const d=r.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new ae.L(o+1,d)).equals(i)?new ae.L(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new Y.e(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new ae.L(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new Y.e(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,o=!1){const s=this.model.validatePosition(new ae.L(e,t)),r=s.lineNumber,a=s.column;let l=r-1,d=!1;if(o)for(;l<this.modelLineProjections.length&&!this.modelLineProjections[l].isVisible();)l++,d=!0;else for(;l>0&&!this.modelLineProjections[l].isVisible();)l--,d=!0;if(0===l&&!this.modelLineProjections[l].isVisible())return new ae.L(n?0:1,1);const h=1+this.projectedModelLineLineCounts.getPrefixSum(l);let c;return c=d?o?this.modelLineProjections[l].getViewPositionOfModelPosition(h,1,i):this.modelLineProjections[l].getViewPositionOfModelPosition(h,this.model.getLineMaxColumn(l+1),i):this.modelLineProjections[r-1].getViewPositionOfModelPosition(h,a,i),c}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return Y.e.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new Y.e(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,o){const s=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-s.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new Y.e(s.lineNumber,1,r.lineNumber,r.column),t,i,n,o);let a=[];const l=s.lineNumber-1,d=r.lineNumber-1;let h=null;for(let e=l;e<=d;e++)if(this.modelLineProjections[e].isVisible())null===h&&(h=new ae.L(e+1,e===l?s.column:1));else if(null!==h){const o=this.model.getLineMaxColumn(e);a=a.concat(this.model.getDecorationsInRange(new Y.e(h.lineNumber,h.column,e,o),t,i,n)),h=null}null!==h&&(a=a.concat(this.model.getDecorationsInRange(new Y.e(h.lineNumber,h.column,r.lineNumber,r.column),t,i,n)),h=null),a.sort(((e,t)=>{const i=Y.e.compareRangesUsingStarts(e.range,t.range);return 0===i?e.id<t.id?-1:e.id>t.id?1:0:i}));const c=[];let u=0,g=null;for(const e of a){const t=e.id;g!==t&&(g=t,c[u++]=e)}return c}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}class Wo{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class Vo{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Ho{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class zo{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Ko(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new Kn(t,i)}onModelLinesInserted(e,t,i,n){return new Un(t,i)}onModelLineChanged(e,t,i){return[!1,new zn(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let e=0;e<i;e++)n[e]=0;return n}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){const t=this.model.tokenization.getLineTokens(e),i=t.getLineContent();return new gi.IP(i,!1,1,i.length+1,0,t.inflate(),null)}getViewLinesData(e,t,i){const n=this.model.getLineCount();e=Math.min(Math.max(1,e),n),t=Math.min(Math.max(1,t),n);const o=[];for(let n=e;n<=t;n++){const t=n-e;o[t]=i[t]?this.getViewLineData(n):null}return o}getDecorationsInRange(e,t,i,n,o){return this.model.getDecorationsInRange(e,t,i,n,o)}normalizePosition(e,t){return this.model.normalizePosition(e,t)}getLineIndentColumn(e){return this.model.getLineIndentColumn(e)}getInjectedTextAt(e){return null}}class Ko{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class Uo extends k.JT{constructor(e,t,i,n,o,s,r,a,l){if(super(),this.languageConfigurationService=r,this._themeService=a,this._attachedView=l,this.hiddenAreasModel=new qo,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new Yn,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new kn.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new Bt.pY((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStart=jo.create(this.model),this.model.isTooLargeForTokenization())this._lines=new zo(this.model);else{const e=this._configuration.options,t=e.get(49),i=e.get(136),s=e.get(143),r=e.get(135),a=e.get(127);this._lines=new Bo(this._editorId,this.model,n,o,t,this.model.getOptions().tabSize,i,s.wrappingColumn,r,a)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new go(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new No(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._handleVisibleLinesChanged(),e.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new $n(e)),this._eventDispatcher.emitOutgoingEvent(new to(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new Do.CU(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(ui.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new Gn)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new qn(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new Y.e(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Wn(e)),this._eventDispatcher.emitOutgoingEvent(new eo(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new Rn)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new An)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new ae.L(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new Go(t,this._viewportStart.startLineDelta)}return new Go(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,o=n.get(49),s=n.get(136),r=n.get(143),a=n.get(135),l=n.get(127);this._lines.setWrappingSettings(o,s,r.wrappingColumn,a,l)&&(e.emitViewEvent(new Bn),e.emitViewEvent(new Hn),e.emitViewEvent(new Fn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(89)&&(this._decorations.reset(),e.emitViewEvent(new Fn(null))),e.emitViewEvent(new On(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),kn.LM.shouldRecreate(t)&&(this.cursorConfig=new kn.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e instanceof Mn.fV?e.rawContentChangedEvent.changes:e.changes,s=e instanceof Mn.fV?e.rawContentChangedEvent.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(let t=0;t<e.detail.length;t++){const i=e.detail[t];let n=e.injectedTexts[t];n&&(n=n.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize(),l=new E.H9(a);for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new Bn),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(s,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),o=this._lines.onModelLinesInserted(s,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[o,r,a,d]=this._lines.onModelLineChanged(s,e.lineNumber,i);n=o,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),d&&(t.emitViewEvent(d),this.viewLayout.onLinesDeleted(d.fromLineNumber,d.toLineNumber));break}}null!==s&&this._lines.acceptVersionId(s),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new Hn),t.emitViewEvent(new Fn(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const e=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStart.startLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();e instanceof Mn.fV&&t.emitOutgoingEvent(new ho(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i<n;i++){const n=e.ranges[i],o=this.coordinatesConverter.convertModelPositionToViewPosition(new ae.L(n.fromLineNumber,1)).lineNumber,s=this.coordinatesConverter.convertModelPositionToViewPosition(new ae.L(n.toLineNumber,this.model.getLineMaxColumn(n.toLineNumber))).lineNumber;t[i]={fromLineNumber:o,toLineNumber:s}}this._eventDispatcher.emitSingleViewEvent(new Zn(t)),this._eventDispatcher.emitOutgoingEvent(new uo(e))}))),this._register(this.model.onDidChangeLanguageConfiguration((e=>{this._eventDispatcher.emitSingleViewEvent(new Vn),this.cursorConfig=new kn.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new lo(e))}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new kn.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new ao(e))}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new Bn),e.emitViewEvent(new Hn),e.emitViewEvent(new Fn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new kn.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new co(e))}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new Fn(e)),this._eventDispatcher.emitOutgoingEvent(new ro(e))})))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);const i=this.hiddenAreasModel.getMergedRanges();if(i===this.previousHiddenAreas)return;this.previousHiddenAreas=i;const n=this._captureStableViewport();let o=!1;try{const e=this._eventDispatcher.beginEmitViewEvents();o=this._lines.setHiddenAreas(i),o&&(e.emitViewEvent(new Bn),e.emitViewEvent(new Hn),e.emitViewEvent(new Fn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged()),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),o&&this._eventDispatcher.emitOutgoingEvent(new no)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(142),t=this._configuration.options.get(65),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),s=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new Y.e(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];const n=[];let o=0,s=t.startLineNumber,r=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;e<t;e++){const t=i[e].startLineNumber,l=i[e].endLineNumber;l<s||t>a||(s<t&&(n[o++]=new Y.e(s,r,t-1,this.model.getLineMaxColumn(t-1))),s=l+1,r=1)}return(s<a||s===a&&r<l)&&(n[o++]=new Y.e(s,r,a,l)),n}getCompletelyVisibleViewRange(){const e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,i=e.completelyVisibleEndLineNumber;return new Y.e(t,this.getLineMinColumn(t),i,this.getLineMaxColumn(i))}getCompletelyVisibleViewRangeAtScrollTop(e){const t=this.viewLayout.getLinesViewportDataAtScrollTop(e),i=t.completelyVisibleStartLineNumber,n=t.completelyVisibleEndLineNumber;return new Y.e(i,this.getLineMinColumn(i),n,this.getLineMaxColumn(n))}saveState(){const e=this.viewLayout.saveState(),t=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(t),n=this.coordinatesConverter.convertViewPositionToModelPosition(new ae.L(i,this.getLineMinColumn(i))),o=this.viewLayout.getVerticalOffsetForLineNumber(i)-t;return{scrollLeft:e.scrollLeft,firstPosition:n,firstPositionDeltaTop:o}}reduceRestoreState(e){if(void 0===e.firstPosition)return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n){return this._lines.getViewLinesBracketGuides(e,t,i,n)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=Oe.LC(this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Oe.ow(this.getLineContent(e));return-1===t?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){const i=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,i)}getViewLineRenderingData(e){const t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){const i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),o=this.getTabSize(),s=this._lines.getViewLineData(e);return s.inlineDecorations&&(t=[...t,...s.inlineDecorations.map((t=>t.toInlineDecoration(e)))]),new gi.wA(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,i,n,s.tokens,t,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new gi.ud(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,(0,W.$J)(this._configuration.options)),i=new $o;for(const n of t){const t=n.options,o=t.overviewRuler;if(!o)continue;const s=o.position;if(0===s)continue;const r=o.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,s)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;null==e||e.invalidateCachedColor();const i=t.options.minimap;null==i||i.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e);return this.model.modifyPosition(i,t)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const o=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(o)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(Y.e.compareRangesUsingStarts);let o=!1,s=!1;for(const t of e)t.isEmpty()?o=!0:s=!0;if(!s){if(!t)return"";const i=e.map((e=>e.startLineNumber));let o="";for(let e=0;e<i.length;e++)e>0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){const t=[];let n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}const r=[];for(const t of e)t.isEmpty()||r.push(this.model.getValueInRange(t,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===bo.bd)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new Y.e(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(49),s=this._getColorMap();let r;return/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===W.hL.fontFamily?r=W.hL.fontFamily:(r=o.fontFamily,r=r.replace(/"/g,"'"),/[,']/.test(r)||/[+ ]/.test(r)&&(r=`'${r}'`),r=`${r}, ${W.hL.fontFamily}`),{mode:i,html:`<div style="color: ${s[1]};background-color: ${s[2]};font-family: ${r};font-weight: ${o.fontWeight};font-size: ${o.fontSize}px;line-height: ${o.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,s)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,r=this.getTabSize();let a="";for(let e=i;e<=o;e++){const l=this.model.tokenization.getLineTokens(e),d=l.getLineContent(),h=e===i?n-1:0,c=e===o?s-1:d.length;a+=""===d?"<br>":(0,Co.Fq)(d,l.inflate(),t,h,c,r,T.ED)}return a}_getColorMap(){const e=Ge.RW.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=Qe.Il.Format.CSS.formatHex(e[i]);return t}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){return this._withViewEventsCollector((n=>this._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new so):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,o){this._executeCursorEdit((s=>this._cursor.compositionType(s,e,t,i,n,o)))}paste(e,t,i,n){this._executeCursorEdit((o=>this._cursor.paste(o,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,i,0,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new Y.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new jn(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new Y.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new jn(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((s=>s.emitViewEvent(new jn(e,!1,i,null,n,t,o))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Qn),this._eventDispatcher.emitOutgoingEvent(new io))}_withViewEventsCollector(e){try{return e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class jo{static create(e){const t=e._setTrackedRange(null,new Y.e(1,1,1,1),1);return new jo(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,o){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=o}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new ae.L(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new Y.e(i.lineNumber,i.column,i.lineNumber,i.column),1),o=e.viewLayout.getVerticalOffsetForLineNumber(t),s=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=s-o}invalidate(){this._isValid=!1}}class $o{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,o){const s=this._asMap[e];if(s){const e=s.data,t=e[e.length-3],r=e[e.length-1];if(t===o&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(o,i,n)}else{const s=new gi.SQ(e,t,[o,i,n]);this._asMap[e]=s,this.asArray.push(s)}}}class qo{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&Zo(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce(((e,t)=>function(e,t){const i=[];let n=0,o=0;for(;n<e.length&&o<t.length;){const s=e[n],r=t[o];if(s.endLineNumber<r.startLineNumber-1)i.push(e[n++]);else if(r.endLineNumber<s.startLineNumber-1)i.push(t[o++]);else{const e=Math.min(s.startLineNumber,r.startLineNumber),t=Math.max(s.endLineNumber,r.endLineNumber);i.push(new Y.e(e,1,t,1)),n++,o++}}for(;n<e.length;)i.push(e[n++]);for(;o<t.length;)i.push(t[o++]);return i}(e,t)),[]);return Zo(this.ranges,e)||(this.ranges=e),this.ranges}}function Zo(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!e[i].equalsRange(t[i]))return!1;return!0}class Go{constructor(e,t){this.viewportStartModelPosition=e,this.startLineDelta=t}recoverViewportStart(e,t){if(!this.viewportStartModelPosition)return;const i=e.convertModelPositionToViewPosition(this.viewportStartModelPosition),n=t.getVerticalOffsetForLineNumber(i.lineNumber);t.setScrollPosition({scrollTop:n+this.startLineDelta},1)}}var Qo=i(94565),Yo=i(93983),Jo=i(60972),Xo=i(59422),es=i(44906),ts=i(35146);class is{constructor(e,t,i,n,o){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=o}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let e=0;e<this.injectionOffsets.length&&i>this.injectionOffsets[e];e++)i<this.injectionOffsets[e]+this.injectionOptions[e].content.length?i=this.injectionOffsets[e]:i-=this.injectionOptions[e].content.length;return i}translateToOutputPosition(e,t=2){let i=e;if(null!==this.injectionOffsets)for(let n=0;n<this.injectionOffsets.length&&!(e<this.injectionOffsets[n])&&(1===t||e!==this.injectionOffsets[n]);n++)i+=this.injectionOptions[n].content.length;return this.offsetInInputWithInjectionsToOutputPosition(i,t)}offsetInInputWithInjectionsToOutputPosition(e,t=2){let i=0,n=this.breakOffsets.length-1,o=0,s=0;for(;i<=n;){o=i+(n-i)/2|0;const r=this.breakOffsets[o];if(s=o>0?this.breakOffsets[o-1]:0,0===t)if(e<=s)n=o-1;else{if(!(e>r))break;i=o+1}else if(e<s)n=o-1;else{if(!(e>=r))break;i=o+1}}let r=e-s;return o>0&&(r+=this.wrappedTextIndentLength),new ss(o,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),o=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(o!==n)return this.offsetInInputWithInjectionsToOutputPosition(o,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new ss(e-1,this.getMaxOutputOffset(e-1))}else if(1===i&&e<this.getOutputLineCount()-1&&t===this.getMaxOutputOffset(e))return new ss(e+1,this.getMinOutputOffset(e+1));return new ss(e,t)}outputPositionToOffsetInInputWithInjections(e,t){return e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&ns(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(os(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!ns(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!os(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t||4===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1<this.injectionOffsets.length&&this.injectionOffsets[t+1]===this.injectionOffsets[t];)e+=this.injectionOptions[t+1].content.length,t++;return e}if(0===t||3===t){let e=i.offsetInInputWithInjections,t=i.injectedTextIndex;for(;t-1>=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}(0,ts.vE)(t)}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let o=0;o<t.length;o++){const s=i[o].content.length,r=t[o]+n,a=t[o]+n+s;if(r>e)break;if(e<=a)return{injectedTextIndex:o,offsetInInputWithInjections:r,length:s};n+=s}}}}function ns(e){return null==e||e===Si.RM.Right||e===Si.RM.Both}function os(e){return null==e||e===Si.RM.Left||e===Si.RM.Both}class ss{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new ae.L(e+this.outputLineIndex,this.outputOffset+1)}}class rs{static create(e){return new rs(e.get(131),e.get(130))}constructor(e,t){this.classifier=new as(e,t)}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[],a=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t),a.push(i)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,d=[];for(let e=0,h=s.length;e<h;e++){const h=r[e],c=a[e];!c||c.injectionOptions||h?d[e]=cs(this.classifier,s[e],h,t,i,l,n,o):d[e]=hs(this.classifier,c,s[e],t,i,l,n,o)}return ls.length=0,ds.length=0,d}}}}class as extends es.N{constructor(e,t){super(0);for(let t=0;t<e.length;t++)this.set(e.charCodeAt(t),1);for(let e=0;e<t.length;e++)this.set(t.charCodeAt(e),2)}get(e){return e>=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let ls=[],ds=[];function hs(e,t,i,n,o,s,r,a){if(-1===o)return null;const l=i.length;if(l<=1)return null;const d="keepAll"===a,h=t.breakOffsets,c=t.breakOffsetsVisibleColumn,u=ms(i,n,o,s,r),g=o-u,p=ls,m=ds;let f=0,_=0,v=0,b=o;const C=h.length;let w=0;if(w>=0){let e=Math.abs(c[w]-b);for(;w+1<C;){const t=Math.abs(c[w+1]-b);if(t>=e)break;e=t,w++}}for(;w<C;){let t=w<0?0:h[w],o=w<0?0:c[w];_>t&&(t=_,o=v);let r=0,a=0,u=0,y=0;if(o<=b){let v=o,C=0===t?0:i.charCodeAt(t-1),w=0===t?0:e.get(C),S=!0;for(let o=t;o<l;o++){const t=o,l=i.charCodeAt(o);let h,c;if(Oe.ZG(l)?(o++,h=0,c=2):(h=e.get(l),c=us(l,v,n,s)),t>_&&ps(0,w,l,h,d)&&(r=t,a=v),v+=c,v>b){t>_?(u=t,y=v-c):(u=o+1,y=v),v-a>g&&(r=0),S=!1;break}C=l,w=h}if(S){f>0&&(p[f]=h[h.length-1],m[f]=c[h.length-1],f++);break}}if(0===r){let l=o,h=i.charCodeAt(t),c=e.get(h),p=!1;for(let n=t-1;n>=_;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){p=!0;break}let m,f;if(Oe.YK(o)?(n--,m=0,f=2):(m=e.get(o),f=Oe.K7(o)?s:1),l<=b){if(0===u&&(u=t,y=l),l<=b-g)break;if(ps(0,m,h,c,d)){r=t,a=l;break}}l-=f,h=o,c=m}if(0!==r){const e=g-(y-a);if(e<=n){const t=i.charCodeAt(u);let o;o=Oe.ZG(t)?2:us(t,y,n,s),e-o<0&&(r=0)}}if(p){w--;continue}}if(0===r&&(r=u,a=y),r<=_){const e=i.charCodeAt(_);Oe.ZG(e)?(r=_+2,a=v+2):(r=_+1,a=v+us(e,v,n,s))}for(_=r,p[f]=r,v=a,m[f]=a,f++,b=a+g;w<0||w<C&&c[w]<a;)w++;let S=Math.abs(c[w]-b);for(;w+1<C;){const e=Math.abs(c[w+1]-b);if(e>=S)break;S=e,w++}}return 0===f?null:(p.length=f,m.length=f,ls=t.breakOffsets,ds=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=m,t.wrappedTextIndentLength=u,t)}function cs(e,t,i,n,o,s,r,a){const l=Mn.gk.applyInjectedText(t,i);let d,h;if(i&&i.length>0?(d=i.map((e=>e.options)),h=i.map((e=>e.column-1))):(d=null,h=null),-1===o)return d?new is(h,d,[l.length],[],0):null;const c=l.length;if(c<=1)return d?new is(h,d,[l.length],[],0):null;const u="keepAll"===a,g=ms(l,n,o,s,r),p=o-g,m=[],f=[];let _=0,v=0,b=0,C=o,w=l.charCodeAt(0),y=e.get(w),S=us(w,0,n,s),L=1;Oe.ZG(w)&&(S+=1,w=l.charCodeAt(1),y=e.get(w),L++);for(let t=L;t<c;t++){const i=t,o=l.charCodeAt(t);let r,a;Oe.ZG(o)?(t++,r=0,a=2):(r=e.get(o),a=us(o,S,n,s)),ps(0,y,o,r,u)&&(v=i,b=S),S+=a,S>C&&((0===v||S-b>p)&&(v=i,b=S-a),m[_]=v,f[_]=b,_++,C=b+p,v=0),w=o,y=r}return 0!==_||i&&0!==i.length?(m[_]=c,f[_]=S,new is(h,d,m,f,g)):null}function us(e,t,i,n){return 9===e?i-t%i:Oe.K7(e)||e<32?n:1}function gs(e,t){return t-e%t}function ps(e,t,i,n,o){return 32!==i&&(2===t&&2!==n||1!==t&&1===n||!o&&3===t&&2!==n||!o&&3===n&&1!==t)}function ms(e,t,i,n,o){let s=0;if(0!==o){const r=Oe.LC(e);if(-1!==r){for(let i=0;i<r;i++)s+=9===e.charCodeAt(i)?gs(s,t):1;const a=3===o?2:2===o?1:0;for(let e=0;e<a;e++)s+=gs(s,t);s+n>i&&(s=0)}}return s}const fs=(0,st.Z)("domLineBreaksComputer",{createHTML:e=>e});class _s{static create(){return new _s}constructor(){}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t)},finalize:()=>function(e,t,i,n,o,s,r){var a;function l(t){const i=r[t];if(i){const n=Mn.gk.applyInjectedText(e[t],i),o=i.map((e=>e.options)),s=i.map((e=>e.column-1));return new is(s,o,[n.length],[],0)}return null}if(-1===n){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=l(i);return t}const d=Math.round(n*t.typicalHalfwidthCharacterWidth),h=3===o?2:2===o?1:0,c=Math.round(i*h),u=Math.ceil(t.spaceWidth*c),g=document.createElement("div");(0,Pe.N)(g,t);const p=new rt.HT(1e4),m=[],f=[],_=[],v=[],b=[];for(let n=0;n<e.length;n++){const s=Mn.gk.applyInjectedText(e[n],r[n]);let a=0,l=0,h=d;if(0!==o)if(a=Oe.LC(s),-1===a)a=0;else{for(let e=0;e<a;e++)l+=9===s.charCodeAt(e)?i-l%i:1;const e=Math.ceil(t.spaceWidth*l);e+t.typicalFullwidthCharacterWidth>d?(a=0,l=0):h=d-e}const c=s.substr(a),g=vs(c,l,i,h,p,u);m[n]=a,f[n]=l,_[n]=c,v[n]=g[0],b[n]=g[1]}const C=p.build(),w=null!==(a=null==fs?void 0:fs.createHTML(C))&&void 0!==a?a:C;g.innerHTML=w,g.style.position="absolute",g.style.top="10000","keepAll"===s?(g.style.wordBreak="keep-all",g.style.overflowWrap="anywhere"):(g.style.wordBreak="inherit",g.style.overflowWrap="break-word"),document.body.appendChild(g);const y=document.createRange(),S=Array.prototype.slice.call(g.children,0),L=[];for(let t=0;t<e.length;t++){const e=bs(y,S[t],_[t],v[t]);if(null===e){L[t]=l(t);continue}const i=m[t],n=f[t]+c,o=b[t],s=[];for(let t=0,i=e.length;t<i;t++)s[t]=o[e[t]];if(0!==i)for(let t=0,n=e.length;t<n;t++)e[t]+=i;let a,d;const h=r[t];h?(a=h.map((e=>e.options)),d=h.map((e=>e.column-1))):(a=null,d=null),L[t]=new is(d,a,e,s,n)}return document.body.removeChild(g),L}(s,e,t,i,n,o,r)}}}function vs(e,t,i,n,o,s){if(0!==s){const e=String(s);o.appendString('<div style="text-indent: -'),o.appendString(e),o.appendString("px; padding-left: "),o.appendString(e),o.appendString("px; box-sizing: border-box; width:")}else o.appendString('<div style="width:');o.appendString(String(n)),o.appendString('px;">');const r=e.length;let a=t,l=0;const d=[],h=[];let c=0<r?e.charCodeAt(0):0;o.appendString("<span>");for(let t=0;t<r;t++){0!==t&&t%16384==0&&o.appendString("</span><span>"),d[t]=l,h[t]=a;const n=c;c=t+1<r?e.charCodeAt(t+1):0;let s=1,u=1;switch(n){case 9:s=i-a%i,u=s;for(let e=1;e<=s;e++)e<s?o.appendCharCode(160):o.appendASCIICharCode(32);break;case 32:32===c?o.appendCharCode(160):o.appendASCIICharCode(32);break;case 60:o.appendString("&lt;");break;case 62:o.appendString("&gt;");break;case 38:o.appendString("&amp;");break;case 0:o.appendString("&#00;");break;case 65279:case 8232:case 8233:case 133:o.appendCharCode(65533);break;default:Oe.K7(n)&&u++,n<32?o.appendCharCode(9216+n):o.appendCharCode(n)}l+=s,a+=u}return o.appendString("</span>"),d[e.length]=l,h[e.length]=a,o.appendString("</div>"),[d,h]}function bs(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),s=[];try{Cs(e,o,n,0,null,i.length-1,null,s)}catch(e){return console.log(e),null}return 0===s.length?null:(s.push(i.length),s)}function Cs(e,t,i,n,o,s,r,a){if(n===s)return;if(o=o||ws(e,t,i[n],i[n+1]),r=r||ws(e,t,i[s],i[s+1]),Math.abs(o[0].top-r[0].top)<=.1)return;if(n+1===s)return void a.push(s);const l=n+(s-n)/2|0,d=ws(e,t,i[l],i[l+1]);Cs(e,t,i,n,o,l,d,a),Cs(e,t,i,l,d,s,r,a)}function ws(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}var ys=i(92896),Ss=i(51381),Ls=i(71922),xs=i(84144);const ks={value:(0,y.NC)("accessibleDiffViewer","Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class Ns extends xs.Ke{constructor(){super({id:Ns.id,title:{value:(0,y.NC)("editor.action.accessibleDiffViewer.next","Go to Next Difference"),original:"Go to Next Difference"},category:ks,precondition:Yo.Ao.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=Es(e);null==t||t.accessibleDiffViewerNext()}}Ns.id="editor.action.accessibleDiffViewer.next",xs.BH.appendMenuItem(xs.eH.EditorTitle,{command:{id:Ns.id,title:(0,y.NC)("Open Accessible Diff Viewer","Open Accessible Diff Viewer")},order:10,group:"2_diff",when:Yo.Ao.and(Ln.u.accessibleDiffViewerVisible.negate(),Yo.Ao.has("isInDiffEditor"))});class Ds extends xs.Ke{constructor(){super({id:Ds.id,title:{value:(0,y.NC)("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),original:"Go to Previous Difference"},category:ks,precondition:Yo.Ao.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=Es(e);null==t||t.accessibleDiffViewerPrev()}}function Es(e){var t;const i=e.get(G.$),n=i.listDiffEditors(),o=null!==(t=i.getFocusedCodeEditor())&&void 0!==t?t:i.getActiveCodeEditor();if(!o)return null;for(let e=0,t=n.length;e<t;e++){const t=n[e];if(t.getModifiedEditor().getId()===o.getId()||t.getOriginalEditor().getId()===o.getId())return t}if(document.activeElement)for(const e of n)if(Is(e.getContainerDomNode(),document.activeElement))return e;return null}function Is(e,t){let i=t;for(;i;){if(i===e)return!0;i=i.parentElement}return!1}Ds.id="editor.action.accessibleDiffViewer.prev",Qo.P.registerCommandAlias("editor.action.diffReview.next",Ns.id),(0,xs.r1)(Ns),Qo.P.registerCommandAlias("editor.action.diffReview.prev",Ds.id),(0,xs.r1)(Ds);class Ts extends k.JT{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new k.b2),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const e of t)this._pending.has(e.id)?(0,L.dL)(new Error(`Cannot have two contributions with the same id ${e.id}`)):this._pending.set(e.id,e);this._instantiateSome(0),this._register((0,Bt.To)((()=>{this._instantiateSome(1)}))),this._register((0,Bt.To)((()=>{this._instantiateSome(2)}))),this._register((0,Bt.To)((()=>{this._instantiateSome(3)}),5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)"function"==typeof i.saveViewState&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)"function"==typeof i.restoreViewState&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){this._register((0,Bt.To)((()=>{this._instantiateSome(1)}),50))}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const e of t)this._instantiateById(e.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const e=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,e),"function"==typeof e.restoreViewState&&0!==t.instantiation&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(e){(0,L.dL)(e)}}}}var Ms,Rs=function(e,t){return function(i,n){t(i,n,e)}};let As=0;class Os{constructor(e,t,i,n,o,s){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o,this.attachedView=s}dispose(){(0,k.B9)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Ps=Ms=class extends k.JT{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(e,t,i,n,s,r,a,l,d,h,c,u){var g;super(),this.languageConfigurationService=c,this._deliveryQueue=(0,x.Sp)(),this._contributions=this._register(new Ts),this._onDidDispose=this._register(new x.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Fs({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Fs({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new Bs(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new x.Q5({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),s.willCreateCodeEditor();const p=Object.assign({},t);let m;this._domElement=e,this._overflowWidgetsDomNode=p.overflowWidgetsDomNode,delete p.overflowWidgetsDomNode,this._id=++As,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,p,h)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(142)){const e=t.get(142);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=d,this._codeEditorService=s,this._commandService=r,this._themeService=l,this._register(new Ws(this,this._contextKeyService)),this._register(new Vs(this,this._contextKeyService,u)),this._instantiationService=n.createChild(new Jo.y([Yo.i6,this._contextKeyService])),this._modelData=null,this._focusTracker=new Hs(e),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={},m=Array.isArray(i.contributions)?i.contributions:o.Uc.getEditorContributions(),this._contributions.initialize(this,m,this._instantiationService);for(const e of o.Uc.getEditorActions()){if(this._actions.has(e.id)){(0,L.dL)(new Error(`Cannot have two actions with the same id ${e.id}`));continue}const t=new yn.p(e.id,e.label,e.alias,null!==(g=e.precondition)&&void 0!==g?g:void 0,(()=>this._instantiationService.invokeFunction((t=>Promise.resolve(e.runEditorCommand(t,this,null))))),this._contextKeyService);this._actions.set(t.id,t)}const f=()=>!this._configuration.options.get(89)&&this._configuration.options.get(35).enabled;this._register(new S.eg(this._domElement,{onDragEnter:()=>{},onDragOver:e=>{if(!f())return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this.showDropIndicatorAt(t.position)},onDrop:e=>{return t=this,i=void 0,o=function*(){if(!f())return;if(this.removeDropIndicator(),!e.dataTransfer)return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this._onDropIntoEditor.fire({position:t.position,event:e})},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;null===(t=this._modelData)||void 0===t||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i){return new K(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Sn.g.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?ys.w.getWordAtPosition(this._modelData.model,this._configuration.options.get(128),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const o={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(o),this._postDetachModelCleanup(n),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(s.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?Ms._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?Ms._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?Ms._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var i;null===(i=this._modelData)||void 0===i||i.viewModel.setHiddenAreas(e.map((e=>Y.e.lift(e))),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return le.i.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!ae.L.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!Y.e.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,s,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new Y.e(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!ae.L.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new Y.e(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=Q.Y.isISelection(e),n=Y.e.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new Q.Y(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new Y.e(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!Y.e.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(Y.e.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t<i;t++)if(!Q.Y.isISelection(e[t]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,e,i)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,t=1){if(this._modelData){if("number"!=typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:e},t)}}setScrollTop(e,t=1){if(this._modelData){if("number"!=typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:e},t)}}setScrollPosition(e,t=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(e,t)}hasPendingScrollAnimation(){return!!this._modelData&&this._modelData.viewModel.viewLayout.hasPendingScrollAnimation()}saveViewState(){if(!this._modelData)return null;const e=this._contributions.saveViewState();return{cursorState:this._modelData.viewModel.saveCursorState(),viewState:this._modelData.viewModel.saveState(),contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const t=e;if(t&&t.cursorState&&t.viewState){const e=t.cursorState;Array.isArray(e)?e.length>0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){var e;null===(e=this._getViewModel())||void 0===e||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.isSupported())),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run(i)).then(void 0,L.dL):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,o){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,o,e)}_paste(e,t,i,n,o){if(!this._modelData||0===t.length)return;const s=this._modelData.viewModel,r=s.getSelection().getStartPosition();s.paste(t,i,n,e);const a=s.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new Y.e(r.lineNumber,r.column,a.lineNumber,a.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=o.Uc.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,L.dL)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(89)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(89)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(89))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new zs(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,W.$J)(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,(0,W.$J)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){this._modelData&&0!==e.length&&this._modelData.model.changeDecorations((t=>{t.deltaDecorations(e,[])}))}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(142)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarPointerDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e){this._configuration.observeContainer(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const e=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(142);return{top:Ms._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft(),height:i.get(65)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){(0,Pe.N)(e,this._configuration.options.get(49))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),n=new Uo(this._id,this._configuration,e,_s.create(),rs.create(this._configuration.options),(e=>S.jL(e)),this.languageConfigurationService,this._themeService,i);t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(n.onEvent((t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._onDidScrollChange.fire(t);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(t.reachedMaxCursorCount){const e=this.getOption(78),t=y.NC("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",e);this._notificationService.prompt(Xo.zb.Warning,t,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:y.NC("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const e=[];for(let i=0,n=t.selections.length;i<n;i++)e[i]=t.selections[i].getPosition();const i={position:e[0],secondaryPositions:e.slice(1),reason:t.reason,source:t.source};this._onDidChangeCursorPosition.fire(i);const n={selection:t.selections[0],secondarySelections:t.selections.slice(1),modelVersionId:t.modelVersionId,oldSelections:t.oldSelections,oldModelVersionId:t.oldModelVersionId,source:t.source,reason:t.reason};this._onDidChangeCursorSelection.fire(n);break}case 7:this._onDidChangeModelDecorations.fire(t.event);break;case 8:this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._onDidChangeModelLanguage.fire(t.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(t.event);break;case 10:this._onDidChangeModelContent.fire(t.event);break;case 11:this._onDidChangeModelOptions.fire(t.event);break;case 12:this._onDidChangeModelTokens.fire(t.event)}})));const[o,s]=this._createView(n);if(s){this._domElement.appendChild(o.domNode.domNode);let t=Object.keys(this._contentWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];o.addContentWidget(this._contentWidgets[i])}t=Object.keys(this._overlayWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];o.addOverlayWidget(this._overlayWidgets[i])}t=Object.keys(this._glyphMarginWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];o.addGlyphMarginWidget(this._glyphMarginWidgets[i])}o.render(!1,!0),o.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new Os(e,n,o,s,t,i)}_createView(e){let t;t=this.isSimpleWidget?{paste:(e,t,i,n)=>{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",o)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new ot(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new wn(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){null==e||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}showDropIndicatorAt(e){const t=[{range:new Y.e(e.lineNumber,e.column,e.lineNumber,e.column),options:Ms.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}};Ps.dropIntoEditorDecorationOptions=xn.qx.register({description:"workbench-dnd-target",className:"dnd-target"}),Ps=Ms=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Rs(3,Cn.TG),Rs(4,G.$),Rs(5,Qo.H),Rs(6,Yo.i6),Rs(7,He.XE),Rs(8,Xo.lT),Rs(9,z.F),Rs(10,Ss.c_),Rs(11,Ls.p)],Ps);class Fs extends k.JT{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new x.Q5(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new x.Q5(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class Bs extends x.Q5{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class Ws extends k.JT{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=Ln.u.editorSimpleInput.bindTo(t),this._editorFocus=Ln.u.focus.bindTo(t),this._textInputFocus=Ln.u.textInputFocus.bindTo(t),this._editorTextFocus=Ln.u.editorTextFocus.bindTo(t),this._editorTabMovesFocus=Ln.u.tabMovesFocus.bindTo(t),this._editorReadonly=Ln.u.readOnly.bindTo(t),this._inDiffEditor=Ln.u.inDiffEditor.bindTo(t),this._editorColumnSelection=Ln.u.columnSelection.bindTo(t),this._hasMultipleSelections=Ln.u.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=Ln.u.hasNonEmptySelection.bindTo(t),this._canUndo=Ln.u.canUndo.bindTo(t),this._canRedo=Ln.u.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._register(B.n.onDidChangeTabFocus((()=>this._editorTabMovesFocus.set(B.n.getTabFocusMode("editorFocus"))))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(B.n.getTabFocusMode("editorFocus")),this._editorReadonly.set(e.get(89)),this._inDiffEditor.set(e.get(60)),this._editorColumnSelection.set(e.get(21))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class Vs extends k.JT{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=Ln.u.languageId.bindTo(t),this._hasCompletionItemProvider=Ln.u.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=Ln.u.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=Ln.u.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=Ln.u.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=Ln.u.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=Ln.u.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=Ln.u.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=Ln.u.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=Ln.u.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=Ln.u.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=Ln.u.hasReferenceProvider.bindTo(t),this._hasRenameProvider=Ln.u.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=Ln.u.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=Ln.u.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=Ln.u.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=Ln.u.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=Ln.u.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=Ln.u.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=Ln.u.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===N.lg.walkThroughSnippet)})):this.reset()}}class Hs extends k.JT{constructor(e){super(),this._onChange=this._register(new x.Q5),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(S.go(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}class zs{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations((i=>{this._isChangingDecorations||e.call(t,i)}),i)}getRange(e){return this._editor.hasModel()?e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e]):null}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){0!==this._decorationIds.length&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations((t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)}))}finally{this._isChangingDecorations=!1}return this._decorationIds}}const Ks=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),Us=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function js(e){return Ks+encodeURIComponent(e.toString())+Us}const $s=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),qs=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');(0,He.Ic)(((e,t)=>{const i=e.getColor(pi.lXJ);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${js(i)}") repeat-x bottom left; }`);const n=e.getColor(pi.uoC);n&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${js(n)}") repeat-x bottom left; }`);const o=e.getColor(pi.c63);o&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${js(o)}") repeat-x bottom left; }`);const s=e.getColor(pi.Dut);s&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return $s+encodeURIComponent(e.toString())+qs}(s)}") no-repeat bottom left; }`);const r=e.getColor(ze.zu);r&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)}))},84527:(e,t,i)=>{i.d(t,{H:()=>m});var n=i(36248),o=i(17122),s=i(42095),r=i(94565),a=i(93983),l=i(72065),d=i(59422),h=i(97781),c=i(31106),u=i(51381),g=i(71922),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends s.Gm{constructor(e,t,i,n,o,s,r,a,l,d,h,c,u){super(e,Object.assign(Object.assign({},n.getRawOptions()),{overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()}),i,o,s,r,a,l,d,h,c,u),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.jB(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};m=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([p(4,l.TG),p(5,o.$),p(6,r.H),p(7,a.i6),p(8,h.XE),p(9,d.lT),p(10,c.F),p(11,u.c_),p(12,g.p)],m)},61329:(e,t,i)=>{i.d(t,{OY:()=>s,Sj:()=>r,T4:()=>o,Uo:()=>a,hP:()=>l});var n=i(3860);class o{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getEndPosition())}}class s{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromRange(i,0)}}class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getStartPosition())}}class a{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},10291:(e,t,i)=>{i.d(t,{U:()=>u});var n,o=i(97295),s=i(7988),r=i(24314),a=i(3860),l=i(1615),d=i(51381);const h=Object.create(null);function c(e,t){if(t<=0)return"";h[e]||(h[e]=["",e]);const i=h[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let u=n=class{static unshiftIndent(e,t,i,n,o){const r=s.i.visibleColumnFromColumn(e,t,i);if(o){const e=c(" ",n);return c(e,s.i.prevIndentTabStop(r,n)/n)}return c("\t",s.i.prevRenderTabStop(r,i)/i)}static shiftIndent(e,t,i,n,o){const r=s.i.visibleColumnFromColumn(e,t,i);if(o){const e=c(" ",n);return c(e,s.i.nextIndentTabStop(r,n)/n)}return c("\t",s.i.nextRenderTabStop(r,i)/i)}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let a=this._selection.endLineNumber;1===this._selection.endColumn&&i!==a&&(a-=1);const{tabSize:d,indentSize:h,insertSpaces:u}=this._opts,g=i===a;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,p=0;for(let m=i;m<=a;m++,c=p){p=0;const a=e.getLineContent(m);let f,_=o.LC(a);if((!this._opts.isUnshift||0!==a.length&&0!==_)&&(g||this._opts.isUnshift||0!==a.length)){if(-1===_&&(_=a.length),m>1&&s.i.visibleColumnFromColumn(a,_+1,d)%h!=0&&e.tokenization.isCheapToTokenize(m-1)){const t=(0,l.A)(this._opts.autoIndent,e,new r.e(m-1,e.getLineMaxColumn(m-1),m-1,e.getLineMaxColumn(m-1)),this._languageConfigurationService);if(t){if(p=c,t.appendText)for(let e=0,i=t.appendText.length;e<i&&p<h&&32===t.appendText.charCodeAt(e);e++)p++;t.removeText&&(p=Math.max(0,p-t.removeText));for(let e=0;e<p&&0!==_&&32===a.charCodeAt(_-1);e++)_--}}this._opts.isUnshift&&0===_||(f=this._opts.isUnshift?n.unshiftIndent(a,_+1,d,h,u):n.shiftIndent(a,_+1,d,h,u),this._addEditOperation(t,new r.e(m,1,m,_+1),f),m!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=this._selection.startColumn<=_+1))}}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&0===e.getLineLength(i)&&(this._useLastEditRangeForCursorEndPosition=!0);const n=u?c(" ",h):"\t";for(let s=i;s<=a;s++){const a=e.getLineContent(s);let l=o.LC(a);if((!this._opts.isUnshift||0!==a.length&&0!==l)&&(g||this._opts.isUnshift||0!==a.length)&&(-1===l&&(l=a.length),!this._opts.isUnshift||0!==l))if(this._opts.isUnshift){l=Math.min(l,h);for(let e=0;e<l;e++)if(9===a.charCodeAt(e)){l=e+1;break}this._addEditOperation(t,new r.e(s,1,s,l+1),"")}else this._addEditOperation(t,new r.e(s,1,s,1),n),s!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=1===this._selection.startColumn)}}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){if(this._useLastEditRangeForCursorEndPosition){const e=t.getInverseEditOperations()[0];return new a.Y(e.range.endLineNumber,e.range.endColumn,e.range.endLineNumber,e.range.endColumn)}const i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const e=this._selection.startColumn;return i.startColumn<=e?i:0===i.getDirection()?new a.Y(i.startLineNumber,e,i.endLineNumber,i.endColumn):new a.Y(i.endLineNumber,i.endColumn,i.startLineNumber,e)}return i}};var g,p;u=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(g=2,p=d.c_,function(e,t){p(e,t,g)})],u)},15115:(e,t,i)=>{i.d(t,{k:()=>n});const n={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0}},800:(e,t,i)=>{i.d(t,{Pe:()=>m,ei:()=>p,wk:()=>d});var n=i(15115),o=i(64141),s=i(22075),r=i(63580),a=i(23193),l=i(89872);const d=Object.freeze({id:"editor",order:5,type:"object",title:r.NC("editorConfigurationTitle","Editor"),scope:5}),h=Object.assign(Object.assign({},d),{properties:{"editor.tabSize":{type:"number",default:s.D.tabSize,minimum:1,markdownDescription:r.NC("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:r.NC("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:s.D.insertSpaces,markdownDescription:r.NC("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:s.D.detectIndentation,markdownDescription:r.NC("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:s.D.trimAutoWhitespace,description:r.NC("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:s.D.largeFileOptimizations,description:r.NC("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:r.NC("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[r.NC("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),r.NC("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),r.NC("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:r.NC("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[r.NC("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),r.NC("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),r.NC("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:r.NC("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:r.NC("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:r.NC("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:r.NC("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:r.NC("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:r.NC("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:r.NC("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:r.NC("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.NC("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:r.NC("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:r.NC("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.NC("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:n.k.maxComputationTime,description:r.NC("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:n.k.maxFileSize,description:r.NC("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:n.k.renderSideBySide,description:r.NC("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:n.k.renderSideBySideInlineBreakpoint,description:r.NC("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:n.k.useInlineViewWhenSpaceIsLimited,description:r.NC("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:n.k.renderMarginRevertIcon,description:r.NC("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:n.k.ignoreTrimWhitespace,description:r.NC("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:n.k.renderIndicators,description:r.NC("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:n.k.diffCodeLens,description:r.NC("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:n.k.diffWordWrap,markdownEnumDescriptions:[r.NC("wordWrap.off","Lines will never wrap."),r.NC("wordWrap.on","Lines will wrap at the viewport width."),r.NC("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:n.k.diffAlgorithm,markdownEnumDescriptions:[r.NC("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),r.NC("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:n.k.hideUnchangedRegions.enabled,markdownDescription:r.NC("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions. Only works when {0} is set.","`#diffEditor.experimental.useVersion2#`")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:n.k.hideUnchangedRegions.revealLineCount,markdownDescription:r.NC("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions. Only works when {0} is set.","`#diffEditor.experimental.useVersion2#`"),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:n.k.hideUnchangedRegions.minimumLineCount,markdownDescription:r.NC("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions. Only works when {0} is set.","`#diffEditor.experimental.useVersion2#`"),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:n.k.hideUnchangedRegions.contextLineCount,markdownDescription:r.NC("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions. Only works when {0} is set.","`#diffEditor.experimental.useVersion2#`"),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:n.k.experimental.showMoves,markdownDescription:r.NC("showMoves","Controls whether the diff editor should show detected code moves. Only works when {0} is set.","`#diffEditor.experimental.useVersion2#`")},"diffEditor.experimental.useVersion2":{type:"boolean",default:!0,description:r.NC("useVersion2","Controls whether the diff editor uses the new or the old implementation."),tags:["experimental"]},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:n.k.experimental.showEmptyDecorations,description:r.NC("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}});for(const e of o.Bc){const t=e.schema;if(void 0!==t)if(void 0!==(c=t).type||void 0!==c.anyOf)h.properties[`editor.${e.name}`]=t;else for(const e in t)Object.hasOwnProperty.call(t,e)&&(h.properties[e]=t[e])}var c;let u=null;function g(){return null===u&&(u=Object.create(null),Object.keys(h.properties).forEach((e=>{u[e]=!0}))),u}function p(e){return g()[`editor.${e}`]||!1}function m(e){return g()[`diffEditor.${e}`]||!1}l.B.as(a.IP.Configuration).registerConfiguration(h)},64141:(e,t,i)=>{i.d(t,{$J:()=>M,Av:()=>A,BH:()=>V,Bb:()=>h,Bc:()=>B,Bo:()=>E,LJ:()=>c,L_:()=>w,NY:()=>L,O7:()=>_,Zc:()=>b,d2:()=>N,gk:()=>T,hL:()=>F,n0:()=>D,qt:()=>O,rk:()=>g,y0:()=>d});var n=i(9488),o=i(36248),s=i(1432),r=i(22075),a=i(270),l=i(63580);const d=8;class h{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class c{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class u{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}compute(e,t,i){return i}}class g{constructor(e,t){this.newValue=e,this.didChange=t}}function p(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new g(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&n.fS(e,t);return new g(t,!i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const o=p(e[n],t[n]);o.didChange&&(e[n]=o.newValue,i=!0)}return new g(e,i)}class m{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return p(e,t)}validate(e){return this.defaultValue}}class f{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function _(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class v extends f{constructor(e,t,i,n=void 0){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return _(e,this.defaultValue)}}function b(e,t,i,n){if(void 0===e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),0|o)}class C extends f{static clampedInt(e,t,i,n){return b(e,t,i,n)}constructor(e,t,i,n,o,s=void 0){void 0!==s&&(s.type="integer",s.default=i,s.minimum=n,s.maximum=o),super(e,t,i,s),this.minimum=n,this.maximum=o}validate(e){return C.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function w(e,t,i,n){if(void 0===e)return t;const o=y.float(e,t);return y.clamp(o,i,n)}class y extends f{static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}validate(e){return this.validationFn(y.float(e,this.defaultValue))}}class S extends f{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n=void 0){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return S.string(e,this.defaultValue)}}function L(e,t,i,n){return"string"!=typeof e?t:n&&e in n?n[e]:-1===i.indexOf(e)?t:e}class x extends f{constructor(e,t,i,n,o=void 0){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return L(e,this.defaultValue,this._allowedValues)}}class k extends u{constructor(e,t,i,n,o,s,r=void 0){void 0!==r&&(r.type="string",r.enum=o,r.default=n),super(e,t,i,r),this._allowedValues=o,this._convert=s}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var N;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(N||(N={}));class D extends u{constructor(){super(50,"fontLigatures",D.OFF,{anyOf:[{type:"boolean",description:l.NC("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:l.NC("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:l.NC("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?D.OFF:"true"===e?D.ON:e:Boolean(e)?D.ON:D.OFF}}D.OFF='"liga" off, "calt" off',D.ON='"liga" on, "calt" on';class E extends u{constructor(){super(53,"fontVariations",E.OFF,{anyOf:[{type:"boolean",description:l.NC("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:l.NC("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:l.NC("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?E.OFF:"true"===e?E.TRANSLATE:e:Boolean(e)?E.TRANSLATE:E.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}E.OFF="normal",E.TRANSLATE="translate";class I extends u{constructor(){super(52,"fontWeight",F.fontWeight,{anyOf:[{type:"number",minimum:I.MINIMUM_VALUE,maximum:I.MAXIMUM_VALUE,errorMessage:l.NC("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:I.SUGGESTION_VALUES}],default:F.fontWeight,description:l.NC("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(C.clampedInt(e,F.fontWeight,I.MINIMUM_VALUE,I.MAXIMUM_VALUE))}}I.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],I.MINIMUM_VALUE=1,I.MAXIMUM_VALUE=1e3;class T extends m{constructor(){super(142)}compute(e,t,i){return T.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const o=(i+e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:o,minimapLineCount:Math.floor(e.viewLineCount/o)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const s=t.stableMinimapLayoutInput,r=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,c=e.minimap.renderCharacters;let u=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,f=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,C=c?2:3;let w=Math.floor(o*n);const y=w/o;let S=!1,L=!1,x=C*u,k=u/o,N=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:i,extraLinesBeforeFirstLine:s,extraLinesBeyondLastLine:l,desiredRatio:d,minimapLineCount:c}=T.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:h,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:a,pixelRatio:o});if(_/c>1)S=!0,L=!0,u=1,x=1,k=u/o;else{let n=!1,h=u+1;if("fit"===p){const e=Math.ceil((s+_+l)*x);b&&r&&v<=t.stableFitRemainingWidth?(n=!0,h=t.stableFitMaxMinimapScale):n=e>w}if("fill"===p||n){S=!0;const n=u;x=Math.min(a*o,Math.max(1,Math.floor(1/d))),b&&r&&v<=t.stableFitRemainingWidth&&(h=t.stableFitMaxMinimapScale),u=Math.min(h,Math.max(1,Math.floor(x/C))),u>n&&(N=Math.min(2,u/n)),k=u/o/N,w=Math.ceil(Math.max(i,s+_+l)*x),b?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const D=Math.floor(g*k),E=Math.min(D,Math.max(0,Math.floor((v-f-2)*k/(l+k)))+d);let I=Math.floor(o*E);const M=I/o;return I=Math.floor(I*N),{renderMinimap:c?1:2,minimapLeft:"left"===m?0:i-E-f,minimapWidth:E,minimapHeightIsEditorHeight:S,minimapIsSampling:L,minimapScale:u,minimapLineHeight:x,minimapCanvasInnerWidth:I,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:y}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,s=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,d=t.viewLineCount,h=e.get(134),u="inherit"===h?e.get(133):h,g="inherit"===u?e.get(129):u,p=e.get(132),m=t.isDominatedByLongLines,f=e.get(56),_=0!==e.get(66).renderType,v=e.get(67),b=e.get(103),C=e.get(82),w=e.get(71),y=e.get(101),S=y.verticalScrollbarSize,L=y.verticalHasArrows,x=y.arrowSize,k=y.horizontalScrollbarSize,N=e.get(42),D="never"!==e.get(108);let E=e.get(64);N&&D&&(E+=16);let I=0;if(_){const e=Math.max(s,v);I=Math.round(e*a)}let M=0;f&&(M=o*t.glyphMarginDecorationLaneCount);let R=0,A=R+M,O=A+I,P=O+E;const F=i-M-I-E;let B=!1,W=!1,V=-1;"inherit"===u&&m?(B=!0,W=!0):"on"===g||"bounded"===g?W=!0:"wordWrapColumn"===g&&(V=p);const H=T._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:b,paddingTop:C.top,paddingBottom:C.bottom,minimap:w,verticalScrollbarWidth:S,viewLineCount:d,remainingWidth:F,isViewportWrapping:W},t.memory||new c);0!==H.renderMinimap&&0===H.minimapLeft&&(R+=H.minimapWidth,A+=H.minimapWidth,O+=H.minimapWidth,P+=H.minimapWidth);const z=F-H.minimapWidth,K=Math.max(1,Math.floor((z-S-2)/r)),U=L?x:0;return W&&(V=Math.max(1,K),"bounded"===g&&(V=Math.min(V,p))),{width:i,height:n,glyphMarginLeft:R,glyphMarginWidth:M,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:A,lineNumbersWidth:I,decorationsLeft:O,decorationsWidth:E,contentLeft:P,contentWidth:z,minimap:H,viewportColumn:K,isWordWrapMinified:B,isViewportWrapping:W,wrappingColumn:V,verticalScrollbarWidth:S,horizontalScrollbarHeight:k,overviewRuler:{top:U,width:S,height:n-2*U,right:0}}}}function M(e){const t=e.get(96);return"editable"===t?e.get(89):"on"!==t}function R(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const A="inUntrustedWorkspace",O={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};function P(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const F={fontFamily:s.dz?"Menlo, Monaco, 'Courier New', monospace":s.IJ?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:s.dz?12:14,lineHeight:0,letterSpacing:0},B=[];function W(e){return B[e.id]=e,e}const V={acceptSuggestionOnCommitCharacter:W(new v(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:l.NC("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:W(new x(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",l.NC("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:l.NC("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:W(new class extends u{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[l.NC("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached"),l.NC("accessibilitySupport.on","Optimize for usage with a Screen Reader"),l.NC("accessibilitySupport.off","Assume a screen reader is not attached")],default:"auto",tags:["accessibility"],description:l.NC("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:W(new C(3,"accessibilityPageSize",10,1,1073741824,{description:l.NC("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:W(new S(4,"ariaLabel",l.NC("editorViewAccessibleLabel","Editor content"))),ariaRequired:W(new v(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:W(new v(7,"screenReaderAnnounceInlineSuggestion",!0,{description:l.NC("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:W(new x(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.NC("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),l.NC("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:l.NC("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:W(new x(8,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",l.NC("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:l.NC("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:W(new x(9,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",l.NC("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:l.NC("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:W(new x(10,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.NC("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),l.NC("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:l.NC("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:W(new k(11,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[l.NC("editor.autoIndent.none","The editor will not insert indentation automatically."),l.NC("editor.autoIndent.keep","The editor will keep the current line's indentation."),l.NC("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),l.NC("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),l.NC("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:l.NC("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:W(new v(12,"automaticLayout",!1)),autoSurround:W(new x(13,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[l.NC("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),l.NC("editor.autoSurround.quotes","Surround with quotes but not brackets."),l.NC("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:l.NC("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:W(new class extends u{constructor(){const e={enabled:r.D.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:r.D.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(14,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.NC("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:l.NC("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:_(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}),bracketPairGuides:W(new class extends u{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(15,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.NC("editor.guides.bracketPairs.true","Enables bracket pair guides."),l.NC("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),l.NC("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:l.NC("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.NC("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),l.NC("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),l.NC("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:l.NC("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:l.NC("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:l.NC("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[l.NC("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),l.NC("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),l.NC("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:l.NC("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{bracketPairs:P(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:P(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:_(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:_(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:P(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}),stickyTabStops:W(new v(114,"stickyTabStops",!1,{description:l.NC("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:W(new v(16,"codeLens",!0,{description:l.NC("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:W(new S(17,"codeLensFontFamily","",{description:l.NC("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:W(new C(18,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:l.NC("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:W(new v(19,"colorDecorators",!0,{description:l.NC("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:W(new x(145,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[l.NC("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),l.NC("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),l.NC("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:l.NC("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:W(new C(20,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:l.NC("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:W(new v(21,"columnSelection",!1,{description:l.NC("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:W(new class extends u{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(22,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:l.NC("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:l.NC("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:_(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:_(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:W(new v(23,"contextmenu",!0)),copyWithSyntaxHighlighting:W(new v(24,"copyWithSyntaxHighlighting",!0,{description:l.NC("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:W(new k(25,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:l.NC("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:W(new x(26,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[l.NC("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),l.NC("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),l.NC("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:l.NC("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:W(new k(27,"cursorStyle",N.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return N.Line;case"block":return N.Block;case"underline":return N.Underline;case"line-thin":return N.LineThin;case"block-outline":return N.BlockOutline;case"underline-thin":return N.UnderlineThin}}),{description:l.NC("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:W(new C(28,"cursorSurroundingLines",0,0,1073741824,{description:l.NC("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:W(new x(29,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[l.NC("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),l.NC("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:l.NC("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:W(new C(30,"cursorWidth",0,0,1073741824,{markdownDescription:l.NC("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:W(new v(31,"disableLayerHinting",!1)),disableMonospaceOptimizations:W(new v(32,"disableMonospaceOptimizations",!1)),domReadOnly:W(new v(33,"domReadOnly",!1)),dragAndDrop:W(new v(34,"dragAndDrop",!0,{description:l.NC("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:W(new class extends v{constructor(){super(36,"emptySelectionClipboard",!0,{description:l.NC("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),dropIntoEditor:W(new class extends u{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(35,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.NC("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:l.NC("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[l.NC("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),l.NC("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showDropSelector:L(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}),stickyScroll:W(new class extends u{constructor(){const e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(113,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:l.NC("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:l.NC("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:l.NC("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:l.NC("editor.stickyScroll.scrollWithEditor","Enable scrolling of the sticky scroll widget with the editor's horizontal scrollbar.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),maxLineCount:C.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:L(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:_(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}),experimentalWhitespaceRendering:W(new x(37,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[l.NC("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),l.NC("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),l.NC("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:l.NC("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:W(new S(38,"extraEditorClassName","")),fastScrollSensitivity:W(new y(39,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:l.NC("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:W(new class extends u{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(40,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:l.NC("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[l.NC("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),l.NC("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),l.NC("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:l.NC("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[l.NC("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),l.NC("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),l.NC("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:l.NC("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:l.NC("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:s.dz},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:l.NC("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:l.NC("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:_(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":L(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":L(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:_(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:_(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:_(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:W(new v(41,"fixedOverflowWidgets",!1)),folding:W(new v(42,"folding",!0,{description:l.NC("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:W(new x(43,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[l.NC("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),l.NC("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:l.NC("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:W(new v(44,"foldingHighlight",!0,{description:l.NC("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:W(new v(45,"foldingImportsByDefault",!1,{description:l.NC("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:W(new C(46,"foldingMaximumRegions",5e3,10,65e3,{description:l.NC("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:W(new v(47,"unfoldOnClickAfterEndOfLine",!1,{description:l.NC("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:W(new S(48,"fontFamily",F.fontFamily,{description:l.NC("fontFamily","Controls the font family.")})),fontInfo:W(new class extends m{constructor(){super(49)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:W(new D),fontSize:W(new class extends f{constructor(){super(51,"fontSize",F.fontSize,{type:"number",minimum:6,maximum:100,default:F.fontSize,description:l.NC("fontSize","Controls the font size in pixels.")})}validate(e){const t=y.float(e,this.defaultValue);return 0===t?F.fontSize:y.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:W(new I),fontVariations:W(new E),formatOnPaste:W(new v(54,"formatOnPaste",!1,{description:l.NC("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:W(new v(55,"formatOnType",!1,{description:l.NC("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:W(new v(56,"glyphMargin",!0,{description:l.NC("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:W(new class extends u{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[l.NC("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),l.NC("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),l.NC("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(57,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:l.NC("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:l.NC("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:l.NC("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:l.NC("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:l.NC("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:l.NC("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:l.NC("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:l.NC("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:l.NC("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:l.NC("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:l.NC("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,s;if(!e||"object"!=typeof e)return this.defaultValue;const r=e;return{multiple:L(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:L(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:L(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:L(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=r.multipleImplementations)&&void 0!==o?o:L(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(s=r.multipleReferences)&&void 0!==s?s:L(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:S.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:S.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:S.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:S.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:S.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:W(new v(58,"hideCursorInOverviewRuler",!1,{description:l.NC("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:W(new class extends u{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(59,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:l.NC("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:l.NC("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:l.NC("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:l.NC("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),delay:C.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:_(t.sticky,this.defaultValue.sticky),above:_(t.above,this.defaultValue.above)}}}),inDiffEditor:W(new v(60,"inDiffEditor",!1)),letterSpacing:W(new y(62,"letterSpacing",F.letterSpacing,(e=>y.clamp(e,-5,20)),{description:l.NC("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:W(new class extends u{constructor(){const e={enabled:!0};super(63,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:l.NC("codeActions","Enables the Code Action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:_(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),lineDecorationsWidth:W(new class extends u{constructor(){super(64,"lineDecorationsWidth",10)}validate(e){return"string"==typeof e&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):C.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?C.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}),lineHeight:W(new class extends y{constructor(){super(65,"lineHeight",F.lineHeight,(e=>y.clamp(e,0,150)),{markdownDescription:l.NC("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:W(new class extends u{constructor(){super(66,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[l.NC("lineNumbers.off","Line numbers are not rendered."),l.NC("lineNumbers.on","Line numbers are rendered as absolute number."),l.NC("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),l.NC("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:l.NC("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:W(new C(67,"lineNumbersMinChars",5,1,300)),linkedEditing:W(new v(68,"linkedEditing",!1,{description:l.NC("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:W(new v(69,"links",!0,{description:l.NC("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:W(new x(70,"matchBrackets","always",["always","near","never"],{description:l.NC("matchBrackets","Highlight matching brackets.")})),minimap:W(new class extends u{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(71,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:l.NC("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:l.NC("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[l.NC("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),l.NC("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),l.NC("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:l.NC("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:l.NC("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:l.NC("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:l.NC("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:l.NC("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:l.NC("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),autohide:_(t.autohide,this.defaultValue.autohide),size:L(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:L(t.side,this.defaultValue.side,["right","left"]),showSlider:L(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:_(t.renderCharacters,this.defaultValue.renderCharacters),scale:C.clampedInt(t.scale,1,1,3),maxColumn:C.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:W(new x(72,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:W(new y(73,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:l.NC("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:W(new v(74,"mouseWheelZoom",!1,{markdownDescription:l.NC("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:W(new v(75,"multiCursorMergeOverlapping",!0,{description:l.NC("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:W(new k(76,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?s.dz?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[l.NC("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),l.NC("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:l.NC({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:W(new x(77,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[l.NC("multiCursorPaste.spread","Each cursor pastes a single line of the text."),l.NC("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:l.NC("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:W(new C(78,"multiCursorLimit",1e4,1,1e5,{markdownDescription:l.NC("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:W(new v(79,"occurrencesHighlight",!0,{description:l.NC("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:W(new v(80,"overviewRulerBorder",!0,{description:l.NC("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:W(new C(81,"overviewRulerLanes",3,0,3)),padding:W(new class extends u{constructor(){super(82,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:l.NC("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:l.NC("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:C.clampedInt(t.top,0,0,1e3),bottom:C.clampedInt(t.bottom,0,0,1e3)}}}),pasteAs:W(new class extends u{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(83,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.NC("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:l.NC("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[l.NC("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),l.NC("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showPasteSelector:L(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}),parameterHints:W(new class extends u{constructor(){const e={enabled:!0,cycle:!0};super(84,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:l.NC("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:l.NC("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),cycle:_(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:W(new x(85,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[l.NC("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),l.NC("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:l.NC("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:W(new v(86,"definitionLinkOpensInPeek",!1,{description:l.NC("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:W(new class extends u{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[l.NC("on","Quick suggestions show inside the suggest widget"),l.NC("inline","Quick suggestions show as ghost text"),l.NC("off","Quick suggestions are disabled")]}];super(87,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:l.NC("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:l.NC("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:l.NC("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:l.NC("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if("boolean"==typeof e){const t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!=typeof e)return this.defaultValue;const{other:t,comments:i,strings:n}=e,o=["on","inline","off"];let s,r,a;return s="boolean"==typeof t?t?"on":"off":L(t,this.defaultValue.other,o),r="boolean"==typeof i?i?"on":"off":L(i,this.defaultValue.comments,o),a="boolean"==typeof n?n?"on":"off":L(n,this.defaultValue.strings,o),{other:s,comments:r,strings:a}}}),quickSuggestionsDelay:W(new C(88,"quickSuggestionsDelay",10,0,1073741824,{description:l.NC("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:W(new v(89,"readOnly",!1)),readOnlyMessage:W(new class extends u{constructor(){super(90,"readOnlyMessage",void 0)}validate(e){return e&&"object"==typeof e?e:this.defaultValue}}),renameOnType:W(new v(91,"renameOnType",!1,{description:l.NC("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:l.NC("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:W(new v(92,"renderControlCharacters",!0,{description:l.NC("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:W(new x(93,"renderFinalNewline",s.IJ?"dimmed":"on",["off","on","dimmed"],{description:l.NC("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:W(new x(94,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",l.NC("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:l.NC("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:W(new v(95,"renderLineHighlightOnlyWhenFocus",!1,{description:l.NC("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:W(new x(96,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:W(new x(97,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",l.NC("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),l.NC("renderWhitespace.selection","Render whitespace characters only on selected text."),l.NC("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:l.NC("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:W(new C(98,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:W(new v(99,"roundedSelection",!0,{description:l.NC("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:W(new class extends u{constructor(){const e=[],t={type:"number",description:l.NC("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(100,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:l.NC("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:l.NC("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if("number"==typeof i)t.push({column:C.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:C.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:W(new class extends u{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(101,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.NC("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),l.NC("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),l.NC("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:l.NC("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.NC("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),l.NC("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),l.NC("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:l.NC("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:l.NC("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:l.NC("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:l.NC("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=C.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=C.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:C.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:R(t.vertical,this.defaultValue.vertical),horizontal:R(t.horizontal,this.defaultValue.horizontal),useShadows:_(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:_(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:_(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:_(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:_(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:C.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:C.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:_(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:W(new C(102,"scrollBeyondLastColumn",4,0,1073741824,{description:l.NC("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:W(new v(103,"scrollBeyondLastLine",!0,{description:l.NC("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:W(new v(104,"scrollPredominantAxis",!0,{description:l.NC("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:W(new v(105,"selectionClipboard",!0,{description:l.NC("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:s.IJ})),selectionHighlight:W(new v(106,"selectionHighlight",!0,{description:l.NC("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:W(new v(107,"selectOnLineNumbers",!0)),showFoldingControls:W(new x(108,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[l.NC("showFoldingControls.always","Always show the folding controls."),l.NC("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),l.NC("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:l.NC("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:W(new v(109,"showUnused",!0,{description:l.NC("showUnused","Controls fading out of unused code.")})),showDeprecated:W(new v(137,"showDeprecated",!0,{description:l.NC("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:W(new class extends u{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(138,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:l.NC("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[l.NC("editor.inlayHints.on","Inlay hints are enabled"),l.NC("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",s.dz?"Ctrl+Option":"Ctrl+Alt"),l.NC("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",s.dz?"Ctrl+Option":"Ctrl+Alt"),l.NC("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:l.NC("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:l.NC("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:l.NC("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return"boolean"==typeof t.enabled&&(t.enabled=t.enabled?"on":"off"),{enabled:L(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:C.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily),padding:_(t.padding,this.defaultValue.padding)}}}),snippetSuggestions:W(new x(110,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[l.NC("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),l.NC("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),l.NC("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),l.NC("snippetSuggestions.none","Do not show snippet suggestions.")],description:l.NC("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:W(new class extends u{constructor(){super(111,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:l.NC("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:l.NC("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:_(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:_(e.selectSubwords,this.defaultValue.selectSubwords)}:this.defaultValue}}),smoothScrolling:W(new v(112,"smoothScrolling",!1,{description:l.NC("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:W(new C(115,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:W(new class extends u{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(116,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[l.NC("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),l.NC("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:l.NC("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:l.NC("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:l.NC("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:l.NC("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[l.NC("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),l.NC("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),l.NC("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),l.NC("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:l.NC("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:l.NC("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:l.NC("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:l.NC("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:l.NC("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:l.NC("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:l.NC("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:l.NC("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:l.NC("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:L(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:_(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:_(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:_(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:_(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:L(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:_(t.showIcons,this.defaultValue.showIcons),showStatusBar:_(t.showStatusBar,this.defaultValue.showStatusBar),preview:_(t.preview,this.defaultValue.preview),previewMode:L(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:_(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:_(t.showMethods,this.defaultValue.showMethods),showFunctions:_(t.showFunctions,this.defaultValue.showFunctions),showConstructors:_(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:_(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:_(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:_(t.showFields,this.defaultValue.showFields),showVariables:_(t.showVariables,this.defaultValue.showVariables),showClasses:_(t.showClasses,this.defaultValue.showClasses),showStructs:_(t.showStructs,this.defaultValue.showStructs),showInterfaces:_(t.showInterfaces,this.defaultValue.showInterfaces),showModules:_(t.showModules,this.defaultValue.showModules),showProperties:_(t.showProperties,this.defaultValue.showProperties),showEvents:_(t.showEvents,this.defaultValue.showEvents),showOperators:_(t.showOperators,this.defaultValue.showOperators),showUnits:_(t.showUnits,this.defaultValue.showUnits),showValues:_(t.showValues,this.defaultValue.showValues),showConstants:_(t.showConstants,this.defaultValue.showConstants),showEnums:_(t.showEnums,this.defaultValue.showEnums),showEnumMembers:_(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:_(t.showKeywords,this.defaultValue.showKeywords),showWords:_(t.showWords,this.defaultValue.showWords),showColors:_(t.showColors,this.defaultValue.showColors),showFiles:_(t.showFiles,this.defaultValue.showFiles),showReferences:_(t.showReferences,this.defaultValue.showReferences),showFolders:_(t.showFolders,this.defaultValue.showFolders),showTypeParameters:_(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:_(t.showSnippets,this.defaultValue.showSnippets),showUsers:_(t.showUsers,this.defaultValue.showUsers),showIssues:_(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:W(new class extends u{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(61,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:l.NC("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover"],enumDescriptions:[l.NC("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),l.NC("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion.")],description:l.NC("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:l.NC("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),mode:L(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:L(t.showToolbar,this.defaultValue.showToolbar,["always","onHover"]),suppressSuggestions:_(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:_(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}),inlineCompletionsAccessibilityVerbose:W(new v(146,"inlineCompletionsAccessibilityVerbose",!1,{description:l.NC("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:W(new C(117,"suggestFontSize",0,0,1e3,{markdownDescription:l.NC("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:W(new C(118,"suggestLineHeight",0,0,1e3,{markdownDescription:l.NC("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:W(new v(119,"suggestOnTriggerCharacters",!0,{description:l.NC("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:W(new x(120,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[l.NC("suggestSelection.first","Always select the first suggestion."),l.NC("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),l.NC("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:l.NC("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:W(new x(121,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[l.NC("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),l.NC("tabCompletion.off","Disable tab completions."),l.NC("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:l.NC("tabCompletion","Enables tab completions.")})),tabIndex:W(new C(122,"tabIndex",0,-1,1073741824)),unicodeHighlight:W(new class extends u{constructor(){const e={nonBasicASCII:A,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:A,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(123,"unicodeHighlight",e,{[O.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.nonBasicASCII,description:l.NC("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[O.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:l.NC("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[O.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:l.NC("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[O.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.includeComments,description:l.NC("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[O.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.includeStrings,description:l.NC("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[O.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:l.NC("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[O.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:l.NC("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(o.fS(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&e&&(o.fS(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new g(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:P(t.nonBasicASCII,A,[!0,!1,A]),invisibleCharacters:_(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:_(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:P(t.includeComments,A,[!0,!1,A]),includeStrings:P(t.includeStrings,A,[!0,!1,A]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;const i={};for(const[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}),unusualLineTerminators:W(new x(124,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[l.NC("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),l.NC("unusualLineTerminators.off","Unusual line terminators are ignored."),l.NC("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:l.NC("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:W(new v(125,"useShadowDOM",!0)),useTabStops:W(new v(126,"useTabStops",!0,{description:l.NC("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:W(new x(127,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[l.NC("wordBreak.normal","Use the default line break rule."),l.NC("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:l.NC("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:W(new S(128,"wordSeparators",a.vu,{description:l.NC("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:W(new x(129,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[l.NC("wordWrap.off","Lines will never wrap."),l.NC("wordWrap.on","Lines will wrap at the viewport width."),l.NC({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),l.NC({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:l.NC({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:W(new S(130,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:W(new S(131,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥+")),wordWrapColumn:W(new C(132,"wordWrapColumn",80,1,1073741824,{markdownDescription:l.NC({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:W(new x(133,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:W(new x(134,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:W(new class extends m{constructor(){super(139)}compute(e,t,i){const n=["monaco-editor"];return t.get(38)&&n.push(t.get(38)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(72)?n.push("mouse-default"):"copy"===t.get(72)&&n.push("mouse-copy"),t.get(109)&&n.push("showUnused"),t.get(137)&&n.push("showDeprecated"),n.join(" ")}}),defaultColorDecorators:W(new v(144,"defaultColorDecorators",!1,{markdownDescription:l.NC("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:W(new class extends m{constructor(){super(140)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:W(new v(141,"tabFocusMode",!1,{markdownDescription:l.NC("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:W(new T),wrappingInfo:W(new class extends m{constructor(){super(143)}compute(e,t,i){const n=t.get(142);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}),wrappingIndent:W(new class extends u{constructor(){super(135,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[l.NC("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),l.NC("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),l.NC("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),l.NC("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:l.NC("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){return 2===t.get(2)?0:i}}),wrappingStrategy:W(new class extends u{constructor(){super(136,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[l.NC("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),l.NC("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:l.NC("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return L(e,"simple",["simple","advanced"])}compute(e,t,i){return 2===t.get(2)?"advanced":i}})}},82334:(e,t,i)=>{i.d(t,{C:()=>o});var n=i(4669);const o=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},27374:(e,t,i)=>{i.d(t,{E4:()=>a,pR:()=>l});var n=i(1432),o=i(64141),s=i(82334);const r=n.dz?1.5:1.35;class a{static createFromValidatedSettings(e,t,i){const n=e.get(48),o=e.get(52),s=e.get(51),r=e.get(50),l=e.get(53),d=e.get(65),h=e.get(62);return a._create(n,o,s,r,l,d,h,t,i)}static _create(e,t,i,n,l,d,h,c,u){0===d?d=r*i:d<8&&(d*=i),(d=Math.round(d))<8&&(d=8);const g=1+(u?0:.1*s.C.getZoomLevel());return i*=g,d*=g,l===o.Bo.TRANSLATE&&("normal"===t||"bold"===t?l=o.Bo.OFF:(l=`'wght' ${parseInt(t,10)}`,t="normal")),new a({pixelRatio:c,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,fontVariationSettings:l,lineHeight:d,letterSpacing:h})}constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.fontVariationSettings=e.fontVariationSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const e=o.hL.fontFamily,t=a._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}class l extends a{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=2,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.fontVariationSettings===e.fontVariationSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},44906:(e,t,i)=>{i.d(t,{N:()=>o,q:()=>s});var n=i(85427);class o{constructor(e){const t=(0,n.K)(e);this._defaultValue=t,this._asciiMap=o._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const i=(0,n.K)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class s{constructor(){this._actual=new o(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}},7988:(e,t,i)=>{i.d(t,{i:()=>o});var n=i(97295);class o{static _nextVisibleColumn(e,t,i){return 9===e?o.nextRenderTabStop(t,i):n.K7(e)||n.C8(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){const o=Math.min(t-1,e.length),s=e.substring(0,o),r=new n.W1(s);let a=0;for(;!r.eol();){const e=n.ZH(s,o,r.offset);r.nextGraphemeLength(),a=this._nextVisibleColumn(e,a,i)}return a}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const o=e.length,s=new n.W1(e);let r=0,a=1;for(;!s.eol();){const l=n.ZH(e,o,s.offset);s.nextGraphemeLength();const d=this._nextVisibleColumn(l,r,i),h=s.offset+1;if(d>=t)return d-t<t-r?h:a;r=d,a=h}return o+1}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}static prevIndentTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}}},69386:(e,t,i)=>{i.d(t,{h:()=>o});var n=i(24314);class o{static insert(e,t){return{range:new n.e(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},8625:(e,t,i)=>{i.d(t,{Bj:()=>D,CE:()=>W,DS:()=>$,HV:()=>ee,H_:()=>_,Jn:()=>Z,Kh:()=>a,L7:()=>X,Mm:()=>l,N8:()=>L,Qb:()=>Q,Re:()=>O,Tf:()=>f,To:()=>J,UP:()=>V,Vs:()=>B,Xy:()=>y,YF:()=>G,cK:()=>S,dI:()=>c,e9:()=>C,eS:()=>P,e_:()=>I,f9:()=>te,fY:()=>h,gS:()=>m,h1:()=>v,hw:()=>u,lK:()=>A,lS:()=>q,ll:()=>k,m$:()=>j,m1:()=>z,m3:()=>Y,m9:()=>R,n0:()=>d,oV:()=>U,qe:()=>w,r0:()=>H,ts:()=>K,vP:()=>b,zJ:()=>F,zd:()=>x,zu:()=>T,zw:()=>E});var n=i(63580),o=i(41264),s=i(73910),r=i(97781);const a=(0,s.P6G)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},n.NC("lineHighlight","Background color for the highlight of line at the cursor position.")),l=(0,s.P6G)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:s.lRK},n.NC("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),d=((0,s.P6G)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},n.NC("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.P6G)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:s.xL1,hcLight:s.xL1},n.NC("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),(0,s.P6G)("editor.symbolHighlightBackground",{dark:s.MUv,light:s.MUv,hcDark:null,hcLight:null},n.NC("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,s.P6G)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:s.xL1,hcLight:s.xL1},n.NC("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),(0,s.P6G)("editorCursor.foreground",{dark:"#AEAFAD",light:o.Il.black,hcDark:o.Il.white,hcLight:"#0F4A85"},n.NC("caret","Color of the editor cursor."))),h=(0,s.P6G)("editorCursor.background",null,n.NC("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),c=(0,s.P6G)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},n.NC("editorWhitespaces","Color of whitespace characters in the editor.")),u=(0,s.P6G)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:o.Il.white,hcLight:"#292929"},n.NC("editorLineNumbers","Color of editor line numbers.")),g=(0,s.P6G)("editorIndentGuide.background",{dark:c,light:c,hcDark:c,hcLight:c},n.NC("editorIndentGuides","Color of the editor indentation guides."),!1,n.NC("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),p=(0,s.P6G)("editorIndentGuide.activeBackground",{dark:c,light:c,hcDark:c,hcLight:c},n.NC("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,n.NC("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),m=(0,s.P6G)("editorIndentGuide.background1",{dark:g,light:g,hcDark:g,hcLight:g},n.NC("editorIndentGuides1","Color of the editor indentation guides (1).")),f=(0,s.P6G)("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorIndentGuides2","Color of the editor indentation guides (2).")),_=(0,s.P6G)("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorIndentGuides3","Color of the editor indentation guides (3).")),v=(0,s.P6G)("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorIndentGuides4","Color of the editor indentation guides (4).")),b=(0,s.P6G)("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorIndentGuides5","Color of the editor indentation guides (5).")),C=(0,s.P6G)("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorIndentGuides6","Color of the editor indentation guides (6).")),w=(0,s.P6G)("editorIndentGuide.activeBackground1",{dark:p,light:p,hcDark:p,hcLight:p},n.NC("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),y=(0,s.P6G)("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),S=(0,s.P6G)("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),L=(0,s.P6G)("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),x=(0,s.P6G)("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),k=(0,s.P6G)("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),N=(0,s.P6G)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:s.xL1,hcLight:s.xL1},n.NC("editorActiveLineNumber","Color of editor active line number"),!1,n.NC("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),D=((0,s.P6G)("editorLineNumber.activeForeground",{dark:N,light:N,hcDark:N,hcLight:N},n.NC("editorActiveLineNumber","Color of editor active line number")),(0,s.P6G)("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},n.NC("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."))),E=((0,s.P6G)("editorRuler.foreground",{dark:"#5A5A5A",light:o.Il.lightgrey,hcDark:o.Il.white,hcLight:"#292929"},n.NC("editorRuler","Color of the editor rulers.")),(0,s.P6G)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},n.NC("editorCodeLensForeground","Foreground color of editor CodeLens")),(0,s.P6G)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},n.NC("editorBracketMatchBackground","Background color behind matching brackets")),(0,s.P6G)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:s.lRK,hcLight:s.lRK},n.NC("editorBracketMatchBorder","Color for matching brackets boxes")),(0,s.P6G)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},n.NC("editorOverviewRulerBorder","Color of the overview ruler border."))),I=(0,s.P6G)("editorOverviewRuler.background",null,n.NC("editorOverviewRulerBackground","Background color of the editor overview ruler.")),T=((0,s.P6G)("editorGutter.background",{dark:s.cvW,light:s.cvW,hcDark:s.cvW,hcLight:s.cvW},n.NC("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,s.P6G)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:o.Il.fromHex("#fff").transparent(.8),hcLight:s.lRK},n.NC("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),(0,s.P6G)("editorUnnecessaryCode.opacity",{dark:o.Il.fromHex("#000a"),light:o.Il.fromHex("#0007"),hcDark:null,hcLight:null},n.NC("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out."))),M=((0,s.P6G)("editorGhostText.border",{dark:null,light:null,hcDark:o.Il.fromHex("#fff").transparent(.8),hcLight:o.Il.fromHex("#292929").transparent(.8)},n.NC("editorGhostTextBorder","Border color of ghost text in the editor.")),(0,s.P6G)("editorGhostText.foreground",{dark:o.Il.fromHex("#ffffff56"),light:o.Il.fromHex("#0007"),hcDark:null,hcLight:null},n.NC("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),(0,s.P6G)("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},n.NC("editorGhostTextBackground","Background color of the ghost text in the editor.")),new o.Il(new o.VS(0,122,204,.6))),R=(0,s.P6G)("editorOverviewRuler.rangeHighlightForeground",{dark:M,light:M,hcDark:M,hcLight:M},n.NC("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),A=(0,s.P6G)("editorOverviewRuler.errorForeground",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hcDark:new o.Il(new o.VS(255,50,50,1)),hcLight:"#B5200D"},n.NC("overviewRuleError","Overview ruler marker color for errors.")),O=(0,s.P6G)("editorOverviewRuler.warningForeground",{dark:s.uoC,light:s.uoC,hcDark:s.pW3,hcLight:s.pW3},n.NC("overviewRuleWarning","Overview ruler marker color for warnings.")),P=(0,s.P6G)("editorOverviewRuler.infoForeground",{dark:s.c63,light:s.c63,hcDark:s.T83,hcLight:s.T83},n.NC("overviewRuleInfo","Overview ruler marker color for infos.")),F=(0,s.P6G)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},n.NC("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),B=(0,s.P6G)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},n.NC("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),W=(0,s.P6G)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},n.NC("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),V=(0,s.P6G)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),H=(0,s.P6G)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),z=(0,s.P6G)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),K=(0,s.P6G)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new o.Il(new o.VS(255,18,18,.8)),light:new o.Il(new o.VS(255,18,18,.8)),hcDark:new o.Il(new o.VS(255,50,50,1)),hcLight:""},n.NC("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),U=(0,s.P6G)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),j=(0,s.P6G)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),$=(0,s.P6G)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),q=(0,s.P6G)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),Z=(0,s.P6G)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),G=(0,s.P6G)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Q=(0,s.P6G)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Y=(0,s.P6G)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),J=(0,s.P6G)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),X=(0,s.P6G)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),ee=(0,s.P6G)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),te=(0,s.P6G)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},n.NC("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));(0,s.P6G)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},n.NC("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.P6G)("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},n.NC("editorUnicodeHighlight.background","Background color used to highlight unicode characters.")),(0,r.Ic)(((e,t)=>{const i=e.getColor(s.cvW),n=e.getColor(a),o=n&&!n.isTransparent()?n:i;o&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${o}; }`)}))},23795:(e,t,i)=>{function n(e){let t=0,i=0,n=0,o=0;for(let s=0,r=e.length;s<r;s++){const a=e.charCodeAt(s);13===a?(0===t&&(i=s),t++,s+1<r&&10===e.charCodeAt(s+1)?(o|=2,s++):o|=3,n=s+1):10===a&&(o|=1,0===t&&(i=s),t++,n=s+1)}return 0===t&&(i=e.length),[t,i,e.length-n,o]}i.d(t,{Q:()=>n})},83158:(e,t,i)=>{i.d(t,{x:()=>s});var n=i(97295),o=i(7988);function s(e,t,i){let s=n.LC(e);return-1===s&&(s=e.length),function(e,t,i){let n=0;for(let i=0;i<e.length;i++)"\t"===e.charAt(i)?n=o.i.nextIndentTabStop(n,t):n++;let s="";if(!i){const e=Math.floor(n/t);n%=t;for(let t=0;t<e;t++)s+="\t"}for(let e=0;e<n;e++)s+=" ";return s}(e.substring(0,s),t,i)+e.substring(s)}},45463:(e,t,i)=>{i.d(t,{z:()=>r});var n=i(17301),o=i(19247),s=i(24314);class r{static fromRange(e){return new r(e.startLineNumber,e.endLineNumber)}static subtract(e,t){return t?e.startLineNumber<t.startLineNumber&&t.endLineNumberExclusive<e.endLineNumberExclusive?[new r(e.startLineNumber,t.startLineNumber),new r(t.endLineNumberExclusive,e.endLineNumberExclusive)]:t.startLineNumber<=e.startLineNumber&&e.endLineNumberExclusive<=t.endLineNumberExclusive?[]:t.endLineNumberExclusive<e.endLineNumberExclusive?[new r(Math.max(t.endLineNumberExclusive,e.startLineNumber),e.endLineNumberExclusive)]:[new r(e.startLineNumber,Math.min(t.startLineNumber,e.endLineNumberExclusive))]:[e]}static joinMany(e){if(0===e.length)return[];let t=e[0];for(let i=1;i<e.length;i++)t=this.join(t,e[i]);return t}static join(e,t){if(0===e.length)return t;if(0===t.length)return e;const i=[];let n=0,o=0,s=null;for(;n<e.length||o<t.length;){let a=null;if(n<e.length&&o<t.length){const i=e[n],s=t[o];i.startLineNumber<s.startLineNumber?(a=i,n++):(a=s,o++)}else n<e.length?(a=e[n],n++):(a=t[o],o++);null===s?s=a:s.endLineNumberExclusive>=a.startLineNumber?s=new r(s.startLineNumber,Math.max(s.endLineNumberExclusive,a.endLineNumberExclusive)):(i.push(s),s=a)}return null!==s&&i.push(s),i}static ofLength(e,t){return new r(e,e+t)}static deserialize(e){return new r(e[0],e[1])}constructor(e,t){if(e>t)throw new n.he(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&e<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(e){return new r(this.startLineNumber+e,this.endLineNumberExclusive+e)}deltaLength(e){return new r(this.startLineNumber,this.endLineNumberExclusive+e)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(e){return new r(Math.min(this.startLineNumber,e.startLineNumber),Math.max(this.endLineNumberExclusive,e.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumberExclusive,e.endLineNumberExclusive);if(t<=i)return new r(t,i)}intersectsStrict(e){return this.startLineNumber<e.endLineNumberExclusive&&e.startLineNumber<this.endLineNumberExclusive}overlapOrTouch(e){return this.startLineNumber<=e.endLineNumberExclusive&&e.startLineNumber<=this.endLineNumberExclusive}equals(e){return this.startLineNumber===e.startLineNumber&&this.endLineNumberExclusive===e.endLineNumberExclusive}toInclusiveRange(){return this.isEmpty?null:new s.e(this.startLineNumber,1,this.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER)}toExclusiveRange(){return new s.e(this.startLineNumber,1,this.endLineNumberExclusive,1)}mapToLineArray(e){const t=[];for(let i=this.startLineNumber;i<this.endLineNumberExclusive;i++)t.push(e(i));return t}forEach(e){for(let t=this.startLineNumber;t<this.endLineNumberExclusive;t++)e(t)}serialize(){return[this.startLineNumber,this.endLineNumberExclusive]}includes(e){return this.startLineNumber<=e&&e<this.endLineNumberExclusive}toOffsetRange(){return new o.q(this.startLineNumber-1,this.endLineNumberExclusive-1)}}},19247:(e,t,i)=>{i.d(t,{M:()=>s,q:()=>o});var n=i(17301);class o{static addRange(e,t){let i=0;for(;i<t.length&&t[i].endExclusive<e.start;)i++;let n=i;for(;n<t.length&&t[n].start<=e.endExclusive;)n++;if(i===n)t.splice(i,0,e);else{const s=Math.min(e.start,t[i].start),r=Math.max(e.endExclusive,t[n-1].endExclusive);t.splice(i,n-i,new o(s,r))}}static tryCreate(e,t){if(!(e>t))return new o(e,t)}static ofLength(e){return new o(0,e)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new n.he(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new o(this.start+e,this.endExclusive+e)}deltaStart(e){return new o(this.start+e,this.endExclusive)}deltaEnd(e){return new o(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new o(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){const t=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);if(t<=i)return new o(t,i)}slice(e){return e.slice(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new n.he(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new n.he(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}}class s{constructor(){this._sortedRanges=[]}addRange(e){let t=0;for(;t<this._sortedRanges.length&&this._sortedRanges[t].endExclusive<e.start;)t++;let i=t;for(;i<this._sortedRanges.length&&this._sortedRanges[i].start<=e.endExclusive;)i++;if(t===i)this._sortedRanges.splice(t,0,e);else{const n=Math.min(e.start,this._sortedRanges[t].start),s=Math.max(e.endExclusive,this._sortedRanges[i-1].endExclusive);this._sortedRanges.splice(t,i-t,new o(n,s))}}toString(){return this._sortedRanges.map((e=>e.toString())).join(", ")}intersectsStrict(e){let t=0;for(;t<this._sortedRanges.length&&this._sortedRanges[t].endExclusive<=e.start;)t++;return t<this._sortedRanges.length&&this._sortedRanges[t].start<e.endExclusive}intersectWithRange(e){const t=new s;for(const i of this._sortedRanges){const n=i.intersect(e);n&&t.addRange(n)}return t}intersectWithRangeLength(e){return this.intersectWithRange(e).length}get length(){return this._sortedRanges.reduce(((e,t)=>e+t.length),0)}}},50187:(e,t,i)=>{i.d(t,{L:()=>n});class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column}isBeforeOrEqual(e){return n.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column}static compare(e,t){const i=0|e.lineNumber,n=0|t.lineNumber;return i===n?(0|e.column)-(0|t.column):i-n}clone(){return new n(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new n(e.lineNumber,e.column)}static isIPosition(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}}},24314:(e,t,i)=>{i.d(t,{e:()=>o});var n=i(50187);class o{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return o.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return o.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<e.startColumn||t.lineNumber===e.endLineNumber&&t.column>e.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return o.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)}strictContainsRange(e){return o.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return o.plusRange(this,e)}static plusRange(e,t){let i,n,s,r;return t.startLineNumber<e.startLineNumber?(i=t.startLineNumber,n=t.startColumn):t.startLineNumber===e.startLineNumber?(i=t.startLineNumber,n=Math.min(t.startColumn,e.startColumn)):(i=e.startLineNumber,n=e.startColumn),t.endLineNumber>e.endLineNumber?(s=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,r=e.endColumn),new o(i,n,s,r)}intersectRanges(e){return o.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;const a=t.startLineNumber,l=t.startColumn,d=t.endLineNumber,h=t.endColumn;return i<a?(i=a,n=l):i===a&&(n=Math.max(n,l)),s>d?(s=d,r=h):s===d&&(r=Math.min(r,h)),i>s||i===s&&n>r?null:new o(i,n,s,r)}equalsRange(e){return o.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return o.getEndPosition(this)}static getEndPosition(e){return new n.L(e.endLineNumber,e.endColumn)}getStartPosition(){return o.getStartPosition(this)}static getStartPosition(e){return new n.L(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new o(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new o(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return o.collapseToStart(this)}static collapseToStart(e){return new o(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return o.collapseToEnd(this)}static collapseToEnd(e){return new o(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new o(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,t){if(e&&t){const i=0|e.startLineNumber,n=0|t.startLineNumber;if(i===n){const i=0|e.startColumn,n=0|t.startColumn;if(i===n){const i=0|e.endLineNumber,n=0|t.endLineNumber;return i===n?(0|e.endColumn)-(0|t.endColumn):i-n}return i-n}return i-n}return(e?1:0)-(t?1:0)}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}}},3860:(e,t,i)=>{i.d(t,{Y:()=>s});var n=i(50187),o=i(24314);class s extends o.e{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return s.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new s(this.startLineNumber,this.startColumn,e,t):new s(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.L(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new n.L(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new s(e,t,this.endLineNumber,this.endColumn):new s(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new s(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new s(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i<n;i++)if(!this.selectionsEqual(e[i],t[i]))return!1;return!0}static isISelection(e){return e&&"number"==typeof e.selectionStartLineNumber&&"number"==typeof e.selectionStartColumn&&"number"==typeof e.positionLineNumber&&"number"==typeof e.positionColumn}static createWithDirection(e,t,i,n,o){return 0===o?new s(e,t,i,n):new s(i,n,e,t)}}},50072:(e,t,i)=>{i.d(t,{HT:()=>u,kH:()=>c,oe:()=>h});var n=i(97295),o=i(1432),s=i(53060);let r,a,l;function d(){return r||(r=new TextDecoder("UTF-16LE")),r}function h(){return l||(l=o.r()?d():(a||(a=new TextDecoder("UTF-16BE")),a)),l}function c(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?function(e,t,i){const n=[];let o=0;for(let r=0;r<i;r++){const i=s.mP(e,t);t+=2,n[o++]=String.fromCharCode(i)}return n.join("")}(e,t,i):d().decode(n)}class u{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return h().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||n.ZG(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}},93033:(e,t,i)=>{i.d(t,{b:()=>a,q:()=>r});var n=i(53060),o=i(50072);function s(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class r{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${s(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${s(this.oldText)}")`:`(replace@${this.oldPosition} "${s(this.oldText)}" with "${s(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const o=t.length;n.T4(e,o,i),i+=4;for(let s=0;s<o;s++)n.oq(e,t.charCodeAt(s),i),i+=2;return i}static _readString(e,t){const i=n.Ag(e,t);return t+=4,(0,o.kH)(e,t,i)}writeSize(){return 8+r._writeStringSize(this.oldText)+r._writeStringSize(this.newText)}write(e,t){return n.T4(e,this.oldPosition,t),t+=4,n.T4(e,this.newPosition,t),t+=4,t=r._writeString(e,this.oldText,t),r._writeString(e,this.newText,t)}static read(e,t,i){const o=n.Ag(e,t);t+=4;const s=n.Ag(e,t);t+=4;const a=r._readString(e,t);t+=r._writeStringSize(a);const l=r._readString(e,t);return t+=r._writeStringSize(l),i.push(new r(o,a,s,l)),t}}function a(e,t){return null===e||0===e.length?t:new l(e,t).compress()}class l{constructor(e,t){this._prevEdits=e,this._currEdits=t,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,t=0,i=this._getPrev(e),n=this._getCurr(t);for(;e<this._prevLen||t<this._currLen;){if(null===i){this._acceptCurr(n),n=this._getCurr(++t);continue}if(null===n){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldEnd<=i.newPosition){this._acceptCurr(n),n=this._getCurr(++t);continue}if(i.newEnd<=n.oldPosition){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldPosition<i.newPosition){const[e,t]=l._splitCurr(n,i.newPosition-n.oldPosition);this._acceptCurr(e),n=t;continue}if(i.newPosition<n.oldPosition){const[e,t]=l._splitPrev(i,n.oldPosition-i.newPosition);this._acceptPrev(e),i=t;continue}let o,s;if(n.oldEnd===i.newEnd)o=i,s=n,i=this._getPrev(++e),n=this._getCurr(++t);else if(n.oldEnd<i.newEnd){const[e,r]=l._splitPrev(i,n.oldLength);o=e,s=n,i=r,n=this._getCurr(++t)}else{const[t,r]=l._splitCurr(n,i.newLength);o=i,s=t,i=this._getPrev(++e),n=r}this._result[this._resultLen++]=new r(o.oldPosition,o.oldText,s.newPosition,s.newText),this._prevDeltaOffset+=o.newLength-o.oldLength,this._currDeltaOffset+=s.newLength-s.oldLength}const o=l._merge(this._result);return l._removeNoOps(o)}_acceptCurr(e){this._result[this._resultLen++]=l._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=l._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,t){return new r(t.oldPosition-e,t.oldText,t.newPosition,t.newText)}static _rebasePrev(e,t){return new r(t.oldPosition,t.oldText,t.newPosition+e,t.newText)}static _splitPrev(e,t){const i=e.newText.substr(0,t),n=e.newText.substr(t);return[new r(e.oldPosition,e.oldText,e.newPosition,i),new r(e.oldEnd,"",e.newPosition+t,n)]}static _splitCurr(e,t){const i=e.oldText.substr(0,t),n=e.oldText.substr(t);return[new r(e.oldPosition,i,e.newPosition,e.newText),new r(e.oldPosition+t,n,e.newEnd,"")]}static _merge(e){if(0===e.length)return e;const t=[];let i=0,n=e[0];for(let o=1;o<e.length;o++){const s=e[o];n.oldEnd===s.oldPosition?n=new r(n.oldPosition,n.oldText+s.oldText,n.newPosition,n.newText+s.newText):(t[i++]=n,n=s)}return t[i++]=n,t}static _removeNoOps(e){if(0===e.length)return e;const t=[];let i=0;for(let n=0;n<e.length;n++){const o=e[n];o.oldText!==o.newText&&(t[i++]=o)}return t}}},22075:(e,t,i)=>{i.d(t,{D:()=>n});const n={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}},24929:(e,t,i)=>{i.d(t,{u:()=>s});var n=i(44906);class o extends n.N{constructor(e){super(0);for(let t=0,i=e.length;t<i;t++)this.set(e.charCodeAt(t),2);this.set(32,1),this.set(9,1)}}const s=function(e){const t={};return e=>(t.hasOwnProperty(e)||(t[e]=(e=>new o(e))(e)),t[e])}()},270:(e,t,i)=>{i.d(t,{Af:()=>r,eq:()=>a,t2:()=>d,vu:()=>s});var n=i(53725),o=i(91741);const s="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",r=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of s)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function a(e){let t=r;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const l=new o.S;function d(e,t,i,o,s){if(s||(s=n.$.first(l)),i.length>s.maxLen){let n=e-s.maxLen/2;return n<0?n=0:o+=n,d(e,t,i=i.substring(n,e+s.maxLen/2),o,s)}const r=Date.now(),a=e-1-o;let c=-1,u=null;for(let e=1;!(Date.now()-r>=s.timeBudget);e++){const n=a-s.windowSize*e;t.lastIndex=Math.max(0,n);const o=h(t,i,a,c);if(!o&&u)break;if(u=o,n<=0)break;c=n}if(u){const e={word:u[0],startColumn:o+1+u.index,endColumn:o+1+u.index+u[0].length};return t.lastIndex=0,e}return null}function h(e,t,i,n){let o;for(;o=e.exec(t);){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}l.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},47128:(e,t,i)=>{i.d(t,{l:()=>o});var n=i(7988);class o{static whitespaceVisibleColumn(e,t,i){const o=e.length;let s=0,r=-1,a=-1;for(let l=0;l<o;l++){if(l===t)return[r,a,s];switch(s%i==0&&(r=l,a=s),e.charCodeAt(l)){case 32:s+=1;break;case 9:s=n.i.nextRenderTabStop(s,i);break;default:return[-1,-1,-1]}}return t===o?[r,a,s]:[-1,-1,-1]}static atomicPosition(e,t,i,s){const r=e.length,[a,l,d]=o.whitespaceVisibleColumn(e,t,i);if(-1===d)return-1;let h;switch(s){case 0:h=!0;break;case 1:h=!1;break;case 2:if(d%i==0)return t;h=d%i<=i/2}if(h){if(-1===a)return-1;let t=l;for(let o=a;o<r;++o){if(t===l+i)return a;switch(e.charCodeAt(o)){case 32:t+=1;break;case 9:t=n.i.nextRenderTabStop(t,i);break;default:return-1}}return t===l+i?a:-1}const c=n.i.nextRenderTabStop(d,i);let u=d;for(let o=t;o<r;o++){if(u===c)return o;switch(e.charCodeAt(o)){case 32:u+=1;break;case 9:u=n.i.nextRenderTabStop(u,i);break;default:return-1}}return u===c?r:-1}}},29436:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(97295),o=i(61329),s=i(55343),r=i(7988),a=i(10839),l=i(24314),d=i(50187);class h{static deleteRight(e,t,i,n){const s=[];let r=3!==e;for(let e=0,d=n.length;e<d;e++){const d=n[e];let h=d;if(h.isEmpty()){const e=d.getPosition(),n=a.o.right(t,i,e);h=new l.e(n.lineNumber,n.column,e.lineNumber,e.column)}h.isEmpty()?s[e]=null:(h.startLineNumber!==h.endLineNumber&&(r=!0),s[e]=new o.T4(h,""))}return[r,s]}static isAutoClosingPairDelete(e,t,i,n,o,r,a){if("never"===t&&"never"===i)return!1;if("never"===e)return!1;for(let l=0,d=r.length;l<d;l++){const d=r[l],h=d.getPosition();if(!d.isEmpty())return!1;const c=o.getLineContent(h.lineNumber);if(h.column<2||h.column>=c.length+1)return!1;const u=c.charAt(h.column-2),g=n.get(u);if(!g)return!1;if((0,s.LN)(u)){if("never"===i)return!1}else if("never"===t)return!1;const p=c.charAt(h.column-1);let m=!1;for(const e of g)e.open===u&&e.close===p&&(m=!0);if(!m)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t<i;t++){const i=a[t];if(h.lineNumber===i.startLineNumber&&h.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingPairDelete(e,t,i){const n=[];for(let e=0,t=i.length;e<t;e++){const t=i[e].getPosition(),s=new l.e(t.lineNumber,t.column-1,t.lineNumber,t.column+1);n[e]=new o.T4(s,"")}return[!0,n]}static deleteLeft(e,t,i,n,s){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,n,s))return this._runAutoClosingPairDelete(t,i,n);const r=[];let a=2!==e;for(let e=0,s=n.length;e<s;e++){const s=h.getDeleteRange(n[e],i,t);s.isEmpty()?r[e]=null:(s.startLineNumber!==s.endLineNumber&&(a=!0),r[e]=new o.T4(s,""))}return[a,r]}static getDeleteRange(e,t,i){if(!e.isEmpty())return e;const o=e.getPosition();if(i.useTabStops&&o.column>1){const e=t.getLineContent(o.lineNumber),s=n.LC(e),a=-1===s?e.length+1:s+1;if(o.column<=a){const e=i.visibleColumnFromColumn(t,o),n=r.i.prevIndentTabStop(e,i.indentSize),s=i.columnFromVisibleColumn(t,o.lineNumber,n);return new l.e(o.lineNumber,s,o.lineNumber,o.column)}}return l.e.fromPositions(h.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=n.oH(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new d.L(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let r=null;i.sort(((e,t)=>d.L.compare(e.getStartPosition(),t.getEndPosition())));for(let s=0,a=i.length;s<a;s++){const a=i[s];if(a.isEmpty())if(e.emptySelectionClipboard){const e=a.getPosition();let i,d,h,c;e.lineNumber<t.getLineCount()?(i=e.lineNumber,d=1,h=e.lineNumber+1,c=1):e.lineNumber>1&&(null==r?void 0:r.endLineNumber)!==e.lineNumber?(i=e.lineNumber-1,d=t.getLineMaxColumn(e.lineNumber-1),h=e.lineNumber,c=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,d=1,h=e.lineNumber,c=t.getLineMaxColumn(e.lineNumber));const u=new l.e(i,d,h,c);r=u,u.isEmpty()?n[s]=null:n[s]=new o.T4(u,"")}else n[s]=null;else n[s]=new o.T4(a,"")}return new s.Tp(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},28108:(e,t,i)=>{i.d(t,{N:()=>n,P:()=>h});var n,o=i(98401),s=i(55343),r=i(10839),a=i(92896),l=i(50187),d=i(24314);class h{static addCursorDown(e,t,i){const n=[];let o=0;for(let a=0,l=t.length;a<l;a++){const l=t[a];n[o++]=new s.Vi(l.modelState,l.viewState),n[o++]=i?s.Vi.fromModelState(r.o.translateDown(e.cursorConfig,e.model,l.modelState)):s.Vi.fromViewState(r.o.translateDown(e.cursorConfig,e,l.viewState))}return n}static addCursorUp(e,t,i){const n=[];let o=0;for(let a=0,l=t.length;a<l;a++){const l=t[a];n[o++]=new s.Vi(l.modelState,l.viewState),n[o++]=i?s.Vi.fromModelState(r.o.translateUp(e.cursorConfig,e.model,l.modelState)):s.Vi.fromViewState(r.o.translateUp(e.cursorConfig,e,l.viewState))}return n}static moveToBeginningOfLine(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o];n[o]=this._moveToLineStart(e,s,i)}return n}static _moveToLineStart(e,t,i){const n=t.viewState.position.column,o=n===t.modelState.position.column,s=t.viewState.position.lineNumber,r=e.getLineFirstNonWhitespaceColumn(s);return o||n===r?this._moveToLineStartByModel(e,t,i):this._moveToLineStartByView(e,t,i)}static _moveToLineStartByView(e,t,i){return s.Vi.fromViewState(r.o.moveToBeginningOfLine(e.cursorConfig,e,t.viewState,i))}static _moveToLineStartByModel(e,t,i){return s.Vi.fromModelState(r.o.moveToBeginningOfLine(e.cursorConfig,e.model,t.modelState,i))}static moveToEndOfLine(e,t,i,n){const o=[];for(let s=0,r=t.length;s<r;s++){const r=t[s];o[s]=this._moveToLineEnd(e,r,i,n)}return o}static _moveToLineEnd(e,t,i,n){const o=t.viewState.position,s=e.getLineMaxColumn(o.lineNumber),r=o.column===s,a=t.modelState.position,l=e.model.getLineMaxColumn(a.lineNumber),d=s-o.column==l-a.column;return r||d?this._moveToLineEndByModel(e,t,i,n):this._moveToLineEndByView(e,t,i,n)}static _moveToLineEndByView(e,t,i,n){return s.Vi.fromViewState(r.o.moveToEndOfLine(e.cursorConfig,e,t.viewState,i,n))}static _moveToLineEndByModel(e,t,i,n){return s.Vi.fromModelState(r.o.moveToEndOfLine(e.cursorConfig,e.model,t.modelState,i,n))}static expandLineSelection(e,t){const i=[];for(let n=0,o=t.length;n<o;n++){const o=t[n],r=o.modelState.selection.startLineNumber,a=e.model.getLineCount();let h,c=o.modelState.selection.endLineNumber;c===a?h=e.model.getLineMaxColumn(a):(c++,h=1),i[n]=s.Vi.fromModelState(new s.rS(new d.e(r,1,r,1),0,0,new l.L(c,h),0))}return i}static moveToBeginningOfBuffer(e,t,i){const n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o];n[o]=s.Vi.fromModelState(r.o.moveToBeginningOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return n}static moveToEndOfBuffer(e,t,i){const n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o];n[o]=s.Vi.fromModelState(r.o.moveToEndOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return n}static selectAll(e,t){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return s.Vi.fromModelState(new s.rS(new d.e(1,1,1,1),0,0,new l.L(i,n),0))}static line(e,t,i,n,o){const r=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);if(!i){const t=e.model.getLineCount();let i=r.lineNumber+1,n=1;return i>t&&(i=t,n=e.model.getLineMaxColumn(i)),s.Vi.fromModelState(new s.rS(new d.e(r.lineNumber,1,i,n),2,0,new l.L(i,n),0))}const h=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<h)return s.Vi.fromViewState(t.viewState.move(!0,a.lineNumber,1,0));if(r.lineNumber>h){const i=e.getLineCount();let n=a.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),s.Vi.fromViewState(t.viewState.move(!0,n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return s.Vi.fromModelState(t.modelState.move(!0,e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return s.Vi.fromModelState(a.w.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new s.Vi(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return s.Vi.fromViewState(new s.rS(new d.e(i,n,i,n),0,0,new l.L(i,n),0))}static moveTo(e,t,i,n,o){if(i){if(1===t.modelState.selectionStartKind)return this.word(e,t,i,n);if(2===t.modelState.selectionStartKind)return this.line(e,t,i,n,o)}const r=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return s.Vi.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,o,a){switch(i){case 0:return 4===a?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===a?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===a?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===a?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===a?t.map((t=>s.Vi.fromViewState(r.o.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.Vi.fromModelState(r.o.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===a?t.map((t=>s.Vi.fromViewState(r.o.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>s.Vi.fromModelState(r.o.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const s=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{const i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];i[o]=this.findPositionInViewportIfOutside(e,r,s,n)}return i}default:return null}}static findPositionInViewportIfOutside(e,t,i,n){const o=t.viewState.position.lineNumber;if(i.startLineNumber<=o&&o<=i.endLineNumber-1)return new s.Vi(t.modelState,t.viewState);{let a;a=o>i.endLineNumber-1?i.endLineNumber-1:o<i.startLineNumber?i.startLineNumber:o;const l=r.o.vertical(e.cursorConfig,e,o,t.viewState.position.column,t.viewState.leftoverVisibleColumns,a,!1);return s.Vi.fromViewState(t.viewState.move(n,l.lineNumber,l.column,l.leftoverVisibleColumns))}}static _firstLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.min(t.endLineNumber,n+i-1)}static _lastLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.max(n,t.endLineNumber-i+1)}static _moveLeft(e,t,i,n){return t.map((t=>s.Vi.fromViewState(r.o.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o],l=a.viewState.position.lineNumber,d=Math.round(e.getLineContent(l).length/2);n[o]=s.Vi.fromViewState(r.o.moveLeft(e.cursorConfig,e,a.viewState,i,d))}return n}static _moveRight(e,t,i,n){return t.map((t=>s.Vi.fromViewState(r.o.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let o=0,a=t.length;o<a;o++){const a=t[o],l=a.viewState.position.lineNumber,d=Math.round(e.getLineContent(l).length/2);n[o]=s.Vi.fromViewState(r.o.moveRight(e.cursorConfig,e,a.viewState,i,d))}return n}static _moveDownByViewLines(e,t,i,n){const o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromViewState(r.o.moveDown(e.cursorConfig,e,l.viewState,i,n))}return o}static _moveDownByModelLines(e,t,i,n){const o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromModelState(r.o.moveDown(e.cursorConfig,e.model,l.modelState,i,n))}return o}static _moveUpByViewLines(e,t,i,n){const o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromViewState(r.o.moveUp(e.cursorConfig,e,l.viewState,i,n))}return o}static _moveUpByModelLines(e,t,i,n){const o=[];for(let a=0,l=t.length;a<l;a++){const l=t[a];o[a]=s.Vi.fromModelState(r.o.moveUp(e.cursorConfig,e.model,l.modelState,i,n))}return o}static _moveToViewPosition(e,t,i,n,o){return s.Vi.fromViewState(t.viewState.move(i,n,o,0))}static _moveToModelPosition(e,t,i,n,o){return s.Vi.fromModelState(t.modelState.move(i,n,o,0))}static _moveToViewMinColumn(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineMinColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewFirstNonWhitespaceColumn(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineFirstNonWhitespaceColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewCenterColumn(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=Math.round((e.getLineMaxColumn(r)+e.getLineMinColumn(r))/2);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewMaxColumn(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineMaxColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}static _moveToViewLastNonWhitespaceColumn(e,t,i){const n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o],r=s.viewState.position.lineNumber,a=e.getLineLastNonWhitespaceColumn(r);n[o]=this._moveToViewPosition(e,s,i,r,a)}return n}}!function(e){e.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:function(e){if(!o.Kn(e))return!1;const t=e;return!(!o.HD(t.to)||!o.o8(t.select)&&!o.jn(t.select)||!o.o8(t.by)&&!o.HD(t.by)||!o.o8(t.value)&&!o.hj(t.value))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},e.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},e.parse=function(t){if(!t.to)return null;let i;switch(t.to){case e.RawDirection.Left:i=0;break;case e.RawDirection.Right:i=1;break;case e.RawDirection.Up:i=2;break;case e.RawDirection.Down:i=3;break;case e.RawDirection.PrevBlankLine:i=4;break;case e.RawDirection.NextBlankLine:i=5;break;case e.RawDirection.WrappedLineStart:i=6;break;case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:i=7;break;case e.RawDirection.WrappedLineColumnCenter:i=8;break;case e.RawDirection.WrappedLineEnd:i=9;break;case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:i=10;break;case e.RawDirection.ViewPortTop:i=11;break;case e.RawDirection.ViewPortBottom:i=13;break;case e.RawDirection.ViewPortCenter:i=12;break;case e.RawDirection.ViewPortIfOutside:i=14;break;default:return null}let n=0;switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Character:n=3;break;case e.RawUnit.HalfLine:n=4}return{direction:i,unit:n,select:!!t.select,value:t.value||1}}}(n||(n={}))},10839:(e,t,i)=>{i.d(t,{o:()=>h});var n=i(97295),o=i(7988),s=i(50187),r=i(24314),a=i(47128),l=i(55343);class d{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class h{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-n.HO(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new s.L(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),r=a.l.atomicPosition(o,t.column-1,i,0);if(-1!==r&&r+1>=n)return new s.L(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?h.leftPositionAtomicSoftTabs(t,i,e.tabSize):h.leftPosition(t,i);return new d(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(h.clipPositionColumn(n,t),0),l=h.left(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static clipPositionColumn(e,t){return new s.L(e.lineNumber,h.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return e<t?t:e>i?i:e}static rightPosition(e,t,i){return i<e.getLineMaxColumn(t)?i+=n.vH(e.getLineContent(t),i-1):t<e.getLineCount()&&(t+=1,i=e.getLineMinColumn(t)),new s.L(t,i)}static rightPositionAtomicSoftTabs(e,t,i,n,o){if(i<e.getLineIndentColumn(t)){const o=e.getLineContent(t),r=a.l.atomicPosition(o,i-1,n,1);if(-1!==r)return new s.L(t,r+1)}return this.rightPosition(e,t,i)}static right(e,t,i){const n=e.stickyTabStops?h.rightPositionAtomicSoftTabs(t,i.lineNumber,i.column,e.tabSize,e.indentSize):h.rightPosition(t,i.lineNumber,i.column);return new d(n.lineNumber,n.column,0)}static moveRight(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.endLineNumber,r=i.selection.endColumn;else{const n=i.position.delta(void 0,o-1),a=t.normalizePosition(h.clipPositionColumn(n,t),1),l=h.right(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static vertical(e,t,i,n,r,a,l,h){const c=o.i.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize)+r,u=t.getLineCount(),g=1===i&&1===n,p=i===u&&n===t.getLineMaxColumn(i),m=a<i?g:p;if((i=a)<1?(i=1,n=l?t.getLineMinColumn(i):Math.min(t.getLineMaxColumn(i),n)):i>u?(i=u,n=l?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,c),r=m?0:c-o.i.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==h){const e=new s.L(i,n),o=t.normalizePosition(e,h);r+=n-o.column,i=o.lineNumber,n=o.column}return new d(i,n,r)}static down(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i+s,r,4)}static moveDown(e,t,i,n,o){let r,a;i.hasSelection()&&!n?(r=i.selection.endLineNumber,a=i.selection.endColumn):(r=i.position.lineNumber,a=i.position.column);let l,d=0;do{if(l=h.down(e,t,r+d,a,i.leftoverVisibleColumns,o,!0),t.normalizePosition(new s.L(l.lineNumber,l.column),2).lineNumber>r)break}while(d++<10&&r+d<t.getLineCount());return i.move(n,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateDown(e,t,i){const n=i.selection,o=h.down(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),a=h.down(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new l.rS(new r.e(o.lineNumber,o.column,o.lineNumber,o.column),0,o.leftoverVisibleColumns,new s.L(a.lineNumber,a.column),a.leftoverVisibleColumns)}static up(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i-s,r,3)}static moveUp(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.startLineNumber,r=i.selection.startColumn):(s=i.position.lineNumber,r=i.position.column);const a=h.up(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){const n=i.selection,o=h.up(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),a=h.up(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new l.rS(new r.e(o.lineNumber,o.column,o.lineNumber,o.column),0,o.leftoverVisibleColumns,new s.L(a.lineNumber,a.column),a.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let o=i.position.lineNumber;for(;o>1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){const o=t.getLineCount();let s=i.position.lineNumber;for(;s<o&&this._isBlankLine(t,s);)s++;for(;s<o&&!this._isBlankLine(t,s);)s++;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToBeginningOfLine(e,t,i,n){const o=i.position.lineNumber,s=t.getLineMinColumn(o),r=t.getLineFirstNonWhitespaceColumn(o)||s;let a;return a=i.position.column===r?s:r,i.move(n,o,a,0)}static moveToEndOfLine(e,t,i,n,o){const s=i.position.lineNumber,r=t.getLineMaxColumn(s);return i.move(n,s,r,o?1073741824-r:0)}static moveToBeginningOfBuffer(e,t,i,n){return i.move(n,1,1,0)}static moveToEndOfBuffer(e,t,i,n){const o=t.getLineCount(),s=t.getLineMaxColumn(o);return i.move(n,o,s,0)}}},51336:(e,t,i)=>{i.d(t,{Nu:()=>w,u6:()=>b,g_:()=>C});var n=i(17301),o=i(97295),s=i(61329),r=i(10291),a=i(24314),l=i(3860);class d{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new a.e(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new a.e(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new l.Y(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class h{constructor(e,t,i){this._position=e,this._text=t,this._charAfter=i}getEditOperations(e,t){t.addTrackedEditOperation(new a.e(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return new l.Y(i.endLineNumber,i.startColumn,i.endLineNumber,i.endColumn-this._charAfter.length)}}var c=i(55343),u=i(24929),g=i(50187),p=i(49119),m=i(51381),f=i(19111),_=i(75383),v=i(1615);class b{static indent(e,t,i){if(null===t||null===i)return[];const n=[];for(let t=0,o=i.length;t<o;t++)n[t]=new r.U(i[t],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService);return n}static outdent(e,t,i){const n=[];for(let t=0,o=i.length;t<o;t++)n[t]=new r.U(i[t],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService);return n}static shiftIndent(e,t,i){return i=i||1,r.U.shiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static unshiftIndent(e,t,i){return i=i||1,r.U.unshiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static _distributedPaste(e,t,i,n){const o=[];for(let e=0,t=i.length;e<t;e++)o[e]=new s.T4(i[e],n[e]);return new c.Tp(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,o){const r=[];for(let e=0,t=i.length;e<t;e++){const t=i[e],l=t.getPosition();if(o&&!t.isEmpty()&&(o=!1),o&&n.indexOf("\n")!==n.length-1&&(o=!1),o){const i=new a.e(l.lineNumber,1,l.lineNumber,1);r[e]=new s.hP(i,n,t,!0)}else r[e]=new s.T4(t,n)}return new c.Tp(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,i,n,s){if(n)return null;if(1===t.length)return null;if(s&&s.length===t.length)return s;if("spread"===e.multiCursorPaste){10===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1)),13===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1));const e=o.uq(i);if(e.length===t.length)return e}return null}static paste(e,t,i,n,o,s){const r=this._distributePasteToCursors(e,i,n,o,s);return r?(i=i.sort(a.e.compareRangesUsingStarts),this._distributedPaste(e,t,i,r)):this._simplePaste(e,t,i,n,o)}static _goodIndentForLine(e,t,i){let n=null,s="";const r=(0,_.r7)(e.autoIndent,t,i,!1,e.languageConfigurationService);if(r)n=r.action,s=r.indentation;else if(i>1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n);if(o.ow(e)>=0)break}if(n<1)return null;const r=t.getLineMaxColumn(n),l=(0,v.A)(e.autoIndent,t,new a.e(n,r,n,r),e.languageConfigurationService);l&&(s=l.indentation+l.appendText)}return n&&(n===p.wU.Indent&&(s=b.shiftIndent(e,s)),n===p.wU.Outdent&&(s=b.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let o="";const r=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,r),n=e.indentSize,s=n-i%n;for(let e=0;e<s;e++)o+=" "}else o="\t";return new s.T4(i,o,n)}static tab(e,t,i){const n=[];for(let o=0,l=i.length;o<l;o++){const l=i[o];if(l.isEmpty()){const i=t.getLineContent(l.startLineNumber);if(/^\s*$/.test(i)&&t.tokenization.isCheapToTokenize(l.startLineNumber)){let r=this._goodIndentForLine(e,t,l.startLineNumber);r=r||"\t";const d=e.normalizeIndentation(r);if(!i.startsWith(d)){n[o]=new s.T4(new a.e(l.startLineNumber,1,l.startLineNumber,i.length+1),d,!0);continue}}n[o]=this._replaceJumpToNextIndent(e,t,l,!0)}else{if(l.startLineNumber===l.endLineNumber){const i=t.getLineMaxColumn(l.startLineNumber);if(1!==l.startColumn||l.endColumn!==i){n[o]=this._replaceJumpToNextIndent(e,t,l,!1);continue}}n[o]=new r.U(l,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService)}}return n}static compositionType(e,t,i,n,o,s,r,a){const l=n.map((e=>this._compositionType(i,e,o,s,r,a)));return new c.Tp(4,l,{shouldPushStackElementBefore:S(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,r){if(!t.isEmpty())return null;const l=t.getPosition(),d=Math.max(1,l.column-n),h=Math.min(e.getLineMaxColumn(l.lineNumber),l.column+o),c=new a.e(l.lineNumber,d,l.lineNumber,h);return e.getValueInRange(c)===i&&0===r?null:new s.Uo(c,i,0,r)}static _typeCommand(e,t,i){return i?new s.Sj(e,t,!0):new s.T4(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return b._typeCommand(n,"\n",i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){const s=t.getLineContent(n.startLineNumber),r=o.V8(s).substring(0,n.startColumn-1);return b._typeCommand(n,"\n"+e.normalizeIndentation(r),i)}const r=(0,v.A)(e.autoIndent,t,n,e.languageConfigurationService);if(r){if(r.indentAction===p.wU.None)return b._typeCommand(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);if(r.indentAction===p.wU.Indent)return b._typeCommand(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);if(r.indentAction===p.wU.IndentOutdent){const t=e.normalizeIndentation(r.indentation),o=e.normalizeIndentation(r.indentation+r.appendText),a="\n"+o+"\n"+t;return i?new s.Sj(n,a,!0):new s.Uo(n,a,-1,o.length-t.length,!0)}if(r.indentAction===p.wU.Outdent){const t=b.unshiftIndent(e,r.indentation);return b._typeCommand(n,"\n"+e.normalizeIndentation(t+r.appendText),i)}}const a=t.getLineContent(n.startLineNumber),l=o.V8(a).substring(0,n.startColumn-1);if(e.autoIndent>=4){const r=(0,_.UF)(e.autoIndent,t,n,{unshiftIndent:t=>b.unshiftIndent(e,t),shiftIndent:t=>b.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(r){let a=e.visibleColumnFromColumn(t,n.getEndPosition());const l=n.endColumn,d=t.getLineContent(n.endLineNumber),h=o.LC(d);if(n=h>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,h+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new s.Sj(n,"\n"+e.normalizeIndentation(r.afterEnter),!0);{let t=0;return l<=h+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(r.afterEnter).length-1,0)),new s.Uo(n,"\n"+e.normalizeIndentation(r.afterEnter),0,t,!0)}}}return b._typeCommand(n,"\n"+e.normalizeIndentation(l),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;e<n;e++)if(!t.tokenization.isCheapToTokenize(i[e].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,i,n){const o=(0,m.u0)(t,i.startLineNumber,i.startColumn),s=(0,_.$9)(e.autoIndent,t,i,n,{shiftIndent:t=>b.shiftIndent(e,t),unshiftIndent:t=>b.unshiftIndent(e,t)},e.languageConfigurationService);if(null===s)return null;if(s!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?b._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+n,!1):b._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let s=0,r=i.length;s<r;s++){const r=i[s];if(!r.isEmpty())return!1;const a=r.getPosition(),l=t.getLineContent(a.lineNumber);if(l.charAt(a.column-1)!==o)return!1;const d=(0,c.LN)(o);if(92===(a.column>2?l.charCodeAt(a.column-2):0)&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t<i;t++){const i=n[t];if(a.lineNumber===i.startLineNumber&&a.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingOvertype(e,t,i,n,o){const r=[];for(let e=0,t=n.length;e<t;e++){const t=n[e].getPosition(),i=new a.e(t.lineNumber,t.column,t.lineNumber,t.column+1);r[e]=new s.T4(i,o)}return new c.Tp(4,r,{shouldPushStackElementBefore:S(e,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],o=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],s=n.some((e=>t.startsWith(e.open))),r=o.some((e=>t.startsWith(e.close)));return!s&&r}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let s=null;for(const e of o)if(null===s||e.open.length>s.open.length){let o=!0;for(const s of i)if(t.getValueInRange(new a.e(s.lineNumber,s.column-e.open.length+1,s.lineNumber,s.column))+n!==e.open){o=!1;break}o&&(s=e)}return s}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o}static _getAutoClosingPairClose(e,t,i,n,o){const s=(0,c.LN)(n),r=s?e.autoClosingQuotes:e.autoClosingBrackets,a=s?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if("never"===r)return null;for(const e of i)if(!e.isEmpty())return null;const l=i.map((e=>{const t=e.getPosition();return o?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),d=this._findAutoClosingPairOpen(e,t,l.map((e=>new g.L(e.lineNumber,e.beforeColumn))),n);if(!d)return null;const h=this._findContainedAutoClosingPair(e,d),p=h?h.close:"";let m=!0;for(const i of l){const{lineNumber:o,beforeColumn:s,afterColumn:l}=i,h=t.getLineContent(o),c=h.substring(0,s-1),g=h.substring(l-1);if(g.startsWith(p)||(m=!1),g.length>0){const t=g.charAt(0);if(!b._isBeforeClosingBrace(e,g)&&!a(t))return null}if(1===d.open.length&&("'"===n||'"'===n)&&"always"!==r){const t=(0,u.u)(e.wordSeparators);if(c.length>0){const e=c.charCodeAt(c.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(o))return null;t.tokenization.forceTokenization(o);const _=t.tokenization.getLineTokens(o),v=(0,f.wH)(_,s-1);if(!d.shouldAutoClose(v,s-v.firstCharOffset))return null;const C=d.findNeutralCharacter();if(C){const e=t.tokenization.getTokenTypeIfInsertingCharacter(o,s,C);if(!d.isOK(e))return null}}return m?d.close.substring(0,d.close.length-p.length):d.close}static _runAutoClosingOpenCharType(e,t,i,n,o,s,r){const a=[];for(let e=0,t=n.length;e<t;e++){const t=n[e];a[e]=new C(t,o,!s,r)}return new c.Tp(4,a,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,t){return(0,c.LN)(t)?"quotes"===e.autoSurround||"languageDefined"===e.autoSurround:"brackets"===e.autoSurround||"languageDefined"===e.autoSurround}static _isSurroundSelectionType(e,t,i,n){if(!b._shouldSurroundChar(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;const o=(0,c.LN)(n);for(const e of i){if(e.isEmpty())return!1;let i=!0;for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const o=t.getLineContent(n),s=n===e.startLineNumber?e.startColumn-1:0,r=n===e.endLineNumber?e.endColumn-1:o.length,a=o.substring(s,r);if(/[^ \t]/.test(a)){i=!1;break}}if(i)return!1;if(o&&e.startLineNumber===e.endLineNumber&&e.startColumn+1===e.endColumn){const i=t.getValueInRange(e);if((0,c.LN)(i))return!1}}return!0}static _runSurroundSelectionType(e,t,i,n,o){const s=[];for(let e=0,i=n.length;e<i;e++){const i=n[e],r=t.surroundingPairs[o];s[e]=new d(i,o,r)}return new c.Tp(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(e,t,i){return!(1!==i.length||!t.tokenization.isCheapToTokenize(i[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,t,i,r,l){if(!t.electricChars.hasOwnProperty(l)||!r.isEmpty())return null;const d=r.getPosition();i.tokenization.forceTokenization(d.lineNumber);const h=i.tokenization.getLineTokens(d.lineNumber);let u;try{u=t.onElectricCharacter(l,h,d.column)}catch(e){return(0,n.dL)(e),null}if(!u)return null;if(u.matchOpenBracket){const n=(h.getLineContent()+l).lastIndexOf(u.matchOpenBracket)+1,r=i.bracketPairs.findMatchingBracketUp(u.matchOpenBracket,{lineNumber:d.lineNumber,column:n},500);if(r){if(r.startLineNumber===d.lineNumber)return null;const n=i.getLineContent(r.startLineNumber),h=o.V8(n),u=t.normalizeIndentation(h),g=i.getLineContent(d.lineNumber),p=i.getLineFirstNonWhitespaceColumn(d.lineNumber)||d.column,m=u+g.substring(p-1,d.column-1)+l,f=new a.e(d.lineNumber,1,d.lineNumber,d.column),_=new s.T4(f,m);return new c.Tp(y(m,e),[_],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(e,t,i,n,o,r){if(!n)return null;let l=null;for(const e of n)if(null===l)l=e.insertedText;else if(l!==e.insertedText)return null;if(!l||1!==l.length)return null;const d=l;let u=!1;for(const e of n)if(0!==e.deletedText.length){u=!0;break}if(u){if(!b._shouldSurroundChar(t,d)||!t.surroundingPairs.hasOwnProperty(d))return null;const e=(0,c.LN)(d);for(const t of n){if(0!==t.deletedSelectionStart||t.deletedSelectionEnd!==t.deletedText.length)return null;if(/^[ \t]+$/.test(t.deletedText))return null;if(e&&(0,c.LN)(t.deletedText))return null}const i=[];for(const e of o){if(!e.isEmpty())return null;i.push(e.getPosition())}if(i.length!==n.length)return null;const s=[];for(let e=0,o=i.length;e<o;e++)s.push(new h(i[e],n[e].deletedText,t.surroundingPairs[d]));return new c.Tp(4,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(t,i,o,r,d)){const e=o.map((e=>new s.T4(new a.e(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new c.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const g=this._getAutoClosingPairClose(t,i,o,d,!0);return null!==g?this._runAutoClosingOpenCharType(e,t,i,o,d,!0,g):null}static typeWithInterceptors(e,t,i,n,o,r,a){if(!e&&"\n"===a){const e=[];for(let t=0,s=o.length;t<s;t++)e[t]=b._enter(i,n,!1,o[t]);return new c.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(i,n,o)){const e=[];let t=!1;for(let s=0,r=o.length;s<r;s++)if(e[s]=this._runAutoIndentType(i,n,o[s],a),!e[s]){t=!0;break}if(!t)return new c.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(i,n,o,r,a))return this._runAutoClosingOvertype(t,i,n,o,a);if(!e){const e=this._getAutoClosingPairClose(i,n,o,a,!1);if(e)return this._runAutoClosingOpenCharType(t,i,n,o,a,!1,e)}if(!e&&this._isSurroundSelectionType(i,n,o,a))return this._runSurroundSelectionType(t,i,n,o,a);if(!e&&this._isTypeInterceptorElectricChar(i,n,o)){const e=this._typeInterceptorElectricChar(t,i,n,o[0],a);if(e)return e}const l=[];for(let e=0,t=o.length;e<t;e++)l[e]=new s.T4(o[e],a);const d=y(a,t);return new c.Tp(d,l,{shouldPushStackElementBefore:S(t,d),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,i,n,o){const r=[];for(let e=0,t=n.length;e<t;e++)r[e]=new s.T4(n[e],o);const a=y(o,e);return new c.Tp(a,r,{shouldPushStackElementBefore:S(e,a),shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];const n=[];for(let o=0,r=i.length;o<r;o++){let r=i[o].positionLineNumber;if(1===r)n[o]=new s.Sj(new a.e(1,1,1,1),"\n");else{r--;const i=t.getLineMaxColumn(r);n[o]=this._enter(e,t,!1,new a.e(r,i,r,i))}}return n}static lineInsertAfter(e,t,i){if(null===t||null===i)return[];const n=[];for(let o=0,s=i.length;o<s;o++){const s=i[o].positionLineNumber,r=t.getLineMaxColumn(s);n[o]=this._enter(e,t,!1,new a.e(s,r,s,r))}return n}static lineBreakInsert(e,t,i){const n=[];for(let o=0,s=i.length;o<s;o++)n[o]=this._enter(e,t,!0,i[o]);return n}}class C extends s.Uo{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length),this._openCharacter=t,this._closeCharacter=n,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this.closeCharacterRange=new a.e(i.startLineNumber,i.endColumn-this._closeCharacter.length,i.endLineNumber,i.endColumn),this.enclosingRange=new a.e(i.startLineNumber,i.endColumn-this._openCharacter.length-this._closeCharacter.length,i.endLineNumber,i.endColumn),super.computeCursorState(e,t)}}class w{constructor(e,t,i,n,o,s){this.deletedText=e,this.deletedSelectionStart=t,this.deletedSelectionEnd=i,this.insertedText=n,this.insertedSelectionStart=o,this.insertedSelectionEnd=s}}function y(e,t){return" "===e?5===t||6===t?6:5:4}function S(e,t){return!(!x(e)||x(t))||5!==e&&L(e)!==L(t)}function L(e){return 6===e||5===e?"space":e}function x(e){return 4===e||5===e||6===e}},92896:(e,t,i)=>{i.d(t,{L:()=>h,w:()=>d});var n=i(97295),o=i(55343),s=i(29436),r=i(24929),a=i(50187),l=i(24314);class d{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let o=i.column-2;o>=0;o--){const i=e.charCodeAt(o),s=t.get(i);if(0===s){if(2===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===s){if(1===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===s&&0!==n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const o=e.length;for(let s=n;s<o;s++){const n=e.charCodeAt(s),o=t.get(n);if(1===o)return s;if(1===i&&2===o)return s;if(2===i&&0===o)return s}return o}static _findNextWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindNextWordOnLine(n,e,i)}static _doFindNextWordOnLine(e,t,i){let n=0;const o=e.length;for(let s=i.column-1;s<o;s++){const i=e.charCodeAt(s),o=t.get(i);if(0===o){if(2===n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,s-1),s);n=1}else if(2===o){if(1===n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,s-1),s);n=2}else if(1===o&&0!==n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,s-1),s)}return 0!==n?this._createWord(e,n,1,this._findStartOfWord(e,t,n,o-1),o):null}static _findStartOfWord(e,t,i,n){for(let o=n;o>=0;o--){const n=e.charCodeAt(o),s=t.get(n);if(1===s)return o+1;if(1===i&&2===s)return o+1;if(2===i&&0===s)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,s=i.column;1===s&&o>1&&(o-=1,s=t.getLineMaxColumn(o));let r=d._findPreviousWordOnLine(e,t,new a.L(o,s));if(0===n)return new a.L(o,r?r.start+1:1);if(1===n)return r&&2===r.wordType&&r.end-r.start==1&&0===r.nextCharClass&&(r=d._findPreviousWordOnLine(e,t,new a.L(o,r.start+1))),new a.L(o,r?r.start+1:1);if(3===n){for(;r&&2===r.wordType;)r=d._findPreviousWordOnLine(e,t,new a.L(o,r.start+1));return new a.L(o,r?r.start+1:1)}return r&&s<=r.end+1&&(r=d._findPreviousWordOnLine(e,t,new a.L(o,r.start+1))),new a.L(o,r?r.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.L(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=s.charCodeAt(e-2),r=s.charCodeAt(e-1);if(95===t&&95!==r)return new a.L(i,e);if(45===t&&45!==r)return new a.L(i,e);if((n.mK(t)||n.T5(t))&&n.df(r))return new a.L(i,e);if(n.df(t)&&n.df(r)&&e+1<o){const t=s.charCodeAt(e);if(n.mK(t)||n.T5(t))return new a.L(i,e)}}return new a.L(i,1)}static moveWordRight(e,t,i,n){let o=i.lineNumber,s=i.column,r=!1;s===t.getLineMaxColumn(o)&&o<t.getLineCount()&&(r=!0,o+=1,s=1);let l=d._findNextWordOnLine(e,t,new a.L(o,s));if(2===n)l&&2===l.wordType&&l.end-l.start==1&&0===l.nextCharClass&&(l=d._findNextWordOnLine(e,t,new a.L(o,l.end+1))),s=l?l.end+1:t.getLineMaxColumn(o);else if(3===n){for(r&&(s=0);l&&(2===l.wordType||l.start+1<=s);)l=d._findNextWordOnLine(e,t,new a.L(o,l.end+1));s=l?l.start+1:t.getLineMaxColumn(o)}else l&&!r&&s>=l.start+1&&(l=d._findNextWordOnLine(e,t,new a.L(o,l.end+1))),s=l?l.start+1:t.getLineMaxColumn(o);return new a.L(o,s)}static _moveWordPartRight(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(t.column===o)return i<e.getLineCount()?new a.L(i+1,1):t;const s=e.getLineContent(i);for(let e=t.column+1;e<o;e++){const t=s.charCodeAt(e-2),r=s.charCodeAt(e-1);if(95!==t&&95===r)return new a.L(i,e);if(45!==t&&45===r)return new a.L(i,e);if((n.mK(t)||n.T5(t))&&n.df(r))return new a.L(i,e);if(n.df(t)&&n.df(r)&&e+1<o){const t=s.charCodeAt(e);if(n.mK(t)||n.T5(t))return new a.L(i,e)}}return new a.L(i,o)}static _deleteWordLeftWhitespace(e,t){const i=e.getLineContent(t.lineNumber),o=t.column-2,s=n.ow(i,o);return s+1<o?new l.e(t.lineNumber,s+2,t.lineNumber,t.column):null}static deleteWordLeft(e,t){const i=e.wordSeparators,n=e.model,o=e.selection,r=e.whitespaceHeuristics;if(!o.isEmpty())return o;if(s.A.isAutoClosingPairDelete(e.autoClosingDelete,e.autoClosingBrackets,e.autoClosingQuotes,e.autoClosingPairs.autoClosingPairsOpenByEnd,e.model,[e.selection],e.autoClosedCharacters)){const t=e.selection.getPosition();return new l.e(t.lineNumber,t.column-1,t.lineNumber,t.column+1)}const h=new a.L(o.positionLineNumber,o.positionColumn);let c=h.lineNumber,u=h.column;if(1===c&&1===u)return null;if(r){const e=this._deleteWordLeftWhitespace(n,h);if(e)return e}let g=d._findPreviousWordOnLine(i,n,h);return 0===t?g?u=g.start+1:u>1?u=1:(c--,u=n.getLineMaxColumn(c)):(g&&u<=g.end+1&&(g=d._findPreviousWordOnLine(i,n,new a.L(c,g.start+1))),g?u=g.end+1:u>1?u=1:(c--,u=n.getLineMaxColumn(c))),new l.e(c,u,h.lineNumber,h.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new a.L(i.positionLineNumber,i.positionColumn);return this._deleteInsideWordWhitespace(t,n)||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let s=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,s))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;s+1<n&&this._charAtIsWhitespace(i,s+1);)s++;return new l.e(t.lineNumber,o+1,t.lineNumber,s+2)}static _deleteInsideWordDetermineDeleteRange(e,t,i){const n=t.getLineContent(i.lineNumber),o=n.length;if(0===o)return i.lineNumber>1?new l.e(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumber<t.getLineCount()?new l.e(i.lineNumber,1,i.lineNumber+1,1):new l.e(i.lineNumber,1,i.lineNumber,1);const s=e=>e.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.e(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,s=!1;for(;i-1<o&&this._charAtIsWhitespace(n,i-1);)s=!0,i++;if(!s)for(;t>1&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},h=d._findPreviousWordOnLine(e,t,i);if(h&&s(h))return a(h);const c=d._findNextWordOnLine(e,t,i);return c&&s(c)?a(c):h&&c?r(h.end+1,c.start+1):h?r(h.start+1,h.end+1):c?r(c.start+1,c.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=d._moveWordPartLeft(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n<i;n++){const t=e.charAt(n);if(" "!==t&&"\t"!==t)return n}return i}static _deleteWordRightWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-1,o=this._findFirstNonWhitespaceChar(i,n);return n+1<o?new l.e(t.lineNumber,t.column,t.lineNumber,o+1):null}static deleteWordRight(e,t){const i=e.wordSeparators,n=e.model,o=e.selection,s=e.whitespaceHeuristics;if(!o.isEmpty())return o;const r=new a.L(o.positionLineNumber,o.positionColumn);let h=r.lineNumber,c=r.column;const u=n.getLineCount(),g=n.getLineMaxColumn(h);if(h===u&&c===g)return null;if(s){const e=this._deleteWordRightWhitespace(n,r);if(e)return e}let p=d._findNextWordOnLine(i,n,r);return 2===t?p?c=p.end+1:c<g||h===u?c=g:(h++,p=d._findNextWordOnLine(i,n,new a.L(h,1)),c=p?p.start+1:n.getLineMaxColumn(h)):(p&&c>=p.start+1&&(p=d._findNextWordOnLine(i,n,new a.L(h,p.end+1))),p?c=p.start+1:c<g||h===u?c=g:(h++,p=d._findNextWordOnLine(i,n,new a.L(h,1)),c=p?p.start+1:n.getLineMaxColumn(h))),new l.e(h,c,r.lineNumber,r.column)}static _deleteWordPartRight(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=d._moveWordPartRight(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _createWordAtPosition(e,t,i){const n=new l.e(t,i.start+1,t,i.end+1);return{word:e.getValueInRange(n),startColumn:n.startColumn,endColumn:n.endColumn}}static getWordAtPosition(e,t,i){const n=(0,r.u)(t),o=d._findPreviousWordOnLine(n,e,i);if(o&&1===o.wordType&&o.start<=i.column-1&&i.column-1<=o.end)return d._createWordAtPosition(e,i.lineNumber,o);const s=d._findNextWordOnLine(n,e,i);return s&&1===s.wordType&&s.start<=i.column-1&&i.column-1<=s.end?d._createWordAtPosition(e,i.lineNumber,s):null}static word(e,t,i,n,s){const h=(0,r.u)(e.wordSeparators),c=d._findPreviousWordOnLine(h,t,s),u=d._findNextWordOnLine(h,t,s);if(!n){let e,i;return c&&1===c.wordType&&c.start<=s.column-1&&s.column-1<=c.end?(e=c.start+1,i=c.end+1):u&&1===u.wordType&&u.start<=s.column-1&&s.column-1<=u.end?(e=u.start+1,i=u.end+1):(e=c?c.end+1:1,i=u?u.start+1:t.getLineMaxColumn(s.lineNumber)),new o.rS(new l.e(s.lineNumber,e,s.lineNumber,i),1,0,new a.L(s.lineNumber,i),0)}let g,p;c&&1===c.wordType&&c.start<s.column-1&&s.column-1<c.end?(g=c.start+1,p=c.end+1):u&&1===u.wordType&&u.start<s.column-1&&s.column-1<u.end?(g=u.start+1,p=u.end+1):(g=s.column,p=s.column);const m=s.lineNumber;let f;if(i.selectionStart.containsPosition(s))f=i.selectionStart.endColumn;else if(s.isBeforeOrEqual(i.selectionStart.getStartPosition())){f=g;const e=new a.L(m,f);i.selectionStart.containsPosition(e)&&(f=i.selectionStart.endColumn)}else{f=p;const e=new a.L(m,f);i.selectionStart.containsPosition(e)&&(f=i.selectionStart.startColumn)}return i.move(!0,m,f,0)}}class h extends d{static deleteWordPartLeft(e){const t=c([d.deleteWordLeft(e,0),d.deleteWordLeft(e,2),d._deleteWordPartLeft(e.model,e.selection)]);return t.sort(l.e.compareRangesUsingEnds),t[2]}static deleteWordPartRight(e){const t=c([d.deleteWordRight(e,0),d.deleteWordRight(e,2),d._deleteWordPartRight(e.model,e.selection)]);return t.sort(l.e.compareRangesUsingStarts),t[0]}static moveWordPartLeft(e,t,i){const n=c([d.moveWordLeft(e,t,i,0),d.moveWordLeft(e,t,i,2),d._moveWordPartLeft(t,i)]);return n.sort(a.L.compare),n[2]}static moveWordPartRight(e,t,i){const n=c([d.moveWordRight(e,t,i,0),d.moveWordRight(e,t,i,2),d._moveWordPartRight(t,i)]);return n.sort(a.L.compare),n[0]}}function c(e){return e.filter((e=>Boolean(e)))}},55343:(e,t,i)=>{i.d(t,{LM:()=>u,LN:()=>v,Tp:()=>_,Vi:()=>g,rS:()=>f});var n=i(50187),o=i(24314),s=i(3860),r=i(19111),a=i(7988),l=i(83158);const d=()=>!0,h=()=>!1,c=e=>" "===e||"\t"===e;class u{static shouldRecreate(e){return e.hasChanged(142)||e.hasChanged(128)||e.hasChanged(36)||e.hasChanged(75)||e.hasChanged(77)||e.hasChanged(78)||e.hasChanged(6)||e.hasChanged(10)||e.hasChanged(8)||e.hasChanged(9)||e.hasChanged(13)||e.hasChanged(126)||e.hasChanged(49)||e.hasChanged(89)}constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,s=o.get(142),r=o.get(49);this.readOnly=o.get(89),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(114),this.lineHeight=r.lineHeight,this.typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=o.get(126),this.wordSeparators=o.get(128),this.emptySelectionClipboard=o.get(36),this.copyWithSyntaxHighlighting=o.get(24),this.multiCursorMergeOverlapping=o.get(75),this.multiCursorPaste=o.get(77),this.multiCursorLimit=o.get(78),this.autoClosingBrackets=o.get(6),this.autoClosingQuotes=o.get(10),this.autoClosingDelete=o.get(8),this.autoClosingOvertype=o.get(9),this.autoSurround=o.get(13),this.autoIndent=o.get(11),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const a=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(a)for(const e of a)this.surroundingPairs[e.open]=e.close}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=null===(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)||void 0===e?void 0:e.getElectricCharacters();if(t)for(const e of t)this._electricChars[e]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=(0,r.wH)(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return(0,l.x)(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return c;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return d;case"never":return h}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return e=>-1!==i.indexOf(e)}visibleColumnFromColumn(e,t){return a.i.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=a.i.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(n<o)return o;const s=e.getLineMaxColumn(t);return n>s?s:n}}class g{static fromModelState(e){return new p(e)}static fromViewState(e){return new m(e)}static fromModelSelection(e){const t=s.Y.liftSelection(e),i=new f(o.e.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return g.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this.fromModelSelection(e[i]);return t}constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}}class p{constructor(e){this.modelState=e,this.viewState=null}}class m{constructor(e){this.modelState=null,this.viewState=e}}class f{constructor(e,t,i,n,o){this.selectionStart=e,this.selectionStartKind=t,this.selectionStartLeftoverVisibleColumns=i,this.position=n,this.leftoverVisibleColumns=o,this._singleCursorStateBrand=void 0,this.selection=f._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.selectionStartKind===e.selectionStartKind&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,i,s){return e?new f(this.selectionStart,this.selectionStartKind,this.selectionStartLeftoverVisibleColumns,new n.L(t,i),s):new f(new o.e(t,i,t,i),0,s,new n.L(t,i),s)}static _computeSelection(e,t){return e.isEmpty()||!t.isBeforeOrEqual(e.getStartPosition())?s.Y.fromPositions(e.getStartPosition(),t):s.Y.fromPositions(e.getEndPosition(),t)}}class _{constructor(e,t,i){this._editOperationResultBrand=void 0,this.type=e,this.commands=t,this.shouldPushStackElementBefore=i.shouldPushStackElementBefore,this.shouldPushStackElementAfter=i.shouldPushStackElementAfter}}function v(e){return"'"===e||'"'===e||"`"===e}},18790:(e,t,i)=>{i.d(t,{a7:()=>L});var n=i(9488),o=i(35146),s=i(6626),r=i(17301),a=i(45463),l=i(19247),d=i(50187),h=i(24314);class c{static trivial(e,t){return new c([new u(new l.q(0,e.length),new l.q(0,t.length))],!1)}static trivialTimedOut(e,t){return new c([new u(new l.q(0,e.length),new l.q(0,t.length))],!0)}constructor(e,t){this.diffs=e,this.hitTimeout=t}}class u{constructor(e,t){this.seq1Range=e,this.seq2Range=t}reverse(){return new u(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new u(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new u(this.seq1Range.delta(e),this.seq2Range.delta(e))}}class g{isValid(){return!0}}g.instance=new g;class p{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new r.he("timeout must be positive")}isValid(){return!(Date.now()-this.startTime<this.timeout)&&this.valid&&(this.valid=!1),this.valid}}class m{constructor(e,t){this.width=e,this.height=t,this.array=[],this.array=new Array(e*t)}get(e,t){return this.array[e+t*this.width]}set(e,t,i){this.array[e+t*this.width]=i}}class f{compute(e,t,i=g.instance,n){if(0===e.length||0===t.length)return c.trivial(e,t);const o=new m(e.length,t.length),s=new m(e.length,t.length),r=new m(e.length,t.length);for(let a=0;a<e.length;a++)for(let l=0;l<t.length;l++){if(!i.isValid())return c.trivialTimedOut(e,t);const d=0===a?0:o.get(a-1,l),h=0===l?0:o.get(a,l-1);let u;e.getElement(a)===t.getElement(l)?(u=0===a||0===l?0:o.get(a-1,l-1),a>0&&l>0&&3===s.get(a-1,l-1)&&(u+=r.get(a-1,l-1)),u+=n?n(a,l):1):u=-1;const g=Math.max(d,h,u);if(g===u){const e=a>0&&l>0?r.get(a-1,l-1):0;r.set(a,l,e+1),s.set(a,l,3)}else g===d?(r.set(a,l,0),s.set(a,l,1)):g===h&&(r.set(a,l,0),s.set(a,l,2));o.set(a,l,g)}const a=[];let d=e.length,h=t.length;function p(e,t){e+1===d&&t+1===h||a.push(new u(new l.q(e+1,d),new l.q(t+1,h))),d=e,h=t}let f=e.length-1,_=t.length-1;for(;f>=0&&_>=0;)3===s.get(f,_)?(p(f,_),f--,_--):1===s.get(f,_)?f--:_--;return p(-1,-1),a.reverse(),new c(a,!1)}}function _(e,t,i){let n=i;return n=function(e,t,i){if(0===i.length)return i;const n=[];n.push(i[0]);for(let o=1;o<i.length;o++){const s=n[n.length-1];let r=i[o];if(r.seq1Range.isEmpty||r.seq2Range.isEmpty){const i=r.seq1Range.start-s.seq1Range.endExclusive;let o;for(o=1;o<=i&&e.getElement(r.seq1Range.start-o)===e.getElement(r.seq1Range.endExclusive-o)&&t.getElement(r.seq2Range.start-o)===t.getElement(r.seq2Range.endExclusive-o);o++);if(o--,o===i){n[n.length-1]=new u(new l.q(s.seq1Range.start,r.seq1Range.endExclusive-i),new l.q(s.seq2Range.start,r.seq2Range.endExclusive-i));continue}r=r.delta(-o)}n.push(r)}const o=[];for(let i=0;i<n.length-1;i++){const s=n[i+1];let r=n[i];if(r.seq1Range.isEmpty||r.seq2Range.isEmpty){const o=s.seq1Range.start-r.seq1Range.endExclusive;let a;for(a=0;a<o&&e.getElement(r.seq1Range.start+a)===e.getElement(r.seq1Range.endExclusive+a)&&t.getElement(r.seq2Range.start+a)===t.getElement(r.seq2Range.endExclusive+a);a++);if(a===o){n[i+1]=new u(new l.q(r.seq1Range.start+o,s.seq1Range.endExclusive),new l.q(r.seq2Range.start+o,s.seq2Range.endExclusive));continue}a>0&&(r=r.delta(a))}o.push(r)}return n.length>0&&o.push(n[n.length-1]),o}(e,t,n),n=function(e,t,i){if(!e.getBoundaryScore||!t.getBoundaryScore)return i;for(let n=0;n<i.length;n++){const o=n>0?i[n-1]:void 0,s=i[n],r=n+1<i.length?i[n+1]:void 0,a=new l.q(o?o.seq1Range.start+1:0,r?r.seq1Range.endExclusive-1:e.length),d=new l.q(o?o.seq2Range.start+1:0,r?r.seq2Range.endExclusive-1:t.length);s.seq1Range.isEmpty?i[n]=v(s,e,t,a,d):s.seq2Range.isEmpty&&(i[n]=v(s.reverse(),t,e,d,a).reverse())}return i}(e,t,n),n}function v(e,t,i,n,o){let s=1;for(;e.seq1Range.start-s>=n.start&&e.seq2Range.start-s>=o.start&&i.isStronglyEqual(e.seq2Range.start-s,e.seq2Range.endExclusive-s)&&s<100;)s++;s--;let r=0;for(;e.seq1Range.start+r<n.endExclusive&&e.seq2Range.endExclusive+r<o.endExclusive&&i.isStronglyEqual(e.seq2Range.start+r,e.seq2Range.endExclusive+r)&&r<100;)r++;if(0===s&&0===r)return e;let a=0,l=-1;for(let n=-s;n<=r;n++){const o=e.seq2Range.start+n,s=e.seq2Range.endExclusive+n,r=e.seq1Range.start+n,d=t.getBoundaryScore(r)+i.getBoundaryScore(o)+i.getBoundaryScore(s);d>l&&(l=d,a=n)}return e.delta(a)}class b{compute(e,t,i=g.instance){if(0===e.length||0===t.length)return c.trivial(e,t);function n(i,n){for(;i<e.length&&n<t.length&&e.getElement(i)===t.getElement(n);)i++,n++;return i}let o=0;const s=new w;s.set(0,n(0,0));const r=new y;r.set(0,0===s.get(0)?null:new C(null,0,0,s.get(0)));let a=0;e:for(;;){if(o++,!i.isValid())return c.trivialTimedOut(e,t);const l=-Math.min(o,t.length+o%2),d=Math.min(o,e.length+o%2);for(a=l;a<=d;a+=2){const i=a===d?-1:s.get(a+1),o=a===l?-1:s.get(a-1)+1,h=Math.min(Math.max(i,o),e.length),c=h-a;if(h>e.length||c>t.length)continue;const u=n(h,c);s.set(a,u);const g=h===i?r.get(a+1):r.get(a-1);if(r.set(a,u!==h?new C(g,h,c,u-h):g),s.get(a)===e.length&&s.get(a)-a===t.length)break e}}let d=r.get(a);const h=[];let p=e.length,m=t.length;for(;;){const e=d?d.x+d.length:0,t=d?d.y+d.length:0;if(e===p&&t===m||h.push(new u(new l.q(e,p),new l.q(t,m))),!d)break;p=d.x,m=d.y,d=d.prev}return h.reverse(),new c(h,!1)}}class C{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class w{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class y{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var S=i(60652);class L{constructor(){this.dynamicProgrammingDiffing=new f,this.myersDiffingAlgorithm=new b}computeDiff(e,t,i){if(e.length<=1&&(0,n.fS)(e,t,((e,t)=>e===t)))return new S.hZ([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new S.hZ([new S.f0(new a.z(1,e.length+1),new a.z(1,t.length+1),[new S.iy(new h.e(1,1,e.length,e[0].length+1),new h.e(1,1,t.length,t[0].length+1))])],[],!1);const s=0===i.maxComputationTimeMs?g.instance:new p(i.maxComputationTimeMs),r=!i.ignoreTrimWhitespace,d=new Map;function c(e){let t=d.get(e);return void 0===t&&(t=d.size,d.set(e,t)),t}const m=e.map((e=>c(e.trim()))),f=t.map((e=>c(e.trim()))),v=new I(m,e),b=new I(f,t),C=(()=>v.length+b.length<1700?this.dynamicProgrammingDiffing.compute(v,b,s,((i,n)=>e[i]===t[n]?0===t[n].length?.1:1+Math.log(1+t[n].length):.99)):this.myersDiffingAlgorithm.compute(v,b))();let w=C.diffs,y=C.hitTimeout;w=_(v,b,w),w=function(e,t,i){let n=i;if(0===n.length)return n;let o,s=0;do{o=!1;const r=[n[0]];for(let a=1;a<n.length;a++){const d=n[a],h=r[r.length-1];function c(t,i){const n=new l.q(h.seq1Range.endExclusive,d.seq1Range.start);return e.getText(n).replace(/\s/g,"").length<=4&&(t.seq1Range.length+t.seq2Range.length>5||i.seq1Range.length+i.seq2Range.length>5)}c(h,d)?(o=!0,r[r.length-1]=r[r.length-1].join(d)):r.push(d)}n=r}while(s++<10&&o);return n}(v,0,w);const L=[],x=i=>{if(r)for(let n=0;n<i;n++){const i=k+n,o=N+n;if(e[i]!==t[o]){const n=this.refineDiff(e,t,new u(new l.q(i,i+1),new l.q(o,o+1)),s,r);for(const e of n.mappings)L.push(e);n.hitTimeout&&(y=!0)}}};let k=0,N=0;for(const i of w){(0,o.eZ)((()=>i.seq1Range.start-k==i.seq2Range.start-N)),x(i.seq1Range.start-k),k=i.seq1Range.endExclusive,N=i.seq2Range.endExclusive;const n=this.refineDiff(e,t,i,s,r);n.hitTimeout&&(y=!0);for(const e of n.mappings)L.push(e)}x(e.length-k);const D=E(L,e,t);let T=[];return i.computeMoves&&(T=this.computeMoves(D,e,t,m,f,s,r)),(0,o.eZ)((()=>{function i(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const i=t[e.lineNumber-1];return!(e.column<1||e.column>i.length+1)}function n(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1||e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const o of D){if(!o.innerChanges)return!1;for(const n of o.innerChanges)if(!(i(n.modifiedRange.getStartPosition(),t)&&i(n.modifiedRange.getEndPosition(),t)&&i(n.originalRange.getStartPosition(),e)&&i(n.originalRange.getEndPosition(),e)))return!1;if(!n(o.modifiedRange,t)||!n(o.originalRange,e))return!1}return!0})),new S.hZ(D,T,y)}computeMoves(e,t,i,o,r,l,d){const h=[],c=e.filter((e=>e.modifiedRange.isEmpty&&e.originalRange.length>=3)).map((e=>new W(e.originalRange,t,e))),g=new Set(e.filter((e=>e.originalRange.isEmpty&&e.modifiedRange.length>=3)).map((e=>new W(e.modifiedRange,i,e)))),p=new Set;for(const e of c){let t,i=-1;for(const n of g){const o=e.computeSimilarity(n);o>i&&(i=o,t=n)}if(i>.9&&t&&(g.delete(t),h.push(new S.Qy(e.range,t.range)),p.add(e.source),p.add(t.source)),!l.isValid())return[]}const m=new s.r;for(const t of e)if(!p.has(t))for(let e=t.originalRange.startLineNumber;e<t.originalRange.endLineNumberExclusive-2;e++){const t=`${o[e-1]}:${o[e+1-1]}:${o[e+2-1]}`;m.add(t,{range:new a.z(e,e+3)})}const f=[];e.sort((0,n.tT)((e=>e.modifiedRange.startLineNumber),n.fv));for(const t of e){if(p.has(t))continue;let e=[];for(let i=t.modifiedRange.startLineNumber;i<t.modifiedRange.endLineNumberExclusive-2;i++){const t=`${r[i-1]}:${r[i+1-1]}:${r[i+2-1]}`,n=new a.z(i,i+3),o=[];m.forEach(t,(({range:t})=>{for(const i of e)if(i.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&i.modifiedLineRange.endLineNumberExclusive+1===n.endLineNumberExclusive)return i.originalLineRange=new a.z(i.originalLineRange.startLineNumber,t.endLineNumberExclusive),i.modifiedLineRange=new a.z(i.modifiedLineRange.startLineNumber,n.endLineNumberExclusive),void o.push(i);const i={modifiedLineRange:n,originalLineRange:t};f.push(i),o.push(i)})),e=o}if(!l.isValid())return[]}f.sort((0,n.BV)((0,n.tT)((e=>e.modifiedLineRange.length),n.fv)));const _=new N,v=new N;for(const e of f){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,i=k(_.subtractFrom(e.modifiedLineRange),v.subtractFrom(e.originalLineRange).map((e=>e.delta(t))));for(const e of i){if(e.length<3)continue;const i=e,n=e.delta(-t);h.push(new S.Qy(n,i)),_.addRange(i),v.addRange(n)}}if(h.sort((0,n.tT)((e=>e.original.startLineNumber),n.fv)),0===h.length)return[];let b=[h[0]];for(let e=1;e<h.length;e++){const i=b[b.length-1],n=h[e],o=n.original.startLineNumber-i.original.endLineNumberExclusive,s=n.modified.startLineNumber-i.modified.endLineNumberExclusive;o>=0&&s>=0&&o+s<=2?b[b.length-1]=i.join(n):n.original.toOffsetRange().slice(t).map((e=>e.trim())).join("\n").length<=10||b.push(n)}const C=x.createOfSorted(e,(e=>e.originalRange.endLineNumberExclusive),n.fv);return b=b.filter((e=>{const t=C.findLastItemBeforeOrEqual(e.original.startLineNumber)||new S.f0(new a.z(1,1),new a.z(1,1),[]);return e.modified.startLineNumber-t.modifiedRange.endLineNumberExclusive!=e.original.startLineNumber-t.originalRange.endLineNumberExclusive})),b.map((e=>{const n=E(this.refineDiff(t,i,new u(e.original.toOffsetRange(),e.modified.toOffsetRange()),l,d).mappings,t,i,!0);return new S.y0(e,n)}))}refineDiff(e,t,i,n,o){const s=new M(e,i.seq1Range,o),r=new M(t,i.seq2Range,o),a=s.length+r.length<500?this.dynamicProgrammingDiffing.compute(s,r,n):this.myersDiffingAlgorithm.compute(s,r,n);let d=a.diffs;return d=_(s,r,d),d=function(e,t,i){const n=[];let o;function s(){if(!o)return;const e=o.s1Range.length-o.deleted;o.s2Range.length,o.added,Math.max(o.deleted,o.added)+(o.count-1)>e&&n.push(new u(o.s1Range,o.s2Range)),o=void 0}for(const r of i){function a(e,t){var i,n,a,d;if(!o||!o.s1Range.containsRange(e)||!o.s2Range.containsRange(t))if(!o||o.s1Range.endExclusive<e.start&&o.s2Range.endExclusive<t.start)s(),o={added:0,deleted:0,count:0,s1Range:e,s2Range:t};else{const s=l.q.tryCreate(o.s1Range.endExclusive,e.start),r=l.q.tryCreate(o.s2Range.endExclusive,t.start);o.deleted+=null!==(i=null==s?void 0:s.length)&&void 0!==i?i:0,o.added+=null!==(n=null==r?void 0:r.length)&&void 0!==n?n:0,o.s1Range=o.s1Range.join(e),o.s2Range=o.s2Range.join(t)}const h=e.intersect(r.seq1Range),c=t.intersect(r.seq2Range);o.count++,o.deleted+=null!==(a=null==h?void 0:h.length)&&void 0!==a?a:0,o.added+=null!==(d=null==c?void 0:c.length)&&void 0!==d?d:0}const d=e.findWordContaining(r.seq1Range.start-1),h=t.findWordContaining(r.seq2Range.start-1),c=e.findWordContaining(r.seq1Range.endExclusive),g=t.findWordContaining(r.seq2Range.endExclusive);d&&c&&h&&g&&d.equals(c)&&h.equals(g)?a(d,h):(d&&h&&a(d,h),c&&g&&a(c,g))}return s(),function(e,t){const i=[];for(;e.length>0||t.length>0;){const n=e[0],o=t[0];let s;s=n&&(!o||n.seq1Range.start<o.seq1Range.start)?e.shift():t.shift(),i.length>0&&i[i.length-1].seq1Range.endExclusive>=s.seq1Range.start?i[i.length-1]=i[i.length-1].join(s):i.push(s)}return i}(i,n)}(s,r,d),d=function(e,t,i){const n=[];for(const e of i){const t=n[n.length-1];t&&(e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2)?n[n.length-1]=new u(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):n.push(e)}return n}(0,0,d),d=function(e,t,i){let n=i;if(0===n.length)return n;let o,s=0;do{o=!1;const r=[n[0]];for(let a=1;a<n.length;a++){const d=n[a],h=r[r.length-1];function c(i,n){const o=new l.q(h.seq1Range.endExclusive,d.seq1Range.start);if(e.countLinesIn(o)>5||o.length>500)return!1;const s=e.getText(o).trim();if(s.length>20||s.split(/\r\n|\r|\n/).length>1)return!1;const r=e.countLinesIn(i.seq1Range),a=i.seq1Range.length,c=t.countLinesIn(i.seq2Range),u=i.seq2Range.length,g=e.countLinesIn(n.seq1Range),p=n.seq1Range.length,m=t.countLinesIn(n.seq2Range),f=n.seq2Range.length;function _(e){return Math.min(e,130)}return Math.pow(Math.pow(_(40*r+a),1.5)+Math.pow(_(40*c+u),1.5),1.5)+Math.pow(Math.pow(_(40*g+p),1.5)+Math.pow(_(40*m+f),1.5),1.5)>1.3*Math.pow(Math.pow(130,1.5),1.5)}c(h,d)?(o=!0,r[r.length-1]=r[r.length-1].join(d)):r.push(d)}n=r}while(s++<10&&o);for(let g=0;g<n.length;g++){const p=n[g];let m=p.seq1Range,f=p.seq2Range;const _=e.extendToFullLines(p.seq1Range),v=e.getText(new l.q(_.start,p.seq1Range.start));v.length>0&&v.trim().length<=3&&p.seq1Range.length+p.seq2Range.length>100&&(m=p.seq1Range.deltaStart(-v.length),f=p.seq2Range.deltaStart(-v.length));const b=e.getText(new l.q(p.seq1Range.endExclusive,_.endExclusive));b.length>0&&b.trim().length<=3&&p.seq1Range.length+p.seq2Range.length>150&&(m=m.deltaEnd(b.length),f=f.deltaEnd(b.length)),n[g]=new u(m,f)}return n}(s,r,d),{mappings:d.map((e=>new S.iy(s.translateRange(e.seq1Range),r.translateRange(e.seq2Range)))),hitTimeout:a.hitTimeout}}}class x{static createOfSorted(e,t,i){return new x(e,t,i)}constructor(e,t,i){this._items=e,this._itemToDomain=t,this._domainComparator=i,this._currentIdx=0,this._lastValue=void 0,this._hasLastValue=!1}findLastItemBeforeOrEqual(e){if(this._hasLastValue&&n.Bq.isLessThan(this._domainComparator(e,this._lastValue)))throw new r.he;for(this._lastValue=e,this._hasLastValue=!0;this._currentIdx<this._items.length&&n.Bq.isLessThanOrEqual(this._domainComparator(this._itemToDomain(this._items[this._currentIdx]),e));)this._currentIdx++;return 0===this._currentIdx?void 0:this._items[this._currentIdx-1]}}function k(e,t){const i=[];let n=0,o=0;for(;n<e.length&&o<t.length;){const s=e[n],r=t[o],a=s.intersect(r);a&&!a.isEmpty&&i.push(a),s.endLineNumberExclusive<r.endLineNumberExclusive?n++:o++}return i}class N{constructor(){this._normalizedRanges=[]}addRange(e){const t=D(this._normalizedRanges.findIndex((t=>t.endLineNumberExclusive>=e.startLineNumber)),this._normalizedRanges.length),i=(0,n.qr)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)this._normalizedRanges.splice(t,0,e);else if(t===i-1){const i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{const n=this._normalizedRanges[t].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(t,i-t,n)}}subtractFrom(e){const t=D(this._normalizedRanges.findIndex((t=>t.endLineNumberExclusive>=e.startLineNumber)),this._normalizedRanges.length),i=(0,n.qr)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)return[e];const o=[];let s=e.startLineNumber;for(let e=t;e<i;e++){const t=this._normalizedRanges[e];t.startLineNumber>s&&o.push(new a.z(s,t.startLineNumber)),s=t.endLineNumberExclusive}return s<e.endLineNumberExclusive&&o.push(new a.z(s,e.endLineNumberExclusive)),o}}function D(e,t){return-1===e?t:e}function E(e,t,i,n=!1){const s=[];for(const n of function*(e,t){let i,n;for(const t of e)void 0!==n&&(s=t,(o=n).originalRange.overlapOrTouch(s.originalRange)||o.modifiedRange.overlapOrTouch(s.modifiedRange))?i.push(t):(i&&(yield i),i=[t]),n=t;var o,s;i&&(yield i)}(e.map((e=>function(e,t,i){let n=0,o=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+n<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+n<=e.modifiedRange.endLineNumber&&(o=-1),e.modifiedRange.startColumn-1>=i[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+o&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+o&&(n=1);const s=new a.z(e.originalRange.startLineNumber+n,e.originalRange.endLineNumber+1+o),r=new a.z(e.modifiedRange.startLineNumber+n,e.modifiedRange.endLineNumber+1+o);return new S.f0(s,r,[e])}(e,t,i))))){const e=n[0],t=n[n.length-1];s.push(new S.f0(e.originalRange.join(t.originalRange),e.modifiedRange.join(t.modifiedRange),n.map((e=>e.innerChanges[0]))))}return(0,o.eZ)((()=>!(!n&&s.length>0&&s[0].originalRange.startLineNumber!==s[0].modifiedRange.startLineNumber)&&(0,o.DM)(s,((e,t)=>t.originalRange.startLineNumber-e.originalRange.endLineNumberExclusive==t.modifiedRange.startLineNumber-e.modifiedRange.endLineNumberExclusive&&e.originalRange.endLineNumberExclusive<t.originalRange.startLineNumber&&e.modifiedRange.endLineNumberExclusive<t.modifiedRange.startLineNumber)))),s}class I{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:T(this.lines[e-1]))+(e===this.lines.length?0:T(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function T(e){let t=0;for(;t<e.length&&(32===e.charCodeAt(t)||9===e.charCodeAt(t));)t++;return t}class M{constructor(e,t,i){this.lines=e,this.considerWhitespaceChanges=i,this.elements=[],this.firstCharOffsetByLineMinusOne=[],this.additionalOffsetByLine=[];let n=!1;t.start>0&&t.endExclusive>=e.length&&(t=new l.q(t.start-1,t.endExclusive),n=!0),this.lineRange=t;for(let t=this.lineRange.start;t<this.lineRange.endExclusive;t++){let o=e[t],s=0;if(n)s=o.length,o="",n=!1;else if(!i){const e=o.trimStart();s=o.length-e.length,o=e.trimEnd()}this.additionalOffsetByLine.push(s);for(let e=0;e<o.length;e++)this.elements.push(o.charCodeAt(e));t<e.length-1&&(this.elements.push("\n".charCodeAt(0)),this.firstCharOffsetByLineMinusOne[t-this.lineRange.start]=this.elements.length)}this.additionalOffsetByLine.push(0)}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new l.q(0,this.length))}getText(e){return this.elements.slice(e.start,e.endExclusive).map((e=>String.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=P(e>0?this.elements[e-1]:-1),i=P(e<this.elements.length?this.elements[e]:-1);if(6===t&&7===i)return 0;let n=0;return t!==i&&(n+=10,1===i&&(n+=1)),n+=O(t),n+=O(i),n}translateOffset(e){if(this.lineRange.isEmpty)return new d.L(this.lineRange.start+1,1);let t=0,i=this.firstCharOffsetByLineMinusOne.length;for(;t<i;){const n=Math.floor((t+i)/2);this.firstCharOffsetByLineMinusOne[n]>e?i=n:t=n+1}const n=0===t?0:this.firstCharOffsetByLineMinusOne[t-1];return new d.L(this.lineRange.start+t+1,e-n+1+this.additionalOffsetByLine[t])}translateRange(e){return h.e.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!R(this.elements[e]))return;let t=e;for(;t>0&&R(this.elements[t-1]);)t--;let i=e;for(;i<this.elements.length&&R(this.elements[i]);)i++;return new l.q(t,i)}countLinesIn(e){return this.translateOffset(e.endExclusive).lineNumber-this.translateOffset(e.start).lineNumber}isStronglyEqual(e,t){return this.elements[e]===this.elements[t]}extendToFullLines(e){var t,i;const n=null!==(t=function(t,i){const n=function(e,t){let i=0,n=e.length;for(;i<n;){const o=Math.floor((i+n)/2);t(e[o])?i=o+1:n=o}return i-1}(t,(t=>t<=e.start));return-1===n?void 0:t[n]}(this.firstCharOffsetByLineMinusOne))&&void 0!==t?t:0,o=null!==(i=function(t,i){const n=function(e,t){let i=0,n=e.length;for(;i<n;){const o=Math.floor((i+n)/2);t(e[o])?n=o:i=o+1}return i}(t,(t=>e.endExclusive<=t));return n===t.length?void 0:t[n]}(this.firstCharOffsetByLineMinusOne))&&void 0!==i?i:this.elements.length;return new l.q(n,o)}}function R(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const A={0:0,1:0,2:0,3:10,4:2,5:3,6:10,7:10};function O(e){return A[e]}function P(e){return 10===e?7:13===e?6:function(e){return 32===e||9===e}(e)?5:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:4}const F=new Map;function B(e){let t=F.get(e);return void 0===t&&(t=F.size,F.set(e,t)),t}class W{constructor(e,t,i){this.range=e,this.lines=t,this.source=i,this.histogram=[];let n=0;for(let i=e.startLineNumber-1;i<e.endLineNumberExclusive-1;i++){const e=t[i];for(let t=0;t<e.length;t++){n++;const i=B(e[t]);this.histogram[i]=(this.histogram[i]||0)+1}n++;const o=B("\n");this.histogram[o]=(this.histogram[o]||0)+1}this.totalCount=n}computeSimilarity(e){var t,i;let n=0;const o=Math.max(this.histogram.length,e.histogram.length);for(let s=0;s<o;s++)n+=Math.abs((null!==(t=this.histogram[s])&&void 0!==t?t:0)-(null!==(i=e.histogram[s])&&void 0!==i?i:0));return 1-n/(this.totalCount+e.totalCount)}}},60652:(e,t,i)=>{i.d(t,{Qy:()=>a,f0:()=>s,hZ:()=>o,iy:()=>r,y0:()=>l});var n=i(45463);class o{constructor(e,t,i){this.changes=e,this.moves=t,this.hitTimeout=i}}class s{static inverse(e,t,i){const o=[];let r=1,a=1;for(const t of e){const e=new s(new n.z(r,t.originalRange.startLineNumber),new n.z(a,t.modifiedRange.startLineNumber),void 0);e.modifiedRange.isEmpty||o.push(e),r=t.originalRange.endLineNumberExclusive,a=t.modifiedRange.endLineNumberExclusive}const l=new s(new n.z(r,t+1),new n.z(a,i+1),void 0);return l.modifiedRange.isEmpty||o.push(l),o}constructor(e,t,i){this.originalRange=e,this.modifiedRange=t,this.innerChanges=i}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}get changedLineCount(){return Math.max(this.originalRange.length,this.modifiedRange.length)}flip(){var e;return new s(this.modifiedRange,this.originalRange,null===(e=this.innerChanges)||void 0===e?void 0:e.map((e=>e.flip())))}}class r{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new r(this.modifiedRange,this.originalRange)}}class a{constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new a(this.modified,this.original)}join(e){return new a(this.original.join(e.original),this.modified.join(e.modified))}}class l{constructor(e,t){this.lineRangeMapping=e,this.changes=t}flip(){return new l(this.lineRangeMapping.flip(),this.changes.map((e=>e.flip())))}}},30653:(e,t,i)=>{i.d(t,{p:()=>n});class n{constructor(e,t,i,n,o,s){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=o,this._contextKeyService=s}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}},96518:(e,t,i)=>{i.d(t,{g:()=>n});const n={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},29102:(e,t,i)=>{i.d(t,{u:()=>n});var n,o=i(63580),s=i(93983);!function(e){e.editorSimpleInput=new s.uy("editorSimpleInput",!1,!0),e.editorTextFocus=new s.uy("editorTextFocus",!1,o.NC("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new s.uy("editorFocus",!1,o.NC("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new s.uy("textInputFocus",!1,o.NC("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new s.uy("editorReadonly",!1,o.NC("editorReadonly","Whether the editor is read-only")),e.inDiffEditor=new s.uy("inDiffEditor",!1,o.NC("inDiffEditor","Whether the context is a diff editor")),e.isEmbeddedDiffEditor=new s.uy("isEmbeddedDiffEditor",!1,o.NC("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),e.comparingMovedCode=new s.uy("comparingMovedCode",!1,o.NC("comparingMovedCode","Whether a moved code block is selected for comparison")),e.accessibleDiffViewerVisible=new s.uy("accessibleDiffViewerVisible",!1,o.NC("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),e.diffEditorRenderSideBySideInlineBreakpointReached=new s.uy("diffEditorRenderSideBySideInlineBreakpointReached",!1,o.NC("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),e.columnSelection=new s.uy("editorColumnSelection",!1,o.NC("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new s.uy("editorHasSelection",!1,o.NC("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new s.uy("editorHasMultipleSelections",!1,o.NC("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new s.uy("editorTabMovesFocus",!1,o.NC("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new s.uy("isInEmbeddedEditor",!1,!0),e.canUndo=new s.uy("canUndo",!1,!0),e.canRedo=new s.uy("canRedo",!1,!0),e.hoverVisible=new s.uy("editorHoverVisible",!1,o.NC("editorHoverVisible","Whether the editor hover is visible")),e.hoverFocused=new s.uy("editorHoverFocused",!1,o.NC("editorHoverFocused","Whether the editor hover is focused")),e.stickyScrollFocused=new s.uy("stickyScrollFocused",!1,o.NC("stickyScrollFocused","Whether the sticky scroll is focused")),e.stickyScrollVisible=new s.uy("stickyScrollVisible",!1,o.NC("stickyScrollVisible","Whether the sticky scroll is visible")),e.standaloneColorPickerVisible=new s.uy("standaloneColorPickerVisible",!1,o.NC("standaloneColorPickerVisible","Whether the standalone color picker is visible")),e.standaloneColorPickerFocused=new s.uy("standaloneColorPickerFocused",!1,o.NC("standaloneColorPickerFocused","Whether the standalone color picker is focused")),e.inCompositeEditor=new s.uy("inCompositeEditor",void 0,o.NC("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new s.uy("editorLangId","",o.NC("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new s.uy("editorHasCompletionItemProvider",!1,o.NC("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new s.uy("editorHasCodeActionsProvider",!1,o.NC("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new s.uy("editorHasCodeLensProvider",!1,o.NC("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new s.uy("editorHasDefinitionProvider",!1,o.NC("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new s.uy("editorHasDeclarationProvider",!1,o.NC("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new s.uy("editorHasImplementationProvider",!1,o.NC("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new s.uy("editorHasTypeDefinitionProvider",!1,o.NC("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new s.uy("editorHasHoverProvider",!1,o.NC("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new s.uy("editorHasDocumentHighlightProvider",!1,o.NC("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new s.uy("editorHasDocumentSymbolProvider",!1,o.NC("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new s.uy("editorHasReferenceProvider",!1,o.NC("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new s.uy("editorHasRenameProvider",!1,o.NC("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new s.uy("editorHasSignatureHelpProvider",!1,o.NC("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new s.uy("editorHasInlayHintsProvider",!1,o.NC("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new s.uy("editorHasDocumentFormattingProvider",!1,o.NC("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new s.uy("editorHasDocumentSelectionFormattingProvider",!1,o.NC("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new s.uy("editorHasMultipleDocumentFormattingProvider",!1,o.NC("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new s.uy("editorHasMultipleDocumentSelectionFormattingProvider",!1,o.NC("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))}(n||(n={}))},10637:(e,t,i)=>{i.d(t,{n:()=>s,y:()=>o});const n=[];function o(e){n.push(e)}function s(){return n.slice(0)}},45797:(e,t,i)=>{i.d(t,{N:()=>n});class n{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return 0!=(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;");let s="";return 4&n&&(s+=" underline"),8&n&&(s+=" line-through"),s&&(o+=`text-decoration:${s};`),o}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}},96887:(e,t,i)=>{i.d(t,{mY:()=>S,gX:()=>h,MY:()=>g,DI:()=>_,AD:()=>x,gl:()=>L,bw:()=>c,MO:()=>k,ln:()=>v,WW:()=>u,uZ:()=>y,WU:()=>m,RW:()=>N,hG:()=>f,R4:()=>w,vx:()=>b});var n=i(73046),o=i(70666),s=i(24314),r=i(4669),a=i(5976),l=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class d extends a.JT{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return l(this,void 0,void 0,(function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}))}_create(){return l(this,void 0,void 0,(function*(){const e=yield this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}))}}var h,c,u,g,p=i(63580);class m{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class f{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class _{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}!function(e){const t=new Map;t.set(0,n.l.symbolMethod),t.set(1,n.l.symbolFunction),t.set(2,n.l.symbolConstructor),t.set(3,n.l.symbolField),t.set(4,n.l.symbolVariable),t.set(5,n.l.symbolClass),t.set(6,n.l.symbolStruct),t.set(7,n.l.symbolInterface),t.set(8,n.l.symbolModule),t.set(9,n.l.symbolProperty),t.set(10,n.l.symbolEvent),t.set(11,n.l.symbolOperator),t.set(12,n.l.symbolUnit),t.set(13,n.l.symbolValue),t.set(15,n.l.symbolEnum),t.set(14,n.l.symbolConstant),t.set(15,n.l.symbolEnum),t.set(16,n.l.symbolEnumMember),t.set(17,n.l.symbolKeyword),t.set(27,n.l.symbolSnippet),t.set(18,n.l.symbolText),t.set(19,n.l.symbolColor),t.set(20,n.l.symbolFile),t.set(21,n.l.symbolReference),t.set(22,n.l.symbolCustomColor),t.set(23,n.l.symbolFolder),t.set(24,n.l.symbolTypeParameter),t.set(25,n.l.account),t.set(26,n.l.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=n.l.symbolProperty),i};const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(h||(h={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(c||(c={}));class v{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return s.e.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}function b(e){return e&&o.o.isUri(e.uri)&&s.e.isIRange(e.range)&&(s.e.isIRange(e.originSelectionRange)||s.e.isIRange(e.targetSelectionRange))}!function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(u||(u={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(g||(g={}));const C={17:(0,p.NC)("Array","array"),16:(0,p.NC)("Boolean","boolean"),4:(0,p.NC)("Class","class"),13:(0,p.NC)("Constant","constant"),8:(0,p.NC)("Constructor","constructor"),9:(0,p.NC)("Enum","enumeration"),21:(0,p.NC)("EnumMember","enumeration member"),23:(0,p.NC)("Event","event"),7:(0,p.NC)("Field","field"),0:(0,p.NC)("File","file"),11:(0,p.NC)("Function","function"),10:(0,p.NC)("Interface","interface"),19:(0,p.NC)("Key","key"),5:(0,p.NC)("Method","method"),1:(0,p.NC)("Module","module"),2:(0,p.NC)("Namespace","namespace"),20:(0,p.NC)("Null","null"),15:(0,p.NC)("Number","number"),18:(0,p.NC)("Object","object"),24:(0,p.NC)("Operator","operator"),3:(0,p.NC)("Package","package"),6:(0,p.NC)("Property","property"),14:(0,p.NC)("String","string"),22:(0,p.NC)("Struct","struct"),25:(0,p.NC)("TypeParameter","type parameter"),12:(0,p.NC)("Variable","variable")};function w(e,t){return(0,p.NC)("symbolAriaLabel","{0} ({1})",e,C[t])}var y,S,L;!function(e){const t=new Map;t.set(0,n.l.symbolFile),t.set(1,n.l.symbolModule),t.set(2,n.l.symbolNamespace),t.set(3,n.l.symbolPackage),t.set(4,n.l.symbolClass),t.set(5,n.l.symbolMethod),t.set(6,n.l.symbolProperty),t.set(7,n.l.symbolField),t.set(8,n.l.symbolConstructor),t.set(9,n.l.symbolEnum),t.set(10,n.l.symbolInterface),t.set(11,n.l.symbolFunction),t.set(12,n.l.symbolVariable),t.set(13,n.l.symbolConstant),t.set(14,n.l.symbolString),t.set(15,n.l.symbolNumber),t.set(16,n.l.symbolBoolean),t.set(17,n.l.symbolArray),t.set(18,n.l.symbolObject),t.set(19,n.l.symbolKey),t.set(20,n.l.symbolNull),t.set(21,n.l.symbolEnumMember),t.set(22,n.l.symbolStruct),t.set(23,n.l.symbolEvent),t.set(24,n.l.symbolOperator),t.set(25,n.l.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=n.l.symbolProperty),i}}(y||(y={}));class x{static fromValue(e){switch(e){case"comment":return x.Comment;case"imports":return x.Imports;case"region":return x.Region}return new x(e)}constructor(e){this.value=e}}x.Comment=new x("comment"),x.Imports=new x("imports"),x.Region=new x("region"),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title}}(S||(S={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(L||(L={}));class k{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then((e=>{e&&e.dispose()}))}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const N=new class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new r.Q5,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,a.OF)((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();const n=new d(this,e,t);return this._factories.set(e,n),(0,a.OF)((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}getOrCreate(e){return l(this,void 0,void 0,(function*(){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(yield i.resolve(),this.get(e))}))}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}},75383:(e,t,i)=>{i.d(t,{$9:()=>h,UF:()=>d,n8:()=>l,r7:()=>a,tI:()=>c});var n=i(97295),o=i(49119),s=i(19111),r=i(51381);function a(e,t,i,s=!0,r){if(e<4)return null;const a=r.getLanguageConfiguration(t.tokenization.getLanguageId()).indentRulesSupport;if(!a)return null;if(i<=1)return{indentation:"",action:null};for(let e=i-1;e>0&&""===t.getLineContent(e);e--)if(1===e)return{indentation:"",action:null};const l=function(e,t,i){const n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let o,s=-1;for(o=t-1;o>=1;o--){if(e.tokenization.getLanguageIdAtPosition(o,0)!==n)return s;const t=e.getLineContent(o);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;s=o}}return-1}(t,i,a);if(l<0)return null;if(l<1)return{indentation:"",action:null};const d=t.getLineContent(l);if(a.shouldIncrease(d)||a.shouldIndentNextLine(d))return{indentation:n.V8(d),action:o.wU.Indent,line:l};if(a.shouldDecrease(d))return{indentation:n.V8(d),action:null,line:l};{if(1===l)return{indentation:n.V8(t.getLineContent(l)),action:null,line:l};const e=l-1,i=a.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!a.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:n.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(s)return{indentation:n.V8(t.getLineContent(l)),action:null,line:l};for(let e=l;e>0;e--){const i=t.getLineContent(e);if(a.shouldIncrease(i))return{indentation:n.V8(i),action:o.wU.Indent,line:e};if(a.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!a.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:n.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(a.shouldDecrease(i))return{indentation:n.V8(i),action:null,line:e}}return{indentation:n.V8(t.getLineContent(1)),action:null,line:1}}}function l(e,t,i,s,r,l){if(e<4)return null;const d=l.getLanguageConfiguration(i);if(!d)return null;const h=l.getLanguageConfiguration(i).indentRulesSupport;if(!h)return null;const c=a(e,t,s,void 0,l),u=t.getLineContent(s);if(c){const i=c.line;if(void 0!==i){let a=!0;for(let e=i;e<s-1;e++)if(!/^\s*$/.test(t.getLineContent(e))){a=!1;break}if(a){const s=d.onEnter(e,"",t.getLineContent(i),"");if(s){let e=n.V8(t.getLineContent(i));return s.removeText&&(e=e.substring(0,e.length-s.removeText)),s.indentAction===o.wU.Indent||s.indentAction===o.wU.IndentOutdent?e=r.shiftIndent(e):s.indentAction===o.wU.Outdent&&(e=r.unshiftIndent(e)),h.shouldDecrease(u)&&(e=r.unshiftIndent(e)),s.appendText&&(e+=s.appendText),n.V8(e)}}}return h.shouldDecrease(u)?c.action===o.wU.Indent?c.indentation:r.unshiftIndent(c.indentation):c.action===o.wU.Indent?r.shiftIndent(c.indentation):c.indentation}return null}function d(e,t,i,l,d){if(e<4)return null;t.tokenization.forceTokenization(i.startLineNumber);const h=t.tokenization.getLineTokens(i.startLineNumber),c=(0,s.wH)(h,i.startColumn-1),u=c.getLineContent();let g,p,m=!1;c.firstCharOffset>0&&h.getLanguageId(0)!==c.languageId?(m=!0,g=u.substr(0,i.startColumn-1-c.firstCharOffset)):g=h.getLineContent().substring(0,i.startColumn-1),p=i.isEmpty()?u.substr(i.startColumn-1-c.firstCharOffset):(0,r.n2)(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-c.firstCharOffset);const f=d.getLanguageConfiguration(c.languageId).indentRulesSupport;if(!f)return null;const _=g,v=n.V8(g),b={tokenization:{getLineTokens:e=>t.tokenization.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i)},getLineContent:e=>e===i.startLineNumber?_:t.getLineContent(e)},C=n.V8(h.getLineContent()),w=a(e,b,i.startLineNumber+1,void 0,d);if(!w){const e=m?C:v;return{beforeEnter:e,afterEnter:e}}let y=m?C:w.indentation;return w.action===o.wU.Indent&&(y=l.shiftIndent(y)),f.shouldDecrease(p)&&(y=l.unshiftIndent(y)),{beforeEnter:m?C:v,afterEnter:y}}function h(e,t,i,n,s,l){if(e<4)return null;const d=(0,r.n2)(t,i.startLineNumber,i.startColumn);if(d.firstCharOffset)return null;const h=l.getLanguageConfiguration(d.languageId).indentRulesSupport;if(!h)return null;const c=d.getLineContent(),u=c.substr(0,i.startColumn-1-d.firstCharOffset);let g;if(g=i.isEmpty()?c.substr(i.startColumn-1-d.firstCharOffset):(0,r.n2)(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-d.firstCharOffset),!h.shouldDecrease(u+g)&&h.shouldDecrease(u+n+g)){const n=a(e,t,i.startLineNumber,!1,l);if(!n)return null;let r=n.indentation;return n.action!==o.wU.Indent&&(r=s.unshiftIndent(r)),r}return null}function c(e,t,i){const n=i.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}},1615:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(49119),o=i(51381);function s(e,t,i,s){const r=(0,o.n2)(t,i.startLineNumber,i.startColumn),a=s.getLanguageConfiguration(r.languageId);if(!a)return null;const l=r.getLineContent(),d=l.substr(0,i.startColumn-1-r.firstCharOffset);let h;h=i.isEmpty()?l.substr(i.startColumn-1-r.firstCharOffset):(0,o.n2)(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset);let c="";if(i.startLineNumber>1&&0===r.firstCharOffset){const e=(0,o.n2)(t,i.startLineNumber-1);e.languageId===r.languageId&&(c=e.getLineContent())}const u=a.onEnter(e,c,d,h);if(!u)return null;const g=u.indentAction;let p=u.appendText;const m=u.removeText||0;p?g===n.wU.Indent&&(p="\t"+p):p=g===n.wU.Indent||g===n.wU.IndentOutdent?"\t":"";let f=(0,o.u0)(t,i.startLineNumber,i.startColumn);return m&&(f=f.substring(0,f.length-m)),{indentAction:g,appendText:p,removeText:m,indentation:f}}},72042:(e,t,i)=>{i.d(t,{O:()=>n});const n=(0,i(72065).yh)("languageService")},49119:(e,t,i)=>{var n;i.d(t,{V6:()=>o,c$:()=>s,wU:()=>n}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(n||(n={}));class o{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t<i;t++)switch(e.notIn[t]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1}}isOK(e){switch(e){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(e,t){if(0===e.getTokenCount())return!0;const i=e.findTokenIndexAtOffset(t-2),n=e.getStandardTokenType(i);return this.isOK(n)}_findNeutralCharacterInRange(e,t){for(let i=e;i<=t;i++){const e=String.fromCharCode(i);if(!this.open.includes(e)&&!this.close.includes(e))return e}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}class s{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const t of e)r(this.autoClosingPairsOpenByStart,t.open.charAt(0),t),r(this.autoClosingPairsOpenByEnd,t.open.charAt(t.open.length-1),t),r(this.autoClosingPairsCloseByStart,t.close.charAt(0),t),r(this.autoClosingPairsCloseByEnd,t.close.charAt(t.close.length-1),t),1===t.close.length&&1===t.open.length&&r(this.autoClosingPairsCloseSingleChar,t.close,t)}}function r(e,t,i){e.has(t)?e.get(t).push(i):e.set(t,[i])}},51381:(e,t,i)=>{i.d(t,{c_:()=>I,u0:()=>A,n2:()=>O});var n=i(4669),o=i(5976),s=i(97295),r=i(270),a=i(49119),l=i(19111);class d{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.V6(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.V6({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.V6({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n\t",d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n\t";var h=i(9488),c=i(34302);class u{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return(0,h.EB)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if((0,l.Bu)(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,i-1)+e,r=c.Vr.findPrevBracketInRange(o,1,s,0,s.length);if(!r)return null;const a=s.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const d=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var m=i(17301);class f{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=f._createOpenBracketRegExp(e[0]),i=f._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e<o;e++){const o=this._regExpRules[e];if([{reg:o.beforeText,text:i},{reg:o.afterText,text:n},{reg:o.previousLineText,text:t}].every((e=>!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e<t;e++){const t=this._brackets[e];if(t.openRegExp.test(i)&&t.closeRegExp.test(n))return{indentAction:a.wU.IndentOutdent}}if(e>=2&&i.length>0)for(let e=0,t=this._brackets.length;e<t;e++)if(this._brackets[e].openRegExp.test(i))return{indentAction:a.wU.Indent};return null}static _createOpenBracketRegExp(e){let t=s.ec(e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",f._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=s.ec(e);return/\B/.test(t.charAt(t.length-1))||(t+="\\b"),t="^\\s*"+t,f._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(e){return(0,m.dL)(e),null}}}var _=i(72065),v=i(33108),b=i(72042),C=i(65026),w=i(68801),y=i(701);class S{constructor(e,t){this.languageId=e;const i=t.brackets?L(t.brackets):[],n=new y.b((e=>{const t=new Set;return{info:new k(this,e,t),closing:t}})),o=new y.b((e=>{const t=new Set,i=new Set;return{info:new N(this,e,t,i),opening:t,openingColorized:i}}));for(const[e,t]of i){const i=n.get(e),s=o.get(t);i.closing.add(s.info),s.opening.add(i.info)}const s=t.colorizedBracketPairs?L(t.colorizedBracketPairs):i.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[e,t]of s){const i=n.get(e),s=o.get(t);i.closing.add(s.info),s.openingColorized.add(i.info),s.opening.add(i.info)}this._openingBrackets=new Map([...n.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...o.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function L(e){return e.filter((([e,t])=>""!==e&&""!==t))}class x{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class k extends x{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class N extends x{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var D=function(e,t){return function(i,n){t(i,n,e)}};class E{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const I=(0,_.yh)("languageConfigurationService");let T=class extends o.JT{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new V),this.onDidChangeEmitter=this._register(new n.Q5),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(M));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new E(void 0));else for(const e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new E(e)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new E(e.languageId))})))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let o=t.getLanguageConfiguration(e);if(!o){if(!n.isRegisteredLanguageId(e))return new H(e,{});o=new H(e,{})}const s=function(e,t){const i=t.getValue(M.brackets,{overrideIdentifier:e}),n=t.getValue(M.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:R(i),colorizedBracketPairs:R(n)}}(o.languageId,i),r=F([o.underlyingConfig,s]);return new H(o.languageId,r)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};T=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([D(0,v.Ui),D(1,b.O)],T);const M={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function R(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}function A(e,t,i){const n=e.getLineContent(t);let o=s.V8(n);return o.length>i-1&&(o=o.substring(0,i-1)),o}function O(e,t,i){e.tokenization.forceTokenization(t);const n=e.tokenization.getLineTokens(t),o=void 0===i?e.getLineMaxColumn(t)-1:i-1;return(0,l.wH)(n,o)}class P{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new B(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,o.OF)((()=>{for(let e=0;e<this._entries.length;e++)if(this._entries[e]===i){this._entries.splice(e,1),this._resolved=null;break}}))}getResolvedConfiguration(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new H(this.languageId,e))}return this._resolved}_resolve(){return 0===this._entries.length?null:(this._entries.sort(B.cmp),F(this._entries.map((e=>e.configuration))))}}function F(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class B{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class W{constructor(e){this.languageId=e}}class V extends o.JT{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._register(this.register(w.bd,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new P(e),this._entries.set(e,n));const s=n.register(t,i);return this._onDidChange.fire(new W(e)),(0,o.OF)((()=>{s.dispose(),this._onDidChange.fire(new W(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}}class H{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new f(this.underlyingConfig):null,this.comments=H._handleComments(this.underlyingConfig),this.characterPair=new d(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||r.Af,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,r.eq)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new c.EA(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new u(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.c$(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,C.z)(I,T,1)},68801:(e,t,i)=>{i.d(t,{bd:()=>d,dQ:()=>l});var n=i(63580),o=i(4669),s=i(89872),r=i(81170),a=i(23193);const l=new class{constructor(){this._onDidChangeLanguages=new o.Q5,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t<i;t++)if(this._languages[t]===e)return void this._languages.splice(t,1)}}}getLanguages(){return this._languages}};s.B.add("editor.modesRegistry",l);const d="plaintext";l.registerLanguage({id:d,extensions:[".txt"],aliases:[n.NC("plainText.alias","Plain Text"),"text"],mimetypes:[r.v.text]}),s.B.as(a.IP.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])},276:(e,t,i)=>{i.d(t,{Dy:()=>r,Ri:()=>s,TJ:()=>o});var n=i(96887);const o=new class{clone(){return this}equals(e){return this===e}};function s(e,t){return new n.hG([new n.WU(0,"",e)],t)}function r(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(32768|e<<0|2<<24)>>>0,new n.DI(i,null===t?o:t)}},19111:(e,t,i)=>{function n(e,t){const i=e.getCount(),n=e.findTokenIndexAtOffset(t),s=e.getLanguageId(n);let r=n;for(;r+1<i&&e.getLanguageId(r+1)===s;)r++;let a=n;for(;a>0&&e.getLanguageId(a-1)===s;)a--;return new o(e,s,a,r+1,e.getStartOffset(a),e.getEndOffset(r))}i.d(t,{Bu:()=>s,wH:()=>n});class o{constructor(e,t,i,n,o,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=s}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function s(e){return 0!=(3&e)}},34302:(e,t,i)=>{i.d(t,{EA:()=>a,Vr:()=>p});var n=i(97295),o=i(50072),s=i(24314);class r{constructor(e,t,i,n,o,s){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=s,this._openSet=r._toSet(this.open),this._closeSet=r._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}class a{constructor(e,t){this._richEditBracketsBrand=void 0;const i=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e<t;e++)i[e]=e;const n=(e,t)=>{const[i,n]=e,[o,s]=t;return i===o||i===s||n===o||n===s},o=(e,n)=>{const o=Math.min(e,n),s=Math.max(e,n);for(let e=0;e<t;e++)i[e]===s&&(i[e]=o)};for(let s=0;s<t;s++){const r=e[s];for(let a=s+1;a<t;a++)n(r,e[a])&&o(i[s],i[a])}const s=[];for(let n=0;n<t;n++){const o=[],r=[];for(let s=0;s<t;s++)if(i[s]===n){const[t,i]=e[s];o.push(t),r.push(i)}o.length>0&&s.push({open:o,close:r})}return s}(t);this.brackets=i.map(((t,n)=>new r(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e<t;e++)l(o[e],i,n,o);return o=h(o),o.sort(d),o.reverse(),u(o)}(t.open,t.close,i,n),function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e<t;e++)l(o[e],i,n,o);return o=h(o),o.sort(d),o.reverse(),u(o.map(g))}(t.open,t.close,i,n)))),this.forwardRegex=function(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=h(t),u(t)}(this.brackets),this.reversedRegex=function(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=h(t),u(t.map(g))}(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const e of this.brackets){for(const t of e.open)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,t.length);for(const t of e.close)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,t.length)}}}function l(e,t,i,n){for(let o=0,s=t.length;o<s;o++){if(o===i)continue;const s=t[o];for(const t of s.open)t.indexOf(e)>=0&&n.push(t);for(const t of s.close)t.indexOf(e)>=0&&n.push(t)}}function d(e,t){return e.length-t.length}function h(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function c(e){const t=/^[\w ]+$/.test(e);return e=n.ec(e),t?`\\b${e}\\b`:e}function u(e){const t=`(${e.map(c).join(")|(")})`;return n.GF(t,!0)}const g=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return o.oe().decode(t)}(e)),t}}();class p{static _findPrevBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=i.length-(o.index||0),a=o[0].length,l=n+r;return new s.e(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,o){const s=g(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,s,n)}static findNextBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=o.index||0,a=o[0].length;if(0===a)return null;const l=n+r;return new s.e(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,o){const s=i.substring(n,o);return this.findNextBracketInText(e,t,s,n)}}},82963:(e,t,i)=>{i.d(t,{C2:()=>d,Fq:()=>h});var n=i(97295),o=i(77378),s=i(96887),r=i(276),a=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const l={getInitialState:()=>r.TJ,tokenizeEncoded:(e,t,i)=>(0,r.Dy)(0,i)};function d(e,t,i){return a(this,void 0,void 0,(function*(){if(!i)return c(t,e.languageIdCodec,l);const n=yield s.RW.getOrCreate(i);return c(t,e.languageIdCodec,n||l)}))}function h(e,t,i,n,o,s,r){let a="<div>",l=n,d=0,h=!0;for(let c=0,u=t.getCount();c<u;c++){const u=t.getEndOffset(c);if(u<=n)continue;let g="";for(;l<u&&l<o;l++){const t=e.charCodeAt(l);switch(t){case 9:{let e=s-(l+d)%s;for(d+=e-1;e>0;)r&&h?(g+="&#160;",h=!1):(g+=" ",h=!0),e--;break}case 60:g+="&lt;",h=!1;break;case 62:g+="&gt;",h=!1;break;case 38:g+="&amp;",h=!1;break;case 0:g+="&#00;",h=!1;break;case 65279:case 8232:case 8233:case 133:g+="<22>",h=!1;break;case 13:g+="&#8203",h=!1;break;case 32:r&&h?(g+="&#160;",h=!1):(g+=" ",h=!0);break;default:g+=String.fromCharCode(t),h=!1}}if(a+=`<span style="${t.getInlineStyle(c,i)}">${g}</span>`,u>o||l>=o)break}return a+="</div>",a}function c(e,t,i){let s='<div class="monaco-tokenized-source">';const r=n.uq(e);let a=i.getInitialState();for(let e=0,l=r.length;e<l;e++){const l=r[e];e>0&&(s+="<br/>");const d=i.tokenizeEncoded(l,!0,a);o.A.convertToEndOffset(d.tokens,l.length);const h=new o.A(d.tokens,l,t).inflate();let c=0;for(let e=0,t=h.getCount();e<t;e++){const t=h.getClassName(e),i=h.getEndOffset(e);s+=`<span class="${t}">${n.YU(l.substring(c,i))}</span>`,c=i}a=d.endState}return s+="</div>",s}},84973:(e,t,i)=>{i.d(t,{F5:()=>s,Hf:()=>h,Qi:()=>c,RM:()=>r,Tx:()=>u,U:()=>o,dJ:()=>l,je:()=>g,pt:()=>p,sh:()=>n,tk:()=>d});var n,o,s,r,a=i(36248);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(n||(n={})),function(e){e[e.Left=1]="Left",e[e.Right=2]="Right"}(o||(o={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(s||(s={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(r||(r={}));class l{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,a.fS)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class d{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function h(e){return e&&"function"==typeof e.read}class c{constructor(e,t,i,n,o,s){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=s}}class u{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class g{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function p(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},41720:(e,t,i)=>{i.d(t,{BH:()=>f,Dm:()=>v,Kd:()=>l,Y0:()=>d,n2:()=>_});var n=i(17301),o=i(7988),s=i(45035),r=i(61761);class a{get length(){return this._length}constructor(e){this._length=e}}class l extends a{static create(e,t,i){let n=e.length;return t&&(n=(0,s.Ii)(n,t.length)),i&&(n=(0,s.Ii)(n,i.length)),new l(n,e,t,i,t?t.missingOpeningBracketIds:r.tS.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,o){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=o}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new l(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,s.Ii)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class d extends a{static create23(e,t,i,n=!1){let o=e.length,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=(0,s.Ii)(o,t.length),r=r.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=(0,s.Ii)(o,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new c(o,e.listHeight+1,e,t,i,r):new h(o,e.listHeight+1,e,t,i,r)}static getEmpty(){return new g(s.xl,0,[],r.tS.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;if(0===this.childrenLength)return!1;let t=this;for(;4===t.kind;){const e=t.childrenLength;if(0===e)throw new n.he;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n<e;n++){const e=this.getChild(n);t=(0,s.Ii)(t,e.length),i=i.merge(e.missingOpeningBracketIds)}this._length=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}computeMinIndentation(e,t){if(-1!==this.cachedMinIndentation)return this.cachedMinIndentation;let i=Number.MAX_SAFE_INTEGER,n=e;for(let e=0;e<this.childrenLength;e++){const o=this.getChild(e);o&&(i=Math.min(i,o.computeMinIndentation(n,t)),n=(0,s.Ii)(n,o.length))}return this.cachedMinIndentation=i,i}}class h extends d{get childrenLength(){return null!==this._item3?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(e,t){switch(e){case 0:return void(this._item1=t);case 1:return void(this._item2=t);case 2:return void(this._item3=t)}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}constructor(e,t,i,n,o,s){super(e,t,s),this._item1=i,this._item2=n,this._item3=o}deepClone(){return new h(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class c extends h{toMutable(){return new h(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class u extends d{get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,t){this._children[e]=t}get children(){return this._children}constructor(e,t,i,n){super(e,t,n),this._children=i}deepClone(){const e=new Array(this._children.length);for(let t=0;t<this._children.length;t++)e[t]=this._children[t].deepClone();return new u(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class g extends u{toMutable(){return new u(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const p=[];class m extends a{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return p}deepClone(){return this}}class f extends m{get kind(){return 0}get missingOpeningBracketIds(){return r.tS.getEmpty()}canBeReused(e){return!0}computeMinIndentation(e,t){const i=(0,s.Hw)(e),n=(0===i.columnCount?i.lineCount:i.lineCount+1)+1,r=(0,s.W9)((0,s.Ii)(e,this.length))+1;let a=Number.MAX_SAFE_INTEGER;for(let e=n;e<=r;e++){const i=t.getLineFirstNonWhitespaceColumn(e),n=t.getLineContent(e);if(0===i)continue;const s=o.i.visibleColumnFromColumn(n,i,t.getOptions().tabSize);a=Math.min(a,s)}return a}}class _ extends m{static create(e,t,i){return new _(e,t,i)}get kind(){return 1}get missingOpeningBracketIds(){return r.tS.getEmpty()}constructor(e,t,i){super(e),this.bracketInfo=t,this.bracketIds=i}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(e){return!1}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}class v extends m{get kind(){return 3}constructor(e,t){super(t),this.missingOpeningBracketIds=e}canBeReused(e){return!e.intersects(this.missingOpeningBracketIds)}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}},2442:(e,t,i)=>{i.d(t,{Q:()=>s,Y:()=>r});var n=i(24314),o=i(45035);class s{static fromModelContentChanges(e){return e.map((e=>{const t=n.e.lift(e.range);return new s((0,o.PZ)(t.getStartPosition()),(0,o.PZ)(t.getEndPosition()),(0,o.oR)(e.text))})).reverse()}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${(0,o.Hw)(this.startOffset)}...${(0,o.Hw)(this.endOffset)}) -> ${(0,o.Hw)(this.newLength)}`}}class r{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>a.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return null===i?null:(0,o.BE)(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?(0,o.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):(0,o.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=(0,o.Hw)(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,o.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):(0,o.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx<this.edits.length;){const t=this.edits[this.nextEditIdx],i=this.translateOldToCur(t.endOffsetAfterObj);if(!(0,o.By)(i,e))break;{this.nextEditIdx++;const e=(0,o.Hw)(i),n=(0,o.Hw)(this.translateOldToCur(t.endOffsetBeforeObj)),s=e.lineCount-n.lineCount;this.deltaOldToNewLineCount+=s;const r=this.deltaLineIdxInOld===t.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,a=e.columnCount-n.columnCount;this.deltaOldToNewColumnCount=r+a,this.deltaLineIdxInOld=t.endOffsetBeforeObj.lineCount}}}}class a{static from(e){return new a(e.startOffset,e.endOffset,e.newLength)}constructor(e,t,i){this.endOffsetBeforeObj=(0,o.Hw)(t),this.endOffsetAfterObj=(0,o.Hw)((0,o.Ii)(e,i)),this.offsetObj=(0,o.Hw)(e)}}},35382:(e,t,i)=>{i.d(t,{Z:()=>d});var n=i(97295),o=i(41720),s=i(45035),r=i(61761),a=i(6735);class l{static createFromLanguage(e,t){function i(e){return t.getKey(`${e.languageId}:::${e.bracketText}`)}const n=new Map;for(const t of e.bracketsNew.openingBrackets){const e=(0,s.Hg)(0,t.bracketText.length),l=i(t),d=r.tS.getEmpty().add(l,r.Qw);n.set(t.bracketText,new a.WU(e,1,l,d,o.n2.create(e,t,d)))}for(const t of e.bracketsNew.closingBrackets){const e=(0,s.Hg)(0,t.bracketText.length);let l=r.tS.getEmpty();const d=t.getOpeningBrackets();for(const e of d)l=l.add(i(e),r.Qw);n.set(t.bracketText,new a.WU(e,2,i(d[0]),l,o.n2.create(e,t,l)))}return new l(n)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map((e=>function(e){let t=(0,n.ec)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class d{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}},41574:(e,t,i)=>{i.d(t,{o:()=>r});var n=i(9488),o=i(2442),s=i(45035);function r(e,t){if(0===e.length)return t;if(0===t.length)return e;const i=new n.H9(l(e)),r=l(t);r.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let d=i.dequeue();function h(e){if(void 0===e){const e=i.takeWhile((e=>!0))||[];return d&&e.unshift(d),e}const t=[];for(;d&&!(0,s.xd)(e);){const[n,o]=d.splitAt(e);t.push(n),e=(0,s.BE)(n.lengthAfter,e),d=null!=o?o:i.dequeue()}return(0,s.xd)(e)||t.push(new a(!1,e,e)),t}const c=[];function u(e,t,i){if(c.length>0&&(0,s.rM)(c[c.length-1].endOffset,e)){const e=c[c.length-1];c[c.length-1]=new o.Q(e.startOffset,t,(0,s.Ii)(e.newLength,i))}else c.push({startOffset:e,endOffset:t,newLength:i})}let g=s.xl;for(const e of r){const t=h(e.lengthBefore);if(e.modified){const i=(0,s.tQ)(t,(e=>e.lengthBefore)),n=(0,s.Ii)(g,i);u(g,n,e.lengthAfter),g=n}else for(const e of t){const t=g;g=(0,s.Ii)(g,e.lengthBefore),e.modified&&u(t,g,e.lengthAfter)}}return c}class a{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=(0,s.BE)(e,this.lengthAfter);return(0,s.rM)(t,s.xl)?[this,void 0]:this.modified?[new a(this.modified,this.lengthBefore,e),new a(this.modified,s.xl,t)]:[new a(this.modified,e,e),new a(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${(0,s.Hw)(this.lengthBefore)} -> ${(0,s.Hw)(this.lengthAfter)}`}}function l(e){const t=[];let i=s.xl;for(const n of e){const e=(0,s.BE)(i,n.startOffset);(0,s.xd)(e)||t.push(new a(!1,e,e));const o=(0,s.BE)(n.startOffset,n.endOffset);t.push(new a(!0,o,n.newLength)),i=n.endOffset}return t}},45035:(e,t,i)=>{i.d(t,{BE:()=>_,By:()=>b,F_:()=>g,Hg:()=>h,Hw:()=>c,Ii:()=>p,PZ:()=>w,Qw:()=>y,VR:()=>v,W9:()=>u,Zq:()=>C,av:()=>r,oR:()=>S,rM:()=>f,tQ:()=>m,xd:()=>l,xl:()=>a});var n=i(97295),o=i(24314);class s{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}function r(e,t,i,n){return e!==i?h(i-e,n):h(0,n-t)}s.zero=new s(0,0);const a=0;function l(e){return 0===e}const d=Math.pow(2,26);function h(e,t){return e*d+t}function c(e){const t=e,i=Math.floor(t/d);return new s(i,t-i*d)}function u(e){return Math.floor(e/d)}function g(e){return e}function p(e,t){let i=e+t;return t>=d&&(i-=e%d),i}function m(e,t){return e.reduce(((e,i)=>p(e,t(i))),a)}function f(e,t){return e===t}function _(e,t){const i=e,n=t;if(n-i<=0)return a;const o=Math.floor(i/d),s=Math.floor(n/d),r=n-s*d;return o===s?h(0,r-(i-o*d)):h(s-o,r)}function v(e,t){return e<t}function b(e,t){return e<=t}function C(e,t){return e>=t}function w(e){return h(e.lineNumber-1,e.column-1)}function y(e,t){const i=e,n=Math.floor(i/d),s=i-n*d,r=t,a=Math.floor(r/d),l=r-a*d;return new o.e(n+1,s+1,a+1,l+1)}function S(e){const t=(0,n.uq)(e);return h(t.length-1,t[t.length-1].length)}},13883:(e,t,i)=>{i.d(t,{w:()=>g});var n=i(41720),o=i(2442),s=i(61761),r=i(45035);function a(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const o=i>>1;for(let s=0;s<o;s++){const o=s<<1;e[s]=n.Y0.create23(e[o],e[o+1],o+3===i?e[o+2]:null,t)}i=o}return n.Y0.create23(e[0],e[1],i>=3?e[2]:null,t)}function l(e,t){return Math.abs(e.listHeight-t.listHeight)}function d(e,t){return e.listHeight===t.listHeight?n.Y0.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const o=[];let s;for(;;){if(t.listHeight===i.listHeight){s=t;break}if(4!==i.kind)throw new Error("unexpected");o.push(i),i=i.makeLastElementMutable()}for(let e=o.length-1;e>=0;e--){const t=o[e];s?t.childrenLength>=3?s=n.Y0.create23(t.unappendChild(),s,null,!1):(t.appendChildOfSameHeight(s),s=void 0):t.handleChildrenChanged()}return s?n.Y0.create23(e,s,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const o=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");o.push(i),i=i.makeFirstElementMutable()}let s=t;for(let e=o.length-1;e>=0;e--){const t=o[e];s?t.childrenLength>=3?s=n.Y0.create23(s,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(s),s=void 0):t.handleChildrenChanged()}return s?n.Y0.create23(s,e,null,!1):e}(t,e)}class h{constructor(e){this.lastOffset=r.xl,this.nextNodes=[e],this.offsets=[r.xl],this.idxs=[]}readLongestNodeAt(e,t){if((0,r.VR)(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=u(this.nextNodes);if(!i)return;const n=u(this.offsets);if((0,r.VR)(e,n))return;if((0,r.VR)(n,e))if((0,r.Ii)(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=c(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=c(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=u(this.offsets),t=u(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=u(this.nextNodes),n=c(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,r.Ii)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function c(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function u(e){return e.length>0?e[e.length-1]:void 0}function g(e,t,i,n){return new p(e,t,i,n).parseDocument()}class p{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new h(i):void 0,this.positionMapper=new o.Y(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(s.tS.getEmpty(),0);return e||(e=n.Y0.getEmpty()),e}parseList(e,t){const i=[];for(;;){let n=this.tryReadChildFromCache(e);if(!n){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;n=this.parseChild(e,t+1)}4===n.kind&&0===n.childrenLength||i.push(n)}const n=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;for(t++;t<e.length&&e[t].listHeight===n;)t++;return t-i>=2?a(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let e=i();e;e=i())l(n,o)<=l(o,e)?(n=d(n,o),o=e):o=d(o,e);return d(n,o)}(i):a(i,this.createImmutableLists);return n}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!(0,r.xd)(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>!(null!==t&&!(0,r.VR)(i.length,t))&&i.canBeReused(e)));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new n.Dm(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new n.BH(i.length);const o=e.merge(i.bracketIds),s=this.parseList(o,t+1),r=this.tokenizer.peek();return r&&2===r.kind&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),n.Kd.create(i.astNode,s,r.astNode)):n.Kd.create(i.astNode,s,null)}default:throw new Error("unexpected")}}}},61761:(e,t,i)=>{i.d(t,{FE:()=>r,Qw:()=>s,tS:()=>o});const n=[];class o{static create(e,t){if(e<=128&&0===t.length){let i=o.cache[e];return i||(i=new o(e,t),o.cache[e]=i),i}return new o(e,t)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){const i=t.getKey(e);let n=i>>5;if(0===n){const e=1<<i|this.items;return e===this.items?this:o.create(e,this.additionalItems)}n--;const s=this.additionalItems.slice(0);for(;s.length<n;)s.push(0);return s[n]|=1<<(31&i),o.create(this.items,s)}merge(e){const t=this.items|e.items;if(this.additionalItems===n&&e.additionalItems===n)return t===this.items?this:t===e.items?e:o.create(t,n);const i=[];for(let t=0;t<Math.max(this.additionalItems.length,e.additionalItems.length);t++){const n=this.additionalItems[t]||0,o=e.additionalItems[t]||0;i.push(n|o)}return o.create(t,i)}intersects(e){if(0!=(this.items&e.items))return!0;for(let t=0;t<Math.min(this.additionalItems.length,e.additionalItems.length);t++)if(0!=(this.additionalItems[t]&e.additionalItems[t]))return!0;return!1}}o.cache=new Array(129),o.empty=o.create(0,n);const s={getKey:e=>e};class r{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}},6735:(e,t,i)=>{i.d(t,{WU:()=>l,g:()=>c,xH:()=>d});var n=i(17301),o=i(45797),s=i(41720),r=i(45035),a=i(61761);class l{constructor(e,t,i,n,o){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=o}}class d{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new h(this.textModel,this.bracketTokens),this._offset=r.xl,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,r.Hg)(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=(0,r.Ii)(this._offset,e);const t=(0,r.Hw)(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=(0,r.Ii)(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class h{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,null!==this.line&&(this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,r.F_)(e.length),e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const n=this.lineTokens,s=n.getCount();let a=null;if(this.lineTokenOffset<s){const l=n.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<s&&l===n.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const d=0===o.N.getTokenType(l),h=o.N.containsBalancedBrackets(l),c=n.getEndOffset(this.lineTokenOffset);if(h&&d&&this.lineCharOffset<c){const e=n.getLanguageId(this.lineTokenOffset),t=this.line.substring(this.lineCharOffset,c),i=this.bracketTokens.getSingleLanguageBracketTokens(e),o=i.regExpGlobal;if(o){o.lastIndex=0;const e=o.exec(t);e&&(a=i.getToken(e[0]),a&&(this.lineCharOffset+=e.index))}}if(i+=c-this.lineCharOffset,a){if(e!==this.lineIdx||t!==this.lineCharOffset){this.peekedToken=a;break}return this.lineCharOffset+=(0,r.F_)(a.length),a}this.lineTokenOffset++,this.lineCharOffset=c}else{if(this.lineIdx===this.textBufferLineCount-1)break;if(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,i+=33,i>1e3)break}if(i>1500)break}const n=(0,r.av)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.tS.getEmpty(),new s.BH(n))}}class c{constructor(e,t){this.text=e,this._offset=r.xl,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+"|\n","gi"):null,o=[];let d,h=0,c=0,u=0,g=0;const p=[];for(let e=0;e<60;e++)p.push(new l((0,r.Hg)(0,e),0,-1,a.tS.getEmpty(),new s.BH((0,r.Hg)(0,e))));const m=[];for(let e=0;e<60;e++)m.push(new l((0,r.Hg)(1,e),0,-1,a.tS.getEmpty(),new s.BH((0,r.Hg)(1,e))));if(n)for(n.lastIndex=0;null!==(d=n.exec(e));){const e=d.index,i=d[0];if("\n"===i)h++,c=e+1;else{if(u!==e){let t;if(g===h){const i=e-u;if(i<p.length)t=p[i];else{const e=(0,r.Hg)(0,i);t=new l(e,0,-1,a.tS.getEmpty(),new s.BH(e))}}else{const i=h-g,n=e-c;if(1===i&&n<m.length)t=m[n];else{const e=(0,r.Hg)(i,n);t=new l(e,0,-1,a.tS.getEmpty(),new s.BH(e))}}o.push(t)}o.push(t.getToken(i)),u=e+i.length,g=h}}const f=e.length;if(u!==f){const e=g===h?(0,r.Hg)(0,f-u):(0,r.Hg)(h-g,f-c);o.push(new l(e,0,-1,a.tS.getEmpty(),new s.BH(e)))}this.length=(0,r.Hg)(h,f-c),this.tokens=o}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new n.B8}}},95215:(e,t,i)=>{i.d(t,{NL:()=>f,e9:()=>m});var n=i(63580),o=i(17301),s=i(3860),r=i(70666),a=i(93033),l=i(53060),d=i(95935);function h(e){return e.toString()}class c{static create(e,t){const i=e.getAlternativeVersionId(),n=p(e);return new c(i,i,n,n,t,t,[])}constructor(e,t,i,n,o,s,r){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=o,this.afterCursorState=s,this.changes=r}append(e,t,i,n,o){t.length>0&&(this.changes=(0,a.b)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.T4(e,t?t.length:0,i),i+=4,t)for(const n of t)l.T4(e,n.selectionStartLineNumber,i),i+=4,l.T4(e,n.selectionStartColumn,i),i+=4,l.T4(e,n.positionLineNumber,i),i+=4,l.T4(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.Ag(e,t);t+=4;for(let o=0;o<n;o++){const n=l.Ag(e,t);t+=4;const o=l.Ag(e,t);t+=4;const r=l.Ag(e,t);t+=4;const a=l.Ag(e,t);t+=4,i.push(new s.Y(n,o,r,a))}return t}serialize(){let e=10+c._writeSelectionsSize(this.beforeCursorState)+c._writeSelectionsSize(this.afterCursorState)+4;for(const t of this.changes)e+=t.writeSize();const t=new Uint8Array(e);let i=0;l.T4(t,this.beforeVersionId,i),i+=4,l.T4(t,this.afterVersionId,i),i+=4,l.Cg(t,this.beforeEOL,i),i+=1,l.Cg(t,this.afterEOL,i),i+=1,i=c._writeSelections(t,this.beforeCursorState,i),i=c._writeSelections(t,this.afterCursorState,i),l.T4(t,this.changes.length,i),i+=4;for(const e of this.changes)i=e.write(t,i);return t.buffer}static deserialize(e){const t=new Uint8Array(e);let i=0;const n=l.Ag(t,i);i+=4;const o=l.Ag(t,i);i+=4;const s=l.Q$(t,i);i+=1;const r=l.Q$(t,i);i+=1;const d=[];i=c._readSelections(t,i,d);const h=[];i=c._readSelections(t,i,h);const u=l.Ag(t,i);i+=4;const g=[];for(let e=0;e<u;e++)i=a.q.read(t,i,g);return new c(n,o,s,r,d,h,g)}}class u{get type(){return 0}get resource(){return r.o.isUri(this.model)?this.model:this.model.uri}constructor(e,t,i,n){this.label=e,this.code=t,this.model=i,this._data=c.create(i,n)}toString(){return(this._data instanceof c?this._data:c.deserialize(this._data)).changes.map((e=>e.toString())).join(", ")}matchesResource(e){return(r.o.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof c}append(e,t,i,n,o){this._data instanceof c&&this._data.append(e,t,i,n,o)}close(){this._data instanceof c&&(this._data=this._data.serialize())}open(){this._data instanceof c||(this._data=c.deserialize(this._data))}undo(){if(r.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof c&&(this._data=this._data.serialize());const e=c.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(r.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof c&&(this._data=this._data.serialize());const e=c.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof c&&(this._data=this._data.serialize()),this._data.byteLength+168}}class g{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=h(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=h(e);return this._editStackElementsMap.has(t)}setModel(e){const t=h(r.o.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=h(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,o){const s=h(e.uri);this._editStackElementsMap.get(s).append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=h(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,d.EZ)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function p(e){return"\n"===e.getEOL()?0:1}function m(e){return!!e&&(e instanceof u||e instanceof g)}class f{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(m(i)&&i.canAppend(this._model))return i;const o=new u(n.NC("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(o,t),o}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],p(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const o=this._getOrCreateEditStackElement(e,n),s=this._model.applyEdits(t,!0),r=f._computeCursorState(i,s),a=s.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),o.append(this._model,a.map((e=>e.textChange)),p(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,o.dL)(e),null}}}},1516:(e,t,i)=>{i.d(t,{W:()=>u,l:()=>c});var n=i(9488),o=i(97295),s=i(7988),r=i(24314),a=i(94954),l=i(59616),d=i(65094),h=i(17301);class c extends a.U{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,l.q)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new h.he("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide);let r=-2,a=-1,l=-2,d=-1;const c=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,d=-1;for(let t=e;t<n;t++){const e=this._computeIndentLevel(t);if(e>=0){l=t,d=e;break}}}};let u=-2,g=-1,p=-2,m=-1;const f=e=>{if(-2===u){u=-1,g=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){u=t,g=e;break}}}if(-1!==p&&(-2===p||p<e-1)){p=-1,m=-1;for(let t=e;t<n;t++){const e=this._computeIndentLevel(t);if(e>=0){p=t,m=e;break}}}};let _=0,v=!0,b=0,C=!0,w=0,y=0;for(let o=0;v||C;o++){const r=e-o,h=e+o;o>1&&(r<1||r<t)&&(v=!1),o>1&&(h>n||h>i)&&(C=!1),o>5e4&&(v=!1,C=!1);let p=-1;if(v&&r>=1){const e=this._computeIndentLevel(r-1);e>=0?(l=r-1,d=e,p=Math.ceil(e/this.textModel.getOptions().indentSize)):(c(r),p=this._getIndentLevelForWhitespaceLine(s,a,d))}let S=-1;if(C&&h<=n){const e=this._computeIndentLevel(h-1);e>=0?(u=h-1,g=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(f(h),S=this._getIndentLevelForWhitespaceLine(s,g,m))}if(0!==o){if(1===o){if(h<=n&&S>=0&&y+1===S){v=!1,_=h,b=h,w=S;continue}if(r>=1&&p>=0&&p-1===y){C=!1,_=r,b=r,w=p;continue}if(_=e,b=e,w=y,0===w)return{startLineNumber:_,endLineNumber:b,indent:w}}v&&(p>=w?_=r:v=!1),C&&(S>=w?b=h:C=!1)}else y=p}return{startLineNumber:_,endLineNumber:b,indent:w}}getLinesBracketGuides(e,t,i,s){var a;const l=[];for(let i=e;i<=t;i++)l.push([]);const h=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new r.e(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let c;if(i&&h.length>0){const o=(e<=i.lineNumber&&i.lineNumber<=t?h:this.textModel.bracketPairs.getBracketPairsInRange(r.e.fromPositions(i)).toArray()).filter((e=>r.e.strictContainsPosition(e.range,i)));c=null===(a=(0,n.dF)(o,(e=>!0)))||void 0===a?void 0:a.range}const g=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,p=new u;for(const i of h){if(!i.closingBracketRange)continue;const n=c&&i.range.equalsRange(c);if(!n&&!s.includeInactive)continue;const r=p.getInlineClassName(i.nestingLevel,i.nestingLevelOfEqualBracketType,g)+(s.highlightActive&&n?" "+p.activeClassName:""),a=i.openingBracketRange.getStartPosition(),h=i.closingBracketRange.getStartPosition(),u=s.horizontalGuides===d.s6.Enabled||s.horizontalGuides===d.s6.EnabledForActive&&n;if(i.range.startLineNumber===i.range.endLineNumber){u&&l[i.range.startLineNumber-e].push(new d.UO(-1,i.openingBracketRange.getEndPosition().column,r,new d.vW(!1,h.column),-1,-1));continue}const m=this.getVisibleColumnFromPosition(h),f=this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),_=Math.min(f,m,i.minVisibleColumnIndentation+1);let v=!1;o.LC(this.textModel.getLineContent(i.closingBracketRange.startLineNumber))<i.closingBracketRange.startColumn-1&&(v=!0);const b=Math.max(a.lineNumber,e),C=Math.min(h.lineNumber,t),w=v?1:0;for(let t=b;t<C+w;t++)l[t-e].push(new d.UO(_,-1,r,null,t===a.lineNumber?a.column:-1,t===h.lineNumber?h.column:-1));u&&(a.lineNumber>=e&&f>_&&l[a.lineNumber-e].push(new d.UO(_,-1,r,new d.vW(!1,a.column),-1,-1)),h.lineNumber<=t&&m>_&&l[h.lineNumber-e].push(new d.UO(_,-1,r,new d.vW(!v,h.column),-1,-1)))}for(const e of l)e.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return l}getVisibleColumnFromPosition(e){return s.i.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide),r=new Array(t-e+1);let a=-2,l=-1,d=-2,h=-1;for(let o=e;o<=t;o++){const t=o-e,c=this._computeIndentLevel(o-1);if(c>=0)a=o-1,l=c,r[t]=Math.ceil(c/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=o-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==d&&(-2===d||d<o-1)){d=-1,h=-1;for(let e=o;e<i;e++){const t=this._computeIndentLevel(e);if(t>=0){d=e,h=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(s,l,h)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t<i?1+Math.floor(t/n.indentSize):t===i||e?Math.ceil(i/n.indentSize):1+Math.floor(i/n.indentSize)}}class u{constructor(){this.activeClassName="indent-active"}getInlineClassName(e,t,i){return this.getInlineClassNameOfLevel(i?t:e)}getInlineClassNameOfLevel(e){return"bracket-indent-guide lvl-"+e%30}}},90310:(e,t,i)=>{i.d(t,{Ck:()=>r,oQ:()=>s});var n=i(9488),o=i(85427);class s{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,o.A)(e);const i=this.values,n=this.prefixSum,s=t.length;return 0!==s&&(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,o.A)(e),t=(0,o.A)(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=(0,o.A)(e),t=(0,o.A)(t);const i=this.values,n=this.prefixSum;if(e>=i.length)return!1;const s=i.length-e;return t>=s&&(t=s),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,o.A)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,o=0,s=0;for(;t<=i;)if(n=t+(i-t)/2|0,o=this.prefixSum[n],s=o-this.values[n],e<s)i=n-1;else{if(!(e>=o))break;t=n+1}return new a(n,e-s)}}class r{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new a(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=(0,n.Zv)(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e<t;e++){const t=this._values[e],i=e>0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;n<t;n++)this._indexBySum[i+n]=e}this._prefixSum.length=this._values.length,this._indexBySum.length=this._prefixSum[this._prefixSum.length-1],this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(e,t){this._values[e]!==t&&(this._values[e]=t,this._invalidate(e))}}class a{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}},13961:(e,t,i)=>{i.d(t,{HS:()=>Wt,qx:()=>Vt,yO:()=>It});var n=i(9488),o=i(41264),s=i(17301),r=i(4669),a=i(5976),l=i(97295),d=i(70666),h=i(23795),c=i(83158),u=i(45463),g=i(50187),p=i(24314),m=i(3860),f=i(22075),_=i(72042),v=i(51381),b=i(84973),C=i(19111),w=i(34302);class y{constructor(e,t,i,n){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=i,this.isInvalid=n}}class S{constructor(e,t,i,n,o,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n,this.nestingLevelOfEqualBracketType=o,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class L extends S{constructor(e,t,i,n,o,s,r){super(e,t,i,n,o,s),this.minVisibleColumnIndentation=r}}var x=i(2442),k=i(35382),N=i(45035),D=i(13883),E=i(61761),I=i(6735),T=i(41574);class M extends a.JT{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new r.Q5,this.denseKeyProvider=new E.FE,this.brackets=new k.Z(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new I.g(this.textModel.getValue(),e);this.initialAstWithoutTokens=(0,D.w)(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new x.Q((0,N.Hg)(e.fromLineNumber-1,0),(0,N.Hg)(e.toLineNumber,0),(0,N.Hg)(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=x.Q.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=(0,T.o)(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,T.o)(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=t,o=new I.xH(this.textModel,this.brackets);return(0,D.w)(o,e,n,i)}getBracketsInRange(e,t){this.flushQueue();const i=(0,N.Hg)(e.startLineNumber-1,e.startColumn-1),o=(0,N.Hg)(e.endLineNumber-1,e.endColumn-1);return new n.W$((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens;O(n,N.xl,n.length,i,o,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const i=(0,N.PZ)(e.getStartPosition()),o=(0,N.PZ)(e.getEndPosition());return new n.W$((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens,s=new P(e,t,this.textModel);F(n,N.xl,n.length,i,o,s,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return A(t,N.xl,t.length,(0,N.PZ)(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return R(t,N.xl,t.length,(0,N.PZ)(e))}}function R(e,t,i,n){if(4===e.kind||2===e.kind){const o=[];for(const n of e.children)i=(0,N.Ii)(t,n.length),o.push({nodeOffsetStart:t,nodeOffsetEnd:i}),t=i;for(let t=o.length-1;t>=0;t--){const{nodeOffsetStart:i,nodeOffsetEnd:s}=o[t];if((0,N.VR)(i,n)){const o=R(e.children[t],i,s,n);if(o)return o}}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,N.Qw)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function A(e,t,i,n){if(4===e.kind||2===e.kind){for(const o of e.children){if(i=(0,N.Ii)(t,o.length),(0,N.VR)(n,i)){const e=A(o,t,i,n);if(e)return e}t=i}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,N.Qw)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function O(e,t,i,n,o,s,r,a,l,d,h=!1){if(r>200)return!0;e:for(;;)switch(e.kind){case 4:{const a=e.childrenLength;for(let h=0;h<a;h++){const a=e.getChild(h);if(a){if(i=(0,N.Ii)(t,a.length),(0,N.By)(t,o)&&(0,N.Zq)(i,n)){if((0,N.Zq)(i,o)){e=a;continue e}if(!O(a,t,i,n,o,s,r,0,l,d))return!1}t=i}}return!0}case 2:{const h=!d||!e.closingBracket||e.closingBracket.bracketInfo.closesColorized(e.openingBracket.bracketInfo);let c=0;if(l){let t=l.get(e.openingBracket.text);void 0===t&&(t=0),c=t,h&&(t++,l.set(e.openingBracket.text,t))}const u=e.childrenLength;for(let g=0;g<u;g++){const u=e.getChild(g);if(u){if(i=(0,N.Ii)(t,u.length),(0,N.By)(t,o)&&(0,N.Zq)(i,n)){if((0,N.Zq)(i,o)&&1!==u.kind){e=u,h?(r++,a=c+1):a=c;continue e}if((h||1!==u.kind||!e.closingBracket)&&!O(u,t,i,n,o,s,h?r+1:r,h?c+1:c,l,d,!e.closingBracket))return!1}t=i}}return null==l||l.set(e.openingBracket.text,c),!0}case 3:{const e=(0,N.Qw)(t,i);return s(new y(e,r-1,0,!0))}case 1:{const e=(0,N.Qw)(t,i);return s(new y(e,r-1,a-1,h))}case 0:return!0}}class P{constructor(e,t,i){this.push=e,this.includeMinIndentation=t,this.textModel=i}}function F(e,t,i,n,o,s,r,a){var l;if(r>200)return!0;let d=!0;if(2===e.kind){let h=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),h=t,t++,a.set(e.openingBracket.text,t)}const c=(0,N.Ii)(t,e.openingBracket.length);let u=-1;if(s.includeMinIndentation&&(u=e.computeMinIndentation(t,s.textModel)),d=s.push(new L((0,N.Qw)(t,i),(0,N.Qw)(t,c),e.closingBracket?(0,N.Qw)((0,N.Ii)(c,(null===(l=e.child)||void 0===l?void 0:l.length)||N.xl),i):void 0,r,h,e,u)),t=c,d&&e.child){const l=e.child;if(i=(0,N.Ii)(t,l.length),(0,N.By)(t,o)&&(0,N.Zq)(i,n)&&(d=F(l,t,i,n,o,s,r+1,a),!d))return!1}null==a||a.set(e.openingBracket.text,h)}else{let i=t;for(const t of e.children){const e=i;if(i=(0,N.Ii)(i,t.length),(0,N.By)(e,o)&&(0,N.By)(n,i)&&(d=F(t,e,i,n,o,s,r,a),!d))return!1}}return d}class B extends a.JT{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new a.XK),this.onDidChangeEmitter=new r.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange((e=>{var t;e.languageId&&!(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageId))||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())})))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;null===(e=this.bracketPairsTree.value)||void 0===e||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const i=new a.SL;this.bracketPairsTree.value=(e=i.add(new M(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>null==t?void 0:t.dispose()}),i.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||n.W$.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||n.W$.empty}getBracketsInRange(e,t=!1){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(i=this.bracketPairsTree.value)||void 0===i?void 0:i.object.getBracketsInRange(e,t))||n.W$.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),o=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const i=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew.getClosingBracketInfo(e);if(!i)return null;const n=this.getBracketPairsInRange(p.e.fromPositions(t,t)).findLast((e=>i.closes(e.openingBracketInfo)));return n?n.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(o).brackets;if(!s)return null;const r=s.textIsBracket[t];return r?H(this._findMatchingBracketUp(r,n,W(i))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(p.e.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,n.tT)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),p.e.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const i=W(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const o=t.getCount(),s=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){const i=t.getEndOffset(e);if(i<=r)break;if((0,C.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){r=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e<o;e++){const i=t.getStartOffset(e);if(i>=a)break;if((0,C.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){a=i;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),o=this.textModel.getLineContent(i),s=n.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const r=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(s)).brackets;if(r&&!(0,C.Bu)(n.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,s),d=null;for(;;){const n=w.Vr.findNextBracketInRange(r.forwardRegex,i,o,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=o.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],t);if(i){if(i instanceof V)return null;d=i}}a=n.endColumn-1}if(d)return d}if(s>0&&n.getStartOffset(s)===e.column-1){const r=s-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!(0,C.Bu)(n.getStandardTokenType(r))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),d=w.Vr.findPrevBracketInRange(a.reversedRegex,i,o,s,l);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn){const e=o.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),i=this._matchFoundBracket(d,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof V?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof V?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,o=e.reversedRegex;let s=-1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return V.INSTANCE;const d=w.Vr.findPrevBracketInRange(o,t,n,a,l);if(!d)break;const h=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return d;l=d.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=o-1,l=s.length,d=s.length;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1);let h=!0;for(;r>=0;r--){const t=i.getLanguageId(r)===n&&!(0,C.Bu)(i.getStandardTokenType(r));if(t)h?l=i.getStartOffset(r):(l=i.getStartOffset(r),d=i.getEndOffset(r));else if(h&&l!==d){const t=a(e,s,l,d);if(t)return t}h=t}if(h&&l!==d){const t=a(e,s,l,d);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,o=e.forwardRegex;let s=1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return V.INSTANCE;const d=w.Vr.findNextBracketInRange(o,t,n,a,l);if(!d)break;const h=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(h)?s++:e.isClose(h)&&s--,0===s)return d;a=d.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=0,l=0,d=0;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1);let h=!0;for(;r<o;r++){const t=i.getLanguageId(r)===n&&!(0,C.Bu)(i.getStandardTokenType(r));if(t)h||(l=i.getStartOffset(r)),d=i.getEndOffset(r);else if(h&&l!==d){const t=a(e,s,l,d);if(t)return t}h=t}if(h&&l!==d){const t=a(e,s,l,d);if(t)return t}}return null}findPrevBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getFirstBracketBefore(i))||null;let n=null,o=null,s=null;for(let e=i.lineNumber;e>=1;e--){const t=this.textModel.tokenization.getLineTokens(e),r=t.getCount(),a=this.textModel.getLineContent(e);let l=r-1,d=a.length,h=a.length;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),d=i.column-1,h=i.column-1;const e=t.getLanguageId(l);n!==e&&(n=e,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,s=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let c=!0;for(;l>=0;l--){const i=t.getLanguageId(l);if(n!==i){if(o&&s&&c&&d!==h){const t=w.Vr.findPrevBracketInRange(o.reversedRegex,e,a,d,h);if(t)return this._toFoundBracket(s,t);c=!1}n=i,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,s=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const r=!!o&&!(0,C.Bu)(t.getStandardTokenType(l));if(r)c?d=t.getStartOffset(l):(d=t.getStartOffset(l),h=t.getEndOffset(l));else if(s&&o&&c&&d!==h){const t=w.Vr.findPrevBracketInRange(o.reversedRegex,e,a,d,h);if(t)return this._toFoundBracket(s,t)}c=r}if(s&&o&&c&&d!==h){const t=w.Vr.findPrevBracketInRange(o.reversedRegex,e,a,d,h);if(t)return this._toFoundBracket(s,t)}}return null}findNextBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getFirstBracketAfter(i))||null;const n=this.textModel.getLineCount();let o=null,s=null,r=null;for(let e=i.lineNumber;e<=n;e++){const t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),a=this.textModel.getLineContent(e);let l=0,d=0,h=0;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),d=i.column-1,h=i.column-1;const e=t.getLanguageId(l);o!==e&&(o=e,s=this.languageConfigurationService.getLanguageConfiguration(o).brackets,r=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let c=!0;for(;l<n;l++){const i=t.getLanguageId(l);if(o!==i){if(r&&s&&c&&d!==h){const t=w.Vr.findNextBracketInRange(s.forwardRegex,e,a,d,h);if(t)return this._toFoundBracket(r,t);c=!1}o=i,s=this.languageConfigurationService.getLanguageConfiguration(o).brackets,r=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew}const n=!!s&&!(0,C.Bu)(t.getStandardTokenType(l));if(n)c||(d=t.getStartOffset(l)),h=t.getEndOffset(l);else if(r&&s&&c&&d!==h){const t=w.Vr.findNextBracketInRange(s.forwardRegex,e,a,d,h);if(t)return this._toFoundBracket(r,t)}c=n}if(r&&s&&c&&d!==h){const t=w.Vr.findNextBracketInRange(s.forwardRegex,e,a,d,h);if(t)return this._toFoundBracket(r,t)}}return null}findEnclosingBrackets(e,t){const i=this.textModel.validatePosition(e);if(this.canBuildAST){const e=p.e.fromPositions(i),t=this.getBracketPairsInRange(p.e.fromPositions(i,i)).findLast((t=>void 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const n=W(t),o=this.textModel.getLineCount(),s=new Map;let r=[];const a=(e,t)=>{if(!s.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e<n;e++)i[e]=0;s.set(e,i)}r=s.get(e)};let l=0;const d=(e,t,i,o,s)=>{for(;;){if(n&&++l%100==0&&!n())return V.INSTANCE;const a=w.Vr.findNextBracketInRange(e.forwardRegex,t,i,o,s);if(!a)break;const d=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),h=e.textIsBracket[d];if(h&&(h.isOpen(d)?r[h.index]++:h.isClose(d)&&r[h.index]--,-1===r[h.index]))return this._matchFoundBracket(a,h,!1,n);o=a.endColumn-1}return null};let h=null,c=null;for(let e=i.lineNumber;e<=o;e++){const t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),o=this.textModel.getLineContent(e);let s=0,r=0,l=0;if(e===i.lineNumber){s=t.findTokenIndexAtOffset(i.column-1),r=i.column-1,l=i.column-1;const e=t.getLanguageId(s);h!==e&&(h=e,c=this.languageConfigurationService.getLanguageConfiguration(h).brackets,a(h,c))}let u=!0;for(;s<n;s++){const i=t.getLanguageId(s);if(h!==i){if(c&&u&&r!==l){const t=d(c,e,o,r,l);if(t)return H(t);u=!1}h=i,c=this.languageConfigurationService.getLanguageConfiguration(h).brackets,a(h,c)}const n=!!c&&!(0,C.Bu)(t.getStandardTokenType(s));if(n)u||(r=t.getStartOffset(s)),l=t.getEndOffset(s);else if(c&&u&&r!==l){const t=d(c,e,o,r,l);if(t)return H(t)}u=n}if(c&&u&&r!==l){const t=d(c,e,o,r,l);if(t)return H(t)}}return null}_toFoundBracket(e,t){if(!t)return null;let i=this.textModel.getValueInRange(t);i=i.toLowerCase();const n=e.getBracketInfo(i);return n?{range:t,bracketInfo:n}:null}}function W(e){if(void 0===e)return()=>!0;{const t=Date.now();return()=>Date.now()-t<=e}}class V{constructor(){this._searchCanceledBrand=void 0}}function H(e){return e instanceof V?null:e}V.INSTANCE=new V;var z=i(8625),K=i(97781);class U extends a.JT{constructor(e){super(),this.textModel=e,this.colorProvider=new j,this.onDidChangeEmitter=new r.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){return n||void 0===t?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray():[]}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new p.e(1,1,this.textModel.getLineCount(),1),e,t):[]}}class j{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,K.Ic)(((e,t)=>{const i=[z.zJ,z.Vs,z.CE,z.UP,z.r0,z.m1],n=new j;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(z.ts)}; }`);const o=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}}));var $=i(95215),q=i(1516);class Z{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function G(e,t,i,n,o){let s;for(o.spacesDiff=0,o.looksLikeAlignment=!1,s=0;s<t&&s<n&&e.charCodeAt(s)===i.charCodeAt(s);s++);let r=0,a=0;for(let i=s;i<t;i++)32===e.charCodeAt(i)?r++:a++;let l=0,d=0;for(let e=s;e<n;e++)32===i.charCodeAt(e)?l++:d++;if(r>0&&a>0)return;if(l>0&&d>0)return;const h=Math.abs(a-d),c=Math.abs(r-l);if(0===h)return o.spacesDiff=c,void(c>0&&0<=l-1&&l-1<e.length&&l<i.length&&32!==i.charCodeAt(l)&&32===e.charCodeAt(l-1)&&44===e.charCodeAt(e.length-1)&&(o.looksLikeAlignment=!0));c%h!=0||(o.spacesDiff=c/h)}function Q(e,t,i){const n=Math.min(e.getLineCount(),1e4);let o=0,s=0,r="",a=0;const l=[2,4,6,8,3,5,7],d=[0,0,0,0,0,0,0,0,0],h=new Z;for(let l=1;l<=n;l++){const n=e.getLineLength(l),c=e.getLineContent(l),u=n<=65536;let g=!1,p=0,m=0,f=0;for(let t=0,i=n;t<i;t++){const i=u?c.charCodeAt(t):e.getLineCharCode(l,t);if(9===i)f++;else{if(32!==i){g=!0,p=t;break}m++}}if(!g)continue;if(f>0?o++:m>1&&s++,G(r,a,c,p,h),h.looksLikeAlignment&&(!i||t!==h.spacesDiff))continue;const _=h.spacesDiff;_<=8&&d[_]++,r=c,a=p}let c=i;o!==s&&(c=o<s);let u=t;if(c){let e=c?0:.1*n;l.forEach((t=>{const i=d[t];i>e&&(e=i,u=t)})),4===u&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(u=2)}return{insertSpaces:c,tabSize:u}}function Y(e){return(1&e.metadata)>>>0}function J(e,t){e.metadata=254&e.metadata|t<<0}function X(e){return(2&e.metadata)>>>1==1}function ee(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function te(e){return(4&e.metadata)>>>2==1}function ie(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function ne(e){return(64&e.metadata)>>>6==1}function oe(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function se(e,t){e.metadata=231&e.metadata|t<<3}function re(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class ae{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,J(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,ie(this,!1),oe(this,!1),se(this,1),re(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,ee(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;ie(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),oe(this,null!==this.options.glyphMarginClassName),se(this,this.options.stickiness),re(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const le=new ae(null,0,0);le.parent=le,le.left=le,le.right=le,J(le,0);class de{constructor(){this.root=le,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o,s){return this.root===le?[]:function(e,t,i,n,o,s,r){let a=e.root,l=0,d=0,h=0,c=0;const u=[];let g=0;for(;a!==le;)if(X(a))ee(a.left,!1),ee(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!X(a.left)){if(d=l+a.maxEnd,d<t){ee(a,!0);continue}if(a.left!==le){a=a.left;continue}}if(h=l+a.start,h>i)ee(a,!0);else{if(c=l+a.end,c>=t){a.setCachedOffsets(h,c,s);let e=!0;n&&a.ownerId&&a.ownerId!==n&&(e=!1),o&&te(a)&&(e=!1),r&&!ne(a)&&(e=!1),e&&(u[g++]=a)}ee(a,!0),a.right===le||X(a.right)||(l+=a.delta,a=a.right)}}return ee(e.root,!1),u}(this,e,t,i,n,o,s)}search(e,t,i,n){return this.root===le?[]:function(e,t,i,n,o){let s=e.root,r=0,a=0,l=0;const d=[];let h=0;for(;s!==le;){if(X(s)){ee(s.left,!1),ee(s.right,!1),s===s.parent.right&&(r-=s.parent.delta),s=s.parent;continue}if(s.left!==le&&!X(s.left)){s=s.left;continue}a=r+s.start,l=r+s.end,s.setCachedOffsets(a,l,n);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),i&&te(s)&&(e=!1),o&&!ne(s)&&(e=!1),e&&(d[h++]=s),ee(s,!0),s.right===le||X(s.right)||(r+=s.delta,s=s.right)}return ee(e.root,!1),d}(this,e,t,i,n)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let o=0;for(;i!==le;)X(i)?(ee(i.left,!1),ee(i.right,!1),i=i.parent):i.left===le||X(i.left)?(i.ownerId===t&&(n[o++]=i),ee(i,!0),i.right===le||X(i.right)||(i=i.right)):i=i.left;return ee(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==le;)X(t)?(ee(t.left,!1),ee(t.right,!1),t=t.parent):t.left===le||X(t.left)?t.right===le||X(t.right)?(i[n++]=t,ee(t,!0)):t=t.right:t=t.left;return ee(e.root,!1),i}(this)}insert(e){ue(this,e),this._normalizeDeltaIfNecessary()}delete(e){ge(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,s=i.end+n;i.setCachedOffsets(o,s,t)}acceptReplace(e,t,i,n){const o=function(e,t,i){let n=e.root,o=0,s=0,r=0,a=0;const l=[];let d=0;for(;n!==le;)if(X(n))ee(n.left,!1),ee(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!X(n.left)){if(s=o+n.maxEnd,s<t){ee(n,!0);continue}if(n.left!==le){n=n.left;continue}}r=o+n.start,r>i?ee(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[d++]=n),ee(n,!0),n.right===le||X(n.right)||(o+=n.delta,n=n.right))}return ee(e.root,!1),l}(this,e,e+t);for(let e=0,t=o.length;e<t;e++)ge(this,o[e]);this._normalizeDeltaIfNecessary(),function(e,t,i,n){let o=e.root,s=0,r=0,a=0;const l=n-(i-t);for(;o!==le;)if(X(o))ee(o.left,!1),ee(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),ve(o),o=o.parent;else{if(!X(o.left)){if(r=s+o.maxEnd,r<t){ee(o,!0);continue}if(o.left!==le){o=o.left;continue}}a=s+o.start,a>i?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),ee(o,!0)):(ee(o,!0),o.right===le||X(o.right)||(s+=o.delta,o=o.right))}ee(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let s=0,r=o.length;s<r;s++){const r=o[s];r.start=r.cachedAbsoluteStart,r.end=r.cachedAbsoluteEnd,ce(r,e,e+t,i,n),r.maxEnd=r.end,ue(this,r)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,function(e){let t=e.root,i=0;for(;t!==le;)t.left===le||X(t.left)?t.right===le||X(t.right)?(t.start=i+t.start,t.end=i+t.end,t.delta=0,ve(t),ee(t,!0),ee(t.left,!1),ee(t.right,!1),t===t.parent.right&&(i-=t.parent.delta),t=t.parent):(i+=t.delta,t=t.right):t=t.left;ee(e.root,!1)}(this))}}function he(e,t,i,n){return e<i||!(e>i)&&1!==n&&(2===n||t)}function ce(e,t,i,n,o){const s=function(e){return(24&e.metadata)>>>3}(e),r=0===s||2===s,a=1===s||2===s,l=i-t,d=n,h=Math.min(l,d),c=e.start;let u=!1;const g=e.end;let p=!1;t<=c&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=o?1:l>0?2:0;!u&&he(c,r,t,e)&&(u=!0),!p&&he(g,a,t,e)&&(p=!0)}if(h>0&&!o){const e=l>d?2:0;!u&&he(c,r,t+h,e)&&(u=!0),!p&&he(g,a,t+h,e)&&(p=!0)}{const n=o?1:0;!u&&he(c,r,i,n)&&(e.start=t+d,u=!0),!p&&he(g,a,i,n)&&(e.end=t+d,p=!0)}const m=d-l;u||(e.start=Math.max(0,c+m)),p||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function ue(e,t){if(e.root===le)return t.parent=le,t.left=le,t.right=le,J(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const o=t.start,s=t.end;for(;;)if(r=o,a=s,l=n.start+i,d=n.end+i,(r===l?a-d:r-l)<0){if(n.left===le){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===le){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}var r,a,l,d;t.parent=n,t.left=le,t.right=le,J(t,1)}(e,t),be(t.parent);let i=t;for(;i!==e.root&&1===Y(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===Y(t)?(J(i.parent,0),J(t,0),J(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,me(e,i)),J(i.parent,0),J(i.parent.parent,1),fe(e,i.parent.parent))}else{const t=i.parent.parent.left;1===Y(t)?(J(i.parent,0),J(t,0),J(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,fe(e,i)),J(i.parent,0),J(i.parent.parent,1),me(e,i.parent.parent))}return J(e.root,0),t}function ge(e,t){let i,n;if(t.left===le?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===le?(i=t.left,n=t):(n=function(e){for(;e.left!==le;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,J(i,0),t.detach(),pe(),ve(i),void(e.root.parent=le);const o=1===Y(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,J(n,Y(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==le&&(n.left.parent=n),n.right!==le&&(n.right.parent=n)),t.detach(),o)return be(i.parent),n!==t&&(be(n),be(n.parent)),void pe();let s;for(be(i),be(i.parent),n!==t&&(be(n),be(n.parent));i!==e.root&&0===Y(i);)i===i.parent.left?(s=i.parent.right,1===Y(s)&&(J(s,0),J(i.parent,1),me(e,i.parent),s=i.parent.right),0===Y(s.left)&&0===Y(s.right)?(J(s,1),i=i.parent):(0===Y(s.right)&&(J(s.left,0),J(s,1),fe(e,s),s=i.parent.right),J(s,Y(i.parent)),J(i.parent,0),J(s.right,0),me(e,i.parent),i=e.root)):(s=i.parent.left,1===Y(s)&&(J(s,0),J(i.parent,1),fe(e,i.parent),s=i.parent.left),0===Y(s.left)&&0===Y(s.right)?(J(s,1),i=i.parent):(0===Y(s.left)&&(J(s.right,0),J(s,1),me(e,s),s=i.parent.left),J(s,Y(i.parent)),J(i.parent,0),J(s.left,0),fe(e,i.parent),i=e.root));J(i,0),pe()}function pe(){le.parent=le,le.delta=0,le.start=0,le.end=0}function me(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==le&&(i.left.parent=t),i.parent=t.parent,t.parent===le?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,ve(t),ve(i)}function fe(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==le&&(i.right.parent=t),i.parent=t.parent,t.parent===le?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,ve(t),ve(i)}function _e(e){let t=e.end;if(e.left!==le){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==le){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function ve(e){e.maxEnd=_e(e)}function be(e){for(;e!==le;){const t=_e(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class Ce{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==we)return ye(this.right);let e=this;for(;e.parent!==we&&e.parent.left!==e;)e=e.parent;return e.parent===we?we:e.parent}prev(){if(this.left!==we)return Se(this.left);let e=this;for(;e.parent!==we&&e.parent.right!==e;)e=e.parent;return e.parent===we?we:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const we=new Ce(null,0);function ye(e){for(;e.left!==we;)e=e.left;return e}function Se(e){for(;e.right!==we;)e=e.right;return e}function Le(e){return e===we?0:e.size_left+e.piece.length+Le(e.right)}function xe(e){return e===we?0:e.lf_left+e.piece.lineFeedCnt+xe(e.right)}function ke(){we.parent=we}function Ne(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==we&&(i.left.parent=t),i.parent=t.parent,t.parent===we?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function De(e,t){const i=t.left;t.left=i.right,i.right!==we&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===we?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function Ee(e,t){let i,n;if(t.left===we?(n=t,i=n.right):t.right===we?(n=t,i=n.left):(n=ye(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),ke(),void(e.root.parent=we);const o=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Me(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Me(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==we&&(n.left.parent=n),n.right!==we&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Me(e,n)),t.detach(),i.parent.left===i){const t=Le(i),n=xe(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const o=t-i.parent.size_left,s=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,Te(e,i.parent,o,s)}}if(Me(e,i.parent),o)return void ke();let s;for(;i!==e.root&&0===i.color;)i===i.parent.left?(s=i.parent.right,1===s.color&&(s.color=0,i.parent.color=1,Ne(e,i.parent),s=i.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.right.color&&(s.left.color=0,s.color=1,De(e,s),s=i.parent.right),s.color=i.parent.color,i.parent.color=0,s.right.color=0,Ne(e,i.parent),i=e.root)):(s=i.parent.left,1===s.color&&(s.color=0,i.parent.color=1,De(e,i.parent),s=i.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.left.color&&(s.right.color=0,s.color=1,Ne(e,s),s=i.parent.left),s.color=i.parent.color,i.parent.color=0,s.left.color=0,De(e,i.parent),i=e.root));i.color=0,ke()}function Ie(e,t){for(Me(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Ne(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,De(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&De(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Ne(e,t.parent.parent))}e.root.color=0}function Te(e,t,i,n){for(;t!==e.root&&t!==we;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Me(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=Le((t=t.parent).left)-t.size_left,n=xe(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}we.parent=we,we.left=we,we.right=we,we.color=0;var Re=i(77277);const Ae=65535;function Oe(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class Pe{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function Fe(e,t=!0){const i=[0];let n=1;for(let t=0,o=e.length;t<o;t++){const s=e.charCodeAt(t);13===s?t+1<o&&10===e.charCodeAt(t+1)?(i[n++]=t+2,t++):i[n++]=t+1:10===s&&(i[n++]=t+1)}return t?Oe(i):i}class Be{constructor(e,t,i,n,o){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=o}}class We{constructor(e,t){this.buffer=e,this.lineStarts=t}}class Ve{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==we&&e.iterate(e.root,(e=>(e!==we&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class He{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<e&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n<i.length;n++){const o=i[n];(null===o.node.parent||o.nodeStartOffset>=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class ze{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new We("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=we,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t<i;t++)if(e[t].buffer.length>0){e[t].lineStarts||(e[t].lineStarts=Fe(e[t].buffer));const i=new Be(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new He(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=65535-Math.floor(21845),i=2*t;let n="",o=0;const s=[];if(this.iterate(this.root,(r=>{const a=this.getNodeContent(r),l=a.length;if(o<=t||o+l<i)return n+=a,o+=l,!0;const d=n.replace(/\r\n|\r|\n/g,e);return s.push(new We(d,Fe(d))),n=a,o=l,!0})),o>0){const t=n.replace(/\r\n|\r|\n/g,e);s.push(new We(t,Fe(t)))}this.create(s,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Ve(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==we;)if(n.left!==we&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==we;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){const e=n-this.getOffsetAt(i+1,1);return new g.L(i+1,e+1)}return new g.L(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===we){const t=n-e-this.getOffsetAt(i+1,1);return new g.L(i+1,t+1)}t=t.right}return new g.L(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let s=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==we;){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){s+=e.substring(n,n+t.remainder);break}s+=e.substr(n,i.piece.length),i=i.next()}return s}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(o=>{if(o===we)return!0;const s=o.piece;let r=s.length;if(0===r)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,d=s.start.line,h=s.end.line;let c=l[d]+s.start.column;if(n&&(10===a.charCodeAt(c)&&(c++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(d===h)return this._EOLNormalized||13!==a.charCodeAt(c+r-1)?i+=a.substr(c,r):(n=!0,i+=a.substr(c,r-1)),!0;i+=this._EOLNormalized?a.substring(c,Math.max(c,l[d+1]-this._EOLLength)):a.substring(c,l[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=d+1;n<h;n++)i=this._EOLNormalized?a.substring(l[n],l[n+1]-this._EOLLength):a.substring(l[n],l[n+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;return this._EOLNormalized||13!==a.charCodeAt(l[h]+s.end.column-1)?i=a.substr(l[h],s.end.column):(n=!0,0===s.end.column?t--:i=a.substr(l[h],s.end.column-1)),!0})),n&&(e[t++]=i,i=""),e[t++]=i,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e||(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,"")),this._lastVisitedLine.value}_getCharCode(e){if(e.remainder===e.node.piece.length){const t=e.node.next();if(!t)return 0;const i=this._buffers[t.piece.bufferIndex],n=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return i.buffer.charCodeAt(n)}{const t=this._buffers[e.node.piece.bufferIndex],i=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start)+e.remainder;return t.buffer.charCodeAt(i)}}getLineCharCode(e,t){const i=this.nodeAt2(e,t+1);return this._getCharCode(i)}getLineLength(e){if(e===this.getLineCount()){const t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,t,i,n,o,s,r,a,l,d,h){const c=this._buffers[e.piece.bufferIndex],u=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),g=this.offsetInBuffer(e.piece.bufferIndex,o),m=this.offsetInBuffer(e.piece.bufferIndex,s);let f;const _={line:0,column:0};let v,b;t._wordSeparators?(v=c.buffer.substring(g,m),b=e=>e+g,t.reset(0)):(v=c.buffer,b=e=>e,t.reset(g));do{if(f=t.next(v),f){if(b(f.index)>=m)return d;this.positionInBuffer(e,b(f.index)-u,_);const t=this.getLineFeedCnt(e.piece.bufferIndex,o,_),s=_.line===o.line?_.column-o.column+n:_.column+1,r=s+f[0].length;if(h[d++]=(0,Re.iE)(new p.e(i+t,s,i+t,r),f,a),b(f.index)+f[0].length>=m)return d;if(d>=l)return d}}while(f);return d}findMatchesLineByLine(e,t,i,n){const o=[];let s=0;const r=new Re.sz(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let d=this.positionInBuffer(a.node,a.remainder);const h=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,d,h,t,i,n,s,o),o;let c=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,d,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,h=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[d.line+l],p=c===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(u,r,c,p,d,this.positionInBuffer(u,g-h),t,i,n,s,o),s>=n)return o;c+=l}const h=c===e.startLineNumber?e.startColumn-1:0;if(c===e.endLineNumber){const a=this.getLineContent(c).substring(h,e.endColumn-1);return s=this._findMatchesInLine(t,r,a,e.endLineNumber,h,s,o,i,n),o}if(s=this._findMatchesInLine(t,r,this.getLineContent(c).substr(h),c,h,s,o,i,n),s>=n)return o;c++,a=this.nodeAt2(c,1),u=a.node,d=this.positionInBuffer(a.node,a.remainder)}if(c===e.endLineNumber){const a=c===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(c).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,r,l,e.endLineNumber,a,s,o,i,n),o}const g=c===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,r,c,g,d,h,t,i,n,s,o),o}_findMatchesInLine(e,t,i,n,o,s,r,a,l){const d=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,h=i.length;let c=-a;for(;-1!==(c=i.indexOf(t,c+a));)if((!d||(0,Re.cM)(d,i,h,c,a))&&(r[s++]=new b.tk(new p.e(n,c+1+o,n,c+1+a+o),null),s>=l))return s;return s}let h;t.reset(0);do{if(h=t.next(i),h&&(r[s++]=(0,Re.iE)(new p.e(n,h.index+1+o,n,h.index+1+h[0].length+o),h,a),s>=l))return s}while(h);return s}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==we){const{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),s=i.piece,r=s.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&o+s.length===e&&t.length<Ae)return this.appendToNode(i,t),void this.computeBufferMetadata();if(o===e)this.insertContentToNodeLeft(t,i),this._searchCache.validate(e);else if(o+i.piece.length>e){const e=[];let o=new Be(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(r,s.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(i,n)){const e={line:o.start.line+1,column:0};o=new Be(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,n-1)){const o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a);else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let d=i;for(let e=0;e<l.length;e++)d=this.rbInsertRight(d,l[e]);this.deleteNodes(e)}else this.insertContentToNodeRight(t,i)}else{const e=this.createNewPieces(t);let i=this.rbInsertLeft(null,e[0]);for(let t=1;t<e.length;t++)i=this.rbInsertRight(i,e[t])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===we)return;const i=this.nodeAt(e),n=this.nodeAt(e+t),o=i.node,s=n.node;if(o===s){const s=this.positionInBuffer(o,i.remainder),r=this.positionInBuffer(o,n.remainder);if(i.nodeStartOffset===e){if(t===o.piece.length){const e=o.next();return Ee(this,o),this.validateCRLFWithPrevNode(e),void this.computeBufferMetadata()}return this.deleteNodeHead(o,r),this._searchCache.validate(e),this.validateCRLFWithPrevNode(o),void this.computeBufferMetadata()}return i.nodeStartOffset+o.piece.length===e+t?(this.deleteNodeTail(o,s),this.validateCRLFWithNextNode(o),void this.computeBufferMetadata()):(this.shrinkNode(o,s,r),void this.computeBufferMetadata())}const r=[],a=this.positionInBuffer(o,i.remainder);this.deleteNodeTail(o,a),this._searchCache.validate(e),0===o.piece.length&&r.push(o);const l=this.positionInBuffer(s,n.remainder);this.deleteNodeHead(s,l),0===s.piece.length&&r.push(s);for(let e=o.next();e!==we&&e!==s;e=e.next())r.push(e);const d=0===o.piece.length?o.prev():o;this.deleteNodes(r),this.validateCRLFWithNextNode(d),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){const i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){const n=t.piece,o={line:n.start.line+1,column:0},s=new Be(n.bufferIndex,o,n.end,this.getLineFeedCnt(n.bufferIndex,o,n.end),n.length-1);t.piece=s,e+="\n",Te(this,t,-1,-1),0===t.piece.length&&i.push(t)}const n=this.createNewPieces(e);let o=this.rbInsertLeft(t,n[n.length-1]);for(let e=n.length-2;e>=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let o=n;for(let e=1;e<i.length;e++)o=this.rbInsertRight(o,i[e]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){const n=e.piece,o=e.piece.bufferIndex,s=this._buffers[o].lineStarts,r=s[n.start.line]+n.start.column+t;let a=n.start.line,l=n.end.line,d=0,h=0,c=0;for(;a<=l&&(d=a+(l-a)/2|0,c=s[d],d!==l);)if(h=s[d+1],r<c)l=d-1;else{if(!(r>=h))break;a=d+1}return i?(i.line=d,i.column=r-c,null):{line:d,column:r-c}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const o=n[i.line+1],s=n[i.line]+i.column;if(o>s+1)return i.line-t.line;const r=s-1;return 13===this._buffers[e].buffer.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)Ee(this,e[t])}createNewPieces(e){if(e.length>Ae){const t=[];for(;e.length>Ae;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,Ae),e=e.substring(Ae));const o=Fe(n);t.push(new Be(this._buffers.length,{line:0,column:0},{line:o.length-1,column:n.length-o[o.length-1]},o.length-1,n.length)),this._buffers.push(new We(n,o))}const i=Fe(e);return t.push(new Be(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new We(e,i)),t}let t=this._buffers[0].buffer.length;const i=Fe(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e<i.length;e++)i[e]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(0!==t)for(let e=0;e<i.length;e++)i[e]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const o=this._buffers[0].buffer.length,s=this._buffers[0].lineStarts.length-1,r={line:s,column:o-this._buffers[0].lineStarts[s]},a=new Be(0,n,r,this.getLineFeedCnt(0,n,r),o-t);return this._lastChangeBufferPos=r,[a]}getLineRawContent(e,t=0){let i=this.root,n="";const o=this._searchCache.get2(e);if(o){i=o.node;const s=this.getAccumulatedValue(i,e-o.nodeStartLineNumber-1),r=this._buffers[i.piece.bufferIndex].buffer,a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(o.nodeStartLineNumber+i.piece.lineFeedCnt!==e){const n=this.getAccumulatedValue(i,e-o.nodeStartLineNumber);return r.substring(a+s,a+n-t)}n=r.substring(a+s,a+i.piece.length)}else{let o=0;const s=e;for(;i!==we;)if(i.left!==we&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:s-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(s+t,s+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==we;){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(i,0),s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(s,s+o-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==we;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),s=t,r=this.offsetInBuffer(i.bufferIndex,s),a=this.getLineFeedCnt(i.bufferIndex,i.start,s),l=a-n,d=r-o,h=i.length+d;e.piece=new Be(i.bufferIndex,i.start,s,a,h),Te(this,e,d,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),s=t,r=this.getLineFeedCnt(i.bufferIndex,s,i.end),a=r-n,l=o-this.offsetInBuffer(i.bufferIndex,s),d=i.length+l;e.piece=new Be(i.bufferIndex,s,i.end,r,d),Te(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,o=n.start,s=n.end,r=n.length,a=n.lineFeedCnt,l=t,d=this.getLineFeedCnt(n.bufferIndex,n.start,l),h=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new Be(n.bufferIndex,n.start,l,d,h),Te(this,e,h-r,d-a);const c=new Be(n.bufferIndex,i,s,this.getLineFeedCnt(n.bufferIndex,i,s),this.offsetInBuffer(n.bufferIndex,s)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,c);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=Fe(t,!1);for(let e=0;e<o.length;e++)o[e]+=n;if(i){const e=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-e}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));const s=this._buffers[0].lineStarts.length-1,r={line:s,column:this._buffers[0].buffer.length-this._buffers[0].lineStarts[s]},a=e.piece.length+t.length,l=e.piece.lineFeedCnt,d=this.getLineFeedCnt(0,e.piece.start,r),h=d-l;e.piece=new Be(e.piece.bufferIndex,e.piece.start,r,d,a),this._lastChangeBufferPos=r,Te(this,e,t.length,h)}nodeAt(e){let t=this.root;const i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;for(;t!==we;)if(t.size_left>e)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==we;)if(i.left!==we&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,s),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==we;){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1)return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)};t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===we||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;return n!==i.length-1&&(!(i[n+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o))}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==we&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let o;o=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new Be(e.piece.bufferIndex,e.piece.start,o,r,s),Te(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Be(t.piece.bufferIndex,a,t.piece.end,d,l),Te(this,t,-1,-1),0===t.piece.length&&i.push(t);const h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(let e=0;e<i.length;e++)Ee(this,i[e])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const i=t.next();if(this.startWithLF(i)){if(e+="\n",1===i.piece.length)Ee(this,i);else{const e=i.piece,t={line:e.start.line+1,column:0},n=e.length-1,o=this.getLineFeedCnt(e.bufferIndex,t,e.end);i.piece=new Be(e.bufferIndex,t,e.end,o,n),Te(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===we)return t(we);const i=this.iterate(e.left,t);return i?t(e)&&this.iterate(e.right,t):i}getNodeContent(e){if(e===we)return"";const t=this._buffers[e.piece.bufferIndex],i=e.piece,n=this.offsetInBuffer(i.bufferIndex,i.start),o=this.offsetInBuffer(i.bufferIndex,i.end);return t.buffer.substring(n,o)}getPieceContent(e){const t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(i,n)}rbInsertRight(e,t){const i=new Ce(t,1);if(i.left=we,i.right=we,i.parent=we,i.size_left=0,i.lf_left=0,this.root===we)this.root=i,i.color=0;else if(e.right===we)e.right=i,i.parent=e;else{const t=ye(e.right);t.left=i,i.parent=t}return Ie(this,i),i}rbInsertLeft(e,t){const i=new Ce(t,1);if(i.left=we,i.right=we,i.parent=we,i.size_left=0,i.lf_left=0,this.root===we)this.root=i,i.color=0;else if(e.left===we)e.left=i,i.parent=e;else{const t=Se(e.left);t.right=i,i.parent=t}return Ie(this,i),i}}var Ke=i(93033);class Ue extends a.JT{constructor(e,t,i,n,o,s,a){super(),this._onDidChangeContent=this._register(new r.Q5),this._BOM=t,this._mightContainNonBasicASCII=!s,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._pieceTree=new ze(e,i,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){const i=e+t,n=this.getPositionAt(e),o=this.getPositionAt(i);return new p.e(n.lineNumber,n.column,o.lineNumber,o.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;const i=this.getOffsetAt(e.startLineNumber,e.startColumn),n=this.getOffsetAt(e.endLineNumber,e.endColumn);let o=0;const s=this._getEndOfLine(t),r=this.getEOL();return s.length!==r.length&&(o=(s.length-r.length)*(e.endLineNumber-e.startLineNumber)),n-i+o}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,o=e.endLineNumber;for(let t=n;t<=o;t++){const s=this.getLineContent(t),r=t===n?e.startColumn-1:0,a=t===o?e.endColumn-1:s.length;for(let e=r;e<a;e++)l.ZG(s.charCodeAt(e))?(i+=1,e+=1):i+=1}return i+=this._getEndOfLine(t).length*(o-n),i}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=l.LC(this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=l.ow(this.getLineContent(e));return-1===t?0:t+2}_getEndOfLine(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,o=this._mightContainUnusualLineTerminators,s=this._mightContainNonBasicASCII,r=!0,a=[];for(let t=0;t<e.length;t++){const i=e[t];r&&i._isTracked&&(r=!1);const d=i.range;if(i.text){let e=!0;s||(e=!l.$i(i.text),s=e),!n&&e&&(n=l.Ut(i.text)),!o&&e&&(o=l.ab(i.text))}let c="",u=0,g=0,p=0;if(i.text){let e;[u,g,p,e]=(0,h.Q)(i.text);const t=this.getEOL();c=0===e||e===("\r\n"===t?2:1)?i.text:i.text.replace(/\r\n|\r|\n/g,t)}a[t]={sortIndex:t,identifier:i.identifier||null,range:d,rangeOffset:this.getOffsetAt(d.startLineNumber,d.startColumn),rangeLength:this.getValueLengthInRange(d),text:c,eolCount:u,firstLineLength:g,lastLineLength:p,forceMoveMarkers:Boolean(i.forceMoveMarkers),isAutoWhitespaceEdit:i.isAutoWhitespaceEdit||!1}}a.sort(Ue._sortOpsAscending);let d=!1;for(let e=0,t=a.length-1;e<t;e++){const t=a[e].range.getEndPosition(),i=a[e+1].range.getStartPosition();if(i.isBeforeOrEqual(t)){if(i.isBefore(t))throw new Error("Overlapping ranges are not allowed!");d=!0}}r&&(a=this._reduceOperations(a));const c=i||t?Ue._getInverseEditRanges(a):[],u=[];if(t)for(let e=0;e<a.length;e++){const t=a[e],i=c[e];if(t.isAutoWhitespaceEdit&&t.range.isEmpty())for(let e=i.startLineNumber;e<=i.endLineNumber;e++){let n="";e===i.startLineNumber&&(n=this.getLineContent(t.range.startLineNumber),-1!==l.LC(n))||u.push({lineNumber:e,oldContent:n})}}let g=null;if(i){let e=0;g=[];for(let t=0;t<a.length;t++){const i=a[t],n=c[t],o=this.getValueInRange(i.range),s=i.rangeOffset+e;e+=i.text.length-o.length,g[t]={sortIndex:i.sortIndex,identifier:i.identifier,range:n,text:o,textChange:new Ke.q(i.rangeOffset,o,s,i.text)}}d||g.sort(((e,t)=>e.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=s;const p=this._doApplyEdits(a);let m=null;if(t&&u.length>0){u.sort(((e,t)=>t.lineNumber-e.lineNumber)),m=[];for(let e=0,t=u.length;e<t;e++){const t=u[e].lineNumber;if(e>0&&u[e-1].lineNumber===t)continue;const i=u[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===l.LC(n)&&m.push(t)}}return this._onDidChangeContent.fire(),new b.je(g,p,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,o=new p.e(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let s=i.startLineNumber,r=i.startColumn;const a=[];for(let i=0,n=e.length;i<n;i++){const n=e[i],o=n.range;t=t||n.forceMoveMarkers,a.push(this.getValueInRange(new p.e(s,r,o.startLineNumber,o.startColumn))),n.text.length>0&&a.push(n.text),s=o.endLineNumber,r=o.endColumn}const l=a.join(""),[d,c,u]=(0,h.Q)(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:d,firstLineLength:c,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Ue._sortOpsDescending);const t=[];for(let i=0;i<e.length;i++){const n=e[i],o=n.range.startLineNumber,s=n.range.startColumn,r=n.range.endLineNumber,a=n.range.endColumn;if(o===r&&s===a&&0===n.text.length)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const l=new p.e(o,s,r,a);t.push({range:l,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){const t=[];let i=0,n=0,o=null;for(let s=0,r=e.length;s<r;s++){const r=e[s];let a,l,d;if(o?o.range.endLineNumber===r.range.startLineNumber?(a=i,l=n+(r.range.startColumn-o.range.endColumn)):(a=i+(r.range.startLineNumber-o.range.endLineNumber),l=r.range.startColumn):(a=r.range.startLineNumber,l=r.range.startColumn),r.text.length>0){const e=r.eolCount+1;d=1===e?new p.e(a,l,a,l+r.firstLineLength):new p.e(a,l,a+e-1,r.lastLineLength+1)}else d=new p.e(a,l,a,l);i=d.endLineNumber,n=d.endColumn,t.push(d),o=r}return t}static _sortOpsAscending(e,t){const i=p.e.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=p.e.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class je{constructor(e,t,i,n,o,s,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e<n;e++){const n=i[e].buffer.replace(/\r\n|\r|\n/g,t),o=Fe(n);i[e]=new We(n,o)}const n=new Ue(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class $e{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(0===e.length)return;0===this.chunks.length&&l.uS(e)&&(this.BOM=l.c1,e=e.substr(1));const t=e.charCodeAt(e.length-1);13===t||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,s=0,r=!0;for(let a=0,l=t.length;a<l;a++){const d=t.charCodeAt(a);13===d?a+1<l&&10===t.charCodeAt(a+1)?(s++,e[i++]=a+2,a++):(n++,e[i++]=a+1):10===d?(o++,e[i++]=a+1):r&&9!==d&&(d<32||d>126)&&(r=!1)}const a=new Pe(Oe(e),n,o,s,r);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new We(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=l.Ut(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=l.ab(e)))}finish(e=!0){return this._finish(),new je(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=Fe(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var qe=i(15393),Ze=i(270),Ge=i(96887),Qe=i(94954),Ye=i(1432),Je=i(84013),Xe=i(19247),et=i(276);class tt{constructor(e){this._default=e,this._store=[]}get(e){return e<this._store.length?this._store[e]:this._default}set(e,t){for(;e>=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(0===t)return void this.insert(e,i);if(0===i)return void this.delete(e,t);const n=this._store.slice(0,e),o=this._store.slice(e+t),s=function(e,t){const i=[];for(let n=0;n<e;n++)i[n]=t;return i}(i,this._default);this._store=n.concat(s,o)}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let e=0;e<t;e++)i[e]=this._default;this._store=(0,n.Zv)(this._store,e,i)}}class it{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(e,t){this._startLineNumber=e,this._tokens=t}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class nt{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new it(e,[t]))}finalize(){return this._tokens}}var ot=i(77378);class st{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new at(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class rt extends st{constructor(e,t,i,n){super(e,t),this._textModel=i,this._languageIdCodec=n}updateTokensUntilLine(e,t){const i=this._textModel.getLanguageId();for(;;){const n=this.getFirstInvalidLine();if(!n||n.lineNumber>t)break;const o=this._textModel.getLineContent(n.lineNumber),s=ht(this._languageIdCodec,i,this.tokenizationSupport,o,!0,n.startState);e.add(n.lineNumber,s.tokens),this.store.setEndState(n.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),o=this._textModel.getLineContent(e.lineNumber),s=o.substring(0,e.column-1)+t+o.substring(e.column-1),r=ht(this._languageIdCodec,n,this.tokenizationSupport,s,!0,i),a=new ot.A(r.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,o=e.column,s=this.getStartState(n);if(!s)return null;const r=this._textModel.getLineContent(n),a=r.substring(0,o-1)+i+r.substring(o-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),d=ht(this._languageIdCodec,l,this.tokenizationSupport,a,!0,s);return new ot.A(d.tokens,a,this._languageIdCodec)}isCheapToTokenize(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e<t||e===t&&this._textModel.getLineLength(e)<2048}tokenizeHeuristically(e,t,i){if(i<=this.store.getFirstInvalidEndStateLineNumberOrMax())return{heuristicTokens:!1};if(t<=this.store.getFirstInvalidEndStateLineNumberOrMax())return this.updateTokensUntilLine(e,i),{heuristicTokens:!1};let n=this.guessStartState(t);const o=this._textModel.getLanguageId();for(let s=t;s<=i;s++){const t=this._textModel.getLineContent(s),i=ht(this._languageIdCodec,o,this.tokenizationSupport,t,!0,n);e.add(s,i.tokens),n=i.endState}return{heuristicTokens:!0}}guessStartState(e){let t=this._textModel.getLineFirstNonWhitespaceColumn(e);const i=[];let n=null;for(let o=e-1;t>1&&o>=1;o--){const e=this._textModel.getLineFirstNonWhitespaceColumn(o);if(0!==e&&e<t&&(i.push(this._textModel.getLineContent(o)),t=e,n=this.getStartState(o),n))break}n||(n=this.tokenizationSupport.getInitialState()),i.reverse();const o=this._textModel.getLanguageId();let s=n;for(const e of i)s=ht(this._languageIdCodec,o,this.tokenizationSupport,e,!1,s).endState;return s}}class at{constructor(e){this.lineCount=e,this._tokenizationStateStore=new lt,this._invalidEndStatesLineNumbers=new dt,this._invalidEndStatesLineNumbers.addRange(new Xe.q(1,e+1))}getEndState(e){return this._tokenizationStateStore.getEndState(e)}setEndState(e,t){if(!t)throw new s.he("Cannot set null/undefined state");this._invalidEndStatesLineNumbers.delete(e);const i=this._tokenizationStateStore.setEndState(e,t);return i&&e<this.lineCount&&this._invalidEndStatesLineNumbers.addRange(new Xe.q(e+1,e+2)),i}acceptChange(e,t){this.lineCount+=t-e.length,this._tokenizationStateStore.acceptChange(e,t),this._invalidEndStatesLineNumbers.addRangeAndResize(new Xe.q(e.startLineNumber,e.endLineNumberExclusive),t)}acceptChanges(e){for(const t of e){const[e]=(0,h.Q)(t.text);this.acceptChange(new u.z(t.range.startLineNumber,t.range.endLineNumber+1),e+1)}}invalidateEndStateRange(e){this._invalidEndStatesLineNumbers.addRange(new Xe.q(e.startLineNumber,e.endLineNumberExclusive))}getFirstInvalidEndStateLineNumber(){return this._invalidEndStatesLineNumbers.min}getFirstInvalidEndStateLineNumberOrMax(){return this.getFirstInvalidEndStateLineNumber()||Number.MAX_SAFE_INTEGER}allStatesValid(){return null===this._invalidEndStatesLineNumbers.min}getStartState(e,t){return 1===e?t:this.getEndState(e-1)}getFirstInvalidLine(e){const t=this.getFirstInvalidEndStateLineNumber();if(null===t)return null;const i=this.getStartState(t,e);if(!i)throw new s.he("Start state must be defined");return{lineNumber:t,startState:i}}}class lt{constructor(){this._lineEndStates=new tt(null)}getEndState(e){return this._lineEndStates.get(e)}setEndState(e,t){const i=this._lineEndStates.get(e);return!(i&&i.equals(t)||(this._lineEndStates.set(e,t),0))}acceptChange(e,t){let i=e.length;t>0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class dt{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Xe.q(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new Xe.q(i.start,e):this._ranges.splice(t,1,new Xe.q(i.start,e),new Xe.q(e+1,i.endExclusive))}}addRange(e){Xe.q.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;for(;!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive);)i++;let n=i;for(;!(n>=this._ranges.length||e.endExclusive<this._ranges[n].start);)n++;const o=t-e.length;for(let e=n;e<this._ranges.length;e++)this._ranges[e]=this._ranges[e].delta(o);if(i===n){const n=new Xe.q(e.start,e.start+t);n.isEmpty||this._ranges.splice(i,0,n)}else{const t=Math.min(e.start,this._ranges[i].start),s=Math.max(e.endExclusive,this._ranges[n-1].endExclusive),r=new Xe.q(t,s+o);r.isEmpty?this._ranges.splice(i,n-i):this._ranges.splice(i,n-i,r)}}toString(){return this._ranges.map((e=>e.toString())).join(" + ")}}function ht(e,t,i,n,o,r){let a=null;if(i)try{a=i.tokenizeEncoded(n,o,r.clone())}catch(e){(0,s.dL)(e)}return a||(a=(0,et.Dy)(e.encodeLanguageId(t),r)),ot.A.convertToEndOffset(a.tokens,n.length),a}class ct{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,qe.To)((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()<t?(0,Ye.fn)(i):this._beginBackgroundTokenization())};i()}_backgroundTokenizeForAtLeast1ms(){const e=this._tokenizerWithStateStore._textModel.getLineCount(),t=new nt,i=Je.G.create(!1);do{if(i.elapsed()>1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){var t;const i=null===(t=this._tokenizerWithStateStore)||void 0===t?void 0:t.getFirstInvalidLine();return i?(this._tokenizerWithStateStore.updateTokensUntilLine(e,i.lineNumber),i.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new u.z(e,t))}}const ut=new Uint32Array(0).buffer;class gt{static deleteBeginning(e,t){return null===e||e===ut?e:gt.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===ut)return e;const i=pt(e),n=i[i.length-2];return gt.delete(e,t,n)}static delete(e,t,i){if(null===e||e===ut||t===i)return e;const n=pt(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return ut;const s=ot.A.findIndexInTokensArray(n,t),r=s>0?n[s-1<<1]:0;if(i<n[s<<1]){const r=i-t;for(let e=s;e<o;e++)n[e<<1]-=r;return e}let a,l;r!==t?(n[s<<1]=t,a=s+1<<1,l=t):(a=s<<1,l=r);const d=i-t;for(let e=s+1;e<o;e++){const t=n[e<<1]-d;t>l&&(n[a++]=t,n[a++]=n[1+(e<<1)],l=t)}if(a===n.length)return e;const h=new Uint32Array(a);return h.set(n.subarray(0,a),0),h.buffer}static append(e,t){if(t===ut)return e;if(e===ut)return t;if(null===e)return e;if(null===t)return null;const i=pt(e),n=pt(t),o=n.length>>>1,s=new Uint32Array(i.length+n.length);s.set(i,0);let r=i.length;const a=i[i.length-2];for(let e=0;e<o;e++)s[r++]=n[e<<1]+a,s[r++]=n[1+(e<<1)];return s.buffer}static insert(e,t,i){if(null===e||e===ut)return e;const n=pt(e),o=n.length>>>1;let s=ot.A.findIndexInTokensArray(n,t);s>0&&n[s-1<<1]===t&&s--;for(let e=s;e<o;e++)n[e<<1]+=i;return e}}function pt(e){return e instanceof Uint32Array?e:new Uint32Array(e)}var mt=i(45797);class ft{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(e,t,i){let n=null;if(t<this._len&&(n=this._lineTokens[t]),null!==n&&n!==ut)return new ot.A(pt(n),i,this._languageIdCodec);const o=new Uint32Array(2);return o[0]=i.length,o[1]=_t(this._languageIdCodec.encodeLanguageId(e)),new ot.A(o,i,this._languageIdCodec)}static _massageTokens(e,t,i){const n=i?pt(i):null;if(0===t){let t=!1;if(n&&n.length>1&&(t=mt.N.getLanguageId(n[1])!==e),!t)return ut}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=_t(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let e=0;e<t;e++)i[e]=null;this._lineTokens=n.Zv(this._lineTokens,e,i),this._len+=t}setTokens(e,t,i,n,o){const s=ft._massageTokens(this._languageIdCodec.encodeLanguageId(e),i,n);this._ensureLine(t);const r=this._lineTokens[t];return this._lineTokens[t]=s,!!o&&!ft._equals(r,s)}static _equals(e,t){if(!e||!t)return!e&&!t;const i=pt(e),n=pt(t);if(i.length!==n.length)return!1;for(let e=0,t=i.length;e<t;e++)if(i[e]!==n[e])return!1;return!0}acceptEdit(e,t,i){this._acceptDeleteRange(e),this._acceptInsertText(new g.L(e.startLineNumber,e.startColumn),t,i)}_acceptDeleteRange(e){const t=e.startLineNumber-1;if(t>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=gt.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=gt.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i<this._len&&(n=gt.deleteBeginning(this._lineTokens[i],e.endColumn-1)),this._lineTokens[t]=gt.append(this._lineTokens[t],n),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t,i){if(0===t&&0===i)return;const n=e.lineNumber-1;n>=this._len||(0!==t?(this._lineTokens[n]=gt.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=gt.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=gt.insert(this._lineTokens[n],e.column-1,i))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const i=[];for(let n=0,o=e.length;n<o;n++){const o=e[n];let s=0,r=0,a=!1;for(let e=o.startLineNumber;e<=o.endLineNumber;e++)a?(this.setTokens(t.getLanguageId(),e-1,t.getLineLength(e),o.getLineTokens(e),!1),r=e):this.setTokens(t.getLanguageId(),e-1,t.getLineLength(e),o.getLineTokens(e),!0)&&(a=!0,s=e,r=e);a&&i.push({fromLineNumber:s,toLineNumber:r})}return{changes:i}}}function _t(e){return(32768|e<<0|2<<24|1024)>>>0}class vt{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let o=null;for(let e=0,t=this._pieces.length;e<t;e++){const n=this._pieces[e];if(n.endLineNumber<i.startLineNumber)continue;if(n.startLineNumber>i.endLineNumber){o=o||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumber<i.startLineNumber)continue;if(n.startLineNumber>i.endLineNumber){o=o||{index:e};continue}const[s,r]=n.split(i);s.isEmpty()?o=o||{index:e}:r.isEmpty()||(this._pieces.splice(e,1,s,r),e++,t++,o=o||{index:e})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=n.Zv(this._pieces,o.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const i=this._pieces;if(0===i.length)return t;const n=i[vt._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const o=t.getCount(),s=n.getCount();let r=0;const a=[];let l=0,d=0;const h=(e,t)=>{e!==d&&(d=e,a[l++]=e,a[l++]=t)};for(let e=0;e<s;e++){const i=n.getStartCharacter(e),s=n.getEndCharacter(e),a=n.getMetadata(e),l=((1&a?2048:0)|(2&a?4096:0)|(4&a?8192:0)|(8&a?16384:0)|(16&a?16744448:0)|(32&a?4278190080:0))>>>0,d=~l>>>0;for(;r<o&&t.getEndOffset(r)<=i;)h(t.getEndOffset(r),t.getMetadata(r)),r++;for(r<o&&t.getStartOffset(r)<i&&h(i,t.getMetadata(r));r<o&&t.getEndOffset(r)<s;)h(t.getEndOffset(r),t.getMetadata(r)&d|a&l),r++;if(r<o)h(s,t.getMetadata(r)&d|a&l),t.getEndOffset(r)===s&&r++;else{const e=Math.min(Math.max(0,r-1),o-1);h(s,t.getMetadata(e)&d|a&l)}}for(;r<o;)h(t.getEndOffset(r),t.getMetadata(r)),r++;return new ot.A(new Uint32Array(a),t.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(e,t){let i=0,n=e.length-1;for(;i<n;){let o=i+Math.floor((n-i)/2);if(e[o].endLineNumber<t)i=o+1;else{if(!(e[o].startLineNumber>t)){for(;o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const s of this._pieces)s.acceptEdit(e,t,i,n,o)}}class bt extends Qe.U{constructor(e,t,i,n,o,s){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this._bracketPairsTextModelPart=n,this._languageId=o,this._attachedViews=s,this._semanticTokens=new vt(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new r.Q5),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new r.Q5),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new r.Q5),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new Ct(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews)),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(this.grammarTokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})))}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,i,n]=(0,h.Q)(t.text);this._semanticTokens.acceptEdit(t.range,e,i,n,t.text.length>0?t.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this.grammarTokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new s.he("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLineWithEdit(e,t,i){return this.grammarTokens.tokenizeLineWithEdit(e,t,i)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),o=n.findTokenIndexAtOffset(t.column-1),[s,r]=bt._findLanguageBoundaries(n,o),a=(0,Ze.t2)(t.column,this.getLanguageConfiguration(n.getLanguageId(o)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&s===t.column-1){const[s,r]=bt._findLanguageBoundaries(n,o-1),a=(0,Ze.t2)(t.column,this.getLanguageConfiguration(n.getLanguageId(o-1)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,s=e.getCount();n<s&&e.getLanguageId(n)===i;n++)o=e.getEndOffset(n);return[n,o]}getWordUntilPosition(e){const t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(e,t){const i=this._textModel.validatePosition(new g.L(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}setLanguageId(e,t="api"){if(this._languageId===e)return;const i={oldLanguage:this._languageId,newLanguage:e,source:t};this._languageId=e,this._bracketPairsTextModelPart.handleDidChangeLanguage(i),this.grammarTokens.resetTokenization(),this._onDidChangeLanguage.fire(i),this._onDidChangeLanguageConfiguration.fire({})}}class Ct extends a.JT{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,i,n){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=i,this._tokenizer=null,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new a.XK),this._tokens=new ft(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new a.XK),this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new r.Q5),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new r.Q5),this.onDidChangeTokens=this._onDidChangeTokens.event,this._attachedViewStates=this._register(new a.b2),this._register(Ge.RW.onDidChange((e=>{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(n.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let i=this._attachedViewStates.get(e);i||(i=new wt((()=>this.refreshRanges(i.lineRanges))),this._attachedViewStates.set(e,i)),i.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){var t;this._tokens.flush(),null===(t=this._debugBackgroundTokens)||void 0===t||t.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new at(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const[i,n]=(()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=Ge.RW.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(e){return(0,s.dL)(e),[null,null]}return[e,t]})();if(this._tokenizer=i&&n?new rt(this._textModel.getLineCount(),i,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{2!==this._backgroundTokenizationState&&(this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire())},setEndState:(e,t)=>{var i;if(!this._tokenizer)return;const n=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==n&&e>=n&&(null===(i=this._tokenizer)||void 0===i||i.store.setEndState(e,t))}};i&&i.createBackgroundTokenizer&&!i.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new ct(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),(null==i?void 0:i.backgroundTokenizerShouldOnlyVerifyTokens)&&i.createBackgroundTokenizer?(this._debugBackgroundTokens=new ft(this._languageIdCodec),this._debugBackgroundStates=new at(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,{setTokens:e=>{var t;null===(t=this._debugBackgroundTokens)||void 0===t||t.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{var i;null===(i=this._debugBackgroundStates)||void 0===i||i.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;null===(e=this._defaultBackgroundTokenizer)||void 0===e||e.handleChanges()}handleDidChangeContent(e){var t,i,n;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const i of e.changes){const[e,n]=(0,h.Q)(i.text);this._tokens.acceptEdit(i.range,e,n),null===(t=this._debugBackgroundTokens)||void 0===t||t.acceptEdit(i.range,e,n)}null===(i=this._debugBackgroundStates)||void 0===i||i.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),null===(n=this._defaultBackgroundTokenizer)||void 0===n||n.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=u.z.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){var i,n;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const o=new nt,{heuristicTokens:s}=this._tokenizer.tokenizeHeuristically(o,e,t),r=this.setTokens(o.finalize());if(s)for(const e of r.changes)null===(i=this._backgroundTokenizer.value)||void 0===i||i.requestTokens(e.fromLineNumber,e.toLineNumber+1);null===(n=this._defaultBackgroundTokenizer)||void 0===n||n.checkFinished()}forceTokenization(e){var t,i;const n=new nt;null===(t=this._tokenizer)||void 0===t||t.updateTokensUntilLine(n,e),this.setTokens(n.finalize()),null===(i=this._defaultBackgroundTokenizer)||void 0===i||i.checkFinished()}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var t;const i=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,i);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const o=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,i);!n.equals(o)&&(null===(t=this._debugBackgroundTokenizer.value)||void 0===t?void 0:t.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new g.L(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){if(!this._tokenizer)return null;const n=this._textModel.validatePosition(e);return this.forceTokenization(n.lineNumber),this._tokenizer.tokenizeLineWithEdit(n,t,i)}get hasTokens(){return this._tokens.hasTokens}}class wt extends a.JT{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new qe.pY((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,n.fS)(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}var yt,St=i(14706),Lt=i(64862),xt=function(e,t){return function(i,n){t(i,n,e)}};function kt(e,t){let i;return i="string"==typeof e?function(e){const t=new $e;return t.acceptChunk(e),t.finish()}(e):b.Hf(e)?function(e){const t=new $e;let i;for(;"string"==typeof(i=e.read());)t.acceptChunk(i);return t.finish()}(e):e,i.create(t)}let Nt=0;class Dt{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;for(;;){const n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const Et=()=>{throw new Error("Invalid change accessor")};let It=yt=class extends a.JT{static resolveOptions(e,t){if(t.detectIndentation){const i=Q(e,t.tabSize,t.insertSpaces);return new b.dJ({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new b.dJ(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,a.F8)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,o,s,h){super(),this._undoRedoService=o,this._languageService=s,this._languageConfigurationService=h,this._onWillDispose=this._register(new r.Q5),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Kt((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new r.Q5),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new r.Q5),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new r.Q5),this._eventEmitter=this._register(new Ut),this._languageSelectionListener=this._register(new a.XK),this._deltaDecorationCallCnt=0,this._attachedViews=new jt,Nt++,this.id="$model"+Nt,this.isForSimpleWidget=i.isForSimpleWidget,this._associatedResource=null==n?d.o.parse("inmemory://model/"+Nt):n,this._attachedEditorCount=0;const{textBuffer:c,disposable:u}=kt(e,i.defaultEOL);this._buffer=c,this._bufferDisposable=u,this._options=yt.resolveOptions(this._buffer,i);const g="string"==typeof t?t:t.languageId;"string"!=typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new B(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new q.l(this,this._languageConfigurationService)),this._decorationProvider=this._register(new U(this)),this._tokenizationTextModelPart=new bt(this._languageService,this._languageConfigurationService,this,this._bracketPairs,g,this._attachedViews);const m=this._buffer.getLineCount(),f=this._buffer.getValueLengthInRange(new p.e(1,1,m,this._buffer.getLineLength(m)+1),0);i.largeFileOptimizations?this._isTooLargeForTokenization=f>yt.LARGE_FILE_SIZE_THRESHOLD||m>yt.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=f>yt._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=l.PJ(Nt),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Rt,this._commandManager=new $.NL(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(g)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new Ue([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=a.JT.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new St.fV(e,t)))}setValue(e){if(this._assertNotDisposed(),null==e)throw(0,s.b1)();const{textBuffer:t,disposable:i}=kt(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,s,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:o,isRedoing:s,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Rt,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new St.dQ([new St.Jx],this._versionId,!1,!1),this._createContentChanged2(new p.e(1,1,o,s),0,n,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new St.dQ([new St.CZ],this._versionId,!1,!1),this._createContentChanged2(new p.e(1,1,o,s),0,n,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i<n;i++){const n=t[i],o=n.range,s=n.cachedAbsoluteStart-n.start,r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),a=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);n.cachedAbsoluteStart=r,n.cachedAbsoluteEnd=a,n.cachedVersionId=e,n.start=r-s,n.end=a-s,ve(n)}}onBeforeAttached(){return this._attachedEditorCount++,1===this._attachedEditorCount&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.attachView()}onBeforeDetached(e){this._attachedEditorCount--,0===this._attachedEditorCount&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.detachView(e)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.originalIndentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new b.dJ({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:s});if(this._options.equals(r))return;const a=this._options.createChangeEvent(r);this._options=r,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=Q(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),(0,c.x)(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(l.Qe.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Dt(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.he("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.he("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.he("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.he("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new s.he("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o=Math.floor("number"!=typeof i||isNaN(i)?1:i),s=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(o<1)o=1,s=1;else if(o>t)o=t,s=this.getLineMaxColumn(o);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(o);s>=e&&(s=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof r||isNaN(r)?1:r),d=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,d=1;else if(l>t)l=t,d=this.getLineMaxColumn(l);else if(d<=1)d=1;else{const e=this.getLineMaxColumn(l);d>=e&&(d=e)}return i===o&&n===s&&r===l&&a===d&&e instanceof p.e&&!(e instanceof m.Y)?e:new p.e(o,s,l,d)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(l.ZG(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(n<1)return new g.L(1,1);if(n>s)return new g.L(s,this.getLineMaxColumn(s));if(o<=1)return new g.L(n,1);const r=this.getLineMaxColumn(n);if(o>=r)return new g.L(n,r);if(1===i){const e=this._buffer.getLineCharCode(n,o-2);if(l.ZG(e))return new g.L(n,o-1)}return new g.L(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof g.L&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,s,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,r=l.ZG(e),a=l.ZG(t);return!r&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof p.e&&!(e instanceof m.Y)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,s=i.lineNumber,r=i.column;{const e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,i=l.ZG(e),a=l.ZG(t);return i||a?n===s&&o===r?new p.e(n,o-1,s,r-1):i&&a?new p.e(n,o-1,s,r+1):i?new p.e(n,o-1,s,r):new p.e(n,o,s,r+1):new p.e(n,o,s,r)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new p.e(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,s,r=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>p.e.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let d;if(l.push(a.reduce(((e,t)=>p.e.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new Re.bc(e,i,n,o).parseSearchRequest();if(!t)return[];d=e=>this.findMatchesLineByLine(e,t,s,r)}else d=t=>Re.pM.findMatches(this,new Re.bc(e,i,n,o),t,s,r);return l.map(d).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new Re.bc(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new p.e(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),d=this.findMatchesLineByLine(l,t,s,1);return Re.pM.findNextMatch(this,new Re.bc(e,i,n,o),r,s),d.length>0?d[0]:(l=new p.e(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),d=this.findMatchesLineByLine(l,t,s,1),d.length>0?d[0]:null)}return Re.pM.findNextMatch(this,new Re.bc(e,i,n,o),r,s)}findPreviousMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);return Re.pM.findPreviousMatch(this,new Re.bc(e,i,n,o),r,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof b.Qi?e:new b.Qi(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this._validateEditOperation(e[i]);return t}pushEditOperations(e,t,i,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i,n){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const i=t.map((e=>({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,o=e.length;t<o;t++){const o=e[t];let s=!1;for(let e=0,t=i.length;e<t;e++){const t=i[e].range,n=t.startLineNumber>o.endLineNumber,r=o.startLineNumber>t.endLineNumber;if(!n&&!r){s=!0;break}}if(!s){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;e<n;e++){const n=this._trimAutoWhitespaceLines[e],o=this.getLineMaxColumn(n);let s=!0;for(let e=0,t=i.length;e<t;e++){const t=i[e].range,r=i[e].text;if(!(n<t.startLineNumber||n>t.endLineNumber||n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1))){s=!1;break}}if(s){const e=new p.e(n,1,n,o);t.push(new b.Qi(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new p.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new p.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),o=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),r=o.changes;if(this._trimAutoWhitespaceLines=o.trimAutoWhitespaceLineNumbers,0!==r.length){for(let e=0,t=r.length;e<t;e++){const t=r[e];this._decorationsTree.acceptReplace(t.rangeOffset,t.rangeLength,t.text.length,t.forceMoveMarkers)}const e=[];this._increaseVersionId();let t=i;for(let i=0,o=r.length;i<o;i++){const o=r[i],[a]=(0,h.Q)(o.text);this._onDidChangeDecorations.fire();const l=o.range.startLineNumber,d=o.range.endLineNumber,c=d-l,u=a,p=Math.min(c,u),m=u-c,f=s-t-m+l,_=f,v=f+u,b=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new g.L(_,1)),this.getOffsetAt(new g.L(v,this.getLineMaxColumn(v))),0),C=St.gk.fromDecorations(b),w=new n.H9(C);for(let t=p;t>=0;t--){const i=l+t,n=f+t;w.takeFromEndWhile((e=>e.lineNumber>n));const o=w.takeFromEndWhile((e=>e.lineNumber===n));e.push(new St.rU(i,this.getLineContent(n),o))}if(p<c){const t=l+p;e.push(new St.lN(t+1,d))}if(p<u){const i=new n.H9(C),o=l+p,r=u-p,a=s-t-r+o+1,d=[],h=[];for(let e=0;e<r;e++){const t=a+e;h[e]=this.getLineContent(t),i.takeWhile((e=>e.lineNumber<t)),d[e]=i.takeWhile((e=>e.lineNumber===t))}e.push(new St.Tx(o+1,l+u,h,d))}t+=m}this._emitContentChangedEvent(new St.dQ(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===o.reverseEdits?void 0:o.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e).map((e=>new St.rU(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new St.D8(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,zt(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(e){(0,s.dL)(e)}return i.addDecoration=Et,i.changeDecoration=Et,i.changeDecorationOptions=Et,i.removeDecoration=Et,i.deltaDecorations=Et,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,s.dL)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Ht[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),r=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),s,r,o),n.setOptions(Ht[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;e<i;e++){const i=t[e];this._decorationsTree.delete(i),delete this._decorations[i.id]}}getDecorationOptions(e){const t=this._decorations[e];return t?t.options:null}getDecorationRange(e){const t=this._decorations[e];return t?this._decorationsTree.getNodeRange(this,t):null}getLineDecorations(e,t=0,i=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,o=!1,s=!1){const r=this.getLineCount(),a=Math.min(r,Math.max(1,e)),l=Math.min(r,Math.max(1,t)),d=this.getLineMaxColumn(l),h=new p.e(a,1,l,d),c=this._getDecorationsInRange(h,i,o,s);return(0,n.vA)(c,this._decorationProvider.getDecorationsInRange(h,i,o)),c}getDecorationsInRange(e,t=0,i=!1,o=!1,s=!1){const r=this.validateRange(e),a=this._getDecorationsInRange(r,t,i,s);return(0,n.vA)(a,this._decorationProvider.getDecorationsInRange(r,t,i,o)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return St.gk.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,i,n){const o=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,o,s,t,i,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),s=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,s,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}n!==o?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i,n=!1){const o=this.getVersionId(),s=t.length;let r=0;const a=i.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const d=new Array(a);for(;r<s||l<a;){let h=null;if(r<s){do{h=this._decorations[t[r++]]}while(!h&&r<s);if(h){if(h.options.after){const e=this._decorationsTree.getNodeRange(this,h);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(h.options.before){const e=this._decorationsTree.getNodeRange(this,h);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}this._decorationsTree.delete(h),n||this._onDidChangeDecorations.checkAffectedAndFire(h.options)}}if(l<a){if(!h){const e=++this._lastDecorationId,t=`${this._instanceId};${e}`;h=new ae(t,0,0),this._decorations[t]=h}const t=i[l],s=this._validateRangeRelaxedNoAllocations(t.range),r=zt(t.options),a=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),c=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);h.ownerId=e,h.reset(o,a,c,s),h.setOptions(r),h.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.endLineNumber),h.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.startLineNumber),n||this._onDidChangeDecorations.checkAffectedAndFire(r),this._decorationsTree.insert(h),d[l]=h.id,l++}else h&&delete this._decorations[h.id]}return d}finally{this._onDidChangeDecorations.endDeferredEmit()}}getLanguageId(){return this.tokenization.getLanguageId()}setLanguage(e,t){"string"==typeof e?(this._languageSelectionListener.clear(),this._setLanguage(e,t)):(this._languageSelectionListener.value=e.onDidChange((()=>this._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return function(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}(this.getLineContent(e))+1}};function Tt(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Mt(e){return!!e.options.after||!!e.options.before}It._MODEL_SYNC_LIMIT=52428800,It.LARGE_FILE_SIZE_THRESHOLD=20971520,It.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,It.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:f.D.tabSize,indentSize:f.D.indentSize,insertSpaces:f.D.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:f.D.trimAutoWhitespace,largeFileOptimizations:f.D.largeFileOptimizations,bracketPairColorizationOptions:f.D.bracketPairColorizationOptions},It=yt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([xt(4,Lt.tJ),xt(5,_.O),xt(6,v.c_)],It);class Rt{constructor(){this._decorationsTree0=new de,this._decorationsTree1=new de,this._injectedTextDecorationsTree=new de}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,o,s){const r=e.getVersionId(),a=this._intervalSearch(t,i,n,o,r,s);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,i,n,o,s){const r=this._decorationsTree0.intervalSearch(e,t,i,n,o,s),a=this._decorationsTree1.intervalSearch(e,t,i,n,o,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,o,s);return r.concat(a).concat(l)}getInjectedTextInInterval(e,t,i,n){const o=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,o,!1);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n,o){const s=e.getVersionId(),r=this._search(t,i,n,s,o);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n,o){if(i)return this._decorationsTree1.search(e,t,n,o);{const i=this._decorationsTree0.search(e,t,n,o),s=this._decorationsTree1.search(e,t,n,o),r=this._injectedTextDecorationsTree.search(e,t,n,o);return i.concat(s).concat(r)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){Mt(e)?this._injectedTextDecorationsTree.insert(e):Tt(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Mt(e)?this._injectedTextDecorationsTree.delete(e):Tt(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Mt(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Tt(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function At(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class Ot{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Pt extends Ot{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:b.sh.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class Ft{constructor(e){var t;this.position=null!==(t=null==e?void 0:e.position)&&void 0!==t?t:b.U.Left}}class Bt extends Ot{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?o.Il.fromHex(e):t.getColor(e.id)}}class Wt{static from(e){return e instanceof Wt?e:new Wt(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Vt{static register(e){return new Vt(e)}static createDynamic(e){return new Vt(e)}constructor(e){var t,i,n,o,s,r;this.description=e.description,this.blockClassName=e.blockClassName?At(e.blockClassName):null,this.blockDoesNotCollapse=null!==(t=e.blockDoesNotCollapse)&&void 0!==t?t:null,this.blockIsAfterEnd=null!==(i=e.blockIsAfterEnd)&&void 0!==i?i:null,this.blockPadding=null!==(n=e.blockPadding)&&void 0!==n?n:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?At(e.className):null,this.shouldFillLineOnLineBreak=null!==(o=e.shouldFillLineOnLineBreak)&&void 0!==o?o:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Pt(e.overviewRuler):null,this.minimap=e.minimap?new Bt(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Ft(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?At(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?At(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?At(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?At(e.marginClassName):null,this.inlineClassName=e.inlineClassName?At(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?At(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?At(e.afterContentClassName):null,this.after=e.after?Wt.from(e.after):null,this.before=e.before?Wt.from(e.before):null,this.hideInCommentTokens=null!==(s=e.hideInCommentTokens)&&void 0!==s&&s,this.hideInStringTokens=null!==(r=e.hideInStringTokens)&&void 0!==r&&r}}Vt.EMPTY=Vt.register({description:"empty"});const Ht=[Vt.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Vt.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Vt.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Vt.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function zt(e){return e instanceof Vt?e:Vt.createDynamic(e)}class Kt extends a.JT{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new r.Q5),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Ut extends a.JT{constructor(){super(),this._fastEmitter=this._register(new r.Q5),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new r.Q5),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}class jt{constructor(){this._onDidChangeVisibleRanges=new r.Q5,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new $t((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class $t{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const i=e.map((e=>new u.z(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:i,stabilized:t})}}},94954:(e,t,i)=>{i.d(t,{U:()=>o});var n=i(5976);class o extends n.JT{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}},77277:(e,t,i)=>{i.d(t,{bc:()=>l,cM:()=>u,iE:()=>d,pM:()=>c,sz:()=>g});var n=i(97295),o=i(24929),s=i(50187),r=i(24314),a=i(84973);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t<i;t++){const n=e.charCodeAt(t);if(10===n)return!0;if(92===n){if(t++,t>=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.GF(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.Tx(t,this.wordSeparators?(0,o.u)(this.wordSeparators):null,i?this.searchString:null)}}function d(e,t,i){if(!i)return new a.tk(e,null);const n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e];return new a.tk(e,n)}class h{constructor(e){const t=[];let i=0;for(let n=0,o=e.length;n<o;n++)10===e.charCodeAt(n)&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let i=0,n=t.length-1;if(-1===n)return 0;if(e<=t[0])return 0;for(;i<n;){const o=i+((n-i)/2>>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class c{static findMatches(e,t,i,n,o){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,i,new g(s.wordSeparators,s.regex),n,o):this._doFindMatchesLineByLine(e,i,s,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,s){let a,l,d=0;if(n?(d=n.findLineFeedCountBeforeOffset(o),a=t+o+d):a=t+o,n){const e=n.findLineFeedCountBeforeOffset(o+s.length)-d;l=a+s.length+e}else l=a+s.length;const h=e.getPositionAt(a),c=e.getPositionAt(l);return new r.e(h.lineNumber,h.column,c.lineNumber,c.column)}static _doFindMatchesMultiline(e,t,i,n,o){const s=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new h(r):null,l=[];let c,u=0;for(i.reset(0);c=i.next(r);)if(l[u++]=d(this._getMultilineMatchRange(e,s,r,a,c.index,c[0]),c,n),u>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const s=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o);for(let a=t.startLineNumber+1;a<t.endLineNumber&&r<o;a++)r=this._findMatchesInLine(i,e.getLineContent(a),a,0,r,s,n,o);if(r<o){const a=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);r=this._findMatchesInLine(i,a,t.endLineNumber,0,r,s,n,o)}return s}static _findMatchesInLine(e,t,i,n,o,s,l,h){const c=e.wordSeparators;if(!l&&e.simpleSearch){const l=e.simpleSearch,d=l.length,g=t.length;let p=-d;for(;-1!==(p=t.indexOf(l,p+d));)if((!c||u(c,t,g,p,d))&&(s[o++]=new a.tk(new r.e(i,p+1+n,i,p+1+d+n),null),o>=h))return o;return o}const p=new g(e.wordSeparators,e.regex);let m;p.reset(0);do{if(m=p.next(t),m&&(s[o++]=d(new r.e(i,m.index+1+n,i,m.index+1+m[0].length+n),m,l),o>=h))return o}while(m);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,s,n):this._doFindNextMatchLineByLine(e,i,s,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new s.L(t.lineNumber,1),a=e.getOffsetAt(o),l=e.getLineCount(),c=e.getValueInRange(new r.e(o.lineNumber,o.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new h(c):null;i.reset(t.column-1);const g=i.next(c);return g?d(this._getMultilineMatchRange(e,a,c,u,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new s.L(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s),a=this._findFirstMatchInLine(i,r,s,t.column,n);if(a)return a;for(let t=1;t<=o;t++){const r=(s+t-1)%o,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const s=e.next(t);return s?d(new r.e(i,s.index+1,i,s.index+1+s[0].length),s,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new g(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,s,n):this._doFindPreviousMatchLineByLine(e,i,s,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new r.e(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new s.L(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,s,n);if(a)return a;for(let t=1;t<=o;t++){const r=(o+s-t-1)%o,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,s=null;for(e.reset(0);o=e.next(t);)s=d(new r.e(i,o.index+1,i,o.index+1+o[0].length),o,n);return s}}function u(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;const s=t.charCodeAt(n-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;const s=t.charCodeAt(n+o);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}class g{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const o=i.index,s=i[0].length;if(o===this._prevMatchStartIndex&&s===this._prevMatchLength){if(0===s){n.ZH(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=s,!this._wordSeparators||u(this._wordSeparators,e,t,o,s))return i}while(i);return null}}},59616:(e,t,i)=>{function n(e,t){let i=0,n=0;const o=e.length;for(;n<o;){const o=e.charCodeAt(n);if(32===o)i++;else{if(9!==o)break;i=i-i%t+t}n++}return n===o?-1:i}i.d(t,{q:()=>n})},20927:(e,t,i)=>{i.d(t,{O:()=>g});var n=i(71050),o=i(4669),s=i(22258),r=i(70666),a=i(50187),l=i(24314),d=i(3860),h=i(96887),c=i(70902);class u{static chord(e,t){return(0,s.gx)(e,t)}}function g(){return{editor:void 0,languages:void 0,CancellationTokenSource:n.A,Emitter:o.Q5,KeyCode:c.VD,KeyMod:u,Position:a.L,Range:l.e,Selection:d.Y,SelectionDirection:c.a$,MarkerSeverity:c.ZL,MarkerTag:c.eB,Uri:r.o,Token:h.WU}}u.CtrlCmd=2048,u.Shift=1024,u.Alt=512,u.WinCtrl=256},85215:(e,t,i)=>{i.d(t,{p:()=>n});const n=(0,i(72065).yh)("editorWorkerService")},88191:(e,t,i)=>{i.d(t,{A:()=>u});var n=i(89954),o=i(43702),s=i(59870),r=i(48814),a=i(65026),l=i(72065),d=i(43557),h=i(50988),c=function(e,t){return function(i,n){t(i,n,e)}};const u=(0,l.yh)("ILanguageFeatureDebounceService");var g;!function(e){const t=new WeakMap;let i=0;e.of=function(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}}(g||(g={}));class p{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class m{constructor(e,t,i,n,s,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new o.z6(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,n.SP)(g.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?(0,s.uZ)(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new s.N(6),this._cache.set(i,n));const o=(0,s.uZ)(n.update(t),this._min,this._max);return(0,h.xn)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){const e=new s.nM;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return(0,s.uZ)(e,this._min,this._max)}}let f=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){var n,o,s;const r=null!==(n=null==i?void 0:i.min)&&void 0!==n?n:50,a=null!==(o=null==i?void 0:i.max)&&void 0!==o?o:Math.pow(r,2),l=null!==(s=null==i?void 0:i.key)&&void 0!==s?s:void 0,d=`${g.of(e)},${r}${l?","+l:""}`;let h=this._data.get(d);return h||(this._isDev?h=new m(this._logService,t,e,0|this._overallAverage()||1.5*r,r,a):(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),h=new p(1.5*r)),this._data.set(d,h)),h}_overallAverage(){const e=new s.nM;for(const t of this._data.values())e.update(t.default());return e.value}};f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([c(0,d.VZ),c(1,r.Y)],f),(0,a.z)(u,f,1)},71922:(e,t,i)=>{i.d(t,{p:()=>n});const n=(0,i(72065).yh)("ILanguageFeaturesService")},36357:(e,t,i)=>{i.d(t,{i:()=>n});const n=(0,i(72065).yh)("markerDecorationsService")},73733:(e,t,i)=>{i.d(t,{q:()=>n});const n=(0,i(72065).yh)("modelService")},88216:(e,t,i)=>{i.d(t,{S:()=>n});const n=(0,i(72065).yh)("textModelService")},26909:(e,t,i)=>{i.d(t,{$:()=>p,h:()=>m});var n=i(45797),o=i(97781),s=i(43557),r=i(50187),a=i(24314),l=i(23795);class d{static create(e,t){return new d(e,new h(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new a.e(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,o,s]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new d(this._startLineNumber,n),new d(this._startLineNumber+s,o)]}applyEdit(e,t){const[i,n,o]=(0,l.Q)(t);this.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new r.L(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;const s=e.lineNumber-this._startLineNumber;s<0?this._startLineNumber+=t:s>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(s,e.column-1,t,i,n,o)}}class h{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;i<this._tokenCount;i++)t.push(`(${this._getDeltaLine(i)+e},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})`);return`[${t.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return 0===e?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(0===e)return null;const t=this._getStartCharacter(0),i=this._getDeltaLine(e-1),n=this._getEndCharacter(e-1);return new a.e(0,t+1,i,n+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return 0===this._getTokenCount()}getLineTokens(e){let t=0,i=this._getTokenCount()-1;for(;t<i;){const n=t+Math.floor((i-t)/2),o=this._getDeltaLine(n);if(o<e)t=n+1;else{if(!(o>e)){let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let s=n;for(;s<i&&this._getDeltaLine(s+1)===e;)s++;return new c(this._tokens.subarray(4*o,4*s+4))}i=n-1}}return this._getDeltaLine(t)===e?new c(this._tokens.subarray(4*t,4*t+4)):null}clear(){this._tokenCount=0}removeTokens(e,t,i,n){const o=this._tokens,s=this._tokenCount;let r=0,a=!1,l=0;for(let d=0;d<s;d++){const s=4*d,h=o[s],c=o[s+1],u=o[s+2],g=o[s+3];if((h>e||h===e&&u>=t)&&(h<i||h===i&&c<=n))a=!0;else{if(0===r&&(l=h),a){const e=4*r;o[e]=h-l,o[e+1]=c,o[e+2]=u,o[e+3]=g}r++}}return this._tokenCount=r,l}split(e,t,i,n){const o=this._tokens,s=this._tokenCount,r=[],a=[];let l=r,d=0,c=0;for(let r=0;r<s;r++){const s=4*r,h=o[s],u=o[s+1],g=o[s+2],p=o[s+3];if(h>e||h===e&&g>=t){if(h<i||h===i&&u<=n)continue;l!==a&&(l=a,d=0,c=h)}l[d++]=h-c,l[d++]=u,l[d++]=g,l[d++]=p}return[new h(new Uint32Array(r)),new h(new Uint32Array(a)),c]}acceptDeleteRange(e,t,i,n,o){const s=this._tokens,r=this._tokenCount,a=n-t;let l=0,d=!1;for(let h=0;h<r;h++){const c=4*h;let u=s[c],g=s[c+1],p=s[c+2];const m=s[c+3];if(u<t||u===t&&p<=i){l++;continue}if(u===t&&g<i)u===n&&p>o?p-=o-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>o)){d=!0;continue}p-=o-i}else if(u<n||u===n&&g<o){if(!(u===n&&p>o)){d=!0;continue}u=t,g=i,p=g+(p-o)}else if(u>n){if(0===a&&!d){l=r;break}u-=a}else{if(!(u===n&&g>=o))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=o-i,p-=o-i}const f=4*l;s[f]=u,s[f+1]=g,s[f+2]=p,s[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,s){const r=0===i&&1===n&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s<l;s++){const l=4*s;let d=a[l],h=a[l+1],c=a[l+2];if(!(d<e||d===e&&c<t)){if(d===e&&c===t){if(!r)continue;c+=1}else if(d===e&&h<t&&t<c)0===i?c+=n:c=t;else{if(d===e&&h===t&&r)continue;if(d===e)if(d+=i,0===i)h+=n,c+=n;else{const e=c-h;h=o+(h-t),c=h+e}else d+=i}a[l]=d,a[l+1]=h,a[l+2]=c}}}}class c{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}var u=i(72042),g=function(e,t){return function(i,n){t(i,n,e)}};let p=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new _}getMetadata(e,t,i){const o=this._languageService.languageIdCodec.encodeLanguageId(i),r=this._hashTable.get(e,t,o);let a;if(r)a=r.metadata,this._logService.getLevel()===s.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${n.N.getForeground(a)}, fontStyle ${n.N.getFontStyle(a).toString(2)}`);else{let r=this._legend.tokenTypes[e];const l=[];if(r){let e=t;for(let t=0;e>0&&t<this._legend.tokenModifiers.length;t++)1&e&&l.push(this._legend.tokenModifiers[t]),e>>=1;e>0&&this._logService.getLevel()===s.in.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(r,l,i);void 0===n?a=2147483647:(a=0,void 0!==n.italic&&(a|=1|(n.italic?1:0)<<11),void 0!==n.bold&&(a|=2|(n.bold?2:0)<<11),void 0!==n.underline&&(a|=4|(n.underline?4:0)<<11),void 0!==n.strikethrough&&(a|=8|(n.strikethrough?8:0)<<11),n.foreground&&(a|=16|n.foreground<<15),0===a&&(a=2147483647))}else this._logService.getLevel()===s.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,r="not-in-legend";this._hashTable.add(e,t,o,a),this._logService.getLevel()===s.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${r}) / ${t} (${l.join(" ")}): foreground ${n.N.getForeground(a)}, fontStyle ${n.N.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,o){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${o}).`))}};function m(e,t,i){const n=e.data,o=e.data.length/5|0,s=Math.max(Math.ceil(o/1024),400),r=[];let a=0,l=1,h=0;for(;a<o;){const e=a;let c=Math.min(e+s,o);if(c<o){let t=c;for(;t-1>e&&0===n[5*t];)t--;if(t-1===e){let e=c;for(;e+1<o&&0===n[5*e];)e++;c=e}else c=t}let u=new Uint32Array(4*(c-e)),g=0,p=0,m=0,f=0;for(;a<c;){const e=5*a,o=n[e],s=n[e+1],r=l+o|0,d=0===o?h+s|0:s,c=d+n[e+2]|0,_=n[e+3],v=n[e+4];if(c<=d)t.warnInvalidLengthSemanticTokens(r,d+1);else if(m===r&&f>d)t.warnOverlappingSemanticTokens(r,d+1);else{const e=t.getMetadata(_,v,i);2147483647!==e&&(0===p&&(p=r),u[g]=r-p,u[g+1]=d,u[g+2]=c,u[g+3]=e,g+=4,m=r,f=c)}l=r,h=d,a++}g!==u.length&&(u=u.subarray(0,g));const _=d.create(p,u);r.push(_)}return r}p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([g(1,o.XE),g(2,u.O),g(3,s.VZ)],p);class f{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class _{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=_._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<_._SIZES.length?2/3*this._currentLength:0),this._elements=[],_._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let i=0;i<t;i++)e[i]=null}_hash2(e,t){return(e<<5)-e+t|0}_hashFunc(e,t,i){return this._hash2(this._hash2(e,t),i)%this._currentLength}get(e,t,i){const n=this._hashFunc(e,t,i);let o=this._elements[n];for(;o;){if(o.tokenTypeIndex===e&&o.tokenModifierSet===t&&o.languageId===i)return o;o=o.next}return null}add(e,t,i,n){if(this._elementsCount++,0!==this._growCount&&this._elementsCount>=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=_._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<_._SIZES.length?2/3*this._currentLength:0),this._elements=[],_._nullOutEntries(this._elements,this._currentLength);for(const t of e){let e=t;for(;e;){const t=e.next;e.next=null,this._add(e),e=t}}}this._add(new f(e,t,i,n))}_add(e){const t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}_._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]},73343:(e,t,i)=>{i.d(t,{s:()=>n});const n=(0,i(72065).yh)("semanticTokensStylingService")},71765:(e,t,i)=>{i.d(t,{V:()=>o,y:()=>s});var n=i(72065);const o=(0,n.yh)("textResourceConfigurationService"),s=(0,n.yh)("textResourcePropertiesService")},31446:(e,t,i)=>{i.d(t,{a:()=>l});var n=i(24314),o=i(77277),s=i(97295),r=i(35146),a=i(270);class l{static computeUnicodeHighlights(e,t,i){const l=i?i.startLineNumber:1,h=i?i.endLineNumber:e.getLineCount(),c=new d(t),u=c.getCandidateCodePoints();let g;var p;g="allNonBasicAscii"===u?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp((p=Array.from(u),`[${s.ec(p.map((e=>String.fromCodePoint(e))).join(""))}]`),"g");const m=new o.sz(null,g),f=[];let _,v=!1,b=0,C=0,w=0;e:for(let t=l,i=h;t<=i;t++){const i=e.getLineContent(t),o=i.length;m.reset(0);do{if(_=m.next(i),_){let e=_.index,l=_.index+_[0].length;if(e>0){const t=i.charCodeAt(e-1);s.ZG(t)&&e--}if(l+1<o){const e=i.charCodeAt(l-1);s.ZG(e)&&l++}const d=i.substring(e,l);let h=(0,a.t2)(e+1,a.Af,i,0);h&&h.endColumn<=e+1&&(h=null);const u=c.shouldHighlightNonBasicASCII(d,h?h.word:null);if(0!==u){3===u?b++:2===u?C++:1===u?w++:(0,r.vE)(u);const i=1e3;if(f.length>=i){v=!0;break e}f.push(new n.e(t,e+1,t,l+1))}}}while(_)}return{ranges:f,hasMore:v,ambiguousCharacterCount:b,invisibleCharacterCount:C,nonBasicAsciiCharacterCount:w}}static computeUnicodeHighlightReason(e,t){const i=new d(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),o=i.ambiguousCharacters.getPrimaryConfusable(n),r=s.ZK.getLocales().filter((e=>!s.ZK.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:r}}case 1:return{kind:2}}}}class d{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=s.ZK.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of s.vU.codePoints)h(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,o=!1;if(t)for(const e of t){const t=e.codePointAt(0),i=s.$i(e);n=n||i,i||this.ambiguousCharacters.isAmbiguous(t)||s.vU.isInvisibleCharacter(t)||(o=!0)}return!n&&o?0:this.options.invisibleCharacters&&!h(e)&&s.vU.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function h(e){return" "===e||"\n"===e||"\t"===e}},70902:(e,t,i)=>{var n,o,s,r,a,l,d,h,c,u,g,p,m,f,_,v,b,C,w,y,S,L,x,k,N,D,E,I,T,M,R,A,O,P,F,B,W,V,H;i.d(t,{E$:()=>N,F5:()=>x,Ij:()=>l,In:()=>B,Lu:()=>I,MG:()=>k,MY:()=>u,OI:()=>V,RM:()=>b,U:()=>_,VD:()=>y,Vi:()=>h,WW:()=>O,ZL:()=>S,_x:()=>c,a$:()=>A,a7:()=>s,ao:()=>n,bw:()=>w,cR:()=>P,cm:()=>r,d2:()=>W,eB:()=>L,g4:()=>M,g_:()=>R,gl:()=>C,gm:()=>m,jl:()=>f,np:()=>o,py:()=>E,r3:()=>d,r4:()=>F,rf:()=>g,sh:()=>D,up:()=>H,vQ:()=>T,wT:()=>p,wU:()=>v,we:()=>a}),function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(n||(n={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(o||(o={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(s||(s={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(r||(r={})),function(e){e[e.Deprecated=1]="Deprecated"}(a||(a={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(l||(l={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(d||(d={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(h||(h={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(c||(c={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(u||(u={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(g||(g={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.screenReaderAnnounceInlineSuggestion=7]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=8]="autoClosingDelete",e[e.autoClosingOvertype=9]="autoClosingOvertype",e[e.autoClosingQuotes=10]="autoClosingQuotes",e[e.autoIndent=11]="autoIndent",e[e.automaticLayout=12]="automaticLayout",e[e.autoSurround=13]="autoSurround",e[e.bracketPairColorization=14]="bracketPairColorization",e[e.guides=15]="guides",e[e.codeLens=16]="codeLens",e[e.codeLensFontFamily=17]="codeLensFontFamily",e[e.codeLensFontSize=18]="codeLensFontSize",e[e.colorDecorators=19]="colorDecorators",e[e.colorDecoratorsLimit=20]="colorDecoratorsLimit",e[e.columnSelection=21]="columnSelection",e[e.comments=22]="comments",e[e.contextmenu=23]="contextmenu",e[e.copyWithSyntaxHighlighting=24]="copyWithSyntaxHighlighting",e[e.cursorBlinking=25]="cursorBlinking",e[e.cursorSmoothCaretAnimation=26]="cursorSmoothCaretAnimation",e[e.cursorStyle=27]="cursorStyle",e[e.cursorSurroundingLines=28]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=29]="cursorSurroundingLinesStyle",e[e.cursorWidth=30]="cursorWidth",e[e.disableLayerHinting=31]="disableLayerHinting",e[e.disableMonospaceOptimizations=32]="disableMonospaceOptimizations",e[e.domReadOnly=33]="domReadOnly",e[e.dragAndDrop=34]="dragAndDrop",e[e.dropIntoEditor=35]="dropIntoEditor",e[e.emptySelectionClipboard=36]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=37]="experimentalWhitespaceRendering",e[e.extraEditorClassName=38]="extraEditorClassName",e[e.fastScrollSensitivity=39]="fastScrollSensitivity",e[e.find=40]="find",e[e.fixedOverflowWidgets=41]="fixedOverflowWidgets",e[e.folding=42]="folding",e[e.foldingStrategy=43]="foldingStrategy",e[e.foldingHighlight=44]="foldingHighlight",e[e.foldingImportsByDefault=45]="foldingImportsByDefault",e[e.foldingMaximumRegions=46]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=47]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=48]="fontFamily",e[e.fontInfo=49]="fontInfo",e[e.fontLigatures=50]="fontLigatures",e[e.fontSize=51]="fontSize",e[e.fontWeight=52]="fontWeight",e[e.fontVariations=53]="fontVariations",e[e.formatOnPaste=54]="formatOnPaste",e[e.formatOnType=55]="formatOnType",e[e.glyphMargin=56]="glyphMargin",e[e.gotoLocation=57]="gotoLocation",e[e.hideCursorInOverviewRuler=58]="hideCursorInOverviewRuler",e[e.hover=59]="hover",e[e.inDiffEditor=60]="inDiffEditor",e[e.inlineSuggest=61]="inlineSuggest",e[e.letterSpacing=62]="letterSpacing",e[e.lightbulb=63]="lightbulb",e[e.lineDecorationsWidth=64]="lineDecorationsWidth",e[e.lineHeight=65]="lineHeight",e[e.lineNumbers=66]="lineNumbers",e[e.lineNumbersMinChars=67]="lineNumbersMinChars",e[e.linkedEditing=68]="linkedEditing",e[e.links=69]="links",e[e.matchBrackets=70]="matchBrackets",e[e.minimap=71]="minimap",e[e.mouseStyle=72]="mouseStyle",e[e.mouseWheelScrollSensitivity=73]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=74]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=75]="multiCursorMergeOverlapping",e[e.multiCursorModifier=76]="multiCursorModifier",e[e.multiCursorPaste=77]="multiCursorPaste",e[e.multiCursorLimit=78]="multiCursorLimit",e[e.occurrencesHighlight=79]="occurrencesHighlight",e[e.overviewRulerBorder=80]="overviewRulerBorder",e[e.overviewRulerLanes=81]="overviewRulerLanes",e[e.padding=82]="padding",e[e.pasteAs=83]="pasteAs",e[e.parameterHints=84]="parameterHints",e[e.peekWidgetDefaultFocus=85]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=86]="definitionLinkOpensInPeek",e[e.quickSuggestions=87]="quickSuggestions",e[e.quickSuggestionsDelay=88]="quickSuggestionsDelay",e[e.readOnly=89]="readOnly",e[e.readOnlyMessage=90]="readOnlyMessage",e[e.renameOnType=91]="renameOnType",e[e.renderControlCharacters=92]="renderControlCharacters",e[e.renderFinalNewline=93]="renderFinalNewline",e[e.renderLineHighlight=94]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=95]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=96]="renderValidationDecorations",e[e.renderWhitespace=97]="renderWhitespace",e[e.revealHorizontalRightPadding=98]="revealHorizontalRightPadding",e[e.roundedSelection=99]="roundedSelection",e[e.rulers=100]="rulers",e[e.scrollbar=101]="scrollbar",e[e.scrollBeyondLastColumn=102]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=103]="scrollBeyondLastLine",e[e.scrollPredominantAxis=104]="scrollPredominantAxis",e[e.selectionClipboard=105]="selectionClipboard",e[e.selectionHighlight=106]="selectionHighlight",e[e.selectOnLineNumbers=107]="selectOnLineNumbers",e[e.showFoldingControls=108]="showFoldingControls",e[e.showUnused=109]="showUnused",e[e.snippetSuggestions=110]="snippetSuggestions",e[e.smartSelect=111]="smartSelect",e[e.smoothScrolling=112]="smoothScrolling",e[e.stickyScroll=113]="stickyScroll",e[e.stickyTabStops=114]="stickyTabStops",e[e.stopRenderingLineAfter=115]="stopRenderingLineAfter",e[e.suggest=116]="suggest",e[e.suggestFontSize=117]="suggestFontSize",e[e.suggestLineHeight=118]="suggestLineHeight",e[e.suggestOnTriggerCharacters=119]="suggestOnTriggerCharacters",e[e.suggestSelection=120]="suggestSelection",e[e.tabCompletion=121]="tabCompletion",e[e.tabIndex=122]="tabIndex",e[e.unicodeHighlighting=123]="unicodeHighlighting",e[e.unusualLineTerminators=124]="unusualLineTerminators",e[e.useShadowDOM=125]="useShadowDOM",e[e.useTabStops=126]="useTabStops",e[e.wordBreak=127]="wordBreak",e[e.wordSeparators=128]="wordSeparators",e[e.wordWrap=129]="wordWrap",e[e.wordWrapBreakAfterCharacters=130]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=131]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=132]="wordWrapColumn",e[e.wordWrapOverride1=133]="wordWrapOverride1",e[e.wordWrapOverride2=134]="wordWrapOverride2",e[e.wrappingIndent=135]="wrappingIndent",e[e.wrappingStrategy=136]="wrappingStrategy",e[e.showDeprecated=137]="showDeprecated",e[e.inlayHints=138]="inlayHints",e[e.editorClassName=139]="editorClassName",e[e.pixelRatio=140]="pixelRatio",e[e.tabFocusMode=141]="tabFocusMode",e[e.layoutInfo=142]="layoutInfo",e[e.wrappingInfo=143]="wrappingInfo",e[e.defaultColorDecorators=144]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=145]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=146]="inlineCompletionsAccessibilityVerbose"}(p||(p={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(m||(m={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(f||(f={})),function(e){e[e.Left=1]="Left",e[e.Right=2]="Right"}(_||(_={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(v||(v={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(b||(b={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(C||(C={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(w||(w={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"}(y||(y={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(S||(S={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(L||(L={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(x||(x={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(k||(k={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(N||(N={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(D||(D={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"}(E||(E={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(I||(I={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(T||(T={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(M||(M={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(R||(R={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(A||(A={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(O||(O={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(P||(P={})),function(e){e[e.Deprecated=1]="Deprecated"}(F||(F={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(B||(B={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(W||(W={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(V||(V={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(H||(H={}))},20913:(e,t,i)=>{i.d(t,{B8:()=>l,UX:()=>r,aq:()=>a,iN:()=>h,ld:()=>s,qq:()=>o,ug:()=>n,xi:()=>d});var n,o,s,r,a,l,d,h,c=i(63580);!function(e){e.inspectTokensAction=c.NC("inspectTokens","Developer: Inspect Tokens")}(n||(n={})),function(e){e.gotoLineActionLabel=c.NC("gotoLineActionLabel","Go to Line/Column...")}(o||(o={})),function(e){e.helpQuickAccessActionLabel=c.NC("helpQuickAccess","Show all Quick Access Providers")}(s||(s={})),function(e){e.quickCommandActionLabel=c.NC("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=c.NC("quickCommandActionHelp","Show And Run Commands")}(r||(r={})),function(e){e.quickOutlineActionLabel=c.NC("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=c.NC("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(a||(a={})),function(e){e.editorViewAccessibleLabel=c.NC("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=c.NC("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(l||(l={})),function(e){e.toggleHighContrast=c.NC("toggleHighContrast","Toggle High Contrast Theme")}(d||(d={})),function(e){e.bulkEditServiceSummary=c.NC("bulkEditServiceSummary","Made {0} edits in {1} files")}(h||(h={}))},14706:(e,t,i)=>{i.d(t,{CZ:()=>l,D8:()=>h,Jx:()=>n,Tx:()=>a,dQ:()=>d,fV:()=>c,gk:()=>o,lN:()=>r,rU:()=>s});class n{constructor(){this.changeType=1}}class o{static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const o of t)i+=e.substring(n,o.column-1),n=o.column-1,i+=o.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new o(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new o(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=o}}class s{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class r{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class l{constructor(){this.changeType=5}}class d{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t<i;t++)if(this.changes[t].changeType===e)return!0;return!1}static merge(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.versionId,o=e.isUndoing||t.isUndoing,s=e.isRedoing||t.isRedoing;return new d(i,n,o,s)}}class h{constructor(e){this.changes=e}}class c{constructor(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}merge(e){const t=d.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),i=c._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new c(t,i)}static _mergeChangeEvents(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.eol,o=t.versionId,s=e.isUndoing||t.isUndoing,r=e.isRedoing||t.isRedoing,a=e.isFlush||t.isFlush;return{changes:i,eol:n,isEolChange:e.isEolChange&&t.isEolChange,versionId:o,isUndoing:s,isRedoing:r,isFlush:a}}}},65094:(e,t,i)=>{var n;i.d(t,{UO:()=>o,s6:()=>n,vW:()=>s}),function(e){e[e.Disabled=0]="Disabled",e[e.EnabledForActive=1]="EnabledForActive",e[e.Enabled=2]="Enabled"}(n||(n={}));class o{constructor(e,t,i,n,o,s){if(this.visibleColumn=e,this.column=t,this.className=i,this.horizontalLine=n,this.forWrappedLinesAfterColumn=o,this.forWrappedLinesBeforeOrAtColumn=s,-1!==e==(-1!==t))throw new Error}}class s{constructor(e,t){this.top=e,this.endColumn=t}}},77378:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(45797);class o{static createEmpty(e,t){const i=o.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new o(n,e,t)}constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}equals(e){return e instanceof o&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let t=n;t<o;t++)if(this._tokens[t]!==e._tokens[t])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=n.N.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n.N.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n.N.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n.N.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n.N.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return n.N.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return o.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new s(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t<i;t++)e[t<<1]=e[t+1<<1];e[i<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let i=0,n=(e.length>>>1)-1;for(;i<n;){const o=i+Math.floor((n-i)/2),s=e[o<<1];if(s===t)return o+1;s<t?i=o+1:s>t&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const s=new Array;let r=0;for(;;){const o=t<this._tokensCount?this._tokens[t<<1]:-1,a=i<e.length?e[i]:null;if(-1!==o&&(null===a||o<=a.offset)){n+=this._text.substring(r,o);const e=this._tokens[1+(t<<1)];s.push(n.length,e),t++,r=o}else{if(!a)break;if(a.offset>r){n+=this._text.substring(r,a.offset);const e=this._tokens[1+(t<<1)];s.push(n.length,e),r=a.offset}n+=a.text,s.push(n.length,a.tokenMetadata),i++}}return new o(new Uint32Array(s),n,this._languageIdCodec)}}o.defaultTokenMetadata=33587200;class s{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t<n&&!(e.getStartOffset(t)>=i);t++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof s&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},92550:(e,t,i)=>{i.d(t,{Kp:()=>o,k:()=>a});var n=i(97295);class o{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(!o._equals(e[n],t[n]))return!1;return!0}static extractWrapped(e,t,i){if(0===e.length)return e;const n=t+1,s=i+1,r=i-t,a=[];let l=0;for(const t of e)t.endColumn<=n||t.startColumn>=s||(a[l++]=new o(Math.max(1,t.startColumn-n+1),Math.min(r+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];const s=[];let r=0;for(let a=0,l=e.length;a<l;a++){const l=e[a],d=l.range;if(d.endLineNumber<t||d.startLineNumber>t)continue;if(d.isEmpty()&&(0===l.type||3===l.type))continue;const h=d.startLineNumber===t?d.startColumn:i,c=d.endLineNumber===t?d.endColumn:n;s[r++]=new o(h,c,l.inlineClassName,l.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=o._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className<t.className?-1:1:0}}class s{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class r{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i<n;i++)t|=e[i];return t}consumeLowerThan(e,t,i){for(;this.count>0&&this.stopOffsets[0]<e;){let e=0;for(;e+1<this.count&&this.stopOffsets[e]===this.stopOffsets[e+1];)e++;i.push(new s(t,this.stopOffsets[e],this.classNames.join(" "),r._metadata(this.metadata))),t=this.stopOffsets[e]+1,this.stopOffsets.splice(0,e+1),this.classNames.splice(0,e+1),this.metadata.splice(0,e+1),this.count-=e+1}return this.count>0&&t<e&&(i.push(new s(t,e-1,this.classNames.join(" "),r._metadata(this.metadata))),t=e),t}insert(e,t,i){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(i);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];const i=[],o=new r;let s=0;for(let r=0,a=t.length;r<a;r++){const a=t[r];let l=a.startColumn,d=a.endColumn;const h=a.className,c=1===a.type?2:2===a.type?4:0;if(l>1){const t=e.charCodeAt(l-2);n.ZG(t)&&l--}if(d>1){const t=e.charCodeAt(d-2);n.ZG(t)&&d--}const u=l-1,g=d-2;s=o.consumeLowerThan(u,s,i),0===o.count&&(s=u),o.insert(g,h,c)}return o.consumeLowerThan(1073741824,s,i),i}}},91557:(e,t,i)=>{i.d(t,{Nd:()=>h,zG:()=>l,IJ:()=>d,d1:()=>g,tF:()=>m});var n=i(63580),o=i(97295),s=i(50072),r=i(92550);class a{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class l{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class d{constructor(e,t,i,n,o,s,a,l,d,h,c,u,g,p,m,f,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=d.sort(r.Kp.compare),this.tabSize=h,this.startVisibleColumn=c,this.spaceWidth=u,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===f?4:"boundary"===f?1:"selection"===f?2:"trailing"===f?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort(((e,t)=>e.startOffset<t.startOffset?-1:1)),Math.abs(p-u)<Math.abs(g-u)?(this.renderSpaceWidth=p,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=g,this.renderSpaceCharCode=183)}sameSelection(e){if(null===this.selectionsOnLine)return null===e;if(null===e)return!1;if(e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&r.Kp.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)}}class h{constructor(e,t){this.partIndex=e,this.charIndex=t}}class c{static getPartIndex(e){return(4294901760&e)>>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const o=(t<<16|i<<0)>>>0;this._data[e-1]=o,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=c.getPartIndex(t),n=c.getCharIndex(t);return new h(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i<<0)>>>0;let o=0,s=this.length-1;for(;o+1<s;){const e=o+s>>>1,t=this._data[e];if(t===n)return e;t>n?s=e:o=e}if(o===s)return o;const r=this._data[o],a=this._data[s];if(r===n)return o;if(a===n)return s;const l=c.getPartIndex(r),d=c.getCharIndex(r);let h;return h=l!==c.getPartIndex(a)?t:c.getCharIndex(a),i-d<=h-i?o:s}}class u{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function g(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("<span>");let i=0,n=0,o=0;for(const s of e.lineDecorations)1!==s.type&&2!==s.type||(t.appendString('<span class="'),t.appendString(s.className),t.appendString('"></span>'),1===s.type&&(o|=1,i++),2===s.type&&(o|=2,n++));t.appendString("</span>");const s=new c(1,i+n);return s.setColumnInfo(1,i,0,0),new u(s,!1,o)}return t.appendString("<span><span></span></span>"),new u(new c(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,s=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,a=e.lineContent,l=e.len,d=e.isOverflowing,h=e.overflowingCharCount,g=e.parts,p=e.fauxIndentLength,m=e.tabSize,f=e.startVisibleColumn,v=e.containsRTL,b=e.spaceWidth,C=e.renderSpaceCharCode,w=e.renderWhitespace,y=e.renderControlCharacters,S=new c(l+1,g.length);let L=!1,x=0,k=f,N=0,D=0,E=0;v?t.appendString('<span dir="ltr">'):t.appendString("<span>");for(let e=0,n=g.length;e<n;e++){const n=g[e],d=n.endIndex,h=n.type,c=n.containsRTL,u=0!==w&&n.isWhitespace(),f=u&&!i&&("mtkw"===h||!r),v=x===d&&n.isPseudoAfter();if(N=0,t.appendString("<span "),c&&t.appendString('style="unicode-bidi:isolate" '),t.appendString('class="'),t.appendString(f?"mtkz":h),t.appendASCIICharCode(34),u){let i=0;{let e=x,t=k;for(;e<d;e++){const n=0|(9===a.charCodeAt(e)?m-t%m:1);i+=n,e>=p&&(t+=n)}}for(f&&(t.appendString(' style="width:'),t.appendString(String(b*i)),t.appendString('px"')),t.appendASCIICharCode(62);x<d;x++){let i,n;if(S.setColumnInfo(x+1,e-E,N,D),E=0,9===a.charCodeAt(x)){i=m-k%m|0,n=i,!s||n>1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=n;e++)t.appendCharCode(160)}else i=2,n=1,t.appendCharCode(C),t.appendCharCode(8204);N+=i,D+=n,x>=p&&(k+=n)}}else for(t.appendASCIICharCode(62);x<d;x++){S.setColumnInfo(x+1,e-E,N,D),E=0;const i=a.charCodeAt(x);let n=1,s=1;switch(i){case 9:n=m-k%m,s=n;for(let e=1;e<=n;e++)t.appendCharCode(160);break;case 32:t.appendCharCode(160);break;case 60:t.appendString("&lt;");break;case 62:t.appendString("&gt;");break;case 38:t.appendString("&amp;");break;case 0:y?t.appendCharCode(9216):t.appendString("&#00;");break;case 65279:case 8232:case 8233:case 133:t.appendCharCode(65533);break;default:o.K7(i)&&s++,y&&i<32?t.appendCharCode(9216+i):y&&127===i?t.appendCharCode(9249):y&&_(i)?(t.appendString("[U+"),t.appendString(i.toString(16).toUpperCase().padStart(4,"0")),t.appendString("]"),n=8,s=n):t.appendCharCode(i)}N+=n,D+=s,x>=p&&(k+=s)}v?E++:E=0,x>=l&&!L&&n.isPseudoAfter()&&(L=!0,S.setColumnInfo(x+1,e,N,D)),t.appendString("</span>")}return L||S.setColumnInfo(l+1,g.length-1,N,D),d&&(t.appendString('<span class="mtkoverflow">'),t.appendString(n.NC("showMore","Show more ({0})",function(e){return e<1024?n.NC("overflow.chars","{0} chars",e):e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}(h))),t.appendString("</span>")),t.appendString("</span>"),new u(S,v,r)}(function(e){const t=e.lineContent;let i,n,s;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<t.length?(i=!0,n=t.length-e.stopRenderingLineAfter,s=e.stopRenderingLineAfter):(i=!1,n=0,s=t.length);let l=function(e,t,i,n,s){const r=[];let l=0;n>0&&(r[l++]=new a(n,"",0,!1));let d=n;for(let h=0,c=i.getCount();h<c;h++){const c=i.getEndOffset(h);if(c<=n)continue;const u=i.getClassName(h);if(c>=s){const i=!!t&&o.Ut(e.substring(d,s));r[l++]=new a(s,u,0,i);break}const g=!!t&&o.Ut(e.substring(d,c));r[l++]=new a(c,u,0,g),d=c}return r}(t,e.containsRTL,e.lineTokens,e.fauxIndentLength,s);e.renderControlCharacters&&!e.isBasicASCII&&(l=function(e,t){const i=[];let n=new a(0,"",0,!1),o=0;for(const s of t){const t=s.endIndex;for(;o<t;o++)_(e.charCodeAt(o))&&(o>n.endIndex&&(n=new a(o,s.type,s.metadata,s.containsRTL),i.push(n)),n=new a(o+1,"mtkcontrol",s.metadata,!1),i.push(n));o>n.endIndex&&(n=new a(t,s.type,s.metadata,s.containsRTL),i.push(n))}return i}(t,l)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace&&!e.continuesWithWrappedLine)&&(l=function(e,t,i,n){const s=e.continuesWithWrappedLine,r=e.fauxIndentLength,l=e.tabSize,d=e.startVisibleColumn,h=e.useMonospaceOptimizations,c=e.selectionsOnLine,u=1===e.renderWhitespace,g=3===e.renderWhitespace,p=e.renderSpaceWidth!==e.spaceWidth,m=[];let f=0,_=0,v=n[_].type,b=n[_].containsRTL,C=n[_].endIndex;const w=n.length;let y,S=!1,L=o.LC(t);-1===L?(S=!0,L=i,y=i):y=o.ow(t);let x=!1,k=0,N=c&&c[k],D=d%l;for(let e=r;e<i;e++){const s=t.charCodeAt(e);let d;if(N&&e>=N.endOffset&&(k++,N=c&&c[k]),e<L||e>y)d=!0;else if(9===s)d=!0;else if(32===s)if(u)if(x)d=!0;else{const n=e+1<i?t.charCodeAt(e+1):0;d=32===n||9===n}else d=!0;else d=!1;if(d&&c&&(d=!!N&&N.startOffset<=e&&N.endOffset>e),d&&g&&(d=S||e>y),d&&b&&e>=L&&e<=y&&(d=!1),x){if(!d||!h&&D>=l){if(p)for(let t=(f>0?m[f-1].endIndex:r)+1;t<=e;t++)m[f++]=new a(t,"mtkw",1,!1);else m[f++]=new a(e,"mtkw",1,!1);D%=l}}else(e===C||d&&e>r)&&(m[f++]=new a(e,v,0,b),D%=l);for(9===s?D=l:o.K7(s)?D+=2:D++,x=d;e===C&&(_++,_<w);)v=n[_].type,b=n[_].containsRTL,C=n[_].endIndex}let E=!1;if(x)if(s&&u){const e=i>0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(E=!0)}else E=!0;if(E)if(p)for(let e=(f>0?m[f-1].endIndex:r)+1;e<=i;e++)m[f++]=new a(e,"mtkw",1,!1);else m[f++]=new a(i,"mtkw",1,!1);else m[f++]=new a(i,v,0,b);return m}(e,t,s,l));let d=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;t<i;t++){const i=e.lineDecorations[t];3===i.type||1===i.type?d|=1:2===i.type&&(d|=2)}l=function(e,t,i,n){n.sort(r.Kp.compare);const o=r.k.normalize(e,n),s=o.length;let l=0;const d=[];let h=0,c=0;for(let e=0,t=i.length;e<t;e++){const t=i[e],n=t.endIndex,r=t.type,u=t.metadata,g=t.containsRTL;for(;l<s&&o[l].startOffset<n;){const e=o[l];if(e.startOffset>c&&(c=e.startOffset,d[h++]=new a(c,r,u,g)),!(e.endOffset+1<=n)){c=n,d[h++]=new a(c,r+" "+e.className,u|e.metadata,g);break}c=e.endOffset+1,d[h++]=new a(c,r+" "+e.className,u|e.metadata,g),l++}n>c&&(c=n,d[h++]=new a(c,r,u,g))}const u=i[i.length-1].endIndex;if(l<s&&o[l].startOffset===u)for(;l<s&&o[l].startOffset===u;){const e=o[l];d[h++]=new a(c,e.className,e.metadata,!1),l++}return d}(t,0,l,e.lineDecorations)}return e.containsRTL||(l=function(e,t,i){let n=0;const o=[];let s=0;if(i)for(let i=0,r=t.length;i<r;i++){const r=t[i],l=r.endIndex;if(n+50<l){const t=r.type,i=r.metadata,d=r.containsRTL;let h=-1,c=n;for(let r=n;r<l;r++)32===e.charCodeAt(r)&&(h=r),-1!==h&&r-c>=50&&(o[s++]=new a(h+1,t,i,d),c=h+1,h=-1);c!==l&&(o[s++]=new a(l,t,i,d))}else o[s++]=r;n=l}else for(let e=0,i=t.length;e<i;e++){const i=t[e],r=i.endIndex,l=r-n;if(l>50){const e=i.type,t=i.metadata,d=i.containsRTL,h=Math.ceil(l/50);for(let i=1;i<h;i++){const r=n+50*i;o[s++]=new a(r,e,t,d)}o[s++]=new a(r,e,t,d)}else o[s++]=i;n=r}return o}(t,l,!e.isBasicASCII||e.fontLigatures)),new f(e.useMonospaceOptimizations,e.canUseHalfwidthRightwardsArrow,t,s,i,n,l,d,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,e.containsRTL,e.spaceWidth,e.renderSpaceCharCode,e.renderWhitespace,e.renderControlCharacters)}(e),t)}class p{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function m(e){const t=new s.HT(1e4),i=g(e,t);return new p(i.characterMapping,t.build(),i.containsRTL,i.containsForeignElements)}class f{constructor(e,t,i,n,o,s,r,a,l,d,h,c,u,g,p,m){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=o,this.overflowingCharCount=s,this.parts=r,this.containsForeignElements=a,this.fauxIndentLength=l,this.tabSize=d,this.startVisibleColumn=h,this.containsRTL=c,this.spaceWidth=u,this.renderSpaceCharCode=g,this.renderWhitespace=p,this.renderControlCharacters=m}}function _(e){return e<32?9!==e:127===e||e>=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}},1118:(e,t,i)=>{i.d(t,{$l:()=>c,$t:()=>d,IP:()=>a,SQ:()=>u,Wx:()=>h,l_:()=>s,ud:()=>r,wA:()=>l});var n=i(97295),o=i(24314);class s{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class r{constructor(e,t){this.tabSize=e,this.data=t}}class a{constructor(e,t,i,n,o,s,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=s,this.inlineDecorations=r}}class l{constructor(e,t,i,n,o,s,r,a,d,h){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=l.isBasicASCII(i,s),this.containsRTL=l.containsRTL(i,this.isBasicASCII,o),this.tokens=r,this.inlineDecorations=a,this.tabSize=d,this.startVisibleColumn=h}static isBasicASCII(e,t){return!t||n.$i(e)}static containsRTL(e,t,i){return!(t||!i)&&n.Ut(e)}}class d{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class h{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new d(new o.e(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class c{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class u{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static cmp(e,t){return e.zIndex===t.zIndex?e.color<t.color?-1:e.color>t.color?1:0:e.zIndex-t.zIndex}}},30665:(e,t,i)=>{i.d(t,{EY:()=>o,Tj:()=>s});class n{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class o{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.color<t.color?-1:1}setColorZone(e){this._colorZone=e}getColorZones(){return this._colorZone}}class s{constructor(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(e){this._zones=e,this._zones.sort(o.compare)}setLineHeight(e){return this._lineHeight!==e&&(this._lineHeight=e,this._colorZonesInvalid=!0,!0)}setPixelRatio(e){this._pixelRatio=e,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(e){return this._domWidth!==e&&(this._domWidth=e,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(e){return this._domHeight!==e&&(this._domHeight=e,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(e){return this._outerHeight!==e&&(this._outerHeight=e,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),i=Math.floor(this.getCanvasHeight()),o=i/Math.floor(this._outerHeight),s=Math.floor(4*this._pixelRatio/2),r=[];for(let a=0,l=this._zones.length;a<l;a++){const l=this._zones[a];if(!e){const e=l.getColorZones();if(e){r.push(e);continue}}const d=this._getVerticalOffsetForLine(l.startLineNumber),h=0===l.heightInLines?this._getVerticalOffsetForLine(l.endLineNumber)+t:d+l.heightInLines*t,c=Math.floor(o*d),u=Math.floor(o*h);let g=Math.floor((c+u)/2),p=u-g;p<s&&(p=s),g-p<0&&(g=p),g+p>i&&(g=i-p);const m=l.color;let f=this._color2Id[m];f||(f=++this._lastAssignedId,this._color2Id[m]=f,this._id2Color[f]=m);const _=new n(g-p,g+p,f);l.setColorZone(_),r.push(_)}return this._colorZonesInvalid=!1,r.sort(n.compare),r}}},30168:(e,t,i)=>{i.d(t,{$t:()=>d,CU:()=>a,Fd:()=>l,zg:()=>h});var n=i(50187),o=i(24314),s=i(1118),r=i(64141);class a{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const r=e.range,a=e.options;let l;if(a.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(r.startLineNumber,1),0,!1,!0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);l=new o.e(e.lineNumber,e.column,t.lineNumber,t.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(r,1);i=new s.$l(l,a),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,i=!1){const n=new o.e(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i).inlineDecorations[0]}_getDecorationsInRange(e,t,i){const n=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,r.$J)(this.configuration.options),t,i),a=e.startLineNumber,d=e.endLineNumber,h=[];let c=0;const u=[];for(let e=a;e<=d;e++)u[e-a]=[];for(let e=0,t=n.length;e<t;e++){const t=n[e],i=t.options;if(!l(this.model,t))continue;const r=this._getOrCreateViewModelDecoration(t),g=r.range;if(h[c++]=r,i.inlineClassName){const e=new s.$t(g,i.inlineClassName,i.inlineClassNameAffectsLetterSpacing?3:0),t=Math.max(a,g.startLineNumber),n=Math.min(d,g.endLineNumber);for(let i=t;i<=n;i++)u[i-a].push(e)}if(i.beforeContentClassName&&a<=g.startLineNumber&&g.startLineNumber<=d){const e=new s.$t(new o.e(g.startLineNumber,g.startColumn,g.startLineNumber,g.startColumn),i.beforeContentClassName,1);u[g.startLineNumber-a].push(e)}if(i.afterContentClassName&&a<=g.endLineNumber&&g.endLineNumber<=d){const e=new s.$t(new o.e(g.endLineNumber,g.endColumn,g.endLineNumber,g.endColumn),i.afterContentClassName,2);u[g.endLineNumber-a].push(e)}}return{decorations:h,inlineDecorations:u}}}function l(e,t){return!(t.options.hideInCommentTokens&&d(e,t)||t.options.hideInStringTokens&&h(e,t))}function d(e,t){return c(e,t.range,(e=>1===e))}function h(e,t){return c(e,t.range,(e=>2===e))}function c(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const o=e.tokenization.getLineTokens(n),s=n===t.startLineNumber,r=n===t.endLineNumber;let a=s?o.findTokenIndexAtOffset(t.startColumn-1):0;for(;a<o.getCount()&&!(r&&o.getStartOffset(a)>t.endColumn-1);){if(!i(o.getStandardTokenType(a)))return!1;a++}}return!0}},43017:(e,t,i)=>{var n=i(56346),o=i(59365),s=i(22258),r=i(93379),a=i.n(r),l=i(7795),d=i.n(l),h=i(90569),c=i.n(h),u=i(3565),g=i.n(u),p=i(19216),m=i.n(p),f=i(44589),_=i.n(f),v=i(34055),b={};b.styleTagTransform=_(),b.setAttributes=g(),b.insert=c().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m(),a()(v.Z,b),v.Z&&v.Z.locals&&v.Z.locals;var C,w=i(16830),y=i(3860),S=i(29102),L=i(63580),x=i(93983),k=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const N=new x.uy("selectionAnchorSet",!1);let D=C=class{static get(e){return e.getContribution(C.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=N.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations((t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(y.Y.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:(new o.W5).appendText((0,L.NC)("selectionAnchor","Selection Anchor")),className:"selection-anchor"})})),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,n.Z9)((0,L.NC)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(y.Y.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations((t=>{t.removeDecoration(e),this.decorationId=void 0})),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};var E,I;D.ID="editor.contrib.selectionAnchorController",D=C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(E=1,I=x.i6,function(e,t){I(e,t,E)})],D);class T extends w.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,L.NC)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:S.u.editorTextFocus,primary:(0,s.gx)(2089,2080),weight:100}})}run(e,t){var i;return k(this,void 0,void 0,(function*(){null===(i=D.get(t))||void 0===i||i.setSelectionAnchor()}))}}class M extends w.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,L.NC)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:N})}run(e,t){var i;return k(this,void 0,void 0,(function*(){null===(i=D.get(t))||void 0===i||i.goToSelectionAnchor()}))}}class R extends w.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,L.NC)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:N,kbOpts:{kbExpr:S.u.editorTextFocus,primary:(0,s.gx)(2089,2089),weight:100}})}run(e,t){var i;return k(this,void 0,void 0,(function*(){null===(i=D.get(t))||void 0===i||i.selectFromAnchorToCursor()}))}}class A extends w.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,L.NC)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:N,kbOpts:{kbExpr:S.u.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return k(this,void 0,void 0,(function*(){null===(i=D.get(t))||void 0===i||i.cancelSelectionAnchor()}))}}(0,w._K)(D.ID,D,4),(0,w.Qr)(T),(0,w.Qr)(M),(0,w.Qr)(R),(0,w.Qr)(A)},4215:(e,t,i)=>{var n=i(15393),o=i(5976),s=i(93379),r=i.n(s),a=i(7795),l=i.n(a),d=i(90569),h=i.n(d),c=i(3565),u=i.n(c),g=i(19216),p=i.n(g),m=i(44589),f=i.n(m),_=i(12205),v={};v.styleTagTransform=f(),v.setAttributes=u(),v.insert=h().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p(),r()(_.Z,v),_.Z&&_.Z.locals&&_.Z.locals;var b=i(16830),C=i(50187),w=i(24314),y=i(3860),S=i(29102),L=i(84973),x=i(13961),k=i(63580),N=i(84144),D=i(73910),E=i(97781);const I=(0,D.P6G)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},k.NC("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class T extends b.R6{constructor(){super({id:"editor.action.jumpToBracket",label:k.NC("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:S.u.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;null===(i=O.get(t))||void 0===i||i.jumpToBracket()}}class M extends b.R6{constructor(){super({id:"editor.action.selectToBracket",label:k.NC("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let o=!0;i&&!1===i.selectBrackets&&(o=!1),null===(n=O.get(t))||void 0===n||n.selectToBracket(o)}}class R extends b.R6{constructor(){super({id:"editor.action.removeBrackets",label:k.NC("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:S.u.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;null===(i=O.get(t))||void 0===i||i.removeBrackets(this.id)}}class A{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class O extends o.JT{static get(e){return e.getContribution(O.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new n.pY((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(70),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(70)&&(this._matchBrackets=this._editor.getOption(70),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;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let o=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)o=t[1].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new y.Y(o.lineNumber,o.column,o.lineNumber,o.column):new y.Y(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const o=n.getStartPosition();let s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){const e=t.bracketPairs.findNextBracket(o);e&&e.range&&(s=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let r=null,a=null;if(s){s.sort(w.e.compareRangesUsingStarts);const[t,i]=s;if(r=e?t.getStartPosition():t.getEndPosition(),a=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(o)){const e=r;r=a,a=e}}r&&a&&i.push(new y.Y(r.lineNumber,r.column,a.lineNumber,a.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach((i=>{const n=i.getPosition();let o=t.bracketPairs.matchBracket(n);o||(o=t.bracketPairs.findEnclosingBrackets(n)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())}))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const o=[];let s=0;for(let t=0,i=e.length;t<i;t++){const i=e[t];i.isEmpty()&&(o[s++]=i.getStartPosition())}o.length>1&&o.sort(C.L.compare);const r=[];let a=0,l=0;const d=n.length;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(;l<d&&n[l].position.isBefore(i);)l++;if(l<d&&n[l].position.equals(i))r[a++]=n[l];else{let e=t.bracketPairs.matchBracket(i,20),n=O._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;e||"always"!==this._matchBrackets||(e=t.bracketPairs.findEnclosingBrackets(i,20),n=O._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),r[a++]=new A(i,e,n)}}this._lastBracketsData=r,this._lastVersionId=i}}O.ID="editor.contrib.bracketMatchingController",O._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=x.qx.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,E.EN)(I),position:L.sh.Center}}),O._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=x.qx.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),(0,b._K)(O.ID,O,1),(0,b.Qr)(M),(0,b.Qr)(T),(0,b.Qr)(R),N.BH.appendMenuItem(N.eH.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:k.NC({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})},54367:(e,t,i)=>{var n=i(16830),o=i(29102),s=i(24314),r=i(3860);class a{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new s.e(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(i,o,i,o),a)}else{const r=new s.e(i,o,i,o+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new r.Y(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new r.Y(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}var l=i(63580);class d extends n.R6{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const e of n)i.push(new a(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}(0,n.Qr)(class extends d{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:l.NC("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:o.u.writable})}}),(0,n.Qr)(class extends d{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:l.NC("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:o.u.writable})}})},72102:(e,t,i)=>{var n=i(16830),o=i(61329),s=i(10839),r=i(24314),a=i(29102),l=i(63580);class d extends n.R6{constructor(){super({id:"editor.action.transposeLetters",label:l.NC("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.u.writable,kbOpts:{kbExpr:a.u.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],a=t.getSelections();for(const e of a){if(!e.isEmpty())continue;const t=e.startLineNumber,a=e.startColumn,l=i.getLineMaxColumn(t);if(1===t&&(1===a||2===a&&2===l))continue;const d=a===l?e.getPosition():s.o.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),h=s.o.leftPosition(i,d),c=s.o.leftPosition(i,h),u=i.getValueInRange(r.e.fromPositions(c,h)),g=i.getValueInRange(r.e.fromPositions(h,d)),p=r.e.fromPositions(c,d);n.push(new o.T4(p,g+u))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,n.Qr)(d)},55833:(e,t,i)=>{var n=i(16268),o=i(1432),s=i(35715),r=i(16830),a=i(17122),l=i(29102),d=i(63580),h=i(84144),c=i(84972),u=i(93983);const g="9_cutcopypaste",p=o.tY||document.queryCommandSupported("cut"),m=o.tY||document.queryCommandSupported("copy"),f=void 0!==navigator.clipboard&&!n.vU||document.queryCommandSupported("paste");function _(e){return e.register(),e}const v=p?_(new r.AJ({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:o.tY?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"2_ccp",title:d.NC({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:h.eH.EditorContext,group:g,title:d.NC("actions.clipboard.cutLabel","Cut"),when:l.u.writable,order:1},{menuId:h.eH.CommandPalette,group:"",title:d.NC("actions.clipboard.cutLabel","Cut"),order:1},{menuId:h.eH.SimpleEditorContext,group:g,title:d.NC("actions.clipboard.cutLabel","Cut"),when:l.u.writable,order:1}]})):void 0,b=m?_(new r.AJ({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:o.tY?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"2_ccp",title:d.NC({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:h.eH.EditorContext,group:g,title:d.NC("actions.clipboard.copyLabel","Copy"),order:2},{menuId:h.eH.CommandPalette,group:"",title:d.NC("actions.clipboard.copyLabel","Copy"),order:1},{menuId:h.eH.SimpleEditorContext,group:g,title:d.NC("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;h.BH.appendMenuItem(h.eH.MenubarEditMenu,{submenu:h.eH.MenubarCopy,title:{value:d.NC("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),h.BH.appendMenuItem(h.eH.EditorContext,{submenu:h.eH.EditorContextCopy,title:{value:d.NC("copy as","Copy As"),original:"Copy As"},group:g,order:3}),h.BH.appendMenuItem(h.eH.EditorContext,{submenu:h.eH.EditorContextShare,title:{value:d.NC("share","Share"),original:"Share"},group:"11_share",order:-1,when:u.Ao.and(u.Ao.notEquals("resourceScheme","output"),l.u.editorTextFocus)}),h.BH.appendMenuItem(h.eH.EditorTitleContext,{submenu:h.eH.EditorTitleContextShare,title:{value:d.NC("share","Share"),original:"Share"},group:"11_share",order:-1}),h.BH.appendMenuItem(h.eH.ExplorerContext,{submenu:h.eH.ExplorerContextShare,title:{value:d.NC("share","Share"),original:"Share"},group:"11_share",order:-1});const C=f?_(new r.AJ({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:o.tY?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"2_ccp",title:d.NC({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:h.eH.EditorContext,group:g,title:d.NC("actions.clipboard.pasteLabel","Paste"),when:l.u.writable,order:4},{menuId:h.eH.CommandPalette,group:"",title:d.NC("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:h.eH.SimpleEditorContext,group:g,title:d.NC("actions.clipboard.pasteLabel","Paste"),when:l.u.writable,order:4}]})):void 0;class w extends r.R6{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:d.NC("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:l.u.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(36)&&t.getSelection().isEmpty()||(s.RA.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),s.RA.forceCopyWithSyntaxHighlighting=!1))}}function y(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(a.$).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(36),i=n.getSelection();return i&&i.isEmpty()&&!e||document.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(document.execCommand(t),!0))))}y(v,"cut"),y(b,"copy"),C&&(C.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(a.$),n=e.get(c.p),r=i.getFocusedCodeEditor();return!(!r||!r.hasTextFocus())&&(!(!document.execCommand("paste")&&o.$L)||(l=void 0,d=void 0,u=function*(){const e=yield n.readText();if(""!==e){const t=s.Nl.INSTANCE.get(e);let i=!1,n=null,o=null;t&&(i=r.getOption(36)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),r.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:o})}},new((h=void 0)||(h=Promise))((function(e,t){function i(e){try{o(u.next(e))}catch(e){t(e)}}function n(e){try{o(u.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof h?o:new h((function(e){e(o)}))).then(i,n)}o((u=u.apply(l,d||[])).next())}))));var l,d,h,u})),C.addImplementation(0,"generic-dom",((e,t)=>(document.execCommand("paste"),!0)))),m&&(0,r.Qr)(w)},75396:(e,t,i)=>{i.d(t,{Bb:()=>L,LR:()=>R,MN:()=>x,RB:()=>w,TM:()=>N,UX:()=>M,aI:()=>I,cz:()=>y,pZ:()=>S,uH:()=>k});var n=i(9488),o=i(71050),s=i(17301),r=i(5976),a=i(70666),l=i(66007),d=i(24314),h=i(3860),c=i(71922),u=i(73733),g=i(16467),p=i(63580),m=i(94565),f=i(59422),_=i(90535),v=i(10829),b=i(87997),C=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const w="editor.action.codeAction",y="editor.action.quickFix",S="editor.action.autoFix",L="editor.action.refactor",x="editor.action.sourceAction",k="editor.action.organizeImports",N="editor.action.fixAll";class D extends r.JT{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return(0,n.Of)(e.diagnostics)?(0,n.Of)(t.diagnostics)?D.codeActionsPreferredComparator(e,t):-1:(0,n.Of)(t.diagnostics)?1:D.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(D.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&b.yN.QuickFix.contains(new b.yN(e.kind))&&!!e.isPreferred))}}const E={actions:[],documentation:void 0};function I(e,t,i,o,a,l){var d;return C(this,void 0,void 0,(function*(){const h=o.filter||{},c={only:null===(d=h.include)||void 0===d?void 0:d.value,trigger:o.type},u=new g.YQ(t,l),p=function(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>(0,b.EU)(i,new b.yN(e))))))}(e,t,h),m=new r.SL,f=p.map((e=>C(this,void 0,void 0,(function*(){try{a.report(e);const n=yield e.provideCodeActions(t,i,c,u.token);if(n&&m.add(n),u.token.isCancellationRequested)return E;const o=((null==n?void 0:n.actions)||[]).filter((e=>e&&(0,b.Yl)(h,e))),s=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new b.yN(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new b.yN(e.kind)))return t.command}(e,o,h.include);return{actions:o.map((t=>new b.bA(t,e))),documentation:s}}catch(e){if((0,s.n2)(e))throw e;return(0,s.Cp)(e),E}})))),_=e.onDidChange((()=>{const i=e.all(t);(0,n.fS)(i,p)||u.cancel()}));try{const i=yield Promise.all(f),s=i.map((e=>e.actions)).flat(),r=[...(0,n.kX)(i.map((e=>e.documentation))),...T(e,t,o,s)];return new D(s,r,m)}finally{_.dispose(),u.dispose()}}))}function*T(e,t,i,n){var o,s,r;if(t&&n.length)for(const a of e.all(t))a._getAdditionalMenuItems&&(yield*null===(o=a._getAdditionalMenuItems)||void 0===o?void 0:o.call(a,{trigger:i.type,only:null===(r=null===(s=i.filter)||void 0===s?void 0:s.include)||void 0===r?void 0:r.value},n.map((e=>e.action))))}var M;function R(e,t,i,n,s=o.T.None){var r;return C(this,void 0,void 0,(function*(){const o=e.get(l.vu),a=e.get(m.H),d=e.get(v.b),h=e.get(f.lT);if(d.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred,reason:i}),yield t.resolve(s),!s.isCancellationRequested){if((null===(r=t.action.edit)||void 0===r?void 0:r.edits.length)&&!(yield o.apply(t.action.edit,{editor:null==n?void 0:n.editor,label:t.action.title,quotableLabel:t.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==M.OnSave,showPreview:null==n?void 0:n.preview})).isApplied)return;if(t.action.command)try{yield a.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);h.error("string"==typeof t?t:p.NC("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}}))}!function(e){e.OnSave="onSave",e.FromProblemsView="fromProblemsView",e.FromCodeActions="fromCodeActions"}(M||(M={})),m.P.registerCommand("_executeCodeActionProvider",(function(e,t,i,n,r){return C(this,void 0,void 0,(function*(){if(!(t instanceof a.o))throw(0,s.b1)();const{codeActionProvider:l}=e.get(c.p),g=e.get(u.q).getModel(t);if(!g)throw(0,s.b1)();const p=h.Y.isISelection(i)?h.Y.liftSelection(i):d.e.isIRange(i)?g.validateRange(i):void 0;if(!p)throw(0,s.b1)();const m="string"==typeof n?new b.yN(n):void 0,f=yield I(l,g,p,{type:1,triggerAction:b.aQ.Default,filter:{includeSourceActions:!0,include:m}},_.Ex.None,o.T.None),v=[],C=Math.min(f.validActions.length,"number"==typeof r?r:0);for(let e=0;e<C;e++)v.push(f.validActions[e].resolve(o.T.None));try{return yield Promise.all(v),f.validActions.map((e=>e.action))}finally{setTimeout((()=>f.dispose()),100)}}))}))},51925:(e,t,i)=>{var n=i(16830),o=i(800),s=i(97295),r=i(29102),a=i(75396),l=i(63580),d=i(93983),h=i(87997),c=i(48499),u=i(17016);function g(e){return d.Ao.regex(u.fj.keys()[0],new RegExp("(\\s|^)"+(0,s.ec)(e.value)+"\\b"))}const p={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:l.NC("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:l.NC("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[l.NC("args.schema.apply.first","Always apply the first returned code action."),l.NC("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),l.NC("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:l.NC("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function m(e,t,i,n,o=h.aQ.Default){if(e.hasModel()){const s=c.G.get(e);null==s||s.manualTriggerAtCurrentPosition(t,o,i,n)}}class f extends n.R6{constructor(){super({id:a.cz,label:l.NC("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:d.Ao.and(r.u.writable,r.u.hasCodeActionsProvider),kbOpts:{kbExpr:r.u.textInputFocus,primary:2137,weight:100}})}run(e,t){return m(t,l.NC("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,h.aQ.QuickFix)}}class _ extends n._l{constructor(){super({id:a.RB,precondition:d.Ao.and(r.u.writable,r.u.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:p}]}})}runEditorCommand(e,t,i){const n=h.wZ.fromUser(i,{kind:h.yN.Empty,apply:"ifSingle"});return m(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?l.NC("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):l.NC("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?l.NC("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):l.NC("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class v extends n.R6{constructor(){super({id:a.Bb,label:l.NC("refactor.label","Refactor..."),alias:"Refactor...",precondition:d.Ao.and(r.u.writable,r.u.hasCodeActionsProvider),kbOpts:{kbExpr:r.u.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:d.Ao.and(r.u.writable,g(h.yN.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:p}]}})}run(e,t,i){const n=h.wZ.fromUser(i,{kind:h.yN.Refactor,apply:"never"});return m(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?l.NC("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):l.NC("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?l.NC("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):l.NC("editor.action.refactor.noneMessage","No refactorings available"),{include:h.yN.Refactor.contains(n.kind)?n.kind:h.yN.None,onlyIncludePreferredActions:n.preferred},n.apply,h.aQ.Refactor)}}class b extends n.R6{constructor(){super({id:a.MN,label:l.NC("source.label","Source Action..."),alias:"Source Action...",precondition:d.Ao.and(r.u.writable,r.u.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:d.Ao.and(r.u.writable,g(h.yN.Source))},description:{description:"Source Action...",args:[{name:"args",schema:p}]}})}run(e,t,i){const n=h.wZ.fromUser(i,{kind:h.yN.Source,apply:"never"});return m(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?l.NC("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):l.NC("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?l.NC("editor.action.source.noneMessage.preferred","No preferred source actions available"):l.NC("editor.action.source.noneMessage","No source actions available"),{include:h.yN.Source.contains(n.kind)?n.kind:h.yN.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,h.aQ.SourceAction)}}class C extends n.R6{constructor(){super({id:a.uH,label:l.NC("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:d.Ao.and(r.u.writable,g(h.yN.SourceOrganizeImports)),kbOpts:{kbExpr:r.u.textInputFocus,primary:1581,weight:100}})}run(e,t){return m(t,l.NC("editor.action.organize.noneMessage","No organize imports action available"),{include:h.yN.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",h.aQ.OrganizeImports)}}class w extends n.R6{constructor(){super({id:a.TM,label:l.NC("fixAll.label","Fix All"),alias:"Fix All",precondition:d.Ao.and(r.u.writable,g(h.yN.SourceFixAll))})}run(e,t){return m(t,l.NC("fixAll.noneMessage","No fix all action available"),{include:h.yN.SourceFixAll,includeSourceActions:!0},"ifSingle",h.aQ.FixAll)}}class y extends n.R6{constructor(){super({id:a.pZ,label:l.NC("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:d.Ao.and(r.u.writable,g(h.yN.QuickFix)),kbOpts:{kbExpr:r.u.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return m(t,l.NC("editor.action.autoFix.noneMessage","No auto fixes available"),{include:h.yN.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",h.aQ.AutoFix)}}var S=i(58507),L=i(23193),x=i(89872);(0,n._K)(c.G.ID,c.G,3),(0,n._K)(S.f.ID,S.f,4),(0,n.Qr)(f),(0,n.Qr)(v),(0,n.Qr)(b),(0,n.Qr)(C),(0,n.Qr)(y),(0,n.Qr)(w),(0,n.fK)(new _),x.B.as(L.IP.Configuration).registerConfiguration(Object.assign(Object.assign({},o.wk),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:l.NC("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}))},48499:(e,t,i)=>{i.d(t,{G:()=>ve});var n,o=i(65321),s=i(17301),r=i(79579),a=i(5976),l=i(50187),d=i(71922),h=i(75396),c=i(87997),u=i(91847);let g=n=class{constructor(e){this.keybindingService=e}getResolver(){const e=new r.o((()=>this.keybindingService.getKeybindings().filter((e=>n.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===h.uH?t={kind:c.yN.SourceOrganizeImports.value}:e.command===h.TM&&(t={kind:c.yN.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},c.wZ.fromUser(t,{kind:c.yN.None,apply:"never"}))}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new c.yN(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}};var p,m;g.codeActionCommands=[h.Bb,h.RB,h.MN,h.uH,h.TM],g=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(p=0,m=u.d,function(e,t){m(e,t,p)})],g),i(89899);var f=i(73046),_=(i(22368),i(63580));const v=Object.freeze({kind:c.yN.Empty,title:(0,_.NC)("codeAction.widget.id.more","More Actions...")}),b=Object.freeze([{kind:c.yN.QuickFix,title:(0,_.NC)("codeAction.widget.id.quickfix","Quick Fix")},{kind:c.yN.RefactorExtract,title:(0,_.NC)("codeAction.widget.id.extract","Extract"),icon:f.l.wrench},{kind:c.yN.RefactorInline,title:(0,_.NC)("codeAction.widget.id.inline","Inline"),icon:f.l.wrench},{kind:c.yN.RefactorRewrite,title:(0,_.NC)("codeAction.widget.id.convert","Rewrite"),icon:f.l.wrench},{kind:c.yN.RefactorMove,title:(0,_.NC)("codeAction.widget.id.move","Move"),icon:f.l.wrench},{kind:c.yN.SurroundWith,title:(0,_.NC)("codeAction.widget.id.surround","Surround With"),icon:f.l.symbolSnippet},{kind:c.yN.Source,title:(0,_.NC)("codeAction.widget.id.source","Source Action"),icon:f.l.symbolFile},v]);var C=i(58507),w=i(39310),y=i(90317),S=i(93379),L=i.n(S),x=i(7795),k=i.n(x),N=i(90569),D=i.n(N),E=i(3565),I=i.n(E),T=i(19216),M=i.n(T),R=i(44589),A=i.n(R),O=i(90711),P={};P.styleTagTransform=A(),P.setAttributes=I(),P.insert=D().bind(null,"head"),P.domAPI=k(),P.insertStyleElement=M(),L()(O.Z,P),O.Z&&O.Z.locals&&O.Z.locals;var F=i(12983),B=i(43799),W=i(1432),V=i(25670),H=i(5606),z=i(86253),K=i(73910),U=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},j=function(e,t){return function(i,n){t(i,n,e)}};const $="acceptSelectedCodeAction",q="previewSelectedCodeAction";class Z{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){var n,o;i.text.textContent=null!==(o=null===(n=e.group)||void 0===n?void 0:n.title)&&void 0!==o?o:""}disposeTemplate(e){}}let G=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");return i.className="title",e.append(i),{container:e,icon:t,text:i,keybinding:new F.e(e,W.OS)}}renderElement(e,t,i){var n,s,r;if((null===(n=e.group)||void 0===n?void 0:n.icon)?(i.icon.className=V.k.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=(0,K.n_1)(e.group.icon.color.id))):(i.icon.className=V.k.asClassName(f.l.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=ee(e.label),i.keybinding.set(e.keybinding),o.iJ(!!e.keybinding,i.keybinding.element);const a=null===(s=this._keybindingService.lookupKeybinding($))||void 0===s?void 0:s.getLabel(),l=null===(r=this._keybindingService.lookupKeybinding(q))||void 0===r?void 0:r.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:a&&l?this._supportsPreview?i.container.title=(0,_.NC)({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):i.container.title=(0,_.NC)({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):i.container.title=""}disposeTemplate(e){}};G=U([j(1,u.d)],G);class Q extends UIEvent{constructor(){super("acceptSelectedAction")}}class Y extends UIEvent{constructor(){super("previewSelectedAction")}}function J(e){if("action"===e.kind)return e.label}let X=class extends a.JT{constructor(e,t,i,n,o,s){super(),this._delegate=n,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const r={getHeight:e=>"header"===e.kind?this._headerLineHeight:this._actionLineHeight,getTemplateId:e=>e.kind};this._list=this._register(new B.aV(e,this.domNode,r,[new G(t,this._keybindingService),new Z],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:J},accessibilityProvider:{getAriaLabel:e=>{if("action"===e.kind){let t=e.label?ee(null==e?void 0:e.label):"";return e.disabled&&(t=(0,_.NC)({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",t,e.disabled)),t}return null},getWidgetAriaLabel:()=>(0,_.NC)({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:e=>"action"===e.kind?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(z.O2),this._register(this._list.onMouseClick((e=>this.onListClick(e)))),this._register(this._list.onMouseOver((e=>this.onListHover(e)))),this._register(this._list.onDidChangeFocus((()=>this._list.domFocus()))),this._register(this._list.onDidChangeSelection((e=>this.onListSelection(e)))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&"action"===e.kind}hide(e){this._delegate.onHide(e),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter((e=>"header"===e.kind)).length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);const n=this._allMenuItems.map(((e,t)=>{const i=document.getElementById(this._list.getElementID(t));if(i){i.style.width="auto";const e=i.getBoundingClientRect().width;return i.style.width="",e}return 0})),o=Math.max(...n,e),s=Math.min(i,.7*document.body.clientHeight);return this._list.layout(s,o),this.domNode.style.height=`${s}px`,this._list.domFocus(),o}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(0===t.length)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const o=e?new Y:new Q;this._list.setSelection([i],o)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Y):this._list.setSelection([])}onListHover(e){this._list.setFocus("number"==typeof e.index?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};function ee(e){return e.replace(/\r\n|\r|\n/g," ")}X=U([j(4,H.u),j(5,u.d)],X);var te=i(84144),ie=i(93983),ne=i(65026),oe=i(72065),se=function(e,t){return function(i,n){t(i,n,e)}};(0,K.P6G)("actionBar.toggledBackground",{dark:K.XEs,light:K.XEs,hcDark:K.XEs,hcLight:K.XEs},(0,_.NC)("actionBar.toggledBackground","Background color for toggled action items in action bar."));const re={Visible:new ie.uy("codeActionMenuVisible",!1,(0,_.NC)("codeActionMenuVisible","Whether the action widget list is visible"))},ae=(0,oe.yh)("actionWidgetService");let le=class extends a.JT{get isVisible(){return re.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new a.XK)}show(e,t,i,n,o,s,r){const a=re.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(X,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>o,render:e=>(a.set(!0),this._renderWidget(e,l,null!=r?r:[])),onHide:e=>{a.reset(),this._onWidgetClosed(e)}},s,!1)}acceptSelected(e){var t;null===(t=this._list.value)||void 0===t||t.acceptSelected(e)}focusPrevious(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusPrevious()}focusNext(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusNext()}hide(){var e;null===(e=this._list.value)||void 0===e||e.hide(),this._list.clear()}_renderWidget(e,t,i){var n;const s=document.createElement("div");if(s.classList.add("action-widget"),e.appendChild(s),this._list.value=t,!this._list.value)throw new Error("List has no value");s.appendChild(this._list.value.domNode);const r=new a.SL,l=document.createElement("div"),d=e.appendChild(l);d.classList.add("context-view-block"),r.add(o.nm(d,o.tw.MOUSE_DOWN,(e=>e.stopPropagation())));const h=document.createElement("div"),c=e.appendChild(h);c.classList.add("context-view-pointerBlock"),r.add(o.nm(c,o.tw.POINTER_MOVE,(()=>c.remove()))),r.add(o.nm(c,o.tw.MOUSE_DOWN,(()=>c.remove())));let u=0;if(i.length){const e=this._createActionBar(".action-widget-action-bar",i);e&&(s.appendChild(e.getContainer().parentElement),r.add(e),u=e.getContainer().offsetWidth)}const g=null===(n=this._list.value)||void 0===n?void 0:n.layout(u);s.style.width=`${g}px`;const p=r.add(o.go(e));return r.add(p.onDidBlur((()=>this.hide()))),r}_createActionBar(e,t){if(!t.length)return;const i=o.$(e),n=new y.o(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;null===(t=this._list.value)||void 0===t||t.hide(e)}};le=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([se(0,H.u),se(1,ie.i6),se(2,oe.TG)],le),(0,ne.z)(ae,le,1);const de=1100;(0,te.r1)(class extends te.Ke{constructor(){super({id:"hideCodeActionWidget",title:{value:(0,_.NC)("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:re.Visible,keybinding:{weight:de,primary:9,secondary:[1033]}})}run(e){e.get(ae).hide()}}),(0,te.r1)(class extends te.Ke{constructor(){super({id:"selectPrevCodeAction",title:{value:(0,_.NC)("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:re.Visible,keybinding:{weight:de,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(e){const t=e.get(ae);t instanceof le&&t.focusPrevious()}}),(0,te.r1)(class extends te.Ke{constructor(){super({id:"selectNextCodeAction",title:{value:(0,_.NC)("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:re.Visible,keybinding:{weight:de,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(e){const t=e.get(ae);t instanceof le&&t.focusNext()}}),(0,te.r1)(class extends te.Ke{constructor(){super({id:$,title:{value:(0,_.NC)("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:re.Visible,keybinding:{weight:de,primary:3,secondary:[2137]}})}run(e){const t=e.get(ae);t instanceof le&&t.acceptSelected()}}),(0,te.r1)(class extends te.Ke{constructor(){super({id:q,title:{value:(0,_.NC)("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:re.Visible,keybinding:{weight:de,primary:2051}})}run(e){const t=e.get(ae);t instanceof le&&t.acceptSelected(!0)}});var he,ce=i(94565),ue=i(33108),ge=i(98674),pe=i(90535),me=i(17016),fe=function(e,t){return function(i,n){t(i,n,e)}},_e=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let ve=he=class extends a.JT{static get(e){return e.getContribution(he.ID)}constructor(e,t,i,n,o,s,l,d,h,c){super(),this._commandService=l,this._configurationService=d,this._actionWidgetService=h,this._instantiationService=c,this._activeCodeActions=this._register(new a.XK),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new me.Jt(this._editor,o.codeActionProvider,t,i,s)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._lightBulbWidget=new r.o((()=>{const e=this._editor.getContribution(C.f.ID);return e&&this._register(e.onClick((e=>this.showCodeActionList(e.actions,e,{includeDisabledActions:!1,fromLightbulb:!0})))),e})),this._resolver=n.createInstance(g),this._register(this._editor.onDidLayoutChange((()=>this._actionWidgetService.hide())))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n){var o;if(!this._editor.hasModel())return;null===(o=w.O.get(this._editor))||void 0===o||o.closeMessage();const s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,i){return _e(this,void 0,void 0,(function*(){try{yield this._instantiationService.invokeFunction(h.LR,e,h.UX.FromCodeActions,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:c.aQ.QuickFix,filter:{}})}}))}update(e){var t,i,n,o,r,a,l;return _e(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let d;try{d=yield e.actions}catch(e){return void(0,s.dL)(e)}if(!this._disposed)if(null===(i=this._lightBulbWidget.value)||void 0===i||i.update(d,e.trigger,e.position),1===e.trigger.type){if(null===(n=e.trigger.filter)||void 0===n?void 0:n.include){const t=this.tryGetValidActionToApply(e.trigger,d);if(t){try{null===(o=this._lightBulbWidget.value)||void 0===o||o.hide(),yield this._applyCodeAction(t,!1,!1)}finally{d.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,d);if(t&&t.action.disabled)return null===(r=w.O.get(this._editor))||void 0===r||r.showMessage(t.action.disabled,e.trigger.context.position),void d.dispose()}}const t=!!(null===(a=e.trigger.filter)||void 0===a?void 0:a.include);if(e.trigger.context&&(!d.allActions.length||!t&&!d.validActions.length))return null===(l=w.O.get(this._editor))||void 0===l||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=d,void d.dispose();this._activeCodeActions.value=d,this.showCodeActionList(d,this.toCoords(e.position),{includeDisabledActions:t,fromLightbulb:!1})}else this._actionWidgetService.isVisible?d.dispose():this._activeCodeActions.value=d}))}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}showCodeActionList(e,t,i){return _e(this,void 0,void 0,(function*(){const n=this._editor.getDomNode();if(!n)return;const o=i.includeDisabledActions&&(this._showDisabled||0===e.validActions.length)?e.allActions:e.validActions;if(!o.length)return;const s=l.L.isIPosition(t)?this.toCoords(t):t,r={onSelect:(e,t)=>_e(this,void 0,void 0,(function*(){this._applyCodeAction(e,!0,!!t),this._actionWidgetService.hide()})),onHide:()=>{var e;null===(e=this._editor)||void 0===e||e.focus()}};this._actionWidgetService.show("codeActionWidget",!0,function(e,t,i){if(!t)return e.map((e=>({kind:"action",item:e,group:v,disabled:!!e.action.disabled,label:e.action.disabled||e.action.title})));const n=b.map((e=>({group:e,actions:[]})));for(const t of e){const e=t.action.kind?new c.yN(t.action.kind):c.yN.None;for(const i of n)if(i.group.kind.contains(e)){i.actions.push(t);break}}const o=[];for(const e of n)if(e.actions.length){o.push({kind:"header",group:e.group});for(const t of e.actions)o.push({kind:"action",item:t,group:e.group,label:t.action.title,disabled:!!t.action.disabled,keybinding:i(t.action)})}return o}(o,this._shouldShowHeaders(),this._resolver.getResolver()),r,s,n,this._getActionBarActions(e,t,i))}))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=(0,o.i)(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}_shouldShowHeaders(){var e;const t=null===(e=this._editor)||void 0===e?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:null==t?void 0:t.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map((e=>{var t;return{id:e.id,label:e.title,tooltip:null!==(t=e.tooltip)&&void 0!==t?t:"",class:void 0,enabled:!0,run:()=>{var t;return this._commandService.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}}}));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:(0,_.NC)("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:(0,_.NC)("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};ve.ID="editor.contrib.codeActionController",ve=he=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([fe(1,ge.lT),fe(2,ie.i6),fe(3,oe.TG),fe(4,d.p),fe(5,pe.ek),fe(6,ce.H),fe(7,ue.Ui),fe(8,ae),fe(9,oe.TG)],ve)},17016:(e,t,i)=>{i.d(t,{Jt:()=>f,fj:()=>u});var n=i(15393),o=i(17301),s=i(4669),r=i(5976),a=i(95935),l=i(93983),d=i(90535),h=i(87997),c=i(75396);const u=new l.uy("supportedCodeAction","");class g extends r.JT{constructor(e,t,i,o=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=o,this._autoTriggerTimer=this._register(new n._F),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._tryAutoTrigger())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>(0,a.Xy)(e,t.uri)))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2,triggerAction:h.aQ.Default})}),this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&2===e.type){const{lineNumber:e,column:n}=i.getPosition(),o=t.getLineContent(e);if(0===o.length)return;if(1===n){if(/\s/.test(o[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[n-2])&&/\s/.test(o[n-1]))return}return i}}var p;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,i){this.trigger=e,this.position=t,this._cancellablePromise=i,this.type=1,this.actions=i.catch((e=>{if((0,o.n2)(e))return m;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(p||(p={}));const m=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class f extends r.JT{constructor(e,t,i,n,o){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=o,this._codeActionOracle=this._register(new r.XK),this._state=p.Empty,this._onDidChangeState=this._register(new s.Q5),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=u.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(p.Empty,!0))}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(p.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(89)){const t=this._registry.all(e).flatMap((e=>{var t;return null!==(t=e.providedCodeActionKinds)&&void 0!==t?t:[]}));this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new g(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(p.Empty);const o=(0,n.PG)((i=>(0,c.aI)(this._registry,e,t.selection,t.trigger,d.Ex.None,i)));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(o,250)),this.setState(new p.Triggered(t.trigger,t.selection.getStartPosition(),o))}),void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:h.aQ.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;null===(t=this._codeActionOracle.value)||void 0===t||t.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||this._disposed||this._onDidChangeState.fire(e))}}},58507:(e,t,i)=>{i.d(t,{f:()=>E});var n=i(65321),o=i(10553),s=i(73046),r=i(4669),a=i(5976),l=i(25670),d=i(93379),h=i.n(d),c=i(7795),u=i.n(c),g=i(90569),p=i.n(g),m=i(3565),f=i.n(m),_=i(19216),v=i.n(_),b=i(44589),C=i.n(b),w=i(32874),y={};y.styleTagTransform=C(),y.setAttributes=f(),y.insert=p().bind(null,"head"),y.domAPI=u(),y.insertStyleElement=v(),h()(w.Z,y),w.Z&&w.Z.locals&&w.Z.locals;var S,L,x=i(59616),k=i(75396),N=i(63580),D=i(91847);!function(e){e.Hidden={type:0},e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(L||(L={}));let E=S=class extends a.JT{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new r.Q5),this.onClick=this._onClick.event,this._state=L.Hidden,this._domNode=n.$("div.lightBulbWidget"),this._register(o.o.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),this._register(n.GQ(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=n.i(this._domNode),o=this._editor.getOption(65);let s=Math.floor(o/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(s+=o),this._onClick.fire({x:e.posx,y:t+i+s,actions:this.state.actions,trigger:this.state.trigger})}))),this._register(n.nm(this._domNode,"mouseenter",(e=>{1==(1&e.buttons)&&this.hide()}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(63)&&!this._editor.getOption(63).enabled&&this.hide()}))),this._register(r.ju.runAndSubscribe(t.onDidUpdateKeybindings,(()=>{var e,i,n,o;this._preferredKbLabel=null!==(i=null===(e=t.lookupKeybinding(k.pZ))||void 0===e?void 0:e.getLabel())&&void 0!==i?i:void 0,this._quickFixKbLabel=null!==(o=null===(n=t.lookupKeybinding(k.cz))||void 0===n?void 0:n.getLabel())&&void 0!==o?o:void 0,this._updateLightBulbTitleAndIcon()})))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(63).enabled)return this.hide();const o=this._editor.getModel();if(!o)return this.hide();const{lineNumber:s,column:r}=o.validatePosition(i),a=o.getOptions().tabSize,l=n.get(49),d=o.getLineContent(s),h=(0,x.q)(d,a),c=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let u=s;if(!(l.spaceWidth*h>22))if(s>1&&!c(s-1))u-=1;else if(c(s+1)){if(r*l.spaceWidth<22)return this.hide()}else u+=1;this.state=new L.Showing(e,t,i,{position:{lineNumber:u,column:1},preference:S._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==L.Hidden&&(this.state=L.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){1===this.state.type&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...l.k.asClassNameArray(s.l.lightBulb)),this._domNode.classList.add(...l.k.asClassNameArray(s.l.lightbulbAutofix)),this._preferredKbLabel)?this.title=N.NC("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):(this._domNode.classList.remove(...l.k.asClassNameArray(s.l.lightbulbAutofix)),this._domNode.classList.add(...l.k.asClassNameArray(s.l.lightBulb)),this._quickFixKbLabel?this.title=N.NC("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=N.NC("codeAction","Show Code Actions"))}set title(e){this._domNode.title=e}};var I,T;E.ID="editor.contrib.lightbulbWidget",E._posPref=[0],E=S=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(I=1,T=D.d,function(e,t){T(e,t,I)})],E)},87997:(e,t,i)=>{i.d(t,{EU:()=>r,Yl:()=>a,aQ:()=>n,bA:()=>h,wZ:()=>d,yN:()=>s});var n,o=i(17301);class s{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+s.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new s(this.value+s.sep+e)}}function r(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>l(t,i,e.include)))||!e.includeSourceActions&&s.Source.contains(t))}function a(e,t){const i=t.kind?new s(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>l(i,t,e.include)))||!e.includeSourceActions&&i&&s.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}function l(e,t,i){return!(!t.contains(e)||i&&t.contains(i))}s.sep=".",s.None=new s("@@none@@"),s.Empty=new s(""),s.QuickFix=new s("quickfix"),s.Refactor=new s("refactor"),s.RefactorExtract=s.Refactor.append("extract"),s.RefactorInline=s.Refactor.append("inline"),s.RefactorMove=s.Refactor.append("move"),s.RefactorRewrite=s.Refactor.append("rewrite"),s.Source=new s("source"),s.SourceOrganizeImports=s.Source.append("organizeImports"),s.SourceFixAll=s.Source.append("fixAll"),s.SurroundWith=s.Refactor.append("surround"),function(e){e.Refactor="refactor",e.RefactorPreview="refactor preview",e.Lightbulb="lightbulb",e.Default="other (default)",e.SourceAction="source action",e.QuickFix="quick fix action",e.FixAll="fix all",e.OrganizeImports="organize imports",e.AutoFix="auto fix",e.QuickFixHover="quick fix hover window",e.OnSave="save participants",e.ProblemsView="problems view"}(n||(n={}));class d{static fromUser(e,t){return e&&"object"==typeof e?new d(d.getKindFromUser(e,t.kind),d.getApplyFromUser(e,t.apply),d.getPreferredUser(e)):new d(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new s(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class h{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t,i,n,s,r;return i=this,n=void 0,r=function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(e){(0,o.Cp)(e)}t&&(this.action.edit=t.edit)}return this},new((s=void 0)||(s=Promise))((function(e,t){function o(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(o,a)}l((r=r.apply(i,n||[])).next())}))}}},38593:(e,t,i)=>{var n=i(15393),o=i(17301),s=i(5976),r=i(43407),a=i(16830),l=i(64141),d=i(29102),h=i(71050),c=i(98401),u=i(70666),g=i(73733),p=i(94565),m=i(71922),f=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class _{constructor(){this.lenses=[],this._disposables=new s.SL}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function v(e,t,i){return f(this,void 0,void 0,(function*(){const n=e.ordered(t),s=new Map,r=new _,a=n.map(((e,n)=>f(this,void 0,void 0,(function*(){s.set(e,n);try{const n=yield Promise.resolve(e.provideCodeLenses(t,i));n&&r.add(n,e)}catch(e){(0,o.Cp)(e)}}))));return yield Promise.all(a),r.lenses=r.lenses.sort(((e,t)=>e.symbol.range.startLineNumber<t.symbol.range.startLineNumber?-1:e.symbol.range.startLineNumber>t.symbol.range.startLineNumber?1:s.get(e.provider)<s.get(t.provider)?-1:s.get(e.provider)>s.get(t.provider)?1:e.symbol.range.startColumn<t.symbol.range.startColumn?-1:e.symbol.range.startColumn>t.symbol.range.startColumn?1:0)),r}))}p.P.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;(0,c.p_)(u.o.isUri(i)),(0,c.p_)("number"==typeof n||!n);const{codeLensProvider:r}=e.get(m.p),a=e.get(g.q).getModel(i);if(!a)throw(0,o.b1)();const l=[],d=new s.SL;return v(r,a,h.T.None).then((e=>{d.add(e);const t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?l.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(a,i.symbol,h.T.None)).then((e=>l.push(e||i.symbol))));return Promise.all(t)})).then((()=>l)).finally((()=>{setTimeout((()=>d.dispose()),100)}))}));var b=i(88289),C=i(43702),w=i(24314),y=i(65026),S=i(72065),L=i(26904);const x=(0,S.yh)("ICodeLensCache");class k{constructor(e,t){this.lineCount=e,this.data=t}}let N=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new C.z6(20,.75),(0,n.To)((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),(0,b.I)(e.onWillSaveState)((i=>{i.reason===L.fk.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new _;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new k(e.getLineCount(),n);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new w.e(e,1,e,11)});const o=new _;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new k(i.lineCount,o))}}catch(e){}}};var D,E;N=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(D=0,E=L.Uy,function(e,t){E(e,t,D)})],N),(0,y.z)(x,N,1);var I=i(65321),T=i(56811),M=i(93379),R=i.n(M),A=i(7795),O=i.n(A),P=i(90569),F=i.n(P),B=i(3565),W=i.n(B),V=i(19216),H=i.n(V),z=i(44589),K=i.n(z),U=i(32849),j={};j.styleTagTransform=K(),j.setAttributes=W(),j.insert=F().bind(null,"head"),j.domAPI=O(),j.insertStyleElement=H(),R()(U.Z,j),U.Z&&U.Z.locals&&U.Z.locals;var $=i(13961);class q{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class Z{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+Z._idPool++,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let t=0;t<e.length;t++){const o=e[t];if(o&&(n=!0,o.command)){const n=(0,T.T)(o.command.title.trim());o.command.id?(i.push(I.$("a",{id:String(t),title:o.command.tooltip,role:"button"},...n)),this._commands.set(String(t),o.command)):i.push(I.$("span",{title:o.command.tooltip},...n)),t+1<e.length&&i.push(I.$("span",void 0," | "))}}n?(I.mc(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):I.mc(this._domNode,I.$("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){const t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}}Z._idPool=0;class G{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){const t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let e=0,i=t.length;e<i;e++)this._addDecorationsCallbacks[e](t[e])}}const Q=$.qx.register({collapseOnReplaceEdit:!0,description:"codelens"});class Y{constructor(e,t,i,n,o,s){let r;this._isDisposed=!1,this._editor=t,this._data=e,this._decorationIds=[];const a=[];this._data.forEach(((e,t)=>{e.symbol.command&&a.push(e.symbol),i.addDecoration({range:e.symbol.range,options:Q},(e=>this._decorationIds[t]=e)),r=r?w.e.plusRange(r,e.symbol.range):w.e.lift(e.symbol.range)})),this._viewZone=new q(r.startLineNumber-1,o,s),this._viewZoneId=n.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new Z(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],null==t||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||w.e.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:Q},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t<this._decorationIds.length;t++){const i=e.getDecorationRange(this._decorationIds[t]);i&&(this._data[t].symbol.range=i)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){const i=e[t];if(i){const{symbol:e}=this._data[t];e.command=i.command||e.command}}}getCommand(e){var t;return null===(t=this._contentWidget)||void 0===t?void 0:t.getCommand(e)}getLineNumber(){const e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}var J=i(63580),X=i(59422),ee=i(41157),te=i(88191),ie=function(e,t){return function(i,n){t(i,n,e)}};let ne=class{constructor(e,t,i,o,r,a){this._editor=e,this._languageFeaturesService=t,this._commandService=o,this._notificationService=r,this._codeLensCache=a,this._disposables=new s.SL,this._localToDispose=new s.SL,this._lenses=[],this._oldCodeLensModels=new s.SL,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new n.pY((()=>this._resolveCodeLensesInViewport()),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(49)||e.hasChanged(18)||e.hasChanged(17))&&this._updateLensStyle(),e.hasChanged(16)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(65)/this._editor.getOption(51));let t=this._editor.getOption(18);return(!t||t<5)&&(t=.9*this._editor.getOption(51)|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(17),n=this._editor.getOption(49),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(o.setProperty("--vscode-editorCodeLens-fontFamily",i),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",l.hL.fontFamily)),this._editor.changeViewZones((t=>{for(const i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(16))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&this._localToDispose.add((0,n.Vg)((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const t of this._languageFeaturesService.codeLensProvider.all(e))if("function"==typeof t.onDidChange){const e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new n.pY((()=>{var t;const s=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=(0,n.PG)((t=>v(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const n=this._provideCodeLensDebounce.update(e,Date.now()-s);i.delay=n,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()}),o.dL)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add((0,s.OF)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{var e;this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=[];let n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));const o=new G;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule(),this._resolveCodeLensesScheduler.cancel(),null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,s.OF)((()=>{if(this._editor.getModel()){const e=r.Z.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){const i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new G;for(const e of this._lenses)e.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const o of e.lenses){const e=o.symbol.range.startLineNumber;e<1||e>t||(n&&n[n.length-1].symbol.range.startLineNumber===e?n.push(o):(n=[o],i.push(n)))}if(!i.length&&!this._lenses.length)return;const o=r.Z.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const n=new G;let o=0,r=0;for(;r<i.length&&o<this._lenses.length;){const e=i[r][0].symbol.range.startLineNumber,a=this._lenses[o].getLineNumber();a<e?(this._lenses[o].dispose(n,t),this._lenses.splice(o,1)):a===e?(this._lenses[o].updateCodeLensSymbols(i[r],n),r++,o++):(this._lenses.splice(o,0,new Y(i[r],this._editor,n,t,s.codeLensHeight,(()=>this._resolveCodeLensesInViewportSoon()))),o++,r++)}for(;o<this._lenses.length;)this._lenses[o].dispose(n,t),this._lenses.splice(o,1);for(;r<i.length;)this._lenses.push(new Y(i[r],this._editor,n,t,s.codeLensHeight,(()=>this._resolveCodeLensesInViewportSoon()))),r++;n.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],s=[];if(this._lenses.forEach((e=>{const n=e.computeIfNecessary(t);n&&(i.push(n),s.push(e))})),0===i.length)return;const r=Date.now(),a=(0,n.PG)((e=>{const n=i.map(((i,n)=>{const r=new Array(i.length),a=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(r[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{r[n]=e}),o.Cp)));return Promise.all(a).then((()=>{e.isCancellationRequested||s[n].isDisposed()||s[n].updateCommands(r)}))}));return Promise.all(n)}));this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDebounce.update(t,Date.now()-r);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,o.dL)(e),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getModel(){return this._currentCodeLensModel}};ne.ID="css.editor.codeLens",ne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ie(1,m.p),ie(2,te.A),ie(3,p.H),ie(4,X.lT),ie(5,x)],ne),(0,a._K)(ne.ID,ne,1),(0,a.Qr)(class extends a.R6{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:d.u.hasCodeLensProvider,label:(0,J.NC)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return i=this,n=void 0,s=function*(){if(!t.hasModel())return;const i=e.get(ee.eJ),n=e.get(p.H),o=e.get(X.lT),s=t.getSelection().positionLineNumber,r=t.getContribution(ne.ID);if(!r)return;const a=r.getModel();if(!a)return;const l=[];for(const e of a.lenses)e.symbol.command&&e.symbol.range.startLineNumber===s&&l.push({label:e.symbol.command.title,command:e.symbol.command});if(0===l.length)return;const d=yield i.pick(l,{canPickMany:!1});if(d){if(a.isDisposed)return yield n.executeCommand(this.id);try{yield n.executeCommand(d.command.id,...d.command.arguments||[])}catch(e){o.error(e)}}},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(i,n||[])).next())}));var i,n,o,s}})},52640:(e,t,i)=>{i.d(t,{E:()=>g,R:()=>p});var n=i(71050),o=i(17301),s=i(70666),r=i(24314),a=i(73733),l=i(94565),d=i(71922),h=i(15418),c=i(33108),u=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function g(e,t,i,n=!0){return u(this,void 0,void 0,(function*(){return v(new m,e,t,i,n)}))}function p(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}class m{constructor(){}compute(e,t,i,n){return u(this,void 0,void 0,(function*(){const o=yield e.provideDocumentColors(t,i);if(Array.isArray(o))for(const t of o)n.push({colorInfo:t,provider:e});return Array.isArray(o)}))}}class f{constructor(){}compute(e,t,i,n){return u(this,void 0,void 0,(function*(){const o=yield e.provideDocumentColors(t,i);if(Array.isArray(o))for(const e of o)n.push({range:e.range,color:[e.color.red,e.color.green,e.color.blue,e.color.alpha]});return Array.isArray(o)}))}}class _{constructor(e){this.colorInfo=e}compute(e,t,i,o){return u(this,void 0,void 0,(function*(){const i=yield e.provideColorPresentations(t,this.colorInfo,n.T.None);return Array.isArray(i)&&o.push(...i),Array.isArray(i)}))}}function v(e,t,i,n,s){return u(this,void 0,void 0,(function*(){let r,a=!1;const l=[],d=t.ordered(i);for(let t=d.length-1;t>=0;t--){const s=d[t];if(s instanceof h.G)r=s;else try{(yield e.compute(s,i,n,l))&&(a=!0)}catch(e){(0,o.Cp)(e)}}return a?l:r&&s?(yield e.compute(r,i,n,l),l):[]}))}function b(e,t){const{colorProvider:i}=e.get(d.p),n=e.get(a.q).getModel(t);if(!n)throw(0,o.b1)();return{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:e.get(c.Ui).getValue("editor.defaultColorDecorators",{resource:t})}}l.P.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof s.o))throw(0,o.b1)();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=b(e,i);return v(new f,a,r,n.T.None,l)})),l.P.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,a]=t,{uri:l,range:d}=a;if(!(l instanceof s.o&&Array.isArray(i)&&4===i.length&&r.e.isIRange(d)))throw(0,o.b1)();const{model:h,colorProviderRegistry:c,isDefaultColorDecoratorsEnabled:u}=b(e,l),[g,p,m,f]=i;return v(new _({range:d,color:{red:g,green:p,blue:m,alpha:f}}),c,h,n.T.None,u)}))},46838:(e,t,i)=>{var n=i(5976),o=i(16830),s=i(24314),r=i(89431),a=i(65766),l=i(74271),d=i(66520);class h extends n.JT{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(145);if("click"!==t&&"clickAndHover"!==t)return;const i=e.target;if(6!==i.type)return;if(!i.detail.injectedText)return;if(i.detail.injectedText.options.attachedData!==r.Ak)return;if(!i.range)return;const n=this._editor.getContribution(l.E.ID);if(n&&!n.isColorPickerVisible){const e=new s.e(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(e,1,0,!1,!0)}}}h.ID="editor.contrib.colorContribution",(0,o._K)(h.ID,h,2),d.Ae.register(a.nh)},89431:(e,t,i)=>{i.d(t,{Ak:()=>w,if:()=>y});var n,o=i(15393),s=i(41264),r=i(17301),a=i(4669),l=i(5976),d=i(84013),h=i(97295),c=i(29994),u=i(16830),g=i(24314),p=i(13961),m=i(88191),f=i(71922),_=i(52640),v=i(33108),b=function(e,t){return function(i,n){t(i,n,e)}},C=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const w=Object.create({});let y=n=class extends l.JT{constructor(e,t,i,o){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new l.SL),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new c.t7(this._editor),this._decoratorLimitReporter=new S,this._colorDecorationClassRefs=this._register(new l.SL),this._debounceInformation=o.for(i.colorProvider,"Document Colors",{min:n.RECOMPUTE_TIME}),this._register(e.onDidChangeModel((()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()}))),this._register(e.onDidChangeModelLanguage((()=>this.updateColors()))),this._register(i.colorProvider.onDidChange((()=>this.updateColors()))),this._register(e.onDidChangeConfiguration((e=>{const t=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144);const i=t!==this._isColorDecoratorsEnabled||e.hasChanged(20),n=e.hasChanged(144);(i||n)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"==typeof i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(19)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();e&&this._languageFeaturesService.colorProvider.has(e)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new o._F,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}beginCompute(){return C(this,void 0,void 0,(function*(){this._computePromise=(0,o.PG)((e=>C(this,void 0,void 0,(function*(){const t=this._editor.getModel();if(!t)return[];const i=new d.G(!1),n=yield(0,_.E)(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),n}))));try{const e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){(0,r.dL)(e)}}))}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:p.qx.EMPTY})));this._editor.changeDecorations((i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(20);for(let n=0;n<e.length&&t.length<i;n++){const{red:i,green:o,blue:r,alpha:a}=e[n].colorInfo.color,l=new s.VS(Math.round(255*i),Math.round(255*o),Math.round(255*r),a),d=`rgba(${l.r}, ${l.g}, ${l.b}, ${l.a})`,c=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:d}));t.push({range:{startLineNumber:e[n].colorInfo.range.startLineNumber,startColumn:e[n].colorInfo.range.startColumn,endLineNumber:e[n].colorInfo.range.endLineNumber,endColumn:e[n].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:h.B4,inlineClassName:`${c.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:w}}})}const n=i<e.length&&i;this._decoratorLimitReporter.update(e.length,n),this._colorDecoratorIds.set(t)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){const t=this._editor.getModel();if(!t)return null;const i=t.getDecorationsInRange(g.e.fromPositions(e,e)).filter((e=>this._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};y.ID="editor.contrib.colorDetector",y.RECOMPUTE_TIME=1e3,y=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([b(1,v.Ui),b(2,f.p),b(3,m.A)],y);class S{constructor(){this._onDidChange=new a.Q5,this._computed=0,this._limited=!1}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}(0,u._K)(y.ID,y,1)},65766:(e,t,i)=>{i.d(t,{nh:()=>P,PQ:()=>B});var n=i(15393),o=i(71050),s=i(41264),r=i(5976),a=i(24314),l=i(52640),d=i(89431),h=i(4669);class c{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new h.Q5,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new h.Q5,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new h.Q5,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let e=0;e<this.colorPresentations.length;e++)if(t.toLowerCase()===this.colorPresentations[e].label){i=e;break}if(-1===i){const e=t.split("(")[0].toLowerCase();for(let t=0;t<this.colorPresentations.length;t++)if(this.colorPresentations[t].label.toLowerCase().startsWith(e)){i=t;break}}-1!==i&&i!==this.presentationIndex&&(this.presentationIndex=i,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}var u=i(16268),g=i(65321),p=i(93911),m=i(93794),f=i(73046),_=i(25670),v=(i(39587),i(63580)),b=i(73910),C=i(59554);const w=g.$;class y extends r.JT{constructor(e,t,i,n=!1){super(),this.model=t,this.showingStandaloneColorPicker=n,this._closeButton=null,this._domNode=w(".colorpicker-header"),g.R3(e,this._domNode),this._pickedColorNode=g.R3(this._domNode,w(".picked-color")),g.R3(this._pickedColorNode,w("span.codicon.codicon-color-mode")),this._pickedColorPresentation=g.R3(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const o=(0,v.NC)("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",o),this._originalColorNode=g.R3(this._domNode,w(".original-color")),this._originalColorNode.style.backgroundColor=s.Il.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(b.yJx)||s.Il.white,this._register(i.onDidColorThemeChange((e=>{this.backgroundColor=e.getColor(b.yJx)||s.Il.white}))),this._register(g.nm(this._pickedColorNode,g.tw.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(g.nm(this._originalColorNode,g.tw.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=s.Il.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new S(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=s.Il.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class S extends r.JT{constructor(e){super(),this._onClicked=this._register(new h.Q5),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),g.R3(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),g.R3(this._button,t),g.R3(t,w(".button"+_.k.asCSSSelector((0,C.q5)("color-picker-close",f.l.close,(0,v.NC)("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class L extends r.JT{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=w(".colorpicker-body"),g.R3(e,this._domNode),this._saturationBox=new x(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new N(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new D(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new E(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new s.Il(new s.tx(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new s.Il(new s.tx(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new s.Il(new s.tx(360===i?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class x extends r.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new h.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new h.Q5,this.onColorFlushed=this._onColorFlushed.event,this._domNode=w(".saturation-wrap"),g.R3(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",g.R3(this._domNode,this._canvas),this.selection=w(".saturation-selection"),g.R3(this._domNode,this.selection),this.layout(),this._register(g.nm(this._domNode,g.tw.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;this.monitor=this._register(new p.C);const t=g.i(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangePosition(e.pageX-t.left,e.pageY-t.top)),(()=>null));const i=g.nm(document,g.tw.POINTER_UP,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new s.Il(new s.tx(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const o=i.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=s.Il.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class k extends r.JT{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new h.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new h.Q5,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=g.R3(e,w(".standalone-strip")),this.overlay=g.R3(this.domNode,w(".standalone-overlay"))):(this.domNode=g.R3(e,w(".strip")),this.overlay=g.R3(this.domNode,w(".overlay"))),this.slider=g.R3(this.domNode,w(".slider")),this.slider.style.top="0px",this._register(g.nm(this.domNode,g.tw.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._register(new p.C),i=g.i(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangeTop(e.pageY-i.top)),(()=>null));const n=g.nm(document,g.tw.POINTER_UP,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class N extends k{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,o=new s.Il(new s.VS(t,i,n,1)),r=new s.Il(new s.VS(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class D extends k{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class E extends r.JT{constructor(e){super(),this._onClicked=this._register(new h.Q5),this.onClicked=this._onClicked.event,this._button=g.R3(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=e=>{this._onClicked.fire()}}get button(){return this._button}}class I extends m.${constructor(e,t,i,n,o=!1){super(),this.model=t,this.pixelRatio=i,this._register(u.Tz.onDidChange((()=>this.layout())));const s=w(".colorpicker-widget");e.appendChild(s),this.header=this._register(new y(s,this.model,n,o)),this.body=this._register(new L(s,this.model,this.pixelRatio,o))}layout(){this.body.layout()}}var T=i(97781),M=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}},A=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class O{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let P=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return n.Aq.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return A(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=d.if.get(this._editor);if(!e)return[];for(const i of t){if(!e.isColorDecoration(i))continue;const t=e.getColorData(i.range.getStartPosition());if(t)return[yield W(this,this._editor.getModel(),t.colorInfo,t.provider)]}return[]}))}renderHoverParts(e,t){return V(this,this._editor,this._themeService,t,e)}};P=M([R(1,T.XE)],P);class F{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let B=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,i){return A(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return null;if(!d.if.get(this._editor))return null;const n=yield(0,l.E)(i,this._editor.getModel(),o.T.None);let s=null,r=null;for(const t of n){const i=t.colorInfo;a.e.containsRange(i.range,e.range)&&(s=i,r=t.provider)}const h=null!=s?s:e,c=null!=r?r:t,u=!!s;return{colorHover:yield W(this,this._editor.getModel(),h,c),foundInEditor:u}}))}updateEditorModel(e){return A(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const t=e.model;let i=new a.e(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield z(this._editor.getModel(),t,this._color,i,e),i=H(this._editor,i,t))}))}renderHoverParts(e,t){return V(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};function W(e,t,i,n){return A(this,void 0,void 0,(function*(){const r=t.getValueInRange(i.range),{red:d,green:h,blue:u,alpha:g}=i.color,p=new s.VS(Math.round(255*d),Math.round(255*h),Math.round(255*u),g),m=new s.Il(p),f=yield(0,l.R)(t,i,n,o.T.None),_=new c(m,[],0);return _.colorPresentations=f||[],_.guessColorPresentation(m,r),e instanceof P?new O(e,a.e.lift(i.range),_,n):new F(e,a.e.lift(i.range),_,n)}))}function V(e,t,i,n,o){if(0===n.length||!t.hasModel())return r.JT.None;if(o.setMinimumDimensions){const e=t.getOption(65)+8;o.setMinimumDimensions(new g.Ro(302,e))}const s=new r.SL,l=n[0],d=t.getModel(),h=l.model,c=s.add(new I(o.fragment,h,t.getOption(140),i,e instanceof B));o.setColorPicker(c);let u=!1,p=new a.e(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn);if(e instanceof B){const t=n[0].model.color;e.color=t,z(d,h,t,p,l),s.add(h.onColorFlushed((t=>{e.color=t})))}else s.add(h.onColorFlushed((e=>A(this,void 0,void 0,(function*(){yield z(d,h,e,p,l),u=!0,p=H(t,p,h,o)})))));return s.add(h.onDidChangeColor((e=>{z(d,h,e,p,l)}))),s.add(t.onDidChangeModelContent((e=>{u?u=!1:(o.hide(),t.focus())}))),s}function H(e,t,i,n){let o,s;if(i.presentation.textEdit){o=[i.presentation.textEdit],s=new a.e(i.presentation.textEdit.range.startLineNumber,i.presentation.textEdit.range.startColumn,i.presentation.textEdit.range.endLineNumber,i.presentation.textEdit.range.endColumn);const t=e.getModel()._setTrackedRange(null,s,3);e.pushUndoStop(),e.executeEdits("colorpicker",o),s=e.getModel()._getTrackedRange(t)||s}else o=[{range:t,text:i.presentation.label,forceMoveMarkers:!1}],s=t.setEndPosition(t.endLineNumber,t.startColumn+i.presentation.label.length),e.pushUndoStop(),e.executeEdits("colorpicker",o);return i.presentation.additionalTextEdits&&(o=[...i.presentation.additionalTextEdits],e.executeEdits("colorpicker",o),n&&n.hide()),e.pushUndoStop(),s}function z(e,t,i,n,s){return A(this,void 0,void 0,(function*(){const r=yield(0,l.R)(e,{range:n,color:{red:i.rgba.r/255,green:i.rgba.g/255,blue:i.rgba.b/255,alpha:i.rgba.a}},s.provider,o.T.None);t.colorPresentations=r||[]}))}B=M([R(1,T.XE)],B)},15418:(e,t,i)=>{i.d(t,{G:()=>c});var n=i(41264),o=i(35034),s=i(73733),r=i(51381),a=i(5976),l=i(71922),d=i(10637),h=function(e,t){return function(i,n){t(i,n,e)}};class c{constructor(e,t){this._editorWorkerClient=new o.Q8(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return i=this,n=void 0,s=function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(i,n||[])).next())}));var i,n,o,s}provideColorPresentations(e,t,i){const o=t.range,s=t.color,r=s.alpha,a=new n.Il(new n.VS(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),r)),l=r?n.Il.Format.CSS.formatRGB(a):n.Il.Format.CSS.formatRGBA(a),d=r?n.Il.Format.CSS.formatHSL(a):n.Il.Format.CSS.formatHSLA(a),h=r?n.Il.Format.CSS.formatHex(a):n.Il.Format.CSS.formatHexA(a),c=[];return c.push({label:l,textEdit:{range:o,text:l}}),c.push({label:d,textEdit:{range:o,text:d}}),c.push({label:h,textEdit:{range:o,text:h}}),c}}let u=class extends a.JT{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new c(e,t)))}};u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([h(0,s.q),h(1,r.c_),h(2,l.p)],u),(0,d.y)(u)},2719:(e,t,i)=>{var n,o,s=i(16830),r=i(63580),a=i(5976),l=i(65766),d=i(72065),h=i(24251),c=i(91847),u=i(4669),g=i(71922),p=i(29102),m=i(93983),f=i(73733),_=i(51381),v=i(15418),b=i(65321),C=(i(39587),function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}),w=function(e,t){return function(i,n){t(i,n,e)}},y=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let S=n=class extends a.JT{constructor(e,t,i,n,o,s,r){super(),this._editor=e,this._modelService=i,this._keybindingService=n,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=r,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=p.u.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=p.u.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||null===(e=this._standaloneColorPickerWidget)||void 0===e||e.focus():this._standaloneColorPickerWidget=new L(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),null===(e=this._standaloneColorPickerWidget)||void 0===e||e.hide(),this._editor.focus()}insertColor(){var e;null===(e=this._standaloneColorPickerWidget)||void 0===e||e.updateEditor(),this.hide()}static get(e){return e.getContribution(n.ID)}};S.ID="editor.contrib.standaloneColorPickerController",S=n=C([w(1,m.i6),w(2,f.q),w(3,c.d),w(4,d.TG),w(5,g.p),w(6,_.c_)],S),(0,s._K)(S.ID,S,1);let L=o=class extends a.JT{constructor(e,t,i,n,o,s,r,a){var d;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=r,this._languageConfigurationService=a,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new u.Q5),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(l.PQ,this._editor),this._position=null===(d=this._editor._getViewModel())||void 0===d?void 0:d.getPrimaryCursorState().modelState.position;const h=this._editor.getSelection(),c=h?{startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},g=this._register(b.go(this._body));this._register(g.onDidBlur((e=>{this.hide()}))),this._register(g.onDidFocus((e=>{this.focus()}))),this._register(this._editor.onDidChangeCursorPosition((()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()}))),this._register(this._editor.onMouseMove((e=>{var t;const i=null===(t=e.target.element)||void 0===t?void 0:t.classList;i&&i.contains("colorpicker-color-decoration")&&this.hide()}))),this._register(this.onResult((e=>{this._render(e.value,e.foundInEditor)}))),this._start(c),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return o.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(59).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}_start(e){return y(this,void 0,void 0,(function*(){const t=yield this._computeAsync(e);t&&this._onResult.fire(new x(t.result,t.foundInEditor))}))}_computeAsync(e){return y(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=yield this._standaloneColorPickerParticipant.createColorHover(t,new v.G(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}))}_render(e,t){const i=document.createDocumentFragment();let n;const o={fragment:i,statusBar:this._register(new h.mR(this._keybindingService)),setColorPicker:e=>n=e,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(o,[e])),void 0===n)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(.66*this._editor.getLayoutInfo().width,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),n.layout();const s=n.body,r=s.saturationBox.domNode.clientWidth,a=s.domNode.clientWidth-r-22-8,l=n.body.enterButton;null==l||l.onClicked((()=>{this.updateEditor(),this.hide()}));const d=n.header;d.pickedColorNode.style.width=r+8+"px",d.originalColorNode.style.width=a+"px";const c=n.header.closeButton;null==c||c.onClicked((()=>{this.hide()})),t&&(l&&(l.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};L.ID="editor.contrib.standaloneColorPickerWidget",L=o=C([w(3,d.TG),w(4,f.q),w(5,c.d),w(6,g.p),w(7,_.c_)],L);class x{constructor(e,t){this.value=e,this.foundInEditor=t}}var k=i(84144);class N extends s.x1{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:(0,r.NC)("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:(0,r.NC)({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:k.eH.CommandPalette}]})}runEditorCommand(e,t){var i;null===(i=S.get(t))||void 0===i||i.showOrFocus()}}class D extends s.R6{constructor(){super({id:"editor.action.hideColorPicker",label:(0,r.NC)({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:p.u.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var i;null===(i=S.get(t))||void 0===i||i.hide()}}class E extends s.R6{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,r.NC)({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:p.u.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var i;null===(i=S.get(t))||void 0===i||i.insertColor()}}(0,s.Qr)(D),(0,s.Qr)(E),(0,k.r1)(N)},23365:(e,t,i)=>{var n=i(22258),o=i(16830),s=i(24314),r=i(29102),a=i(51381),l=i(69386),d=i(50187),h=i(3860);class c{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length;if(i+n>e.length)return!1;for(let o=0;o<n;o++){const n=e.charCodeAt(i+o),s=t.charCodeAt(o);if(n!==s&&!(n>=65&&n<=90&&n+32===s||s>=65&&s<=90&&s+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,o,r){const a=e.startLineNumber,l=e.startColumn,d=e.endLineNumber,h=e.endColumn,u=o.getLineContent(a),g=o.getLineContent(d);let p,m=u.lastIndexOf(t,l-1+t.length),f=g.indexOf(i,h-1-i.length);if(-1!==m&&-1!==f)if(a===d)u.substring(m+t.length,f).indexOf(i)>=0&&(m=-1,f=-1);else{const e=u.substring(m+t.length),n=g.substring(0,f);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(m=-1,f=-1)}-1!==m&&-1!==f?(n&&m+t.length<u.length&&32===u.charCodeAt(m+t.length)&&(t+=" "),n&&f>0&&32===g.charCodeAt(f-1)&&(i=" "+i,f-=1),p=c._createRemoveBlockCommentOperations(new s.e(a,m+t.length+1,d,f+1),t,i)):(p=c._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===p.length?i:null);for(const e of p)r.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return s.e.isEmpty(e)?n.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(l.h.delete(new s.e(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const o=[];return s.e.isEmpty(e)?o.push(l.h.replace(new s.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(l.h.insert(new d.L(e.startLineNumber,e.startColumn),t+(n?" ":""))),o.push(l.h.insert(new d.L(e.endLineNumber,e.endColumn),(n?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,n),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;s&&s.blockCommentStartToken&&s.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new h.Y(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new h.Y(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var u=i(97295);class g{constructor(e,t,i,n,o,s,r){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const o=e.getLanguageIdAtPosition(t,1),s=n.getLanguageConfiguration(o).comments,r=s?s.lineCommentToken:null;if(!r)return null;const a=[];for(let e=0,n=i-t+1;e<n;e++)a[e]={ignore:!1,commentStr:r,commentStrOffset:0,commentStrLength:r.length};return a}static _analyzeLines(e,t,i,n,o,s,r,a){let l,d=!0;l=0===e||1!==e;for(let a=0,h=n.length;a<h;a++){const h=n[a],g=o+a;if(g===o&&r){h.ignore=!0;continue}const p=i.getLineContent(g),m=u.LC(p);if(-1!==m){if(d=!1,h.ignore=!1,h.commentStrOffset=m,l&&!c._haystackHasNeedleAtOffset(p,h.commentStr,m)&&(0===e?l=!1:1===e||(h.ignore=!0)),l&&t){const e=m+h.commentStrLength;e<p.length&&32===p.charCodeAt(e)&&(h.commentStrLength+=1)}}else h.ignore=s,h.commentStrOffset=p.length}if(0===e&&d){l=!1;for(let e=0,t=n.length;e<t;e++)n[e].ignore=!1}return{supported:!0,shouldRemoveComments:l,lines:n}}static _gatherPreflightData(e,t,i,n,o,s,r,a){const l=g._gatherPreflightCommentStrings(i,n,o,a);return null===l?{supported:!1}:g._analyzeLines(e,t,i,l,n,s,r,a)}_executeLineComments(e,t,i,n){let o;i.shouldRemoveComments?o=g._createRemoveLineCommentsOperations(i.lines,n.startLineNumber):(g._normalizeInsertionPoint(e,i.lines,n.startLineNumber,this._tabSize),o=this._createAddLineCommentsOperations(i.lines,n.startLineNumber));const r=new d.L(n.positionLineNumber,n.positionColumn);for(let i=0,n=o.length;i<n;i++)t.addEditOperation(o[i].range,o[i].text),s.e.isEmpty(o[i].range)&&s.e.getStartPosition(o[i].range).equals(r)&&e.getLineContent(r.lineNumber).length+1===r.column&&(this._deltaColumn=(o[i].text||"").length);this._selectionId=t.trackSelection(n)}_attemptRemoveBlockComment(e,t,i,n){let o=t.startLineNumber,r=t.endLineNumber;const a=n.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn);let l=e.getLineContent(o).lastIndexOf(i,a-1),d=e.getLineContent(r).indexOf(n,t.endColumn-1-i.length);return-1!==l&&-1===d&&(d=e.getLineContent(o).indexOf(n,l+i.length),r=o),-1===l&&-1!==d&&(l=e.getLineContent(r).lastIndexOf(i,d),o=r),!t.isEmpty()||-1!==l&&-1!==d||(l=e.getLineContent(o).indexOf(i),-1!==l&&(d=e.getLineContent(o).indexOf(n,l+i.length))),-1!==l&&32===e.getLineContent(o).charCodeAt(l+i.length)&&(i+=" "),-1!==d&&32===e.getLineContent(r).charCodeAt(d-1)&&(n=" "+n,d-=1),-1!==l&&-1!==d?c._createRemoveBlockCommentOperations(new s.e(o,l+i.length+1,r,d+1),i,n):null}_executeBlockComment(e,t,i){e.tokenization.tokenizeIfCheap(i.startLineNumber);const n=e.getLanguageIdAtPosition(i.startLineNumber,1),o=this.languageConfigurationService.getLanguageConfiguration(n).comments;if(!o||!o.blockCommentStartToken||!o.blockCommentEndToken)return;const r=o.blockCommentStartToken,a=o.blockCommentEndToken;let l=this._attemptRemoveBlockComment(e,i,r,a);if(!l){if(i.isEmpty()){const t=e.getLineContent(i.startLineNumber);let n=u.LC(t);-1===n&&(n=t.length),l=c._createAddBlockCommentOperations(new s.e(i.startLineNumber,n+1,i.startLineNumber,t.length+1),r,a,this._insertSpace)}else l=c._createAddBlockCommentOperations(new s.e(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),r,a,this._insertSpace);1===l.length&&(this._deltaColumn=r.length+1)}this._selectionId=t.trackSelection(i);for(const e of l)t.addEditOperation(e.range,e.text)}getEditOperations(e,t){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine)return t.addEditOperation(new s.e(i.startLineNumber,e.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===e.getLineCount()?"":"\n"),void(this._selectionId=t.trackSelection(i));i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=g._gatherPreflightData(this._type,this._insertSpace,e,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return n.supported?this._executeLineComments(e,t,n,i):this._executeBlockComment(e,t,i)}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new h.Y(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){const i=[];for(let n=0,o=e.length;n<o;n++){const o=e[n];o.ignore||i.push(l.h.delete(new s.e(t+n,o.commentStrOffset+1,t+n,o.commentStrOffset+o.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){const i=[],n=this._insertSpace?" ":"";for(let o=0,s=e.length;o<s;o++){const s=e[o];s.ignore||i.push(l.h.insert(new d.L(t+o,s.commentStrOffset+1),s.commentStr+n))}return i}static nextVisibleColumn(e,t,i,n){return i?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,i,n){let o,s,r=1073741824;for(let o=0,s=t.length;o<s;o++){if(t[o].ignore)continue;const s=e.getLineContent(i+o);let a=0;for(let e=0,i=t[o].commentStrOffset;a<r&&e<i;e++)a=g.nextVisibleColumn(a,n,9===s.charCodeAt(e),1);a<r&&(r=a)}r=Math.floor(r/n)*n;for(let a=0,l=t.length;a<l;a++){if(t[a].ignore)continue;const l=e.getLineContent(i+a);let d=0;for(o=0,s=t[a].commentStrOffset;d<r&&o<s;o++)d=g.nextVisibleColumn(d,n,9===l.charCodeAt(o),1);t[a].commentStrOffset=d>r?o-1:o}}}var p=i(63580),m=i(84144);class f extends o.R6{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(a.c_);if(!t.hasModel())return;const n=[],o=t.getModel().getOptions(),r=t.getOption(22),l=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));l.sort(((e,t)=>s.e.compareRangesUsingStarts(e.selection,t.selection)));let d=l[0];for(let e=1;e<l.length;e++){const t=l[e];d.selection.endLineNumber===t.selection.startLineNumber&&(d.index<t.index?t.ignoreFirstLine=!0:(d.ignoreFirstLine=!0,d=t))}for(const e of l)n.push(new g(i,e.selection,o.tabSize,this._type,r.insertSpace,r.ignoreEmptyLines,e.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class _ extends o.R6{constructor(){super({id:"editor.action.blockComment",label:p.NC("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:r.u.writable,kbOpts:{kbExpr:r.u.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:m.eH.MenubarEditMenu,group:"5_insert",title:p.NC({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){const i=e.get(a.c_);if(!t.hasModel())return;const n=t.getOption(22),o=[],s=t.getSelections();for(const e of s)o.push(new c(e,n.insertSpace,i));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}(0,o.Qr)(class extends f{constructor(){super(0,{id:"editor.action.commentLine",label:p.NC("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:r.u.writable,kbOpts:{kbExpr:r.u.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:m.eH.MenubarEditMenu,group:"5_insert",title:p.NC({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}),(0,o.Qr)(class extends f{constructor(){super(1,{id:"editor.action.addCommentLine",label:p.NC("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:r.u.writable,kbOpts:{kbExpr:r.u.editorTextFocus,primary:(0,n.gx)(2089,2081),weight:100}})}}),(0,o.Qr)(class extends f{constructor(){super(2,{id:"editor.action.removeCommentLine",label:p.NC("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:r.u.writable,kbOpts:{kbExpr:r.u.editorTextFocus,primary:(0,n.gx)(2089,2099),weight:100}})}}),(0,o.Qr)(_)},93740:(e,t,i)=>{var n,o=i(65321),s=i(10244),r=i(74741),a=i(5976),l=i(1432),d=i(16830),h=i(29102),c=i(63580),u=i(84144),g=i(93983),p=i(5606),m=i(91847),f=i(33108),_=i(40382),v=function(e,t){return function(i,n){t(i,n,e)}};let b=n=class{static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,s,r,l,d){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=l,this._workspaceContextService=d,this._toDispose=new a.SL,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&o.Ay(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{this._editor.getOption(23)&&58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(23))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(6===e.target.type&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),11===e.target.type)return this._showScrollbarContextMenu(e.event);if(6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(23))return;if(!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?u.eH.SimpleEditorContext:u.eH.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),o=n.getActions({arg:e.uri});n.dispose();for(const t of o){const[,n]=t;let o=0;for(const t of n)if(t instanceof u.NZ){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new r.wY(t.id,t.label,n)),o++)}else i.push(t),o++;o&&i.push(new r.Z0)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(59);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),t=o.i(this._editor.getDomNode()),i=t.left+e.left,s=t.top+e.top+e.height;n={x:i,y:s}}const r=this._editor.getOption(125)&&!l.gn;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new s.gU(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new s.gU(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;if((0,_.x)(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(71);let i=0;const n=e=>({id:"menu-action-"+ ++i,label:e.label,tooltip:"",class:void 0,enabled:void 0===e.enabled||e.enabled,checked:e.checked,run:e.run}),o=(e,t,o,s,a)=>{if(!t)return n({label:e,enabled:t,run:()=>{}});const l=e=>()=>{this._configurationService.updateValue(o,e)},d=[];for(const e of a)d.push(n({label:e.label,checked:s===e.value,run:l(e.value)}));return((e,t)=>new r.wY("menu-action-"+ ++i,e,t,void 0))(e,d)},s=[];s.push(n({label:c.NC("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),s.push(new r.Z0),s.push(n({label:c.NC("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),s.push(o(c.NC("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:c.NC("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:c.NC("context.minimap.size.fill","Fill"),value:"fill"},{label:c.NC("context.minimap.size.fit","Fit"),value:"fit"}])),s.push(o(c.NC("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:c.NC("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:c.NC("context.minimap.slider.always","Always"),value:"always"}]));const a=this._editor.getOption(125)&&!l.gn;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:a?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>s,onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};b.ID="editor.contrib.contextmenu",b=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([v(1,p.i),v(2,p.u),v(3,g.i6),v(4,m.d),v(5,u.co),v(6,f.Ui),v(7,_.ec)],b);class C extends d.R6{constructor(){super({id:"editor.action.showContextMenu",label:c.NC("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:h.u.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;null===(i=b.get(t))||void 0===i||i.showContextMenu()}}(0,d._K)(b.ID,b,2),(0,d.Qr)(C)},41895:(e,t,i)=>{var n=i(5976),o=i(16830),s=i(29102),r=i(63580);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i<t;i++)if(!this.selections[i].equalsSelection(e.selections[i]))return!1;return!0}}class l{constructor(e,t,i){this.cursorState=e,this.scrollTop=t,this.scrollLeft=i}}class d extends n.JT{static get(e){return e.getContribution(d.ID)}constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new a(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new l(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}d.ID="editor.contrib.cursorUndoRedoController";class h extends o.R6{constructor(){super({id:"cursorUndo",label:r.NC("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;null===(n=d.get(t))||void 0===n||n.cursorUndo()}}class c extends o.R6{constructor(){super({id:"cursorRedo",label:r.NC("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;null===(n=d.get(t))||void 0===n||n.cursorRedo()}}(0,o._K)(d.ID,d,0),(0,o.Qr)(h),(0,o.Qr)(c)},54555:(e,t,i)=>{var n=i(5976),o=i(1432),s=i(93379),r=i.n(s),a=i(7795),l=i.n(a),d=i(90569),h=i.n(d),c=i(3565),u=i.n(c),g=i(19216),p=i.n(g),m=i(44589),f=i.n(m),_=i(97070),v={};v.styleTagTransform=f(),v.setAttributes=u(),v.insert=h().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p(),r()(_.Z,v),_.Z&&_.Z.locals&&_.Z.locals;var b=i(16830),C=i(50187),w=i(24314),y=i(3860),S=i(13961);class L{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new w.e(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new y.Y(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new y.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber<this.selection.endLineNumber?this.targetSelection=new y.Y(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new y.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,(this.selection.startLineNumber,this.selection.endLineNumber,this.targetPosition.column-this.selection.endColumn+this.selection.startColumn),this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new y.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn):this.targetSelection=this.selection}computeCursorState(e,t){return this.targetSelection}}function x(e){return o.dz?e.altKey:e.ctrlKey}class k extends n.JT{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(34)&&!this._editor.getOption(21)&&(x(e)&&(this._modifierPressed=!0),this._mouseDown&&x(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(34)&&!this._editor.getOption(21)&&(x(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===k.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(null===this._dragSelection){const e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}x(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new C.L(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){const e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:o}=e;i=[new y.Y(n,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new y.Y(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(x(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(k.ID,new L(this._dragSelection,t,x(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new w.e(e.lineNumber,e.column,e.lineNumber,e.column),options:k._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}k.ID="editor.contrib.dragAndDrop",k.TRIGGER_KEY_VALUE=o.dz?6:5,k._DECORATION_OPTIONS=S.qx.register({description:"dnd-target",className:"dnd-target"}),(0,b._K)(k.ID,k,2)},76917:(e,t,i)=>{var n=i(71050),o=i(98401),s=i(70666),r=i(88216),a=i(30335),l=i(94565);l.P.registerCommand("_executeDocumentSymbolProvider",(function(e,...t){return i=this,l=void 0,h=function*(){const[i]=t;(0,o.p_)(s.o.isUri(i));const l=e.get(a.Je),d=e.get(r.S),h=yield d.createModelReference(i);try{return(yield l.getOrCreate(h.object.textEditorModel,n.T.None)).getTopLevelSymbols()}finally{h.dispose()}},new((d=void 0)||(d=Promise))((function(e,t){function n(e){try{s(h.next(e))}catch(e){t(e)}}function o(e){try{s(h.throw(e))}catch(e){t(e)}}function s(t){var i;t.done?e(t.value):(i=t.value,i instanceof d?i:new d((function(e){e(i)}))).then(n,o)}s((h=h.apply(i,l||[])).next())}));var i,l,d,h}))},30335:(e,t,i)=>{i.d(t,{C3:()=>C,H3:()=>b,Je:()=>w,sT:()=>v});var n=i(9488),o=i(71050),s=i(17301),r=i(53725),a=i(43702),l=i(50187),d=i(24314),h=i(88191),c=i(72065),u=i(65026),g=i(73733),p=i(5976),m=i(71922),f=function(e,t){return function(i,n){t(i,n,e)}};class _{remove(){var e;null===(e=this.parent)||void 0===e||e.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class v extends _{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class b extends _{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class C extends _{static create(e,t,i){const r=new o.A(i),a=new C(t.uri),l=e.ordered(t),d=l.map(((e,i)=>{var n;const o=_.findId(`provider_${i}`,a),l=new b(o,a,null!==(n=e.displayName)&&void 0!==n?n:"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,r.token)).then((e=>{for(const t of e||[])C._makeOutlineElement(t,l);return l}),(e=>((0,s.Cp)(e),l))).then((e=>{_.empty(e)?e.remove():a._groups.set(o,e)}))})),h=e.onDidChange((()=>{const i=e.ordered(t);(0,n.fS)(i,l)||r.cancel()}));return Promise.all(d).then((()=>r.token.isCancellationRequested&&!i.isCancellationRequested?C.create(e,t,i):a._compact())).finally((()=>{h.dispose()}))}static _makeOutlineElement(e,t){const i=_.findId(e,t),n=new v(i,t,e);if(e.children)for(const t of e.children)C._makeOutlineElement(t,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=r.$.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof v?e.push(t.symbol):e.push(...r.$.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>d.e.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return C._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>l.L.compare(d.e.getStartPosition(e.range),d.e.getStartPosition(t.range))||l.L.compare(d.e.getEndPosition(t.range),d.e.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&C._flattenDocumentSymbols(e,n.children,n.name)}}const w=(0,c.yh)("IOutlineModelService");let y=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new p.SL,this._cache=new a.z6(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved((e=>{this._cache.delete(e.id)})))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return i=this,s=void 0,a=function*(){const i=this._languageFeaturesService.documentSymbolProvider,s=i.ordered(e);let r=this._cache.get(e.id);if(!r||r.versionId!==e.getVersionId()||!(0,n.fS)(r.provider,s)){const t=new o.A;r={versionId:e.getVersionId(),provider:s,promiseCnt:0,source:t,promise:C.create(i,e,t.token),model:void 0},this._cache.set(e.id,r);const n=Date.now();r.promise.then((t=>{r.model=t,this._debounceInformation.update(e,Date.now()-n)})).catch((t=>{this._cache.delete(e.id)}))}if(r.model)return r.model;r.promiseCnt+=1;const a=t.onCancellationRequested((()=>{0==--r.promiseCnt&&(r.source.cancel(),this._cache.delete(e.id))}));try{return yield r.promise}finally{a.dispose()}},new((r=void 0)||(r=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function o(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(n,o)}l((a=a.apply(i,s||[])).next())}));var i,s,r,a}};y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([f(0,m.p),f(1,h.A),f(2,g.q)],y),(0,u.z)(w,y,1)},55015:(e,t,i)=>{var n,o=i(16830),s=i(10637),r=i(65321),a=i(9488),l=i(15393),d=i(73278),h=i(5976),c=i(81170),u=i(1432),g=i(98e3),p=i(35715),m=i(19701),f=i(66007),_=i(24314),v=i(71922),b=i(91092),C=i(16467),w=i(52165),y=i(63580),S=i(84972),L=i(93983),x=i(72065),k=i(90535),N=i(41157),D=i(85197),E=function(e,t){return function(i,n){t(i,n,e)}},I=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const T="editor.changePasteType",M=new L.uy("pasteWidgetVisible",!1,(0,y.NC)("pasteWidgetVisible","Whether the paste widget is showing")),R="application/vnd.code.copyMetadata";let A=n=class extends h.JT{static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,o,s,a){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=o,this._quickInputService=s,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register((0,r.nm)(l,"copy",(e=>this.handleCopy(e)))),this._register((0,r.nm)(l,"cut",(e=>this.handleCopy(e)))),this._register((0,r.nm)(l,"paste",(e=>this.handlePaste(e)),!0)),this._pasteProgressManager=this._register(new w.r("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(D.p,"pasteIntoEditor",e,M,{id:T,label:(0,y.NC)("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},document.execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(83).enabled&&!this._editor.getOption(89)}handleCopy(e){var t,i;if(!this._editor.hasTextFocus())return;if(u.$L&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled())return;const n=this._editor.getModel(),o=this._editor.getSelections();if(!n||!(null==o?void 0:o.length))return;const s=this._editor.getOption(36);let r=o;const d=1===o.length&&o[0].isEmpty();if(d){if(!s)return;r=[new _.e(r[0].startLineNumber,1,r[0].startLineNumber,1+n.getLineLength(r[0].startLineNumber))]}const h=null===(t=this._editor._getViewModel())||void 0===t?void 0:t.getPlainTextToCopy(o,s,u.ED),c={multicursorText:Array.isArray(h)?h:null,pasteOnNewLine:d,mode:null},p=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter((e=>!!e.prepareDocumentPaste));if(!p.length)return void this.setCopyMetadata(e.clipboardData,{defaultPastePayload:c});const f=(0,m.B)(e.clipboardData),v=p.flatMap((e=>{var t;return null!==(t=e.copyMimeTypes)&&void 0!==t?t:[]})),b=(0,g.R)();this.setCopyMetadata(e.clipboardData,{id:b,providerCopyMimeTypes:v,defaultPastePayload:c});const C=(0,l.PG)((e=>I(this,void 0,void 0,(function*(){const t=(0,a.kX)(yield Promise.all(p.map((t=>I(this,void 0,void 0,(function*(){try{return yield t.prepareDocumentPaste(n,r,f,e)}catch(e){return void console.error(e)}}))))));t.reverse();for(const e of t)for(const[t,i]of e)f.replace(t,i);return f}))));null===(i=this._currentCopyOperation)||void 0===i||i.dataTransferPromise.cancel(),this._currentCopyOperation={handle:b,dataTransferPromise:C}}handlePaste(e){var t,i;return I(this,void 0,void 0,(function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;null===(t=this._currentPasteOperation)||void 0===t||t.cancel(),this._currentPasteOperation=void 0;const n=this._editor.getModel(),o=this._editor.getSelections();if(!(null==o?void 0:o.length)||!n)return;if(!this.isPasteAsEnabled())return;const s=this.fetchCopyMetadata(e),r=(0,m.L)(e.clipboardData);r.delete(R);const a=[...e.clipboardData.types,...null!==(i=null==s?void 0:s.providerCopyMimeTypes)&&void 0!==i?i:[],c.v.uriList],l=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter((e=>{var t;return null===(t=e.pasteMimeTypes)||void 0===t?void 0:t.some((e=>(0,d.SN)(e,a)))}));l.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,l,o,r,s):this.doPasteInline(l,o,r,s))}))}doPasteInline(e,t,i,n){const o=(0,l.PG)((s=>I(this,void 0,void 0,(function*(){const r=this._editor;if(!r.hasModel())return;const a=r.getModel(),l=new C.Dl(r,3,void 0,s);try{if(yield this.mergeInDataFromCopy(i,n,l.token),l.token.isCancellationRequested)return;const o=e.filter((e=>O(e,i)));if(!o.length||1===o.length&&"text"===o[0].id)return void(yield this.applyDefaultPasteHandler(i,n,l.token));const s=yield this.getPasteEdits(o,i,a,t,l.token);if(l.token.isCancellationRequested)return;if(1===s.length&&"text"===s[0].providerId)return void(yield this.applyDefaultPasteHandler(i,n,l.token));if(s.length){const e="afterPaste"===r.getOption(83).showPasteSelector;return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:s},e,l.token)}yield this.applyDefaultPasteHandler(i,n,l.token)}finally{l.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}))));this._pasteProgressManager.showWhile(t[0].getEndPosition(),(0,y.NC)("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),o),this._currentPasteOperation=o}showPasteAsPick(e,t,i,n,o){const s=(0,l.PG)((r=>I(this,void 0,void 0,(function*(){const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),d=new C.Dl(a,3,void 0,r);try{if(yield this.mergeInDataFromCopy(n,o,d.token),d.token.isCancellationRequested)return;let s=t.filter((e=>O(e,n)));e&&(s=s.filter((t=>t.id===e)));const r=yield this.getPasteEdits(s,n,l,i,d.token);if(d.token.isCancellationRequested)return;if(!r.length)return;let a;if(e)a=r.at(0);else{const e=yield this._quickInputService.pick(r.map((e=>({label:e.label,description:e.providerId,detail:e.detail,edit:e}))),{placeHolder:(0,y.NC)("pasteAsPickerPlaceholder","Select Paste Action")});a=null==e?void 0:e.edit}if(!a)return;const h=(0,b.n)(l.uri,i,a);yield this._bulkEditService.apply(h,{editor:this._editor})}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}))));this._progressService.withProgress({location:10,title:(0,y.NC)("pasteAsProgress","Running paste handlers")},(()=>s))}setCopyMetadata(e,t){e.setData(R,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const i=e.clipboardData.getData(R);if(i)try{return JSON.parse(i)}catch(e){return}const[n,o]=p.b6.getTextData(e.clipboardData);return o?{defaultPastePayload:{mode:o.mode,multicursorText:null!==(t=o.multicursorText)&&void 0!==t?t:null,pasteOnNewLine:!!o.isFromEmptySelection}}:void 0}mergeInDataFromCopy(e,t,i){var n;return I(this,void 0,void 0,(function*(){if((null==t?void 0:t.id)&&(null===(n=this._currentCopyOperation)||void 0===n?void 0:n.handle)===t.id){const t=yield this._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[i,n]of t)e.replace(i,n)}if(!e.has(c.v.uriList)){const t=yield this._clipboardService.readResources();if(i.isCancellationRequested)return;t.length&&e.append(c.v.uriList,(0,d.ZO)(d.Z0.create(t)))}}))}getPasteEdits(e,t,i,n,o){return I(this,void 0,void 0,(function*(){const s=yield(0,l.eP)(Promise.all(e.map((e=>I(this,void 0,void 0,(function*(){var s;try{const r=yield null===(s=e.provideDocumentPasteEdits)||void 0===s?void 0:s.call(e,i,n,t,o);if(r)return Object.assign(Object.assign({},r),{providerId:e.id})}catch(e){console.error(e)}}))))),o),r=(0,a.kX)(null!=s?s:[]);return(0,b.C)(r),r}))}applyDefaultPasteHandler(e,t,i){var n,o,s;return I(this,void 0,void 0,(function*(){const r=null!==(n=e.get(c.v.text))&&void 0!==n?n:e.get("text");if(!r)return;const a=yield r.asString();if(i.isCancellationRequested)return;const l={text:a,pasteOnNewLine:null!==(o=null==t?void 0:t.defaultPastePayload.pasteOnNewLine)&&void 0!==o&&o,multicursorText:null!==(s=null==t?void 0:t.defaultPastePayload.multicursorText)&&void 0!==s?s:null,mode:null};this._editor.trigger("keyboard","paste",l)}))}};function O(e,t){var i;return Boolean(null===(i=e.pasteMimeTypes)||void 0===i?void 0:i.some((e=>t.matches(e))))}A.ID="editor.contrib.copyPasteActionController",A=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([E(1,x.TG),E(2,f.vu),E(3,S.p),E(4,v.p),E(5,N.eJ),E(6,k.R9)],A);var P=i(51512);(0,o._K)(A.ID,A,0),(0,s.y)(P.v),(0,o.fK)(new class extends o._l{constructor(){super({id:T,precondition:M,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){var n;return null===(n=A.get(t))||void 0===n?void 0:n.changePasteType()}}),(0,o.Qr)(class extends o.R6{constructor(){super({id:"editor.action.pasteAs",label:y.NC("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:y.NC("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(e,t,i){var n;const o="string"==typeof(null==i?void 0:i.id)?i.id:void 0;return null===(n=A.get(t))||void 0===n?void 0:n.pasteAs(o)}})},51512:(e,t,i)=>{i.d(t,{P:()=>y,v:()=>S});var n=i(9488),o=i(73278),s=i(5976),r=i(81170),a=i(66663),l=i(95935),d=i(70666),h=i(71922),c=i(63580),u=i(40382),g=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},p=function(e,t){return function(i,n){t(i,n,e)}},m=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const f=(0,c.NC)("builtIn","Built-in");class _{provideDocumentPasteEdits(e,t,i,n){return m(this,void 0,void 0,(function*(){const e=yield this.getEdit(i,n);return e?{insertText:e.insertText,label:e.label,detail:e.detail,handledMimeType:e.handledMimeType,yieldTo:e.yieldTo}:void 0}))}provideDocumentOnDropEdits(e,t,i,n){return m(this,void 0,void 0,(function*(){const e=yield this.getEdit(i,n);return e?{insertText:e.insertText,label:e.label,handledMimeType:e.handledMimeType,yieldTo:e.yieldTo}:void 0}))}}class v extends _{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[r.v.text],this.pasteMimeTypes=[r.v.text]}getEdit(e,t){return m(this,void 0,void 0,(function*(){const t=e.get(r.v.text);if(!t)return;if(e.has(r.v.uriList))return;const i=yield t.asString();return{handledMimeType:r.v.text,label:(0,c.NC)("text.label","Insert Plain Text"),detail:f,insertText:i}}))}}class b extends _{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[r.v.uriList],this.pasteMimeTypes=[r.v.uriList]}getEdit(e,t){return m(this,void 0,void 0,(function*(){const i=yield w(e);if(!i.length||t.isCancellationRequested)return;let n=0;const o=i.map((({uri:e,originalText:t})=>e.scheme===a.lg.file?e.fsPath:(n++,t))).join(" ");let s;return s=n>0?i.length>1?(0,c.NC)("defaultDropProvider.uriList.uris","Insert Uris"):(0,c.NC)("defaultDropProvider.uriList.uri","Insert Uri"):i.length>1?(0,c.NC)("defaultDropProvider.uriList.paths","Insert Paths"):(0,c.NC)("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:r.v.uriList,insertText:o,label:s,detail:f}}))}}let C=class extends _{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[r.v.uriList],this.pasteMimeTypes=[r.v.uriList]}getEdit(e,t){return m(this,void 0,void 0,(function*(){const i=yield w(e);if(!i.length||t.isCancellationRequested)return;const o=(0,n.kX)(i.map((({uri:e})=>{const t=this._workspaceContextService.getWorkspaceFolder(e);return t?(0,l.lX)(t.uri,e):void 0})));return o.length?{handledMimeType:r.v.uriList,insertText:o.join(" "),label:i.length>1?(0,c.NC)("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):(0,c.NC)("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:f}:void 0}))}};function w(e){return m(this,void 0,void 0,(function*(){const t=e.get(r.v.uriList);if(!t)return[];const i=yield t.asString(),n=[];for(const e of o.Z0.parse(i))try{n.push({uri:d.o.parse(e),originalText:e})}catch(e){}return n}))}C=g([p(0,u.ec)],C);let y=class extends s.JT{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new v)),this._register(e.documentOnDropEditProvider.register("*",new b)),this._register(e.documentOnDropEditProvider.register("*",new C(t)))}};y=g([p(0,h.p),p(1,u.ec)],y);let S=class extends s.JT{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new v)),this._register(e.documentPasteEditProvider.register("*",new b)),this._register(e.documentPasteEditProvider.register("*",new C(t)))}};S=g([p(0,h.p),p(1,u.ec)],S)},63218:(e,t,i)=>{var n=i(16830),o=i(800),s=i(10637),r=i(51512),a=i(63580),l=i(23193),d=i(89872),h=i(9488),c=i(15393),u=i(73278),g=i(5976),p=i(19701),m=i(24314),f=i(71922);class _{constructor(e){this.identifier=e}}var v=i(65026),b=i(72065);const C=(0,b.yh)("treeViewsDndService");(0,v.z)(C,class{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}},1);var w,y=i(16467),S=i(52165),L=i(33108),x=i(93983),k=i(16021),N=i(91092),D=i(85197),E=function(e,t){return function(i,n){t(i,n,e)}},I=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const T="editor.experimental.dropIntoEditor.defaultProvider",M="editor.changeDropType",R=new x.uy("dropWidgetVisible",!1,(0,a.NC)("dropWidgetVisible","Whether the drop widget is showing"));let A=w=class extends g.JT{static get(e){return e.getContribution(w.ID)}constructor(e,t,i,n,o){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=o,this.treeItemsTransfer=k.Ej.getInstance(),this._dropProgressManager=this._register(t.createInstance(S.r,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(D.p,"dropIntoEditor",e,R,{id:M,label:(0,a.NC)("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor((t=>this.onDropIntoEditor(e,t.position,t.event))))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,i){var n;return I(this,void 0,void 0,(function*(){if(!i.dataTransfer||!e.hasModel())return;null===(n=this._currentOperation)||void 0===n||n.cancel(),e.focus(),e.setPosition(t);const o=(0,c.PG)((n=>I(this,void 0,void 0,(function*(){const s=new y.Dl(e,1,void 0,n);try{const o=yield this.extractDataTransferData(i);if(0===o.size||s.token.isCancellationRequested)return;const r=e.getModel();if(!r)return;const a=this._languageFeaturesService.documentOnDropEditProvider.ordered(r).filter((e=>!e.dropMimeTypes||e.dropMimeTypes.some((e=>o.matches(e))))),l=yield this.getDropEdits(a,r,t,o,s);if(s.token.isCancellationRequested)return;if(l.length){const i=this.getInitialActiveEditIndex(r,l),o="afterDrop"===e.getOption(35).showDropSelector;yield this._postDropWidgetManager.applyEditAndShowIfNeeded([m.e.fromPositions(t)],{activeEditIndex:i,allEdits:l},o,n)}}finally{s.dispose(),this._currentOperation===o&&(this._currentOperation=void 0)}}))));this._dropProgressManager.showWhile(t,(0,a.NC)("dropIntoEditorProgress","Running drop handlers. Click to cancel"),o),this._currentOperation=o}))}getDropEdits(e,t,i,n,o){return I(this,void 0,void 0,(function*(){const s=yield(0,c.eP)(Promise.all(e.map((e=>I(this,void 0,void 0,(function*(){try{const s=yield e.provideDocumentOnDropEdits(t,i,n,o.token);if(s)return Object.assign(Object.assign({},s),{providerId:e.id})}catch(e){console.error(e)}}))))),o.token),r=(0,h.kX)(null!=s?s:[]);return(0,N.C)(r)}))}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(T,{resource:e.uri});for(const[e,n]of Object.entries(i)){const i=t.findIndex((t=>n===t.providerId&&t.handledMimeType&&(0,u.SN)(e,[t.handledMimeType])));if(i>=0)return i}return 0}extractDataTransferData(e){return I(this,void 0,void 0,(function*(){if(!e.dataTransfer)return new u.Hl;const t=(0,p.L)(e.dataTransfer);if(this.treeItemsTransfer.hasData(_.prototype)){const e=this.treeItemsTransfer.getData(_.prototype);if(Array.isArray(e))for(const i of e){const e=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(e)for(const[i,n]of e)t.replace(i,n)}}return t}))}};A.ID="editor.contrib.dropIntoEditorController",A=w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([E(1,b.TG),E(2,L.Ui),E(3,f.p),E(4,C)],A),(0,n._K)(A.ID,A,2),(0,n.fK)(new class extends n._l{constructor(){super({id:M,precondition:R,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){var n;null===(n=A.get(t))||void 0===n||n.changeDropType()}}),(0,s.y)(r.P),d.B.as(l.IP.Configuration).registerConfiguration(Object.assign(Object.assign({},o.wk),{properties:{[T]:{type:"object",scope:5,description:a.NC("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}}))},91092:(e,t,i)=>{i.d(t,{C:()=>s,n:()=>o});var n=i(66007);function o(e,t,i){var o,s;return{edits:[...t.map((t=>new n.Gl(e,"string"==typeof i.insertText?{range:t,text:i.insertText,insertAsSnippet:!1}:{range:t,text:i.insertText.snippet,insertAsSnippet:!0}))),...null!==(s=null===(o=i.additionalEdit)||void 0===o?void 0:o.edits)&&void 0!==s?s:[]]}}function s(e){var t;function i(e,t){return"providerId"in e&&e.providerId===t.providerId||"mimeType"in e&&e.mimeType===t.handledMimeType}const n=new Map;for(const o of e)for(const s of null!==(t=o.yieldTo)&&void 0!==t?t:[])for(const t of e)if(t!==o&&i(s,t)){let e=n.get(o);e||(e=[],n.set(o,e)),e.push(t)}if(!n.size)return Array.from(e);const o=new Set,s=[];return function e(t){if(!t.length)return[];const i=t[0];if(s.includes(i))return console.warn(`Yield to cycle detected for ${i.providerId}`),t;if(o.has(i))return e(t.slice(1));let r=[];const a=n.get(i);return a&&(s.push(i),r=e(a),s.pop()),o.add(i),[...r,i,...e(t.slice(1))]}(Array.from(e))}},85197:(e,t,i)=>{i.d(t,{p:()=>M});var n=i(65321),o=i(32052),s=i(74741),r=i(4669),a=i(5976),l=i(93379),d=i.n(l),h=i(7795),c=i.n(h),u=i(90569),g=i.n(u),p=i(3565),m=i.n(p),f=i(19216),_=i.n(f),v=i(44589),b=i.n(v),C=i(33399),w={};w.styleTagTransform=b(),w.setAttributes=m(),w.insert=g().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=_(),d()(C.Z,w),C.Z&&C.Z.locals&&C.Z.locals;var y,S=i(66007),L=i(93983),x=i(5606),k=i(72065),N=i(91847),D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},E=function(e,t){return function(i,n){t(i,n,e)}},I=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let T=y=class extends a.JT{constructor(e,t,i,n,o,s,l,d,h,c){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=o,this.edits=s,this.onSelectNewEdit=l,this._contextMenuService=d,this._keybindingService=c,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(h),this.visibleContext.set(!0),this._register((0,a.OF)((()=>this.visibleContext.reset()))),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,a.OF)((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition((e=>{o.containsPosition(e.position)||this.dispose()}))),this._register(r.ju.runAndSubscribe(c.onDidUpdateKeybindings,(()=>{this._updateButtonTitle()})))}_updateButtonTitle(){var e;const t=null===(e=this._keybindingService.lookupKeybinding(this.showCommand.id))||void 0===e?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=n.$(".post-edit-widget"),this.button=this._register(new o.z(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(n.nm(this.domNode,n.tw.CLICK,(()=>this.showSelector())))}getId(){return y.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=n.i(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map(((e,t)=>(0,s.xw)({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}})))})}};T.baseId="editor.widget.postEditWidget",T=y=D([E(7,x.i),E(8,L.i6),E(9,N.d)],T);let M=class extends a.JT{constructor(e,t,i,n,o,s){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=o,this._bulkEditService=s,this._currentWidget=this._register(new a.XK),this._register(r.ju.any(t.onDidChangeModel,t.onDidChangeModelContent)((()=>this.clear())))}applyEditAndShowIfNeeded(e,t,i,n){var o,s;return I(this,void 0,void 0,(function*(){const r=this._editor.getModel();if(!r||!e.length)return;const a=t.allEdits[t.activeEditIndex];if(!a)return;let l=[];l=("string"==typeof a.insertText?""===a.insertText:""===a.insertText.snippet)?[]:e.map((e=>new S.Gl(r.uri,"string"==typeof a.insertText?{range:e,text:a.insertText,insertAsSnippet:!1}:{range:e,text:a.insertText.snippet,insertAsSnippet:!0})));const d={edits:[...l,...null!==(s=null===(o=a.additionalEdit)||void 0===o?void 0:o.edits)&&void 0!==s?s:[]]},h=e[0],c=r.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);let u,g;try{u=yield this._bulkEditService.apply(d,{editor:this._editor,token:n}),g=r.getDecorationRange(c[0])}finally{r.deltaDecorations(c,[])}i&&u.isApplied&&t.allEdits.length>1&&this.show(null!=g?g:h,t,(o=>I(this,void 0,void 0,(function*(){const s=this._editor.getModel();s&&(yield s.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:o,allEdits:t.allEdits},i,n))}))))}))}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(T,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;null===(e=this._currentWidget.value)||void 0===e||e.showSelector()}};M=D([E(4,k.TG),E(5,S.vu)],M)},16467:(e,t,i)=>{i.d(t,{yy:()=>f,Dl:()=>_,YQ:()=>v});var n=i(97295),o=i(24314),s=i(71050),r=i(5976),a=i(16830),l=i(93983),d=i(91741),h=i(72065),c=i(65026),u=i(63580);const g=(0,h.yh)("IEditorCancelService"),p=new l.uy("cancellableOperation",!1,(0,u.NC)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,c.z)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:p.bindTo(e.get(l.i6)),tokens:new d.S}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class m extends s.A{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.fK)(new class extends a._l{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(e,t){e.get(g).cancel(t)}});class f{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?n.WU("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof f))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new f(e,this.flags))}}class _ extends m{constructor(e,t,i,n){super(e,n),this._listener=new r.SL,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&o.e.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&o.e.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class v extends s.A{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}},96962:(e,t,i)=>{i.d(t,{pR:()=>yt});var n=i(15393),o=i(5976),s=i(97295),r=i(16830),a=i(8625),l=i(29102),d=i(84973),h=i(9488),c=i(61329),u=i(50187),g=i(24314),p=i(3860),m=i(77277),f=i(13961),_=i(73910),v=i(97781);class b{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e<this._decorations.length?this._decorations[e]:null;return t?this._editor.getModel().getDecorationRange(t):null}getCurrentMatchesPosition(e){const t=this._editor.getModel().getDecorationsInRange(e);for(const e of t){const t=e.options;if(t===b._FIND_MATCH_DECORATION||t===b._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(e.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,o=this._decorations.length;n<o;n++){const o=this._editor.getModel().getDecorationRange(this._decorations[n]);if(e.equalsRange(o)){t=this._decorations[n],i=n+1;break}}return null===this._highlightedDecorationId&&null===t||this._editor.changeDecorations((e=>{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){const e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new g.e(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,b._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=b._FIND_MATCH_DECORATION;const o=[];if(e.length>1e3){n=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,s=Math.max(2,Math.ceil(3/i));let r=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,i=e.length;t<i;t++){const i=e[t].range;a+s>=i.startLineNumber?i.endLineNumber>a&&(a=i.endLineNumber):(o.push({range:new g.e(r,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),r=i.startLineNumber,a=i.endLineNumber)}o.push({range:new g.e(r,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const s=new Array(e.length);for(let t=0,i=e.length;t<i;t++)s[t]={range:e[t].range,options:n};this._decorations=i.deltaDecorations(this._decorations,s),this._overviewRulerApproximateDecorations=i.deltaDecorations(this._overviewRulerApproximateDecorations,o),this._rangeHighlightDecorationId&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach((e=>i.removeDecoration(e))),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,b._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumber<e.lineNumber)return n;if(!(n.endColumn>e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;t<i;t++){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.startLineNumber<e.lineNumber)){if(n.startLineNumber>e.lineNumber)return n;if(!(n.startColumn<e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}}b._CURRENT_FIND_MATCH_DECORATION=f.qx.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,v.EN)(_.Fm_),position:d.sh.Center},minimap:{color:(0,v.EN)(_.SUY),position:d.F5.Inline}}),b._FIND_MATCH_DECORATION=f.qx.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,v.EN)(_.Fm_),position:d.sh.Center},minimap:{color:(0,v.EN)(_.SUY),position:d.F5.Inline}}),b._FIND_MATCH_NO_OVERVIEW_DECORATION=f.qx.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),b._FIND_MATCH_ONLY_OVERVIEW_DECORATION=f.qx.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,v.EN)(_.Fm_),position:d.sh.Center}}),b._RANGE_HIGHLIGHT_DECORATION=f.qx.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),b._FIND_SCOPE_DECORATION=f.qx.register({description:"find-scope",className:"findScope",isWholeLine:!0});class C{constructor(e,t,i){this._editorSelection=e,this._ranges=t,this._replaceStrings=i,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){const e=[];for(let t=0;t<this._ranges.length;t++)e.push({range:this._ranges[t],text:this._replaceStrings[t]});e.sort(((e,t)=>g.e.compareRangesUsingStarts(e.range,t.range)));const i=[];let n=e[0];for(let t=1;t<e.length;t++)n.range.endLineNumber===e[t].range.startLineNumber&&n.range.endColumn===e[t].range.startColumn?(n.range=n.range.plusRange(e[t].range),n.text=n.text+e[t].text):(i.push(n),n=e[t]);i.push(n);for(const e of i)t.addEditOperation(e.range,e.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}function w(e,t){if(e&&""!==e[0]){const i=y(e,t,"-"),n=y(e,t,"_");return i&&!n?S(e,t,"-"):!i&&n?S(e,t,"_"):e[0].toUpperCase()===e[0]?t.toUpperCase():e[0].toLowerCase()===e[0]?t.toLowerCase():s.Kw(e[0][0])&&t.length>0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function y(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function S(e,t,i){const n=t.split(i),o=e[0].split(i);let s="";return n.forEach(((e,t)=>{s+=w([o[t]],e)+i})),s.slice(0,-1)}class L{constructor(e){this.staticValue=e,this.kind=0}}class x{constructor(e){this.pieces=e,this.kind=1}}class k{static fromStaticValue(e){return new k([N.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new L(e[0].staticValue):this._state=new x(e):this._state=new L("")}buildReplaceString(e,t){if(0===this._state.kind)return t?w(e,this._state.staticValue):this._state.staticValue;let i="";for(let t=0,n=this._state.pieces.length;t<n;t++){const n=this._state.pieces[t];if(null!==n.staticValue){i+=n.staticValue;continue}let o=k._substitute(n.matchIndex,e);if(null!==n.caseOps&&n.caseOps.length>0){const e=[],t=n.caseOps.length;let i=0;for(let s=0,r=o.length;s<r;s++){if(i>=t){e.push(o.slice(s));break}switch(n.caseOps[i]){case"U":e.push(o[s].toUpperCase());break;case"u":e.push(o[s].toUpperCase()),i++;break;case"L":e.push(o[s].toLowerCase());break;case"l":e.push(o[s].toLowerCase()),i++;break;default:e.push(o[s])}}o=e.join("")}i+=o}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(e<t.length)return(t[e]||"")+i;i=String(e%10)+i,e=Math.floor(e/10)}return"$"+i}}class N{static staticValue(e){return new N(e,-1,null)}static caseOps(e,t){return new N(null,e,t)}constructor(e,t,i){this.staticValue=e,this.matchIndex=t,i&&0!==i.length?this.caseOps=i.slice(0):this.caseOps=null}}class D{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){0!==e.length&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,i){0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=N.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=N.caseOps(e,i),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=N.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new k(this._result)}}var E=i(93983);const I=new E.uy("findWidgetVisible",!1),T=(I.toNegated(),new E.uy("findInputFocussed",!1)),M=new E.uy("replaceInputFocussed",!1),R={primary:545,mac:{primary:2593}},A={primary:565,mac:{primary:2613}},O={primary:560,mac:{primary:2608}},P={primary:554,mac:{primary:2602}},F={primary:558,mac:{primary:2606}},B="editor.action.nextMatchFindAction",W="editor.action.previousMatchFindAction",V="closeFindWidget",H="toggleFindCaseSensitive",z="toggleFindWholeWord",K="toggleFindRegex",U="toggleFindInSelection",j="togglePreserveCase",$="editor.action.replaceOne",q="editor.action.replaceAll",Z=19999;class G{constructor(e,t){this._toDispose=new o.SL,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new n._F,this._decorations=new b(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new n.pY((()=>this.research(!1)),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,o.B9)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new g.e(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));const n=this._findMatches(i,!1,Z);this._decorations.set(n,i);const o=this._editor.getSelection();let s=this._decorations.getCurrentMatchesPosition(o);if(0===s&&n.length>0){const e=(0,h.lG)(n.map((e=>e.range)),(e=>g.e.compareRangesUsingStarts(e,o)>=0));s=e>0?e-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(40).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||1===n?(1===i?i=o.getLineCount():i--,n=o.getLineMaxColumn(i)):n--,new u.L(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()<Z){let t=this._decorations.matchBeforePosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),t=this._decorations.matchBeforePosition(e)),void(t&&this._setCurrentFindMatch(t))}if(this._cannotFind())return;const i=this._decorations.getFindScope(),n=G._getSearchRange(this._editor.getModel(),i);n.getEndPosition().isBefore(e)&&(e=n.getEndPosition()),e.isBefore(n.getStartPosition())&&(e=n.getEndPosition());const{lineNumber:o,column:s}=e,r=this._editor.getModel();let a=new u.L(o,s),l=r.findPreviousMatch(this._state.searchString,a,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,!1);return l&&l.range.isEmpty()&&l.range.getStartPosition().equals(a)&&(a=this._prevSearchPosition(a),l=r.findPreviousMatch(this._state.searchString,a,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,!1)),l?t||n.containsRange(l.range)?void this._setCurrentFindMatch(l.range):this._moveToPrevMatch(l.range.getStartPosition(),!0):void 0}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||n===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,n=1):n++,new u.L(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()<Z){let t=this._decorations.matchAfterPosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),t=this._decorations.matchAfterPosition(e)),void(t&&this._setCurrentFindMatch(t))}const t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)}_getNextMatch(e,t,i,n=!1){if(this._cannotFind())return null;const o=this._decorations.getFindScope(),s=G._getSearchRange(this._editor.getModel(),o);s.getEndPosition().isBefore(e)&&(e=s.getStartPosition()),e.isBefore(s.getStartPosition())&&(e=s.getStartPosition());const{lineNumber:r,column:a}=e,l=this._editor.getModel();let d=new u.L(r,a),h=l.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t);return i&&h&&h.range.isEmpty()&&h.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),h=l.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t)),h?n||s.containsRange(h.range)?h:this._getNextMatch(h.range.getEndPosition(),t,i,!0):null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(e){const t=this._decorations.getDecorationRangeAt(e);t&&this._setCurrentFindMatch(t)}moveToMatch(e){this._moveToMatch(e)}_getReplacePattern(){return this._state.isRegex?function(e){if(!e||0===e.length)return new k(null);const t=[],i=new D(e);for(let n=0,o=e.length;n<o;n++){const s=e.charCodeAt(n);if(92!==s){if(36===s){if(n++,n>=o)break;const s=e.charCodeAt(n);if(36===s){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===s||38===s){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=s&&s<=57){let r=s-48;if(n+1<o){const o=e.charCodeAt(n+1);if(48<=o&&o<=57){n++,r=10*r+(o-48),i.emitUnchanged(n-2),i.emitMatchIndex(r,n+1,t),t.length=0;continue}}i.emitUnchanged(n-1),i.emitMatchIndex(r,n+1,t),t.length=0;continue}}}else{if(n++,n>=o)break;const s=e.charCodeAt(n);switch(s){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(s))}}}return i.finalize()}(this._state.replaceString):k.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){const n=e.buildReplaceString(i.matches,this._state.preserveCase),o=new c.T4(t,n);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new u.L(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>G._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=Z?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new m.bc(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),o=i.getFullModelRange(),s=this._getReplacePattern();let r;const a=this._state.preserveCase;r=s.hasReplacementPatterns||a?n.replace(t,(function(){return s.buildReplaceString(arguments,a)})):n.replace(t,s.buildReplaceString(null,a));const l=new c.hP(o,r,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,o=i.length;e<o;e++)n[e]=t.buildReplaceString(i[e].matches,this._state.preserveCase);const o=new C(this._editor.getSelection(),i.map((e=>e.range)),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let t=this._findMatches(e,!1,1073741824).map((e=>new p.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)));const i=this._editor.getSelection();for(let e=0,n=t.length;e<n;e++)if(t[e].equalsRange(i)){t=[i].concat(t.slice(0,e)).concat(t.slice(e+1));break}this._editor.setSelections(t)}_executeEditorCommand(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}var Q=i(65321),Y=i(93379),J=i.n(Y),X=i(7795),ee=i.n(X),te=i(90569),ie=i.n(te),ne=i(3565),oe=i.n(ne),se=i(19216),re=i.n(se),ae=i(44589),le=i.n(ae),de=i(68875),he={};he.styleTagTransform=le(),he.setAttributes=oe(),he.insert=ie().bind(null,"head"),he.domAPI=ee(),he.insertStyleElement=re(),J()(de.Z,he),de.Z&&de.Z.locals&&de.Z.locals;var ce=i(51307),ue=i(93794);class ge extends ue.${constructor(e,t,i){super(),this._hideSoon=this._register(new n.pY((()=>this._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const o={inputActiveOptionBorder:(0,_.n_1)(_.PRb),inputActiveOptionForeground:(0,_.n_1)(_.Pvw),inputActiveOptionBackground:(0,_.n_1)(_.XEs)};this.caseSensitive=this._register(new ce.rk(Object.assign({appendTitle:this._keybindingLabelFor(H),isChecked:this._state.matchCase},o))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new ce.Qx(Object.assign({appendTitle:this._keybindingLabelFor(z),isChecked:this._state.wholeWord},o))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new ce.eH(Object.assign({appendTitle:this._keybindingLabelFor(K),isChecked:this._state.isRegex},o))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(Q.nm(this._domNode,Q.tw.MOUSE_LEAVE,(e=>this._onMouseLeave()))),this._register(Q.nm(this._domNode,"mouseover",(e=>this._onMouseOver())))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ge.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}ge.ID="editor.contrib.findOptionsWidget";var pe=i(4669);function me(e,t){return 1===e||2!==e&&t}class fe extends o.JT{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return me(this._isRegexOverride,this._isRegex)}get wholeWord(){return me(this._wholeWordOverride,this._wholeWord)}get matchCase(){return me(this._matchCaseOverride,this._matchCase)}get preserveCase(){return me(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new pe.Q5),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let o=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,o=!0),void 0!==i&&(g.e.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;const o={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;const r=this.isRegex,a=this.wholeWord,l=this.matchCase,d=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,s=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,s=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,s=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,s=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some((t=>!g.e.equalsRange(t,e)))})))||(this._searchScope=e.searchScope,o.searchScope=!0,s=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,s=!0),void 0!==e.isSearching&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,s=!0),void 0!==e.filters&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.filters=!0,s=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,r!==this.isRegex&&(s=!0,o.isRegex=!0),a!==this.wholeWord&&(s=!0,o.wholeWord=!0),l!==this.matchCase&&(s=!0,o.matchCase=!0),d!==this.preserveCase&&(s=!0,o.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=Z}}var _e=i(56346),ve=i(98892),be=i(63841),Ce=i(73046),we=i(17301),ye=i(1432),Se=i(56950),Le={};Le.styleTagTransform=le(),Le.setAttributes=oe(),Le.insert=ie().bind(null,"head"),Le.domAPI=ee(),Le.insertStyleElement=re(),J()(Se.Z,Le),Se.Z&&Se.Z.locals&&Se.Z.locals;var xe=i(63580),ke=i(22980);function Ne(e){var t,i;return"Up"===(null===(t=e.lookupKeybinding("history.showPrevious"))||void 0===t?void 0:t.getElectronAccelerator())&&"Down"===(null===(i=e.lookupKeybinding("history.showNext"))||void 0===i?void 0:i.getElectronAccelerator())}var De=i(59554),Ee=i(25670),Ie=i(92321),Te=i(98401),Me=i(86253);const Re=(0,De.q5)("find-selection",Ce.l.selection,xe.NC("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Ae=(0,De.q5)("find-collapsed",Ce.l.chevronRight,xe.NC("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Oe=(0,De.q5)("find-expanded",Ce.l.chevronDown,xe.NC("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Pe=(0,De.q5)("find-replace",Ce.l.replace,xe.NC("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Fe=(0,De.q5)("find-replace-all",Ce.l.replaceAll,xe.NC("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Be=(0,De.q5)("find-previous-match",Ce.l.arrowUp,xe.NC("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),We=(0,De.q5)("find-next-match",Ce.l.arrowDown,xe.NC("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Ve=xe.NC("label.findDialog","Find / Replace"),He=xe.NC("label.find","Find"),ze=xe.NC("placeholder.find","Find"),Ke=xe.NC("label.previousMatchButton","Previous Match"),Ue=xe.NC("label.nextMatchButton","Next Match"),je=xe.NC("label.toggleSelectionFind","Find in Selection"),$e=xe.NC("label.closeButton","Close"),qe=xe.NC("label.replace","Replace"),Ze=xe.NC("placeholder.replace","Replace"),Ge=xe.NC("label.replaceButton","Replace"),Qe=xe.NC("label.replaceAllButton","Replace All"),Ye=xe.NC("label.toggleReplaceButton","Toggle Replace"),Je=xe.NC("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Z),Xe=xe.NC("label.matchesLocation","{0} of {1}"),et=xe.NC("label.noResults","No results"),tt=419;let it=69;const nt="ctrlEnterReplaceAll.windows.donotask",ot=ye.dz?256:2048;class st{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function rt(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function at(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEnd<i.value.length&&e.stopPropagation()}class lt extends ue.${constructor(e,t,i,s,r,a,l,d,h){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=i,this._contextViewProvider=s,this._keybindingService=r,this._contextKeyService=a,this._storageService=d,this._notificationService=h,this._ctrlEnterReplaceAllWarningPrompted=!!d.getBoolean(nt,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new n.vp(500),this._register((0,o.OF)((()=>this._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(89)&&(this._codeEditor.getOption(89)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(142)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(40)){const e=this._codeEditor.getOption(40).loop;this._state.change({loop:e},!1);const t=this._codeEditor.getOption(40).addExtraSpaceOnTop;t&&!this._viewZone&&(this._viewZone=new st(0),this._showViewZone()),!t&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((()=>{return e=this,t=void 0,n=function*(){if(this._isVisible){const e=yield this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}))),this._findInputFocused=T.bindTo(a),this._findFocusTracker=this._register(Q.go(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=M.bindTo(a),this._replaceFocusTracker=this._register(Q.go(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(40).addExtraSpaceOnTop&&(this._viewZone=new st(0)),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return lt.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(89)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=Q.w(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,we.dL)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=it+"px",this._state.matchesCount>=Z?this._matchesCount.title=Je:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Z&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=s.WU(Xe,i,t)}else e=et;this._matchesCount.appendChild(document.createTextNode(e)),(0,_e.Z9)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),it=Math.max(it,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===et)return""===i?xe.NC("ariaSearchNoResultEmpty","{0} found",e):xe.NC("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=xe.NC("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${n}`:n}return xe.NC("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(89);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(40).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(40).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Q.i(i),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=n.left+(o?o.left:0),r=o?o.top:0;if(this._viewZone&&r<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(t=!1);const i=Q.xQ(this._domNode).left;s>i&&(t=!1);const o=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(o?o.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(40).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(40).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new st(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;const o=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(82).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!Q.Uw(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,o=!1,s=!1;if(this._resized&&Q.w(this._domNode)>tt)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=Q.w(this._findInput.domNode));if(447+i>=t&&(o=!0),447+i-it>=t&&(s=!0),447+i-it>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",s),this._domNode.classList.toggle("reduced-find-widget",o),s||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._findInput.layout({collapsedFindWidget:n,narrowFindWidget:s,reducedFindWidget:o}),this._resized){const e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=Q.w(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||g.e.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|ot)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?rt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?at(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|ot)?(this._keybindingService.dispatchEvent(e,e.target)||(ye.ED&&ye.tY&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(xe.NC("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(nt,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?rt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?at(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new ke.Yb(null,this._contextViewProvider,{width:221,label:He,placeholder:ze,appendCaseSensitiveLabel:this._keybindingLabelFor(H),appendWholeWordsLabel:this._keybindingLabelFor(z),appendRegexLabel:this._keybindingLabelFor(K),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>Ne(this._keybindingService),inputBoxStyles:Me.Hc,toggleStyles:Me.pl},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),ye.IJ&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new dt({label:Ke+this._keybindingLabelFor(W),icon:Be,onTrigger:()=>{(0,Te.cW)(this._codeEditor.getAction(W)).run().then(void 0,we.dL)}})),this._nextBtn=this._register(new dt({label:Ue+this._keybindingLabelFor(B),icon:We,onTrigger:()=>{(0,Te.cW)(this._codeEditor.getAction(B)).run().then(void 0,we.dL)}}));const e=document.createElement("div");e.className="find-part",e.appendChild(this._findInput.domNode);const t=document.createElement("div");t.className="find-actions",e.appendChild(t),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new ve.Z({icon:Re,title:je+this._keybindingLabelFor(U),isChecked:!1,inputActiveOptionBackground:(0,_.n_1)(_.XEs),inputActiveOptionBorder:(0,_.n_1)(_.PRb),inputActiveOptionForeground:(0,_.n_1)(_.Pvw)})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const e=this._codeEditor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),t.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new dt({label:$e+this._keybindingLabelFor(V),icon:De.s_,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),this._replaceInput=this._register(new ke.Nq(null,void 0,{label:qe,placeholder:Ze,appendPreserveCaseLabel:this._keybindingLabelFor(j),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>Ne(this._keybindingService),inputBoxStyles:Me.Hc,toggleStyles:Me.pl},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())}))),this._replaceBtn=this._register(new dt({label:Ge+this._keybindingLabelFor($),icon:Pe,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new dt({label:Qe+this._keybindingLabelFor(q),icon:Fe,onTrigger:()=>{this._controller.replaceAll()}}));const i=document.createElement("div");i.className="replace-part",i.appendChild(this._replaceInput.domNode);const n=document.createElement("div");n.className="replace-actions",i.appendChild(n),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new dt({label:Ye,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Q.w(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=Ve,this._domNode.role="dialog",this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(e),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(i),this._resizeSash=new be.g(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let o=tt;this._register(this._resizeSash.onDidStart((()=>{o=Q.w(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;const t=o+e.startX-e.currentX;t<tt||t>(parseFloat(Q.Dx(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Q.w(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=Q.w(this._domNode);if(e<tt)return;let t=tt;if(!this._resized||e===tt){const e=this._codeEditor.getLayoutInfo();t=e.width-28-e.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Q.w(this._findInput.domNode)),this._findInput.inputBox.layout()})))}updateAccessibilitySupport(){const e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(2!==e)}}lt.ID="editor.contrib.findWidget";class dt extends ue.${constructor(e){super(),this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+Ee.k.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=t,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,(e=>{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{var t,i;if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();null===(i=(t=this._opts).onKeyDown)||void 0===i||i.call(t,e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...Ee.k.asClassNameArray(Ae)),this._domNode.classList.add(...Ee.k.asClassNameArray(Oe))):(this._domNode.classList.remove(...Ee.k.asClassNameArray(Oe)),this._domNode.classList.add(...Ee.k.asClassNameArray(Ae)))}}(0,v.Ic)(((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".findMatch",e.getColor(_.MUv)),i(".currentFindMatch",e.getColor(_.nyM)),i(".findScope",e.getColor(_.jUe)),i(".find-widget",e.getColor(_.D0T));const n=e.getColor(_.rh);n&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const o=e.getColor(_.A42);o&&t.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${o}; border-right: 1px solid ${o}; border-bottom: 1px solid ${o}; }`);const s=e.getColor(_.EiJ);s&&t.addRule(`.monaco-editor .findMatch { border: 1px ${(0,Ie.c3)(e.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const r=e.getColor(_.pnM);r&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }`);const a=e.getColor(_.gkn);a&&t.addRule(`.monaco-editor .findScope { border: 1px ${(0,Ie.c3)(e.type)?"dashed":"solid"} ${a}; }`);const l=e.getColor(_.lRK);l&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${l}; }`);const d=e.getColor(_.Hfx);d&&t.addRule(`.monaco-editor .find-widget { color: ${d}; }`);const h=e.getColor(_.Ido);h&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${h}; }`);const c=e.getColor(_.Ng6);if(c)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${c}; }`);else{const i=e.getColor(_.D1_);i&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${i}; }`)}const u=e.getColor(_.lUq);u&&t.addRule(`\n\t\t.monaco-editor .find-widget .button:not(.disabled):hover,\n\t\t.monaco-editor .find-widget .codicon-find-selection:hover {\n\t\t\tbackground-color: ${u} !important;\n\t\t}\n\t`);const g=e.getColor(_.R80);g&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${g}; }`)}));var ht,ct=i(84144),ut=i(84972),gt=i(5606),pt=i(91847),mt=i(59422),ft=i(41157),_t=i(26904),vt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},bt=function(e,t){return function(i,n){t(i,n,e)}},Ct=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function wt(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)<524288)return e.getModel().getValueInRange(n);return null}let yt=ht=class extends o.JT{get editor(){return this._editor}static get(e){return e.getContribution(ht.ID)}constructor(e,t,i,o){super(),this._editor=e,this._findWidgetVisible=I.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=o,this._updateHistoryDelayer=new n.vp(500),this._state=this._register(new fe),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{const e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(40).loop})})))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!T.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){const e=this._editor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=s.ec(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return Ct(this,void 0,void 0,(function*(){if(this.disposeModel(),!this._editor.hasModel())return;const i=Object.assign(Object.assign({},t),{isRevealed:!0});if("single"===e.seedSearchStringFromSelection){const t=wt(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);t&&(this._state.isRegex?i.searchString=s.ec(t):i.searchString=t)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){const t=wt(this._editor,e.seedSearchStringFromSelection);t&&(i.searchString=t)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const e=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(i.searchString=e)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(i.searchScope=e)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new G(this._editor,this._state))}))}start(e,t){return this._start(e,t)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}goToMatch(e){return!!this._model&&(this._model.moveToMatch(e),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._model.replaceAll(),!0)}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}getGlobalBufferTerm(){return Ct(this,void 0,void 0,(function*(){return this._editor.getOption(40).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}))}setGlobalBufferTerm(e){this._editor.getOption(40).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};yt.ID="editor.contrib.findController",yt=ht=vt([bt(1,E.i6),bt(2,_t.Uy),bt(3,ut.p)],yt);let St=class extends yt{constructor(e,t,i,n,o,s,r,a){super(e,i,r,a),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._notificationService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){const i=Object.create(null,{_start:{get:()=>super._start}});return Ct(this,void 0,void 0,(function*(){this._widget||this._createFindWidget();const n=this._editor.getSelection();let o=!1;switch(this._editor.getOption(40).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":o=!!n&&n.startLineNumber!==n.endLineNumber}e.updateSearchScope=e.updateSearchScope||o,yield i._start.call(this,e,t),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}))}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new lt(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new ge(this._editor,this._state,this._keybindingService))}};St=vt([bt(1,gt.u),bt(2,E.i6),bt(3,pt.d),bt(4,v.XE),bt(5,mt.lT),bt(6,_t.Uy),bt(7,ut.p)],St),(0,r.rn)(new r.jY({id:"actions.find",label:xe.NC("startFindAction","Find"),alias:"Find",precondition:E.Ao.or(l.u.focus,E.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:ct.eH.MenubarEditMenu,group:"3_find",title:xe.NC({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})).addImplementation(0,((e,t,i)=>{const n=yt.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(40).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(40).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(40).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop})}));const Lt={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:xe.NC("actions.find.isRegexOverride",'Overrides "Use Regular Expression" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:xe.NC("actions.find.wholeWordOverride",'Overrides "Match Whole Word" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:xe.NC("actions.find.matchCaseOverride",'Overrides "Math Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:xe.NC("actions.find.preserveCaseOverride",'Overrides "Preserve Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},findInSelection:{type:"boolean"}}}}]};class xt extends r.R6{constructor(){super({id:"editor.actions.findWithArgs",label:xe.NC("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:Lt})}run(e,t,i){return Ct(this,void 0,void 0,(function*(){const e=yt.get(t);if(e){const n=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:void 0!==i.replaceString,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(40).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(40).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(null==i?void 0:i.findInSelection)||!1,loop:t.getOption(40).loop},n),e.setGlobalBufferTerm(e.getState().searchString)}}))}}class kt extends r.R6{constructor(){super({id:"actions.findWithSelection",label:xe.NC("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return Ct(this,void 0,void 0,(function*(){const e=yt.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),e.setGlobalBufferTerm(e.getState().searchString))}))}}class Nt extends r.R6{run(e,t){return Ct(this,void 0,void 0,(function*(){const e=yt.get(t);e&&!this._run(e)&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(40).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(40).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),this._run(e))}))}}class Dt extends r.R6{constructor(){super({id:"editor.action.goToMatchFindAction",label:xe.NC("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:I}),this._highlightDecorations=[]}run(e,t,i){const n=yt.get(t);if(!n)return;const o=n.getState().matchesCount;if(o<1)return void e.get(mt.lT).notify({severity:mt.zb.Warning,message:xe.NC("findMatchAction.noResults","No matches. Try searching for something else.")});const s=e.get(ft.eJ).createInputBox();s.placeholder=xe.NC("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);const r=e=>{const t=parseInt(e);if(isNaN(t))return;const i=n.getState().matchesCount;return t>0&&t<=i?t-1:t<0&&t>=-i?i+t:void 0},a=e=>{const i=r(e);if("number"==typeof i){s.validationMessage=void 0,n.goToMatch(i);const e=n.getState().currentMatch;e&&this.addDecorations(t,e)}else s.validationMessage=xe.NC("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};s.onDidChangeValue((e=>{a(e)})),s.onDidAccept((()=>{const e=r(s.value);"number"==typeof e?(n.goToMatch(e),s.hide()):s.validationMessage=xe.NC("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount)})),s.onDidHide((()=>{this.clearDecorations(t),s.dispose()})),s.show()}clearDecorations(e){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[])}))}addDecorations(e,t){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,v.EN)(a.m9),position:d.sh.Full}}}])}))}}class Et extends r.R6{run(e,t){return Ct(this,void 0,void 0,(function*(){const e=yt.get(t);if(!e)return;const i=wt(t,"single",!1);i&&e.setSearchString(i),this._run(e)||(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),this._run(e))}))}}(0,r.rn)(new r.jY({id:"editor.action.startFindReplaceAction",label:xe.NC("startReplace","Replace"),alias:"Replace",precondition:E.Ao.or(l.u.focus,E.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:ct.eH.MenubarEditMenu,group:"3_find",title:xe.NC({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})).addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(89))return!1;const n=yt.get(t);if(!n)return!1;const o=t.getSelection(),s=n.isFindInputFocused(),r=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&"never"!==t.getOption(40).seedSearchStringFromSelection&&!s,a=s||r?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(40).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(40).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop})})),(0,r._K)(yt.ID,St,0),(0,r.Qr)(xt),(0,r.Qr)(kt),(0,r.Qr)(class extends Nt{constructor(){super({id:B,label:xe.NC("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:l.u.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:E.Ao.and(l.u.focus,T),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}),(0,r.Qr)(class extends Nt{constructor(){super({id:W,label:xe.NC("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:l.u.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:E.Ao.and(l.u.focus,T),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}),(0,r.Qr)(Dt),(0,r.Qr)(class extends Et{constructor(){super({id:"editor.action.nextSelectionMatchFindAction",label:xe.NC("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:l.u.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}),(0,r.Qr)(class extends Et{constructor(){super({id:"editor.action.previousSelectionMatchFindAction",label:xe.NC("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:l.u.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}});const It=r._l.bindToContribution(yt.get);(0,r.fK)(new It({id:V,precondition:I,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:E.Ao.and(l.u.focus,E.Ao.not("isComposing")),primary:9,secondary:[1033]}})),(0,r.fK)(new It({id:H,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),(0,r.fK)(new It({id:z,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:A.primary,mac:A.mac,win:A.win,linux:A.linux}})),(0,r.fK)(new It({id:K,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),(0,r.fK)(new It({id:U,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),(0,r.fK)(new It({id:j,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:F.primary,mac:F.mac,win:F.win,linux:F.linux}})),(0,r.fK)(new It({id:$,precondition:I,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:3094}})),(0,r.fK)(new It({id:$,precondition:I,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:E.Ao.and(l.u.focus,M),primary:3}})),(0,r.fK)(new It({id:q,precondition:I,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:2563}})),(0,r.fK)(new It({id:q,precondition:I,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:E.Ao.and(l.u.focus,M),primary:void 0,mac:{primary:2051}}})),(0,r.fK)(new It({id:"editor.action.selectAllMatches",precondition:I,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:515}}))},63737:(e,t,i)=>{i.d(t,{f:()=>X,n:()=>ee});var n=i(15393),o=i(71050),s=i(17301),r=i(22258),a=i(5976),l=i(97295),d=i(98401),h=i(93379),c=i.n(h),u=i(7795),g=i.n(u),p=i(90569),m=i.n(p),f=i(3565),_=i.n(f),v=i(19216),b=i.n(v),C=i(44589),w=i.n(C),y=i(43388),S={};S.styleTagTransform=w(),S.setAttributes=_(),S.insert=m().bind(null,"head"),S.domAPI=g(),S.insertStyleElement=b(),c()(y.Z,S),y.Z&&y.Z.locals&&y.Z.locals;var L=i(43407),x=i(16830),k=i(29102),N=i(96887),D=i(51381),E=i(71705),I=i(9488),T=i(4669),M=i(24314),R=i(23795);class A{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new T.Q5,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some((e=>e.range.endLineNumber!==e.range.startLineNumber||0!==(0,R.Q)(e.text)[0])))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,o=Number.MAX_VALUE,s=-1;const r=this._foldingModel.regions;for(;i<r.length;i++){if(!r.isCollapsed(i))continue;const a=r.getStartLineNumber(i)+1,l=r.getEndLineNumber(i);o<=a&&l<=s||(!e&&n<this._hiddenRanges.length&&this._hiddenRanges[n].startLineNumber===a&&this._hiddenRanges[n].endLineNumber===l?(t.push(this._hiddenRanges[n]),n++):(e=!0,t.push(new M.e(a,1,l,1))),o=a,s=l)}(this._hasLineChanges||e||n<this._hiddenRanges.length)&&this.applyHiddenRanges(t)}applyHiddenRanges(e){this._hiddenRanges=e,this._hasLineChanges=!1,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return null!==O(this._hiddenRanges,e)}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const o=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=O(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,s=e.length;n<s;n++){let s=e[n];const r=o(s.startLineNumber);r&&(s=s.setStartPosition(r,i.getLineMaxColumn(r)),t=!0);const a=o(s.endLineNumber);a&&(s=s.setEndPosition(a,i.getLineMaxColumn(a)),t=!0),e[n]=s}return t}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function O(e,t){const i=(0,I.lG)(e,(e=>t<e.startLineNumber))-1;return i>=0&&e[i].endLineNumber>=t?e[i]:null}var P,F=i(84990),B=i(63580),W=i(93983),V=i(83973),H=i(37702),z=i(99155),K=i(59422),U=i(88191),j=i(84013),$=i(71922),q=i(94565),Z=i(70666),G=i(73733),Q=i(33108),Y=function(e,t){return function(i,n){t(i,n,e)}};const J=new W.uy("foldingEnabled",!1);let X=P=class extends a.JT{static get(e){return e.getContribution(P.ID)}static getFoldingRangeProviders(e,t){var i,n;const o=e.foldingRangeProvider.ordered(t);return null!==(n=null===(i=P._foldingRangeSelector)||void 0===i?void 0:i.call(P,o,t))&&void 0!==n?n:o}constructor(e,t,i,n,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=s,this.localToDispose=this._register(new a.SL),this.editor=e,this._foldingLimitReporter=new ee(e);const r=this.editor.getOptions();this._isEnabled=r.get(42),this._useFoldingProviders="indentation"!==r.get(43),this._unfoldOnClickAfterEndOfLine=r.get(47),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=r.get(45),this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new V.fF(e),this.foldingDecorationProvider.showFoldingControls=r.get(108),this.foldingDecorationProvider.showFoldingHighlights=r.get(44),this.foldingEnabled=J.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(42)&&(this._isEnabled=this.editor.getOptions().get(42),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(46)&&this.onModelChanged(),e.hasChanged(108)||e.hasChanged(44)){const e=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=e.get(108),this.foldingDecorationProvider.showFoldingHighlights=e.get(44),this.triggerFoldingModelChanged()}e.hasChanged(43)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(43),this.onFoldingStrategyChanged()),e.hasChanged(47)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(47)),e.hasChanged(45)&&(this._foldingImportsByDefault=this.editor.getOptions().get(45))}))),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(t&&this._isEnabled&&!t.isTooLargeForTokenization()&&this.hiddenRangeModel&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new E.av(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new A(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new n.vp(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new n.pY((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((e=>this.onDidChangeModelContent(e)))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{var e,t;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),null===(e=this.updateScheduler)||void 0===e||e.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,null===(t=this.rangeProvider)||void 0===t||t.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;null===(e=this.rangeProvider)||void 0===e||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new F.aI(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=P.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new z.e(e,i,(()=>this.triggerFoldingModelChanged()),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;null===(t=this.hiddenRangeModel)||void 0===t||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=new j.G,i=this.getRangeProvider(e.textModel),o=this.foldingRegionPromise=(0,n.PG)((e=>i.compute(e)));return o.then((i=>{if(i&&o===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=i.setCollapsedAllOfType(N.AD.Imports.value,!0);e&&(n=L.Z.capture(this.editor),this._currentModelHasFoldedImports=e)}const o=this.editor.getSelections(),s=o?o.map((e=>e.startLineNumber)):[];e.update(i,s),null==n||n.restore(this.editor);const r=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=r)}return e}))})).then(void 0,(e=>((0,s.dL)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){const t=this.editor.getSelections();if(t&&t.length>0){const i=[];for(const n of t){const t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,s.dL)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const t=e.target.detail,n=e.target.element.offsetLeft;if(t.offsetX-n<4)return;i=!0;break}case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){const e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==i)return;if(n){if(4!==e.target.type)return}else{const e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(i))return}const s=t.getRegionAtLine(i);if(s&&s.startLineNumber===i){const o=s.isCollapsed;if(n||o){let n=[];if(e.event.altKey){const e=e=>!e.containedBy(s)&&!s.containedBy(e),i=t.getRegionsInside(null,e);for(const e of i)e.isCollapsed&&n.push(e);0===n.length&&(n=i)}else{const i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(s))e.isCollapsed===o&&n.push(e);!o&&i&&0!==n.length||n.push(s)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};X.ID="editor.contrib.folding",X=P=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Y(1,W.i6),Y(2,D.c_),Y(3,K.lT),Y(4,U.A),Y(5,$.p)],X);class ee{constructor(e){this.editor=e,this._onDidChange=new T.Q5,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(46)}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}class te extends x.R6{runEditorCommand(e,t,i){const n=e.get(D.c_),o=X.get(t);if(!o)return;const s=o.getFoldingModel();return s?(this.reportTelemetry(e,t),s.then((e=>{if(e){this.invoke(o,e,t,i,n);const s=t.getSelection();s&&o.reveal(s.getStartPosition())}}))):void 0}getSelectedLines(e){const t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function ie(e){if(!d.o8(e)){if(!d.Kn(e))return!1;const t=e;if(!d.o8(t.levels)&&!d.hj(t.levels))return!1;if(!d.o8(t.direction)&&!d.HD(t.direction))return!1;if(!(d.o8(t.selectionLines)||Array.isArray(t.selectionLines)&&t.selectionLines.every(d.hj)))return!1}return!0}class ne extends te{getFoldingLevel(){return parseInt(this.id.substr(ne.ID_PREFIX.length))}invoke(e,t,i){(0,E.Ln)(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}ne.ID_PREFIX="editor.foldLevel",ne.ID=e=>ne.ID_PREFIX+e,(0,x._K)(X.ID,X,0),(0,x.Qr)(class extends te{constructor(){super({id:"editor.unfold",label:B.NC("unfoldAction.label","Unfold"),alias:"Unfold",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:ie,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=n&&n.levels||1,s=this.getLineNumbers(n,i);n&&"up"===n.direction?(0,E.gU)(t,!1,o,s):(0,E.R$)(t,!1,o,s)}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.unfoldRecursively",label:B.NC("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2142),weight:100}})}invoke(e,t,i,n){(0,E.R$)(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.fold",label:B.NC("foldAction.label","Fold"),alias:"Fold",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:ie,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=this.getLineNumbers(n,i),s=n&&n.levels,r=n&&n.direction;"number"!=typeof s&&"string"!=typeof r?(0,E.HX)(t,!0,o):"up"===r?(0,E.gU)(t,!0,s||1,o):(0,E.R$)(t,!0,s||1,o)}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.foldRecursively",label:B.NC("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,E.R$)(t,!0,Number.MAX_VALUE,n)}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.foldAll",label:B.NC("foldAllAction.label","Fold All"),alias:"Fold All",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2069),weight:100}})}invoke(e,t,i){(0,E.R$)(t,!0)}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.unfoldAll",label:B.NC("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2088),weight:100}})}invoke(e,t,i){(0,E.R$)(t,!1)}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.foldAllBlockComments",label:B.NC("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2138),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,E.MW)(t,N.AD.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).comments;if(n&&n.blockCommentStartToken){const e=new RegExp("^\\s*"+(0,l.ec)(n.blockCommentStartToken));(0,E.DW)(t,e,!0)}}}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.foldAllMarkerRegions",label:B.NC("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2077),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,E.MW)(t,N.AD.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,E.DW)(t,e,!0)}}}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:B.NC("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2078),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())(0,E.MW)(t,N.AD.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,E.DW)(t,e,!1)}}}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.foldAllExcept",label:B.NC("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2136),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,E.YT)(t,!0,n)}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.unfoldAllExcept",label:B.NC("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2134),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,E.YT)(t,!1,n)}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.toggleFold",label:B.NC("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,E.d8)(t,1,n)}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.gotoParentFold",label:B.NC("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,E.PV)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.gotoPreviousFold",label:B.NC("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,E.sK)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.gotoNextFold",label:B.NC("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,E.hE)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:B.NC("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2135),weight:100}})}invoke(e,t,i){var n;const o=[],s=i.getSelections();if(s){for(const e of s){let t=e.endLineNumber;1===e.endColumn&&--t,t>e.startLineNumber&&(o.push({startLineNumber:e.startLineNumber,endLineNumber:t,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.startLineNumber,endColumn:1}))}if(o.length>0){o.sort(((e,t)=>e.startLineNumber-t.startLineNumber));const e=H.MN.sanitizeAndMerge(t.regions,o,null===(n=i.getModel())||void 0===n?void 0:n.getLineCount());t.updatePost(H.MN.fromFoldRanges(e))}}}}),(0,x.Qr)(class extends te{constructor(){super({id:"editor.removeManualFoldingRanges",label:B.NC("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const i=[];for(const e of n){const{startLineNumber:t,endLineNumber:n}=e;i.push(n>=t?{startLineNumber:t,endLineNumber:n}:{endLineNumber:n,startLineNumber:t})}t.removeManualRanges(i),e.triggerFoldingModelChanged()}}});for(let e=1;e<=7;e++)(0,x.QG)(new ne({id:ne.ID(e),label:B.NC("foldLevelAction.label","Fold Level {0}",e),alias:`Fold Level ${e}`,precondition:J,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,r.gx)(2089,2048|21+e),weight:100}}));q.P.registerCommand("_executeFoldingRangeProvider",(function(e,...t){return i=this,n=void 0,a=function*(){const[i]=t;if(!(i instanceof Z.o))throw(0,s.b1)();const n=e.get($.p),r=e.get(G.q).getModel(i);if(!r)throw(0,s.b1)();const a=e.get(Q.Ui);if(!a.getValue("editor.folding",{resource:i}))return[];const l=e.get(D.c_),d=a.getValue("editor.foldingStrategy",{resource:i}),h={get limit(){return a.getValue("editor.foldingMaximumRegions",{resource:i})},update:(e,t)=>{}},c=new F.aI(r,l,h);let u=c;if("indentation"!==d){const e=X.getFoldingRangeProviders(n,r);e.length&&(u=new z.e(r,e,(()=>{}),h,c))}const g=yield u.compute(o.T.None),p=[];try{if(g)for(let e=0;e<g.length;e++){const t=g.getType(e);p.push({start:g.getStartLineNumber(e),end:g.getEndLineNumber(e),kind:t?N.AD.fromValue(t):void 0})}return p}finally{u.dispose()}},new((r=void 0)||(r=Promise))((function(e,t){function o(e){try{l(a.next(e))}catch(e){t(e)}}function s(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(o,s)}l((a=a.apply(i,n||[])).next())}));var i,n,r,a}))},83973:(e,t,i)=>{i.d(t,{Iy:()=>u,f5:()=>g,fF:()=>_});var n=i(73046),o=i(84973),s=i(13961),r=i(63580),a=i(73910),l=i(59554),d=i(97781),h=i(25670);const c=(0,a.P6G)("editor.foldBackground",{light:(0,a.ZnX)(a.hEj,.3),dark:(0,a.ZnX)(a.hEj,.3),hcDark:null,hcLight:null},(0,r.NC)("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);(0,a.P6G)("editorGutter.foldingControlForeground",{dark:a.XZx,light:a.XZx,hcDark:a.XZx,hcLight:a.XZx},(0,r.NC)("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const u=(0,l.q5)("folding-expanded",n.l.chevronDown,(0,r.NC)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),g=(0,l.q5)("folding-collapsed",n.l.chevronRight,(0,r.NC)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),p=(0,l.q5)("folding-manual-collapsed",g,(0,r.NC)("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),m=(0,l.q5)("folding-manual-expanded",u,(0,r.NC)("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),f={color:(0,d.EN)(c),position:o.F5.Inline};class _{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t?_.HIDDEN_RANGE_DECORATION:"never"===this.showFoldingControls?e?this.showFoldingHighlights?_.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:_.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:_.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?_.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:_.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?_.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:_.COLLAPSED_VISUAL_DECORATION:"mouseover"===this.showFoldingControls?i?_.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:_.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?_.MANUALLY_EXPANDED_VISUAL_DECORATION:_.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}_.COLLAPSED_VISUAL_DECORATION=s.qx.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:h.k.asClassName(g)}),_.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=s.qx.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0,firstLineDecorationClassName:h.k.asClassName(g)}),_.MANUALLY_COLLAPSED_VISUAL_DECORATION=s.qx.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:h.k.asClassName(p)}),_.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=s.qx.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0,firstLineDecorationClassName:h.k.asClassName(p)}),_.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=s.qx.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0}),_.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=s.qx.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:f,isWholeLine:!0}),_.EXPANDED_VISUAL_DECORATION=s.qx.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+h.k.asClassName(u)}),_.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=s.qx.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:h.k.asClassName(u)}),_.MANUALLY_EXPANDED_VISUAL_DECORATION=s.qx.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+h.k.asClassName(m)}),_.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=s.qx.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:h.k.asClassName(m)}),_.NO_CONTROLS_EXPANDED_RANGE_DECORATION=s.qx.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),_.HIDDEN_RANGE_DECORATION=s.qx.register({description:"folding-hidden-range-decoration",stickiness:1})},71705:(e,t,i)=>{i.d(t,{DW:()=>g,HX:()=>h,Ln:()=>c,MW:()=>p,PV:()=>m,R$:()=>l,YT:()=>u,av:()=>r,d8:()=>a,gU:()=>d,hE:()=>_,sK:()=>f});var n=i(4669),o=i(37702),s=i(89954);class r{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new n.Q5,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new o.MN(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,o=-1,s=-1;const r=e=>{for(;n<e;){const e=this._regions.getEndLineNumber(n),t=this._regions.isCollapsed(n);if(e<=o){const o=0!==this.regions.getSource(n);i.changeDecorationOptions(this._editorDecorationIds[n],this._decorationProvider.getDecorationOption(t,e<=s,o))}t&&e>s&&(s=e),n++}};for(const i of e){const e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,r(e);const i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),o=Math.max(o,this._regions.getEndLineNumber(e))}}r(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=t=>{for(const i of e)if(!(i.startLineNumber>t.endLineNumber||t.startLineNumber>i.endLineNumber))return!0;return!1};for(let e=0;e<this._regions.length;e++){const n=this._regions.toFoldRange(e);0!==n.source&&i(n)||t.push(n)}this.updatePost(o.MN.fromFoldRanges(t))}update(e,t=[]){const i=this._currentFoldedOrManualRanges(t),n=o.MN.sanitizeAndMerge(e,i,this._textModel.getLineCount());this.updatePost(o.MN.fromFoldRanges(n))}updatePost(e){const t=[];let i=-1;for(let n=0,o=e.length;n<o;n++){const o=e.getStartLineNumber(n),s=e.getEndLineNumber(n),r=e.isCollapsed(n),a=0!==e.getSource(n),l={startLineNumber:o,startColumn:this._textModel.getLineMaxColumn(o),endLineNumber:s,endColumn:this._textModel.getLineMaxColumn(s)+1};t.push({range:l,options:this._decorationProvider.getDecorationOption(r,s<=i,a)}),r&&s>i&&(i=s)}this._decorationProvider.changeDecorations((e=>this._editorDecorationIds=e.deltaDecorations(this._editorDecorationIds,t))),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const t=(t,i)=>{for(const n of e)if(t<n&&n<=i)return!0;return!1},i=[];for(let e=0,n=this._regions.length;e<n;e++){let n=this.regions.isCollapsed(e);const o=this.regions.getSource(e);if(n||0!==o){const s=this._regions.toFoldRange(e),r=this._textModel.getDecorationRange(this._editorDecorationIds[e]);r&&(n&&t(r.startLineNumber,r.endLineNumber)&&(n=!1),i.push({startLineNumber:r.startLineNumber,endLineNumber:r.endLineNumber,type:s.type,isCollapsed:n,source:o}))}}return i}getMemento(){const e=this._currentFoldedOrManualRanges(),t=[],i=this._textModel.getLineCount();for(let n=0,o=e.length;n<o;n++){const o=e[n];if(o.startLineNumber>=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>i)continue;const s=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);t.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,isCollapsed:o.isCollapsed,source:o.source,checksum:s})}return t.length>0?t:void 0}applyMemento(e){var t,i;if(!Array.isArray(e))return;const n=[],s=this._textModel.getLineCount();for(const o of e){if(o.startLineNumber>=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>s)continue;const e=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);o.checksum&&e!==o.checksum||n.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,type:void 0,isCollapsed:null===(t=o.isCollapsed)||void 0===t||t,source:null!==(i=o.source)&&void 0!==i?i:0})}const r=o.MN.sanitizeAndMerge(this._regions,n,s);this.updatePost(o.MN.fromFoldRanges(r))}_getLinesChecksum(e,t){return(0,s.vp)(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),o=1;for(;n>=0;){const e=this._regions.toRegion(n);t&&!t(e,o)||i.push(e),o++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let s=n,r=this._regions.length;s<r;s++){const n=this._regions.toRegion(s);if(!(this._regions.getStartLineNumber(s)<o))break;for(;e.length>0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,s=this._regions.length;e<s;e++){const n=this._regions.toRegion(e);if(!(this._regions.getStartLineNumber(e)<o))break;t&&!t(n)||i.push(n)}return i}}function a(e,t,i){const n=[];for(const o of i){const i=e.getRegionAtLine(o);if(i){const o=!i.isCollapsed;if(n.push(i),t>1){const s=e.getRegionsInside(i,((e,i)=>e.isCollapsed!==o&&i<t));n.push(...s)}}}e.toggleCollapseState(n)}function l(e,t,i=Number.MAX_VALUE,n){const o=[];if(n&&n.length>0)for(const s of n){const n=e.getRegionAtLine(s);if(n&&(n.isCollapsed!==t&&o.push(n),i>1)){const s=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&n<i));o.push(...s)}}else{const n=e.getRegionsInside(null,((e,n)=>e.isCollapsed!==t&&n<i));o.push(...n)}e.toggleCollapseState(o)}function d(e,t,i,n){const o=[];for(const s of n){const n=e.getAllRegionsAtLine(s,((e,n)=>e.isCollapsed!==t&&n<=i));o.push(...n)}e.toggleCollapseState(o)}function h(e,t,i){const n=[];for(const o of i){const i=e.getAllRegionsAtLine(o,(e=>e.isCollapsed!==t));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}function c(e,t,i,n){const o=e.getRegionsInside(null,((e,o)=>o===t&&e.isCollapsed!==i&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(o)}function u(e,t,i){const n=[];for(const t of i){const i=e.getAllRegionsAtLine(t,void 0);i.length>0&&n.push(i[0])}const o=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(o)}function g(e,t,i){const n=e.textModel,o=e.regions,s=[];for(let e=o.length-1;e>=0;e--)if(i!==o.isCollapsed(e)){const i=o.getStartLineNumber(e);t.test(n.getLineContent(i))&&s.push(o.toRegion(e))}e.toggleCollapseState(s)}function p(e,t,i){const n=e.regions,o=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&o.push(n.toRegion(e));e.toggleCollapseState(o)}function m(e,t){let i=null;const n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){const e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}function f(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{const e=i.parentIndex;let n=0;for(-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));null!==i;){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0)for(i=t.regions.toRegion(t.regions.length-1);null!==i;){if(i.startLineNumber<e)return i.startLineNumber;i=i.regionIndex>0?t.regions.toRegion(i.regionIndex-1):null}return null}function _(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){const e=i.parentIndex;let n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}for(;null!==i;){if(!(i.regionIndex<t.regions.length))return null;if(i=t.regions.toRegion(i.regionIndex+1),i.startLineNumber>=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0)for(i=t.regions.toRegion(0);null!==i;){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndex<t.regions.length?t.regions.toRegion(i.regionIndex+1):null}return null}},37702:(e,t,i)=>{i.d(t,{MN:()=>a,Xl:()=>o});const n={0:" ",1:"u",2:"r"},o=16777215,s=4278190080;class r{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return 0!=(this._states[t]&1<<i)}set(e,t){const i=e/32|0,n=e%32,o=this._states[i];this._states[i]=t?o|1<<n:o&~(1<<n)}}class a{constructor(e,t,i){if(e.length!==t.length||e.length>65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new r(e.length),this._userDefinedStates=new r(e.length),this._recoveredStates=new r(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(t,i)=>{const n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;i<n;i++){const n=this._startIndexes[i],s=this._endIndexes[i];if(n>o||s>o)throw new Error("startLineNumber or endLineNumber must not exceed "+o);for(;e.length>0&&!t(n,s);)e.pop();const r=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&r)<<24),this._endIndexes[i]=s+((65280&r)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&o}getEndLineNumber(e){return this._endIndexes[e]&o}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){1===t?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):2===t?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n<this._types.length;n++)this._types[n]===e&&(this.setCollapsed(n,t),i=!0);return i}toRegion(e){return new l(this,e)}getParentIndex(e){this.ensureParentIndices();const t=((this._startIndexes[e]&s)>>>24)+((this._endIndexes[e]&s)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t<i;){const n=Math.floor((t+i)/2);e<this.getStartLineNumber(n)?i=n:t=n+1}return t-1}findRange(e){let t=this.findIndex(e);if(t>=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;t<this.length;t++)e[t]=`[${n[this.getSource(t)]}${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;return e.join(", ")}toFoldRange(e){return{startLineNumber:this._startIndexes[e]&o,endLineNumber:this._endIndexes[e]&o,type:this._types?this._types[e]:void 0,isCollapsed:this.isCollapsed(e),source:this.getSource(e)}}static fromFoldRanges(e){const t=e.length,i=new Uint32Array(t),n=new Uint32Array(t);let o=[],s=!1;for(let r=0;r<t;r++){const t=e[r];i[r]=t.startLineNumber,n[r]=t.endLineNumber,o.push(t.type),t.type&&(s=!0)}s||(o=void 0);const r=new a(i,n,o);for(let i=0;i<t;i++)e[i].isCollapsed&&r.setCollapsed(i,!0),r.setSource(i,e[i].source);return r}static sanitizeAndMerge(e,t,i){i=null!=i?i:Number.MAX_VALUE;const n=(e,t)=>Array.isArray(e)?i=>i<t?e[i]:void 0:i=>i<t?e.toFoldRange(i):void 0,o=n(e,e.length),s=n(t,t.length);let r=0,a=0,l=o(0),d=s(0);const h=[];let c,u=0;const g=[];for(;l||d;){let e;if(d&&(!l||l.startLineNumber>=d.startLineNumber))l&&l.startLineNumber===d.startLineNumber?(1===d.source?e=d:(e=l,e.isCollapsed=d.isCollapsed&&l.endLineNumber===d.endLineNumber,e.source=0),l=o(++r)):(e=d,d.isCollapsed&&0===d.source&&(e.source=2)),d=s(++a);else{let t=a,i=d;for(;;){if(!i||i.startLineNumber>l.endLineNumber){e=l;break}if(1===i.source&&i.endLineNumber>l.endLineNumber)break;i=s(++t)}l=o(++r)}if(e){for(;c&&c.endLineNumber<e.startLineNumber;)c=h.pop();e.endLineNumber>e.startLineNumber&&e.startLineNumber>u&&e.endLineNumber<=i&&(!c||c.endLineNumber>=e.endLineNumber)&&(g.push(e),u=e.startLineNumber,c&&h.push(c),c=e)}}return g}}class l{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}},84990:(e,t,i)=>{i.d(t,{aI:()=>s});var n=i(59616),o=i(37702);class s{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id="indent"}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,o=t&&t.markers;return Promise.resolve(function(e,t,i,o=a){const s=e.getOptions().tabSize,l=new r(o);let d;i&&(d=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const h=[],c=e.getLineCount()+1;h.push({indent:-1,endAbove:c,line:c});for(let i=e.getLineCount();i>0;i--){const o=e.getLineContent(i),r=(0,n.q)(o,s);let a,c=h[h.length-1];if(-1!==r){if(d&&(a=o.match(d))){if(!a[1]){h.push({indent:-2,endAbove:i,line:i});continue}{let e=h.length-1;for(;e>0&&-2!==h[e].indent;)e--;if(e>0){h.length=e+1,c=h[e],l.insertFirst(i,c.line,r),c.line=i,c.indent=r,c.endAbove=i;continue}}}if(c.indent>r){do{h.pop(),c=h[h.length-1]}while(c.indent>r);const e=c.endAbove-1;e-i>=1&&l.insertFirst(i,e,r)}c.indent===r?c.endAbove=i:h.push({indent:r,endAbove:i,line:i})}else t&&(c.endAbove=i)}return l.toIndentRanges(e)}(this.editorModel,i,o,this.foldingRangesLimit))}}class r{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>o.Xl||t>o.Xl)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new o.MN(e,t)}{this._foldingRangesLimit.update(this._length,t);let i=0,s=this._indentOccurrences.length;for(let e=0;e<this._indentOccurrences.length;e++){const n=this._indentOccurrences[e];if(n){if(n+i>t){s=e;break}i+=n}}const r=e.getOptions().tabSize,a=new Uint32Array(t),l=new Uint32Array(t);for(let o=this._length-1,d=0;o>=0;o--){const h=this._startIndexes[o],c=e.getLineContent(h),u=(0,n.q)(c,r);(u<s||u===s&&i++<t)&&(a[d]=h,l[d]=this._endIndexes[o],d++)}return new o.MN(a,l)}}}const a={limit:5e3,update:()=>{}}},99155:(e,t,i)=>{i.d(t,{e:()=>a});var n=i(17301),o=i(5976),s=i(37702);const r={};class a{constructor(e,t,i,n,s){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=s,this.id="syntax",this.disposables=new o.SL,s&&this.disposables.add(s);for(const e of t)"function"==typeof e.onDidChange&&this.disposables.add(e.onDidChange(i))}compute(e){return function(e,t,i){let o=null;const s=e.map(((e,s)=>Promise.resolve(e.provideFoldingRanges(t,r,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(o)||(o=[]);const i=t.getLineCount();for(const t of e)t.start>0&&t.end>t.start&&t.end<=i&&o.push({start:t.start,end:t.end,rank:s,kind:t.kind})}}),n.Cp)));return Promise.all(s).then((e=>o))}(this.providers,this.editorModel,e).then((t=>{var i,n;return t?function(e,t){const i=e.sort(((e,t)=>{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),n=new l(t);let o;const s=[];for(const e of i)if(o){if(e.start>o.start)if(e.end<=o.end)s.push(o),o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);else{if(e.start>o.end){do{o=s.pop()}while(o&&e.start>o.end);o&&s.push(o),o=e}n.add(e.start,e.end,e.kind&&e.kind.value,s.length)}}else o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);return n.toIndentRanges()}(t,this.foldingRangesLimit):null!==(n=null===(i=this.fallbackRangeProvider)||void 0===i?void 0:i.compute(e))&&void 0!==n?n:null}))}dispose(){this.disposables.dispose()}}class l{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>s.Xl||t>s.Xl)return;const o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=n,this._types[o]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;i<this._length;i++)e[i]=this._startIndexes[i],t[i]=this._endIndexes[i];return new s.MN(e,t,this._types)}{this._foldingRangesLimit.update(this._length,e);let t=0,i=this._nestingLevelCounts.length;for(let n=0;n<this._nestingLevelCounts.length;n++){const o=this._nestingLevelCounts[n];if(o){if(o+t>e){i=n;break}t+=o}}const n=new Uint32Array(e),o=new Uint32Array(e),r=[];for(let s=0,a=0;s<this._length;s++){const l=this._nestingLevels[s];(l<i||l===i&&t++<e)&&(n[a]=this._startIndexes[s],o[a]=this._endIndexes[s],r[a]=this._types[s],a++)}return new s.MN(n,o,r)}}}},44125:(e,t,i)=>{var n=i(16830),o=i(82334),s=i(63580);class r extends n.R6{constructor(){super({id:"editor.action.fontZoomIn",label:s.NC("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){o.C.setZoomLevel(o.C.getZoomLevel()+1)}}class a extends n.R6{constructor(){super({id:"editor.action.fontZoomOut",label:s.NC("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){o.C.setZoomLevel(o.C.getZoomLevel()-1)}}class l extends n.R6{constructor(){super({id:"editor.action.fontZoomReset",label:s.NC("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){o.C.setZoomLevel(0)}}(0,n.Qr)(r),(0,n.Qr)(a),(0,n.Qr)(l)},58823:(e,t,i)=>{i.d(t,{xC:()=>E,Zg:()=>N,x$:()=>I,Qq:()=>M,Qs:()=>A});var n=i(56346),o=i(9488),s=i(71050),r=i(17301),a=i(53725),l=i(91741),d=i(98401),h=i(70666),c=i(16467),u=i(65520),g=i(50187),p=i(24314),m=i(3860),f=i(85215),_=i(88216),v=i(35120),b=i(63580),C=i(94565);class w{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}class y{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(w.toKey(e))}has(e){return this._set.has(w.toKey(e))}}var S=i(72065),L=i(71922),x=i(43557),k=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function N(e){if(!(e=e.filter((e=>e.range))).length)return;let{range:t}=e[0];for(let i=1;i<e.length;i++)t=p.e.plusRange(t,e[i].range);const{startLineNumber:i,endLineNumber:o}=t;i===o?1===e.length?(0,n.Z9)(b.NC("hint11","Made 1 formatting edit on line {0}",i)):(0,n.Z9)(b.NC("hintn1","Made {0} formatting edits on line {1}",e.length,i)):1===e.length?(0,n.Z9)(b.NC("hint1n","Made 1 formatting edit between lines {0} and {1}",i,o)):(0,n.Z9)(b.NC("hintnn","Made {0} formatting edits between lines {1} and {2}",e.length,i,o))}function D(e,t,i){const n=[],o=new y,s=e.ordered(i);for(const e of s)n.push(e),e.extensionId&&o.add(e.extensionId);const r=t.ordered(i);for(const e of r){if(e.extensionId){if(o.has(e.extensionId))continue;o.add(e.extensionId)}n.push({displayName:e.displayName,extensionId:e.extensionId,provideDocumentFormattingEdits:(t,i,n)=>e.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)})}return n}class E{static setFormatterSelector(e){return{dispose:E._selectors.unshift(e)}}static select(e,t,i){return k(this,void 0,void 0,(function*(){if(0===e.length)return;const n=a.$.first(E._selectors);return n?yield n(e,t,i):void 0}))}}function I(e,t,i,n,o,s){return k(this,void 0,void 0,(function*(){const r=e.get(S.TG),{documentRangeFormattingEditProvider:a}=e.get(L.p),l=(0,u.CL)(t)?t.getModel():t,d=a.ordered(l),h=yield E.select(d,l,n);h&&(o.report(h),yield r.invokeFunction(T,h,t,i,s))}))}function T(e,t,i,n,s){var r,a;return k(this,void 0,void 0,(function*(){const l=e.get(f.p),d=e.get(x.VZ);let h,g;(0,u.CL)(i)?(h=i.getModel(),g=new c.Dl(i,5,void 0,s)):(h=i,g=new c.YQ(i,s));const _=[];let b=0;for(const e of(0,o._2)(n).sort(p.e.compareRangesUsingStarts))b>0&&p.e.areIntersectingOrTouching(_[b-1],e)?_[b-1]=p.e.fromPositions(_[b-1].getStartPosition(),e.getEndPosition()):b=_.push(e);const C=e=>k(this,void 0,void 0,(function*(){var i,n;d.trace("[format][provideDocumentRangeFormattingEdits] (request)",null===(i=t.extensionId)||void 0===i?void 0:i.value,e);const o=(yield t.provideDocumentRangeFormattingEdits(h,e,h.getFormattingOptions(),g.token))||[];return d.trace("[format][provideDocumentRangeFormattingEdits] (response)",null===(n=t.extensionId)||void 0===n?void 0:n.value,o),o})),w=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>p.e.plusRange(e,t.range)),e[0].range);if(!t.some((e=>p.e.intersectRanges(i,e.range))))return!1;for(const i of e)for(const e of t)if(p.e.intersectRanges(i.range,e.range))return!0;return!1},y=[],S=[];try{if("function"==typeof t.provideDocumentRangesFormattingEdits){d.trace("[format][provideDocumentRangeFormattingEdits] (request)",null===(r=t.extensionId)||void 0===r?void 0:r.value,_);const e=(yield t.provideDocumentRangesFormattingEdits(h,_,h.getFormattingOptions(),g.token))||[];d.trace("[format][provideDocumentRangeFormattingEdits] (response)",null===(a=t.extensionId)||void 0===a?void 0:a.value,e),S.push(e)}else{for(const e of _){if(g.token.isCancellationRequested)return!0;S.push(yield C(e))}for(let e=0;e<_.length;++e)for(let t=e+1;t<_.length;++t){if(g.token.isCancellationRequested)return!0;if(w(S[e],S[t])){const i=p.e.plusRange(_[e],_[t]),n=yield C(i);_.splice(t,1),_.splice(e,1),_.push(i),S.splice(t,1),S.splice(e,1),S.push(n),e=0,t=0}}}for(const e of S){if(g.token.isCancellationRequested)return!0;const t=yield l.computeMoreMinimalEdits(h.uri,e);t&&y.push(...t)}}finally{g.dispose()}if(0===y.length)return!1;if((0,u.CL)(i))v.V.execute(i,y,!0),N(y),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=y,t=new m.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);h.pushEditOperations([t],y.map((e=>({text:e.text,range:p.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(p.e.areIntersectingOrTouching(i,t))return[new m.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function M(e,t,i,n,o){return k(this,void 0,void 0,(function*(){const s=e.get(S.TG),r=e.get(L.p),a=(0,u.CL)(t)?t.getModel():t,l=D(r.documentFormattingEditProvider,r.documentRangeFormattingEditProvider,a),d=yield E.select(l,a,i);d&&(n.report(d),yield s.invokeFunction(R,d,t,i,o))}))}function R(e,t,i,n,o){return k(this,void 0,void 0,(function*(){const s=e.get(f.p);let r,a,l;(0,u.CL)(i)?(r=i.getModel(),a=new c.Dl(i,5,void 0,o)):(r=i,a=new c.YQ(i,o));try{const e=yield t.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield s.computeMoreMinimalEdits(r.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||0===l.length)return!1;if((0,u.CL)(i))v.V.execute(i,l,2!==n),2!==n&&(N(l),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1));else{const[{range:e}]=l,t=new m.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);r.pushEditOperations([t],l.map((e=>({text:e.text,range:p.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(p.e.areIntersectingOrTouching(i,t))return[new m.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function A(e,t,i,n,o,s,a){const l=t.onTypeFormattingEditProvider.ordered(i);return 0===l.length||l[0].autoFormatTriggerCharacters.indexOf(o)<0?Promise.resolve(void 0):Promise.resolve(l[0].provideOnTypeFormattingEdits(i,n,o,s,a)).catch(r.Cp).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}E._selectors=new l.S,C.P.registerCommand("_executeFormatRangeProvider",(function(e,...t){return k(this,void 0,void 0,(function*(){const[i,n,a]=t;(0,d.p_)(h.o.isUri(i)),(0,d.p_)(p.e.isIRange(n));const l=e.get(_.S),c=e.get(f.p),u=e.get(L.p),g=yield l.createModelReference(i);try{return function(e,t,i,n,s,a){return k(this,void 0,void 0,(function*(){const l=t.documentRangeFormattingEditProvider.ordered(i);for(const t of l){const l=yield Promise.resolve(t.provideDocumentRangeFormattingEdits(i,n,s,a)).catch(r.Cp);if((0,o.Of)(l))return yield e.computeMoreMinimalEdits(i.uri,l)}}))}(c,u,g.object.textEditorModel,p.e.lift(n),a,s.T.None)}finally{g.dispose()}}))})),C.P.registerCommand("_executeFormatDocumentProvider",(function(e,...t){return k(this,void 0,void 0,(function*(){const[i,n]=t;(0,d.p_)(h.o.isUri(i));const a=e.get(_.S),l=e.get(f.p),c=e.get(L.p),u=yield a.createModelReference(i);try{return function(e,t,i,n,s){return k(this,void 0,void 0,(function*(){const a=D(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of a){const a=yield Promise.resolve(t.provideDocumentFormattingEdits(i,n,s)).catch(r.Cp);if((0,o.Of)(a))return yield e.computeMoreMinimalEdits(i.uri,a)}}))}(l,c,u.object.textEditorModel,n,s.T.None)}finally{u.dispose()}}))})),C.P.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){return k(this,void 0,void 0,(function*(){const[i,n,o,r]=t;(0,d.p_)(h.o.isUri(i)),(0,d.p_)(g.L.isIPosition(n)),(0,d.p_)("string"==typeof o);const a=e.get(_.S),l=e.get(f.p),c=e.get(L.p),u=yield a.createModelReference(i);try{return A(l,c,u.object.textEditorModel,g.L.lift(n),o,r,s.T.None)}finally{u.dispose()}}))}))},61097:(e,t,i)=>{var n=i(9488),o=i(71050),s=i(17301),r=i(22258),a=i(5976),l=i(16830),d=i(17122),h=i(44906),c=i(24314),u=i(29102),g=i(85215),p=i(71922),m=i(58823),f=i(35120),_=i(63580),v=i(94565),b=i(93983),C=i(72065),w=i(90535),y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},S=function(e,t){return function(i,n){t(i,n,e)}},L=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let x=class{constructor(e,t,i){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._disposables=new a.SL,this._sessionDisposables=new a.SL,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(55)&&this._update()}))),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(55))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new h.q;for(const e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType((e=>{const t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),s=new o.A,r=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return s.cancel(),void r.dispose();for(let t=0,n=e.changes.length;t<n;t++)if(e.changes[t].range.endLineNumber<=i.lineNumber)return s.cancel(),void r.dispose()}));(0,m.Qs)(this._workerService,this._languageFeaturesService,t,i,e,t.getFormattingOptions(),s.token).then((e=>{s.token.isCancellationRequested||(0,n.Of)(e)&&(f.V.execute(this._editor,e,!0),(0,m.Zg)(e))})).finally((()=>{r.dispose()}))}};x.ID="editor.contrib.autoFormat",x=y([S(1,p.p),S(2,g.p)],x);let k=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new a.SL,this._callOnModel=new a.SL,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(54)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(m.x$,this.editor,e,2,w.Ex.None,o.T.None).catch(s.dL))}};k.ID="editor.contrib.formatOnPaste",k=y([S(1,p.p),S(2,C.TG)],k);class N extends l.R6{constructor(){super({id:"editor.action.formatDocument",label:_.NC("formatDocument.label","Format Document"),alias:"Format Document",precondition:b.Ao.and(u.u.notInCompositeEditor,u.u.writable,u.u.hasDocumentFormattingProvider),kbOpts:{kbExpr:u.u.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return L(this,void 0,void 0,(function*(){if(t.hasModel()){const i=e.get(C.TG),n=e.get(w.ek);yield n.showWhile(i.invokeFunction(m.Qq,t,1,w.Ex.None,o.T.None),250)}}))}}class D extends l.R6{constructor(){super({id:"editor.action.formatSelection",label:_.NC("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:b.Ao.and(u.u.writable,u.u.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:u.u.editorTextFocus,primary:(0,r.gx)(2089,2084),weight:100},contextMenuOpts:{when:u.u.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return L(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(C.TG),n=t.getModel(),s=t.getSelections().map((e=>e.isEmpty()?new c.e(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),r=e.get(w.ek);yield r.showWhile(i.invokeFunction(m.x$,t,s,1,w.Ex.None,o.T.None),250)}))}}(0,l._K)(x.ID,x,2),(0,l._K)(k.ID,k,2),(0,l.Qr)(N),(0,l.Qr)(D),v.P.registerCommand("editor.action.format",(e=>L(void 0,void 0,void 0,(function*(){const t=e.get(d.$).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(v.H);t.getSelection().isEmpty()?yield i.executeCommand("editor.action.formatDocument"):yield i.executeCommand("editor.action.formatSelection")}))))},35120:(e,t,i)=>{i.d(t,{V:()=>r});var n=i(69386),o=i(24314),s=i(43407);class r{static _handleEolEdits(e,t){let i;const n=[];for(const e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const a=s.Z.capture(e),l=r._handleEolEdits(e,t);1===l.length&&r._isFullModelReplaceEdit(e,l[0])?e.executeEdits("formatEditsCommand",l.map((e=>n.h.replace(o.e.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",l.map((e=>n.h.replaceMove(o.e.lift(e.range),e.text)))),i&&e.pushUndoStop(),a.restoreRelativeVerticalPositionOfCursor(e)}}},40832:(e,t,i)=>{i.d(t,{c:()=>we,v:()=>Se});var n=i(73046),o=i(5976),s=i(16830),r=i(17122),a=i(50187),l=i(24314),d=i(29102),h=i(9488),c=i(4669),u=i(91741),g=i(97295),p=i(70666),m=i(65026),f=i(72065),_=i(98674),v=i(33108),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},C=function(e,t){return function(i,n){t(i,n,e)}};class w{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let y=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new c.Q5,this.onDidChange=this._onDidChange.event,this._dispoables=new o.SL,this._markers=[],this._nextIdx=-1,p.o.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(e,t)=>{let i=(0,g.qu)(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?l.e.compareRangesUsingStarts(e,t)||_.ZL.compare(e.severity,t.severity):_.ZL.compare(e.severity,t.severity)||l.e.compareRangesUsingStarts(e,t)),i},r=()=>{this._markers=this._markerService.read({resource:p.o.isUri(e)?e:void 0,severities:_.ZL.Error|_.ZL.Warning|_.ZL.Info}),"function"==typeof e&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(r(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new w(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,o=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));o<0&&(o=(0,h.ry)(this._markers,{resource:e.uri},((e,t)=>(0,g.qu)(e.resource.toString(),t.resource.toString()))),o<0&&(o=~o));for(let i=o;i<this._markers.length;i++){let o=l.e.lift(this._markers[i]);if(o.isEmpty()){const t=e.getWordAtPosition(o.getStartPosition());t&&(o=new l.e(o.startLineNumber,t.startColumn,o.startLineNumber,t.endColumn))}if(t&&(o.containsPosition(t)||t.isBeforeOrEqual(o.getStartPosition()))){this._nextIdx=i,n=!0;break}if(this._markers[i].resource.toString()!==e.uri.toString())break}n||(this._nextIdx=i?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,i){if(0===this._markers.length)return!1;const n=this._nextIdx;return-1===this._nextIdx?this._initIdx(t,i,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(e,t){let i=this._markers.findIndex((t=>t.resource.toString()===e.toString()));if(!(i<0))for(;i<this._markers.length;i++)if(l.e.containsPosition(this._markers[i],t))return new w(this._markers[i],i+1,this._markers.length)}};y=b([C(1,_.lT),C(2,v.Ui)],y);const S=(0,f.yh)("IMarkerNavigationService");let L=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new u.S}getMarkerList(e){for(const t of this._provider){const i=t.getMarkerList(e);if(i)return i}return new y(e,this._markerService,this._configService)}};L=b([C(0,_.lT),C(1,v.Ui)],L),(0,m.z)(S,L,1);var x=i(63580),k=i(84144),N=i(93983),D=i(59554),E=i(65321),I=i(64117),T=i(41264),M=i(95935),R=i(93379),A=i.n(R),O=i(7795),P=i.n(O),F=i(90569),B=i.n(F),W=i(3565),V=i.n(W),H=i(19216),z=i.n(H),K=i(44589),U=i.n(K),j=i(35351),$={};$.styleTagTransform=U(),$.setAttributes=V(),$.insert=B().bind(null,"head"),$.domAPI=P(),$.insertStyleElement=z(),A()(j.Z,$),j.Z&&j.Z.locals&&j.Z.locals;var q=i(81774),Z=i(44691),G=i(44349),Q=i(50988),Y=i(81050),J={};J.styleTagTransform=U(),J.setAttributes=V(),J.insert=B().bind(null,"head"),J.domAPI=P(),J.insertStyleElement=z(),A()(Y.Z,J),Y.Z&&Y.Z.locals&&Y.Z.locals;var X,ee=i(25670),te=i(14603);!function(e){e.className=function(e){switch(e){case te.Z.Ignore:return"severity-ignore "+ee.k.asClassName(n.l.info);case te.Z.Info:return ee.k.asClassName(n.l.info);case te.Z.Warning:return ee.k.asClassName(n.l.warning);case te.Z.Error:return ee.k.asClassName(n.l.error);default:return""}}}(X||(X={}));var ie,ne=i(73910),oe=i(97781),se=function(e,t){return function(i,n){t(i,n,e)}};class re{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new o.SL,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(E.mu(this._relatedBlock,"click",(e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new I.NB(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{r.style.left=`-${e.scrollLeft}px`,r.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,o.B9)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:o}=e;let s=((null==t?void 0:t.length)||0)+2;o&&(s+="string"==typeof o?o.length:o.value.length);const r=(0,g.uq)(i);this._lines=r.length,this._longestLineLength=0;for(const e of r)this._longestLineLength=Math.max(e.length+s,this._longestLineLength);E.PO(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of r)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||o){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(o)if("string"==typeof o){const t=document.createElement("span");t.innerText=`(${o})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=E.$("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(o.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},E.R3(this._codeLink,E.$("span")).innerText=o.value,e.appendChild(this._codeLink)}if(E.PO(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,h.Of)(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(65))}px`,this._lines+=1;for(const t of n){const i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);const o=document.createElement("span");o.innerText=t.message,i.appendChild(n),i.appendChild(o),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(49),d=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),c=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:c})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case _.ZL.Error:t=x.NC("Error","Error");break;case _.ZL.Warning:t=x.NC("Warning","Warning");break;case _.ZL.Info:t=x.NC("Info","Info");break;case _.ZL.Hint:t=x.NC("Hint","Hint")}let i=x.NC("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let ae=ie=class extends q.vk{constructor(e,t,i,n,s,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new o.SL,this._onDidSelectRelatedInformation=new c.Q5,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=_.ZL.Warning,this._backgroundColor=T.Il.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(_e);let t=ce,i=ue;this._severity===_.ZL.Warning?(t=ge,i=pe):this._severity===_.ZL.Info&&(t=me,i=fe);const n=e.getColor(t),o=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:o,primaryHeadingColor:e.getColor(q.IH),secondaryHeadingColor:e.getColor(q.R7)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun((e=>this.editor.focus())));const t=[],i=this._menuService.createMenu(ie.TitleMenu,this._contextKeyService);(0,Z.vr)(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=E.R3(e,E.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new re(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=l.e.lift(e),o=this.editor.getPosition(),s=o&&n.containsPosition(o)?o:n.getStartPosition();super.show(s,this.computeRequiredHeight());const r=this.editor.getModel();if(r){const e=i>1?x.NC("problems","{0} of {1} problems",t,i):x.NC("change","{0} of {1} problem",t,i);this.setTitle((0,M.EZ)(r.uri),e)}this._icon.className=`codicon ${X.className(_.ZL.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};ae.TitleMenu=new k.eH("gotoErrorTitleMenu"),ae=ie=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([se(1,oe.XE),se(2,Q.v4),se(3,k.co),se(4,f.TG),se(5,N.i6),se(6,G.e)],ae);const le=(0,ne.kwl)(ne.lXJ,ne.b6y),de=(0,ne.kwl)(ne.uoC,ne.pW3),he=(0,ne.kwl)(ne.c63,ne.T83),ce=(0,ne.P6G)("editorMarkerNavigationError.background",{dark:le,light:le,hcDark:ne.lRK,hcLight:ne.lRK},x.NC("editorMarkerNavigationError","Editor marker navigation widget error color.")),ue=(0,ne.P6G)("editorMarkerNavigationError.headerBackground",{dark:(0,ne.ZnX)(ce,.1),light:(0,ne.ZnX)(ce,.1),hcDark:null,hcLight:null},x.NC("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),ge=(0,ne.P6G)("editorMarkerNavigationWarning.background",{dark:de,light:de,hcDark:ne.lRK,hcLight:ne.lRK},x.NC("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),pe=(0,ne.P6G)("editorMarkerNavigationWarning.headerBackground",{dark:(0,ne.ZnX)(ge,.1),light:(0,ne.ZnX)(ge,.1),hcDark:"#0C141F",hcLight:(0,ne.ZnX)(ge,.2)},x.NC("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),me=(0,ne.P6G)("editorMarkerNavigationInfo.background",{dark:he,light:he,hcDark:ne.lRK,hcLight:ne.lRK},x.NC("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),fe=(0,ne.P6G)("editorMarkerNavigationInfo.headerBackground",{dark:(0,ne.ZnX)(me,.1),light:(0,ne.ZnX)(me,.1),hcDark:null,hcLight:null},x.NC("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),_e=(0,ne.P6G)("editorMarkerNavigation.background",{dark:ne.cvW,light:ne.cvW,hcDark:ne.cvW,hcLight:ne.cvW},x.NC("editorMarkerNavigationBackground","Editor marker navigation widget background."));var ve,be=function(e,t){return function(i,n){t(i,n,e)}},Ce=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let we=ve=class{static get(e){return e.getContribution(ve.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new o.SL,this._editor=e,this._widgetVisible=xe.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(ae,this._editor),this._widget.onDidClose((()=>this.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{var t,i,n;(null===(t=this._model)||void 0===t?void 0:t.selected)&&l.e.containsPosition(null===(i=this._model)||void 0===i?void 0:i.selected.marker,e.position)||null===(n=this._model)||void 0===n||n.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.e.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.L(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var i,n;return Ce(this,void 0,void 0,(function*(){if(this._editor.hasModel()){const o=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(o.move(e,this._editor.getModel(),this._editor.getPosition()),!o.selected)return;if(o.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const s=yield this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);s&&(null===(i=ve.get(s))||void 0===i||i.close(),null===(n=ve.get(s))||void 0===n||n.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}}))}};we.ID="editor.contrib.markerController",we=ve=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([be(1,S),be(2,N.i6),be(3,r.$),be(4,f.TG)],we);class ye extends s.R6{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return Ce(this,void 0,void 0,(function*(){t.hasModel()&&(null===(i=we.get(t))||void 0===i||i.nagivate(this._next,this._multiFile))}))}}class Se extends ye{constructor(){super(!0,!1,{id:Se.ID,label:Se.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:578,weight:100},menuOpts:{menuId:ae.TitleMenu,title:Se.LABEL,icon:(0,D.q5)("marker-navigation-next",n.l.arrowDown,x.NC("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}Se.ID="editor.action.marker.next",Se.LABEL=x.NC("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class Le extends ye{constructor(){super(!1,!1,{id:Le.ID,label:Le.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:1602,weight:100},menuOpts:{menuId:ae.TitleMenu,title:Le.LABEL,icon:(0,D.q5)("marker-navigation-previous",n.l.arrowUp,x.NC("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}Le.ID="editor.action.marker.prev",Le.LABEL=x.NC("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)"),(0,s._K)(we.ID,we,4),(0,s.Qr)(Se),(0,s.Qr)(Le),(0,s.Qr)(class extends ye{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:x.NC("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:66,weight:100},menuOpts:{menuId:k.eH.MenubarGoMenu,title:x.NC({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}),(0,s.Qr)(class extends ye{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:x.NC("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:1090,weight:100},menuOpts:{menuId:k.eH.MenubarGoMenu,title:x.NC({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const xe=new N.uy("markersNavigationVisible",!1),ke=s._l.bindToContribution(we.get);(0,s.fK)(new ke({id:"closeMarkersNavigation",precondition:xe,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:d.u.focus,primary:9,secondary:[1033]}}))},60628:(e,t,i)=>{i.d(t,{BT:()=>te,Bj:()=>ee,_k:()=>X});var n=i(56346),o=i(15393),s=i(22258),r=i(98401),a=i(70666),l=i(16467),d=i(65520),h=i(16830),c=i(17122),u=i(84527),g=i(50187),p=i(24314),m=i(29102),f=i(96887),_=i(88802),v=i(1293),b=i(4669),C=i(5976),w=i(95935),y=i(63580),S=i(93983),L=i(65026),x=i(72065),k=i(91847),N=i(49989),D=i(59422),E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};const T=new S.uy("hasSymbols",!1,(0,y.NC)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),M=(0,x.yh)("ISymbolNavigationService");let R=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=T.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new A(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),o=i.getPosition();if(!n||!o)return;let s=!1,r=!1;for(const e of t.references)if((0,w.Xy)(e.uri,n.uri))s=!0,r=r||p.e.containsPosition(e.range,o);else if(s)break;s&&r||this.reset()}));this._currentState=(0,C.F8)(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:p.e.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?(0,y.NC)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):(0,y.NC)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};R=E([I(0,S.i6),I(1,c.$),I(2,D.lT),I(3,k.d)],R),(0,L.z)(M,R,1),(0,h.fK)(new class extends h._l{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:T,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(M).revealNext(t)}}),N.W.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:T,primary:9,handler(e){e.get(M).reset()}});let A=class{constructor(e){this._listener=new Map,this._disposables=new C.SL,this._onDidChange=new b.Q5,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,C.B9)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,C.F8)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};A=E([I(0,c.$)],A);var O,P,F,B,W,V,H,z,K=i(39310),U=i(81774),j=i(84144),$=i(94565),q=i(90535),Z=i(40184),G=i(71922),Q=i(53725),Y=i(39282),J=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};j.BH.appendMenuItem(j.eH.EditorContext,{submenu:j.eH.EditorContextPeek,title:y.NC("peek.submenu","Peek"),group:"navigation",order:100});class X{static is(e){return!(!e||"object"!=typeof e)&&(e instanceof X||!(!g.L.isIPosition(e.position)||!e.model))}constructor(e,t){this.model=e,this.position=t}}class ee extends h.x1{static all(){return ee._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const i of Q.$.wrap(t.menu))i.id!==j.eH.EditorContext&&i.id!==j.eH.EditorContextPeek||(i.when=S.Ao.and(e.precondition,i.when));return t}constructor(e,t){super(ee._patchConfig(t)),this.configuration=e,ee._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,s){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(D.lT),a=e.get(c.$),d=e.get(q.ek),h=e.get(M),u=e.get(G.p),g=e.get(x.TG),p=t.getModel(),m=t.getPosition(),f=X.is(i)?i:new X(p,m),_=new l.Dl(t,5),v=(0,o.eP)(this._getLocationModel(u,f.model,f.position,_.token),_.token).then((e=>J(this,void 0,void 0,(function*(){var o;if(!e||_.token.isCancellationRequested)return;let r;if((0,n.Z9)(e.ariaMessage),e.referenceAt(p.uri,m)){const e=this._getAlternativeCommand(t);!ee._activeAlternativeCommands.has(e)&&ee._allSymbolNavigationCommands.has(e)&&(r=ee._allSymbolNavigationCommands.get(e))}const l=e.references.length;if(0===l){if(!this.configuration.muteMessage){const e=p.getWordAtPosition(m);null===(o=K.O.get(t))||void 0===o||o.showMessage(this._getNoResultFoundMessage(e),m)}}else{if(1!==l||!r)return this._onResult(a,h,t,e,s);ee._activeAlternativeCommands.add(this.desc.id),g.invokeFunction((e=>r.runEditorCommand(e,t,i,s).finally((()=>{ee._activeAlternativeCommands.delete(this.desc.id)}))))}}))),(e=>{r.error(e)})).finally((()=>{_.dispose()}));return d.showWhile(v,250),v}_onResult(e,t,i,n,o){return J(this,void 0,void 0,(function*(){const s=this._getGoToPreference(i);if(i instanceof u.H||!(this.configuration.openInPeek||"peek"===s&&n.references.length>1)){const r=n.firstReference(),a=n.references.length>1&&"gotoAndPeek"===s,l=yield this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n,o):n.dispose(),"goto"===s&&t.put(r)}else this._openInPeek(i,n,o)}))}_openReference(e,t,i,n,o){return J(this,void 0,void 0,(function*(){let s;if((0,f.vx)(i)&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const r=yield t.openCodeEditor({resource:i.uri,options:{selection:p.e.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(r){if(o){const e=r.getModel(),t=r.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{r.getModel()===e&&t.clear()}),350)}return r}}))}_openInPeek(e,t,i){const n=_.J.get(e);n&&e.hasModel()?n.toggleWidget(null!=i?i:e.getSelection(),(0,o.PG)((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}ee._allSymbolNavigationCommands=new Map,ee._activeAlternativeCommands=new Set;class te extends ee{_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new v.oQ(yield(0,Z.nD)(e.definitionProvider,t,i,n),y.NC("def.title","Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?y.NC("noResultWord","No definition found for '{0}'",e.word):y.NC("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(57).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleDefinitions}}(0,j.r1)(((O=class extends te{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:O.id,title:{value:y.NC("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:y.NC({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:S.Ao.and(m.u.hasDefinitionProvider,m.u.isInWalkThroughSnippet.toNegated()),keybinding:[{when:m.u.editorTextFocus,primary:70,weight:100},{when:S.Ao.and(m.u.editorTextFocus,Y.Pf),primary:2118,weight:100}],menu:[{id:j.eH.EditorContext,group:"navigation",order:1.1},{id:j.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),$.P.registerCommandAlias("editor.action.goToDeclaration",O.id)}}).id="editor.action.revealDefinition",O)),(0,j.r1)(((P=class extends te{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:P.id,title:{value:y.NC("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:S.Ao.and(m.u.hasDefinitionProvider,m.u.isInWalkThroughSnippet.toNegated()),keybinding:[{when:m.u.editorTextFocus,primary:(0,s.gx)(2089,70),weight:100},{when:S.Ao.and(m.u.editorTextFocus,Y.Pf),primary:(0,s.gx)(2089,2118),weight:100}]}),$.P.registerCommandAlias("editor.action.openDeclarationToTheSide",P.id)}}).id="editor.action.revealDefinitionAside",P)),(0,j.r1)(((F=class extends te{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:F.id,title:{value:y.NC("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:S.Ao.and(m.u.hasDefinitionProvider,U.Jy.notInPeekEditor,m.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:m.u.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:j.eH.EditorContextPeek,group:"peek",order:2}}),$.P.registerCommandAlias("editor.action.previewDeclaration",F.id)}}).id="editor.action.peekDefinition",F));class ie extends ee{_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new v.oQ(yield(0,Z.zq)(e.declarationProvider,t,i,n),y.NC("decl.title","Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?y.NC("decl.noResultWord","No declaration found for '{0}'",e.word):y.NC("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(57).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(57).multipleDeclarations}}(0,j.r1)(((B=class extends ie{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:B.id,title:{value:y.NC("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:y.NC({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:S.Ao.and(m.u.hasDeclarationProvider,m.u.isInWalkThroughSnippet.toNegated()),menu:[{id:j.eH.EditorContext,group:"navigation",order:1.3},{id:j.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?y.NC("decl.noResultWord","No declaration found for '{0}'",e.word):y.NC("decl.generic.noResults","No declaration found")}}).id="editor.action.revealDeclaration",B)),(0,j.r1)(class extends ie{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:y.NC("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:S.Ao.and(m.u.hasDeclarationProvider,U.Jy.notInPeekEditor,m.u.isInWalkThroughSnippet.toNegated()),menu:{id:j.eH.EditorContextPeek,group:"peek",order:3}})}});class ne extends ee{_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new v.oQ(yield(0,Z.L3)(e.typeDefinitionProvider,t,i,n),y.NC("typedef.title","Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?y.NC("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):y.NC("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(57).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleTypeDefinitions}}(0,j.r1)(((W=class extends ne{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:W.ID,title:{value:y.NC("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:y.NC({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:S.Ao.and(m.u.hasTypeDefinitionProvider,m.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:m.u.editorTextFocus,primary:0,weight:100},menu:[{id:j.eH.EditorContext,group:"navigation",order:1.4},{id:j.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}}).ID="editor.action.goToTypeDefinition",W)),(0,j.r1)(((V=class extends ne{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:V.ID,title:{value:y.NC("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:S.Ao.and(m.u.hasTypeDefinitionProvider,U.Jy.notInPeekEditor,m.u.isInWalkThroughSnippet.toNegated()),menu:{id:j.eH.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",V));class oe extends ee{_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new v.oQ(yield(0,Z.f4)(e.implementationProvider,t,i,n),y.NC("impl.title","Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?y.NC("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):y.NC("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(57).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(57).multipleImplementations}}(0,j.r1)(((H=class extends oe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:H.ID,title:{value:y.NC("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:y.NC({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:S.Ao.and(m.u.hasImplementationProvider,m.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:m.u.editorTextFocus,primary:2118,weight:100},menu:[{id:j.eH.EditorContext,group:"navigation",order:1.45},{id:j.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}}).ID="editor.action.goToImplementation",H)),(0,j.r1)(((z=class extends oe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:z.ID,title:{value:y.NC("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:S.Ao.and(m.u.hasImplementationProvider,U.Jy.notInPeekEditor,m.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:m.u.editorTextFocus,primary:3142,weight:100},menu:{id:j.eH.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",z));class se extends ee{_getNoResultFoundMessage(e){return e?y.NC("references.no","No references found for '{0}'",e.word):y.NC("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(57).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(57).multipleReferences}}(0,j.r1)(class extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:y.NC("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:y.NC({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:S.Ao.and(m.u.hasReferenceProvider,U.Jy.notInPeekEditor,m.u.isInWalkThroughSnippet.toNegated()),keybinding:{when:m.u.editorTextFocus,primary:1094,weight:100},menu:[{id:j.eH.EditorContext,group:"navigation",order:1.45},{id:j.eH.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new v.oQ(yield(0,Z.aA)(e.referenceProvider,t,i,!0,n),y.NC("ref.title","References"))}))}}),(0,j.r1)(class extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:y.NC("references.action.label","Peek References"),original:"Peek References"},precondition:S.Ao.and(m.u.hasReferenceProvider,U.Jy.notInPeekEditor,m.u.isInWalkThroughSnippet.toNegated()),menu:{id:j.eH.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new v.oQ(yield(0,Z.aA)(e.referenceProvider,t,i,!1,n),y.NC("ref.title","References"))}))}});class re extends ee{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:{value:y.NC("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:S.Ao.and(U.Jy.notInPeekEditor,m.u.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,n){return J(this,void 0,void 0,(function*(){return new v.oQ(this._references,y.NC("generic.title","Locations"))}))}_getNoResultFoundMessage(e){return e&&y.NC("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(57).multipleReferences}_getAlternativeCommand(){return""}}$.P.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.o},{name:"position",description:"The position at which to start",constraint:g.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(e,t,i,n,o,s,l)=>J(void 0,void 0,void 0,(function*(){(0,r.p_)(a.o.isUri(t)),(0,r.p_)(g.L.isIPosition(i)),(0,r.p_)(Array.isArray(n)),(0,r.p_)(void 0===o||"string"==typeof o),(0,r.p_)(void 0===l||"boolean"==typeof l);const h=e.get(c.$),u=yield h.openCodeEditor({resource:t},h.getFocusedCodeEditor());if((0,d.CL)(u))return u.setPosition(i),u.revealPositionInCenterIfOutsideViewport(i,0),u.invokeWithinContext((e=>{const t=new class extends re{_getNoResultFoundMessage(e){return s||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(s),openInPeek:Boolean(l),openToSide:!1},n,o);e.get(x.TG).invokeFunction(t.run.bind(t),u)}))}))}),$.P.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.o},{name:"position",description:"The position at which to start",constraint:g.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(e,t,i,n,o)=>J(void 0,void 0,void 0,(function*(){e.get($.H).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}))}),$.P.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{(0,r.p_)(a.o.isUri(t)),(0,r.p_)(g.L.isIPosition(i));const n=e.get(G.p),s=e.get(c.$);return s.openCodeEditor({resource:t},s.getFocusedCodeEditor()).then((e=>{if(!(0,d.CL)(e)||!e.hasModel())return;const t=_.J.get(e);if(!t)return;const s=(0,o.PG)((t=>(0,Z.aA)(n.referenceProvider,e.getModel(),g.L.lift(i),!1,t).then((e=>new v.oQ(e,y.NC("ref.title","References")))))),r=new p.e(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(r,s,!1))}))}}),$.P.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},40184:(e,t,i)=>{i.d(t,{L3:()=>p,aA:()=>m,f4:()=>g,nD:()=>c,zq:()=>u});var n=i(9488),o=i(71050),s=i(17301),r=i(16830),a=i(71922),l=i(1293),d=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function h(e,t,i,o){return d(this,void 0,void 0,(function*(){const r=i.ordered(e).map((i=>Promise.resolve(o(i,e,t)).then(void 0,(e=>{(0,s.Cp)(e)})))),a=yield Promise.all(r);return(0,n.kX)(a.flat())}))}function c(e,t,i,n){return h(t,i,e,((e,t,i)=>e.provideDefinition(t,i,n)))}function u(e,t,i,n){return h(t,i,e,((e,t,i)=>e.provideDeclaration(t,i,n)))}function g(e,t,i,n){return h(t,i,e,((e,t,i)=>e.provideImplementation(t,i,n)))}function p(e,t,i,n){return h(t,i,e,((e,t,i)=>e.provideTypeDefinition(t,i,n)))}function m(e,t,i,n,o){return h(t,i,e,((e,t,i)=>d(this,void 0,void 0,(function*(){const s=yield e.provideReferences(t,i,{includeDeclaration:!0},o);if(!n||!s||2!==s.length)return s;const r=yield e.provideReferences(t,i,{includeDeclaration:!1},o);return r&&1===r.length?r:s}))))}function f(e){return d(this,void 0,void 0,(function*(){const t=yield e(),i=new l.oQ(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}))}(0,r.sb)("_executeDefinitionProvider",((e,t,i)=>{const n=c(e.get(a.p).definitionProvider,t,i,o.T.None);return f((()=>n))})),(0,r.sb)("_executeTypeDefinitionProvider",((e,t,i)=>{const n=p(e.get(a.p).typeDefinitionProvider,t,i,o.T.None);return f((()=>n))})),(0,r.sb)("_executeDeclarationProvider",((e,t,i)=>{const n=u(e.get(a.p).declarationProvider,t,i,o.T.None);return f((()=>n))})),(0,r.sb)("_executeReferenceProvider",((e,t,i)=>{const n=m(e.get(a.p).referenceProvider,t,i,!1,o.T.None);return f((()=>n))})),(0,r.sb)("_executeImplementationProvider",((e,t,i)=>{const n=g(e.get(a.p).implementationProvider,t,i,o.T.None);return f((()=>n))}))},82005:(e,t,i)=>{i.d(t,{yN:()=>c});var n=i(4669),o=i(5976),s=i(1432);function r(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=r(e.event,t.triggerModifier),this.hasSideBySideModifier=r(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=r(e,t.triggerModifier)}}class d{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function h(e){return"altKey"===e?s.dz?new d(57,"metaKey",6,"altKey"):new d(5,"ctrlKey",6,"altKey"):s.dz?new d(6,"altKey",57,"metaKey"):new d(6,"altKey",5,"ctrlKey")}class c extends o.JT{constructor(e,t){var i;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new n.Q5),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new n.Q5),this.onExecute=this._onExecute.event,this._onCancel=this._register(new n.Q5),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=null!==(i=null==t?void 0:t.extractLineNumberFromMouseEvent)&&void 0!==i?i:e=>e.target.position?e.target.position.lineNumber:0,this._opts=h(this._editor.getOption(76)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(76)){const e=h(this._editor.getOption(76));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new a(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new a(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new a(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new l(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new l(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},53385:(e,t,i)=>{i.d(t,{S:()=>F});var n=i(15393),o=i(17301),s=i(59365),r=i(5976),a=i(93379),l=i.n(a),d=i(7795),h=i.n(d),c=i(90569),u=i.n(c),g=i(3565),p=i.n(g),m=i(19216),f=i.n(m),_=i(44589),v=i.n(_),b=i(33257),C={};C.styleTagTransform=v(),C.setAttributes=p(),C.insert=u().bind(null,"head"),C.domAPI=h(),C.insertStyleElement=f(),l()(b.Z,C),b.Z&&b.Z.locals&&b.Z.locals;var w,y=i(16467),S=i(16830),L=i(24314),x=i(72042),k=i(88216),N=i(82005),D=i(81774),E=i(63580),I=i(93983),T=i(60628),M=i(40184),R=i(71922),A=i(13961),O=function(e,t){return function(i,n){t(i,n,e)}},P=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let F=w=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new r.SL,this.toUnhookForKeyboard=new r.SL,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new N.yN(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,null!=t?t:void 0)}))),this.toUnhook.add(s.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch((e=>{(0,o.dL)(e)})).finally((()=>{this.removeLinkDecorations()}))}))),this.toUnhook.add(s.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(e){return e.getContribution(w.ID)}startFindDefinitionFromCursor(e){return P(this,void 0,void 0,(function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;return P(this,void 0,void 0,(function*(){this.toUnhookForKeyboard.clear();const i=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,void this.removeLinkDecorations();if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const r=new y.yy(this.editor,15);let a;this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,n.PG)((t=>this.findDefinition(e,t)));try{a=yield this.previousPromise}catch(e){return void(0,o.dL)(e)}if(!a||!a.length||!r.validate(this.editor))return void this.removeLinkDecorations();const l=a[0].originSelectionRange?L.e.lift(a[0].originSelectionRange):new L.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(a.length>1){let e=l;for(const{originSelectionRange:t}of a)t&&(e=L.e.plusRange(e,t));this.addDecoration(e,(new s.W5).appendText(E.NC("multipleResults","Click to show {0} definitions.",a.length)))}else{const e=a[0];if(!e.uri)return;this.textModelResolverService.createModelReference(e.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();const o=this.getPreviewValue(i,n,e),r=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(l,o?(new s.W5).appendCodeblock(r||"",o):void 0),t.dispose()}))}}))}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=w.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;o<i.endLineNumber;o++){const t=e.getLineFirstNonWhitespaceColumn(o);n=Math.min(n,t)}return e.getValueInRange(i).replace(new RegExp(`^\\s{${n-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){const i=e.getLineFirstNonWhitespaceColumn(t),n=Math.min(e.getLineCount(),t+w.MAX_SOURCE_PREVIEW_LINES);let o=t+1;for(;o<n&&i!==e.getLineFirstNonWhitespaceColumn(o);o++);return new L.e(t,1,o+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations.set([i])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){var i;return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&6===e.target.type&&!((null===(i=e.target.detail.injectedText)||void 0===i?void 0:i.options)instanceof A.HS)&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?(0,M.nD)(this.languageFeaturesService.definitionProvider,i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext((e=>{const i=!t&&this.editor.getOption(86)&&!this.isInPeekEditor(e);return new T.BT({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e)}))}isInPeekEditor(e){const t=e.get(I.i6);return D.Jy.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};F.ID="editor.contrib.gotodefinitionatposition",F.MAX_SOURCE_PREVIEW_LINES=8,F=w=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([O(1,k.S),O(2,x.O),O(3,R.p)],F),(0,S._K)(F.ID,F,2)},88802:(e,t,i)=>{i.d(t,{J:()=>Le});var n=i(15393),o=i(17301),s=i(22258),r=i(5976),a=i(17122),l=i(50187),d=i(24314),h=i(81774),c=i(63580),u=i(94565),g=i(33108),p=i(93983),m=i(72065),f=i(49989),_=i(95191),v=i(59422),b=i(26904),C=i(1293),w=i(65321),y=i(89782),S=i(41264),L=i(4669),x=i(66663),k=i(95935),N=i(93379),D=i.n(N),E=i(7795),I=i.n(E),T=i(90569),M=i.n(T),R=i(3565),A=i.n(R),O=i(19216),P=i.n(O),F=i(44589),B=i.n(F),W=i(60879),V={};V.styleTagTransform=B(),V.setAttributes=A(),V.insert=M().bind(null,"head"),V.domAPI=I(),V.insertStyleElement=P(),D()(W.Z,V),W.Z&&W.Z.locals&&W.Z.locals;var H,z=i(84527),K=i(13961),U=i(51381),j=i(68801),$=i(72042),q=i(88216),Z=i(89162),G=i(34650),Q=i(32107),Y=i(75392),J=i(91847),X=i(44349),ee=i(86253),te=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ie=function(e,t){return function(i,n){t(i,n,e)}};let ne=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof C.oQ||e instanceof C.F2}getChildren(e){if(e instanceof C.oQ)return e.groups;if(e instanceof C.F2)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};ne=te([ie(0,q.S)],ne);class oe{getHeight(){return 23}getTemplateId(e){return e instanceof C.F2?le.id:he.id}}let se=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof C.WX){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return(0,k.EZ)(e.uri)}};se=te([ie(0,J.d)],se);class re{getId(e){return e instanceof C.WX?e.id:e.uri}}let ae=class extends r.JT{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new Q.g(i,{supportHighlights:!0})),this.badge=new Z.Z(w.R3(i,w.$(".count")),{},ee.ku),e.appendChild(i)}set(e,t){const i=(0,k.XX)(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat((0,c.NC)("referencesCount","{0} references",n)):this.badge.setTitleFormat((0,c.NC)("referenceCount","{0} reference",n))}};ae=te([ie(1,X.e)],ae);let le=H=class{constructor(e){this._instantiationService=e,this.templateId=H.id}renderTemplate(e){return this._instantiationService.createInstance(ae,e)}renderElement(e,t,i){i.set(e.element,(0,Y.mB)(e.filterData))}disposeTemplate(e){e.dispose()}};le.id="FileReferencesRenderer",le=H=te([ie(0,m.TG)],le);class de{constructor(e){this.label=new G.q(e)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!Y.CL.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,Y.mB)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${(0,k.EZ)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class he{constructor(){this.templateId=he.id}renderTemplate(e){return new de(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}he.id="OneReferenceRenderer";class ce{getWidgetAriaLabel(){return(0,c.NC)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var ue=i(97781),ge=i(64862),pe=function(e,t){return function(i,n){t(i,n,e)}},me=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class fe{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new r.SL,this._callOnModelChange=new r.SL,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(const t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,o=e.children.length;n<o;n++){const o=e.children[n];this._decorationIgnoreSet.has(o.id)||o.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:o.range,options:fe.DecorationOptions}),i.push(n))}this._editor.changeDecorations((n=>{const o=n.deltaDecorations([],t);for(let t=0;t<o.length;t++)this._decorations.set(o[t],e.children[i[t]])}))}_onDecorationChanged(){const e=[],t=this._editor.getModel();if(t){for(const[i,n]of this._decorations){const o=t.getDecorationRange(i);if(!o)continue;let s=!1;d.e.equalsRange(o,n.range)||((d.e.spansMultipleLines(o)||n.range.endColumn-n.range.startColumn!=o.endColumn-o.startColumn)&&(s=!0),s?(this._decorationIgnoreSet.add(n.id),e.push(i)):n.range=o)}for(let t=0,i=e.length;t<i;t++)this._decorations.delete(e[t]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}fe.DecorationOptions=K.qx.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class _e{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const n=JSON.parse(e);t=n.ratio,i=n.heightInLines}catch(e){}return{ratio:t||.7,heightInLines:i||18}}}class ve extends _.ls{}let be=class extends h.vk{constructor(e,t,i,n,o,s,a,l,d,h,c,u){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},s),this._defaultTreeKeyboardSupport=t,this.layoutData=i,this._textModelResolverService=o,this._instantiationService=s,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=d,this._keybindingService=h,this._languageService=c,this._languageConfigurationService=u,this._disposeOnNewModel=new r.SL,this._callOnDispose=new r.SL,this._onDidSelectReference=new L.Q5,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new w.Ro(0,0),this._applyTheme(n.getColorTheme()),this._callOnDispose.add(n.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),(0,r.B9)(this._preview),(0,r.B9)(this._previewNotAvailableMessage),(0,r.B9)(this._tree),(0,r.B9)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(h.SC)||S.Il.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(h.KY)||S.Il.transparent,primaryHeadingColor:e.getColor(h.IH),secondaryHeadingColor:e.getColor(h.R7)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=w.R3(e,w.$("div.messages")),w.Cp(this._messageContainer),this._splitView=new y.z(e,{orientation:1}),this._previewContainer=w.R3(e,w.$("div.preview.inline")),this._preview=this._instantiationService.createInstance(z.H,this._previewContainer,{scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}},{},this.editor),w.Cp(this._previewContainer),this._previewNotAvailableMessage=new K.yO(c.NC("missingPreviewMessage","no preview available"),j.bd,K.yO.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=w.R3(e,w.$("div.ref-tree.inline"));const t={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new ce,keyboardNavigationLabelProvider:this._instantiationService.createInstance(se),identityProvider:new re,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:h.M8}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(w.mu(this._treeContainer,"keydown",(e=>{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(ve,"ReferencesWidget",this._treeContainer,new oe,[this._instantiationService.createInstance(le),this._instantiationService.createInstance(he)],this._instantiationService.createInstance(ne),t),this._splitView.addView({onDidChange:L.ju.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},y.M.Distribute),this._splitView.addView({onDidChange:L.ju.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},y.M.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));const i=(e,t)=>{e instanceof C.WX&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")})),w.Cp(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new w.Ro(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=c.NC("noResults","No results"),w.$Z(this._messageContainer),Promise.resolve(void 0)):(w.Cp(this._messageContainer),this._decorationsManager=new fe(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),w.$Z(this._treeContainer),w.$Z(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof C.WX?e:e instanceof C.F2&&e.children.length>0?e.children[0]:void 0}revealReference(e){return me(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return me(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==x.lg.inMemory?this.setTitle((0,k.Hx)(e.uri),this._uriLabel.getUriLabel((0,k.XX)(e.uri))):this.setTitle(c.NC("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent)),this._tree.reveal(e);const n=yield i;if(!this._model)return void n.dispose();(0,r.B9)(this._previewModelReference);const o=n.object;if(o){const t=this._preview.getModel()===o.textEditorModel?0:1,i=d.e.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(o.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}))}};be=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([pe(3,ue.XE),pe(4,q.S),pe(5,m.TG),pe(6,h.Fw),pe(7,X.e),pe(8,ge.tJ),pe(9,J.d),pe(10,$.O),pe(11,U.c_)],be);var Ce,we=function(e,t){return function(i,n){t(i,n,e)}},ye=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Se=new p.uy("referenceSearchVisible",!1,c.NC("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Le=Ce=class{static get(e){return e.getContribution(Ce.ID)}constructor(e,t,i,n,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new r.SL,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Se.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const o="peekViewLayout",s=_e.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(be,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(c.NC("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{const{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t,!0):this.openReference(t,!1,!0)}})));const r=++this._requestIdPool;t.then((t=>{var i;if(r===this._requestIdPool&&this._widget)return null===(i=this._model)||void 0===i||i.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(c.NC("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const t=this._editor.getModel().uri,i=new l.L(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(85)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return ye(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return ye(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var i;null===(i=this._widget)||void 0===i||i.hide(),this._ignoreModelChangeEvent=!0;const s=d.e.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:s,selectionSource:"code.jump",pinned:t}},this._editor).then((e=>{var t;if(this._ignoreModelChangeEvent=!1,e&&this._widget)if(this._editor===e)this._widget.show(s),this._widget.focusOnReferenceTree();else{const i=Ce.get(e),o=this._model.clone();this.closeWidget(),e.focus(),null==i||i.toggleWidget(s,(0,n.PG)((e=>Promise.resolve(o))),null!==(t=this._peekMode)&&void 0!==t&&t)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,o.dL)(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,selectionSource:"code.jump",pinned:i}},this._editor,t)}};function xe(e,t){const i=(0,h.rc)(e);if(!i)return;const n=Le.get(i);n&&t(n)}Le.ID="editor.contrib.referencesController",Le=Ce=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([we(2,p.i6),we(3,a.$),we(4,v.lT),we(5,m.TG),we(6,b.Uy),we(7,g.Ui)],Le),f.W.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,s.gx)(2089,60),when:p.Ao.or(Se,h.Jy.inPeekEditor),handler(e){xe(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),f.W.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:p.Ao.or(Se,h.Jy.inPeekEditor),handler(e){xe(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),f.W.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:p.Ao.or(Se,h.Jy.inPeekEditor),handler(e){xe(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),u.P.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),u.P.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),u.P.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),u.P.registerCommand("closeReferenceSearch",(e=>xe(e,(e=>e.closeWidget())))),f.W.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:p.Ao.and(h.Jy.inPeekEditor,p.Ao.not("config.editor.stablePeek"))}),f.W.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:p.Ao.and(Se,p.Ao.not("config.editor.stablePeek"))}),f.W.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:p.Ao.and(Se,_.CQ,_.PS.negate(),_.uJ.negate()),handler(e){var t;const i=null===(t=e.get(_.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof C.WX&&xe(e,(e=>e.revealReference(i[0])))}}),f.W.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:p.Ao.and(Se,_.CQ,_.PS.negate(),_.uJ.negate()),handler(e){var t;const i=null===(t=e.get(_.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof C.WX&&xe(e,(e=>e.openReference(i[0],!0,!0)))}}),u.P.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(_.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof C.WX&&xe(e,(e=>e.openReference(i[0],!1,!0)))}))},1293:(e,t,i)=>{i.d(t,{F2:()=>p,WX:()=>u,oQ:()=>m});var n=i(17301),o=i(4669),s=i(44742),r=i(5976),a=i(43702),l=i(95935),d=i(97295),h=i(24314),c=i(63580);class u{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=s.a.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?(0,c.NC)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,(0,l.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn):(0,c.NC)("aria.oneReference","in {0} on line {1} at column {2}",(0,l.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:o,endLineNumber:s,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:o-t}),l=new h.e(n,a.startColumn,n,o),d=new h.e(s,r,s,1073741824),c=i.getValueInRange(l).replace(/^\s+/,""),u=i.getValueInRange(e);return{value:c+u+i.getValueInRange(d).replace(/\s+$/,""),highlight:{start:c.length,end:c.length+u.length}}}}class p{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new a.Y9}dispose(){(0,r.B9)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,c.NC)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,l.EZ)(this.uri),this.uri.fsPath):(0,c.NC)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,l.EZ)(this.uri),this.uri.fsPath)}resolve(e){return t=this,i=void 0,s=function*(){if(0!==this._previews.size)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new g(i))}catch(e){(0,n.dL)(e)}return this},new((o=void 0)||(o=Promise))((function(e,n){function r(e){try{l(s.next(e))}catch(e){n(e)}}function a(e){try{l(s.throw(e))}catch(e){n(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(t,i||[])).next())}));var t,i,o,s}}class m{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new o.Q5,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(m._compareReferences);for(const t of e)if(n&&l.SF.isEqual(n.uri,t.uri,!0)||(n=new p(this,t.uri),this.groups.push(n)),0===n.children.length||0!==m._compareReferences(t,n.children[n.children.length-1])){const e=new u(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){(0,r.B9)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new m(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,c.NC)("aria.result.0","No results found"):1===this.references.length?(0,c.NC)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,c.NC)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,c.NC)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const o=i.children.length,s=i.parent.groups.length;return 1===s||t&&n+1<o||!t&&n>0?(n=t?(n+1)%o:(n+o-1)%o,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%s,i.parent.groups[n].children[0]):(n=(n+s-1)%s,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:d.Mh(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLen<t.prefixLen?1:e.offsetDist<t.offsetDist?-1:e.offsetDist>t.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&h.e.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return l.SF.compare(e.uri,t.uri)||h.e.compareRangesUsingStarts(e.range,t.range)}}},24251:(e,t,i)=>{i.d(t,{hT:()=>N,Hb:()=>T,mR:()=>M});var n=i(65321),o=i(82246),s=i(9488),r=i(5976),a=i(50187),l=i(24314),d=i(13961),h=i(96887),c=i(12457),u=i(66520),g=i(72065),p=i(91847),m=i(15393),f=i(29102),_=i(93983),v=i(17735);class b extends r.JT{constructor(e,t=new n.Ro(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new v.f),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=n.Ro.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize((e=>{this._resize(new n.Ro(e.dimension.width,e.dimension.height)),e.done&&(this._isResizing=!1)}))),this._register(this._resizableNode.onDidWillResize((()=>{this._isResizing=!0})))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return(null===(e=this._contentPosition)||void 0===e?void 0:e.position)?a.L.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(t&&i)return n.i(t).top+i.top-30}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const o=n.i(t),s=n.D6(document.body),r=o.top+i.top+i.height;return s.height-r-24}_findPositionPreference(e,t){var i,n;const o=Math.min(null!==(i=this._availableVerticalSpaceBelow(t))&&void 0!==i?i:1/0,e),s=Math.min(null!==(n=this._availableVerticalSpaceAbove(t))&&void 0!==n?n:1/0,e),r=Math.min(Math.max(s,o),e),a=Math.min(e,r);let l;return l=this._editor.getOption(59).above?a<=s?1:2:a<=o?2:1,1===l?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),l}_resize(e){this._resizableNode.layout(e.height,e.width)}}var C,w,y=i(33108),S=i(31106),L=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},x=function(e,t){return function(i,n){t(i,n,e)}};const k=n.$;let N=C=class extends r.JT{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(T,this._editor)),this._participants=[];for(const e of u.Ae.getAll())this._participants.push(this._instantiationService.createInstance(e,this._editor));this._participants.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._computer=new R(this._editor,this._participants),this._hoverOperation=this._register(new c.H(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{if(!this._computer.anchor)return;const t=e.hasLoadingMessage?this._addLoadingMessage(e.value):e.value;this._withResult(new D(this._computer.anchor,t,e.isComplete))}))),this._register(n.mu(this._widget.getDomNode(),"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(h.RW.onDidChange((()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)})))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const n=i.suggestHoverAnchor(e);n&&t.push(n)}const i=e.target;if(6===i.type&&t.push(new u.Qj(0,i.range,e.event.posx,e.event.posy)),7===i.type){const n=this._editor.getOption(49).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&"number"==typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToText<n&&t.push(new u.Qj(0,i.range,e.event.posx,e.event.posy))}return 0===t.length?this._startShowingOrUpdateHover(null,0,0,!1,e):(t.sort(((e,t)=>t.priority-e.priority)),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new u.Qj(0,e,void 0,void 0),t,i,n,null)}_startShowingOrUpdateHover(e,t,i,n,o){return this._widget.position&&this._currentResult?this._editor.getOption(59).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?!(!e||!this._currentResult.anchor.equals(e))||(e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)):(this._setCurrentResult(null),!1):!!e&&(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)}_startHoverOperationIfNecessary(e,t,i,n,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&0===e.messages.length&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(e){return!!e&&this._widget.getDomNode().contains(e)}_addLoadingMessage(e){if(this._computer.anchor)for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e){if(this._widget.position&&this._currentResult&&this._currentResult.isComplete){if(!e.isComplete)return;if(this._computer.insistOnKeepingHoverVisible&&0===e.messages.length)return}this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:i,showAtSecondaryPosition:n,highlightRange:o}=C.computeHoverRanges(this._editor,e.range,t),s=new r.SL,a=s.add(new M(this._keybindingService)),l=document.createDocumentFragment();let d=null;const h={fragment:l,statusBar:a,setColorPicker:e=>d=e,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:e=>this._widget.setMinimumDimensions(e),hide:()=>this.hide()};for(const e of this._participants){const i=t.filter((t=>t.owner===e));i.length>0&&s.add(e.renderHoverParts(h,i))}const c=t.some((e=>e.isBeforeContent));if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(o){const e=this._editor.createDecorationsCollection();e.set([{range:o,options:C._DECORATION_OPTIONS}]),s.add((0,r.OF)((()=>{e.clear()})))}this._widget.showAt(l,new I(d,i,n,this._editor.getOption(59).above,this._computer.shouldFocus,this._computer.source,c,e.initialMousePosX,e.initialMousePosY,s))}else s.dispose()}static computeHoverRanges(e,t,i){let n=1;if(e.hasModel()){const i=e._getViewModel(),o=i.coordinatesConverter,s=o.convertModelRangeToViewRange(t),r=new a.L(s.startLineNumber,i.getLineMinColumn(s.startLineNumber));n=o.convertViewPositionToModelPosition(r).column}const o=t.startLineNumber;let s=t.startColumn,r=i[0].range,d=null;for(const e of i)r=l.e.plusRange(r,e.range),e.range.startLineNumber===o&&e.range.endLineNumber===o&&(s=Math.max(Math.min(s,e.range.startColumn),n)),e.forceShowAtRange&&(d=e.range);return{showAtPosition:d?d.getStartPosition():new a.L(o,t.startColumn),showAtSecondaryPosition:d?d.getStartPosition():new a.L(o,s),highlightRange:r}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};N._DECORATION_OPTIONS=d.qx.register({description:"content-hover-highlight",className:"hoverHighlight"}),N=C=L([x(1,g.TG),x(2,p.d)],N);class D{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter((t=>t.isValidForHoverAnchor(e)));return t.length===this.messages.length?this:new E(this,this.anchor,t,this.isComplete)}}class E extends D{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}class I{constructor(e,t,i,n,o,s,r,a,l,d){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=i,this.preferAbove=n,this.stoleFocus=o,this.source=s,this.isBeforeContent=r,this.initialMousePosX=a,this.initialMousePosY=l,this.disposables=d,this.closestMouseDistance=void 0}}let T=w=class extends b{get isColorPickerVisible(){var e;return Boolean(null===(e=this._visibleData)||void 0===e?void 0:e.colorPicker)}get isVisibleFromKeyboard(){var e;return 1===(null===(e=this._visibleData)||void 0===e?void 0:e.source)}get isVisible(){var e;return null!==(e=this._hoverVisibleKey.get())&&void 0!==e&&e}get isFocused(){var e;return null!==(e=this._hoverFocusedKey.get())&&void 0!==e&&e}constructor(e,t,i,s,r){const a=e.getOption(65)+8,l=new n.Ro(150,a);super(e,l),this._configurationService=i,this._accessibilityService=s,this._keybindingService=r,this._hover=this._register(new o.c8),this._minimumSize=l,this._hoverVisibleKey=f.u.hoverVisible.bindTo(t),this._hoverFocusedKey=f.u.hoverFocused.bindTo(t),n.R3(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange((()=>this._layout()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(49)&&this._updateFont()})));const d=this._register(n.go(this._resizableNode.domNode));this._register(d.onDidFocus((()=>{this._hoverFocusedKey.set(!0)}))),this._register(d.onDidBlur((()=>{this._hoverFocusedKey.set(!1)}))),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),null===(e=this._visibleData)||void 0===e||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return w.ID}static _applyDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,o="number"==typeof i?`${i}px`:i;e.style.width=n,e.style.height=o}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return w._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return w._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,o="number"==typeof i?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=o}_setHoverWidgetMaxDimensions(e,t){w._applyMaxDimensions(this._hover.contentsDomNode,e,t),w._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth","number"==typeof e?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,i-10))}_updateResizableNodeMaxDimensions(){var e,t;const i=null!==(e=this._findMaximumRenderingWidth())&&void 0!==e?e:1/0,o=null!==(t=this._findMaximumRenderingHeight())&&void 0!==t?t:1/0;this._resizableNode.maxSize=new n.Ro(i,o),this._setHoverWidgetMaxDimensions(i,o)}_resize(e){var t,i;w._lastDimensions=new n.Ro(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),null===(i=null===(t=this._visibleData)||void 0===t?void 0:t.colorPicker)||void 0===i||i.layout()}_findAvailableSpaceVertically(){var e;const t=null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition;if(t)return 1===this._positionPreference?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=6;return Array.from(this._hover.contentsDomNode.children).forEach((e=>{t+=e.clientHeight})),this._hasHorizontalScrollbar()&&(t+=10),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some((e=>e.scrollWidth>e.clientWidth));return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=void 0===this._contentWidth?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth<t?n.D6(document.body).width-14:this._hover.containerDomNode.clientWidth+2}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(void 0===this._visibleData.initialMousePosX||void 0===this._visibleData.initialMousePosY)return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const i=n.i(this.getDomNode());void 0===this._visibleData.closestMouseDistance&&(this._visibleData.closestMouseDistance=A(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,i.left,i.top,i.width,i.height));const o=A(e,t,i.left,i.top,i.width,i.height);return!(o>this._visibleData.closestMouseDistance+4||(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,o),0))}_setHoverData(e){var t;null===(t=this._visibleData)||void 0===t||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){const{fontSize:e,lineHeight:t}=this._editor.getOption(49),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=""+t/e,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,w._lastDimensions.height),t=Math.max(.66*this._editor.getLayoutInfo().width,500,w._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[null!==(e=this._positionPreference)&&void 0!==e?e:1]}:null}showAt(e,t){var i,s,r,a;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const l=n.wn(this._hover.containerDomNode),d=t.showAtPosition;this._positionPreference=null!==(i=this._findPositionPreference(l,d))&&void 0!==i?i:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),null===(s=t.colorPicker)||void 0===s||s.layout();const h=(0,o.uX)(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),null!==(a=null===(r=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))||void 0===r?void 0:r.getAriaLabel())&&void 0!==a?a:"");h&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+h)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new n.Ro(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;const i=this._hover.containerDomNode,o=this._hover.contentsDomNode,s=null!==(t=this._findMaximumRenderingHeight())&&void 0!==t?t:1/0;this._setContainerDomNodeDimensions(n.w(i),Math.min(s,e)),this._setContentsDomNodeDimensions(n.w(o),Math.min(s,e-10))}setMinimumDimensions(e){this._minimumSize=new n.Ro(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=void 0===this._contentWidth?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new n.Ro(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let i=n.wn(t),o=n.w(t);if(this._resizableNode.layout(i,o),this._setHoverWidgetDimensions(o,i),i=n.wn(t),o=n.w(t),this._contentWidth=o,this._updateMinimumWidth(),this._resizableNode.layout(i,o),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(i)),null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition){const e=n.wn(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(e,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-30})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+30})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};T.ID="editor.contrib.resizableContentHoverWidget",T._lastDimensions=new n.Ro(0,0),T=w=L([x(1,_.i6),x(2,y.Ui),x(3,S.F),x(4,p.d)],T);let M=class extends r.JT{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=k("div.hover-row.status-bar"),this.actionsElement=n.R3(this.hoverElement,k("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(o.Sr.render(this.actionsElement,e,i))}append(e){const t=n.R3(this.actionsElement,e);return this._hasContent=!0,t}};M=L([x(0,p.d)],M);class R{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(1!==t.type&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const o=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,s=e.range.endLineNumber===n?e.range.endColumn:o;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(i>t.range.startColumn||t.range.endColumn>s)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return m.Aq.EMPTY;const i=R._getLineDecorations(this._editor,t);return m.Aq.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):m.Aq.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=R._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,s.kX)(t)}}function A(e,t,i,n,o,s){const r=i+o/2,a=n+s/2,l=Math.max(Math.abs(e-r)-o/2,0),d=Math.max(Math.abs(t-a)-s/2,0);return Math.sqrt(l*l+d*d)}},41095:(e,t,i)=>{i.d(t,{R8:()=>h});var n=i(15393),o=i(71050),s=i(17301),r=i(16830),a=i(71922),l=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class d{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function h(e,t,i,o){const r=e.ordered(t).map(((e,n)=>function(e,t,i,n,o){return l(this,void 0,void 0,(function*(){try{const s=yield Promise.resolve(e.provideHover(i,n,o));if(s&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(s))return new d(e,s,t)}catch(e){(0,s.Cp)(e)}}))}(e,n,t,i,o)));return n.Aq.fromPromises(r).coalesce()}(0,r.sb)("_executeHoverProvider",((e,t,i)=>function(e,t,i,n){return h(e,t,i,n).map((e=>e.hover)).toPromise()}(e.get(a.p).hoverProvider,t,i,o.T.None)))},74271:(e,t,i)=>{i.d(t,{E:()=>ae});var n=i(22258),o=i(5976),s=i(16830),r=i(24314),a=i(29102),l=i(72042),d=i(53385),h=i(24251),c=i(65321),u=i(9488),g=i(59365),p=i(18806),m=i(12457),f=i(82246);const _=c.$;class v extends o.JT{constructor(e,t,i){super(),this._renderDisposeables=this._register(new o.SL),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new f.c8),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new p.$({editor:this._editor},t,i)),this._computer=new b(this._editor),this._hoverOperation=this._register(new m.H(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(49)&&this._updateFont()}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return v.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const e of t){const t=_("div.hover-row.markdown-hover"),n=c.R3(t,_("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(e.value));n.appendChild(o.element),i.appendChild(t)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),o=this._editor.getOption(65),s=i-n-(this._hover.containerDomNode.clientHeight-o)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(s),0)}px`}}v.ID="editor.contrib.modesGlyphHoverWidget";class b{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const t=n.options.glyphMarginHoverMessage;t&&!(0,g.CP)(t)&&i.push(...(0,u._2)(t).map(e))}return i}}var C=i(72065),w=i(50988),y=i(73910),S=i(97781),L=i(66520),x=i(22374),k=i(15393),N=i(17301),D=i(95935),E=i(71922),I=i(36357),T=i(75396),M=i(48499),R=i(87997),A=i(40832),O=i(63580),P=i(98674),F=i(90535),B=function(e,t){return function(i,n){t(i,n,e)}};const W=c.$;class V{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const H={type:1,filter:{include:R.yN.QuickFix},triggerAction:R.aQ.QuickFixHover};let z=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),s=[];for(const a of t){const t=a.range.startLineNumber===n?a.range.startColumn:1,l=a.range.endLineNumber===n?a.range.endColumn:o,d=this._markerDecorationsService.getMarker(i.uri,a);if(!d)continue;const h=new r.e(e.range.startLineNumber,t,e.range.startLineNumber,l);s.push(new V(this,h,d))}return s}renderHoverParts(e,t){if(!t.length)return o.JT.None;const i=new o.SL;t.forEach((t=>e.fragment.appendChild(this.renderMarkerHover(t,i))));const n=1===t.length?t[0]:t.sort(((e,t)=>P.ZL.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=W("div.hover-row"),n=c.R3(i,W("div.marker.hover-contents")),{source:o,message:s,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=c.R3(n,W("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,o||r)if(r&&"string"!=typeof r){const e=W("span");o&&(c.R3(e,W("span")).innerText=o);const i=c.R3(e,W("a.code-link"));i.setAttribute("href",r.target.toString()),t.add(c.nm(i,"click",(e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()}))),c.R3(i,W("span")).innerText=r.value;const s=c.R3(n,e);s.style.opacity="0.6",s.style.paddingLeft="6px"}else{const e=c.R3(n,W("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&r?`${o}(${r})`:o||`(${r})`}if((0,u.Of)(a))for(const{message:e,resource:i,startLineNumber:o,startColumn:s}of a){const r=c.R3(n,W("div"));r.style.marginTop="8px";const a=c.R3(r,W("a"));a.innerText=`${(0,D.EZ)(i)}(${o}, ${s}): `,a.style.cursor="pointer",t.add(c.nm(a,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(i,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:o,startColumn:s}}}).catch(N.dL)})));const l=c.R3(r,W("span"));l.innerText=e,this._editor.applyFontInfo(l)}return i}renderMarkerStatusbar(e,t,i){if(t.marker.severity!==P.ZL.Error&&t.marker.severity!==P.ZL.Warning&&t.marker.severity!==P.ZL.Info||e.statusBar.addAction({label:O.NC("view problem","View Problem"),commandId:A.v.ID,run:()=>{var i;e.hide(),null===(i=A.c.get(this._editor))||void 0===i||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(89)){const n=e.statusBar.append(W("div"));this.recentMarkerCodeActionsInfo&&(P.H0.makeKey(this.recentMarkerCodeActionsInfo.marker)===P.H0.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=O.NC("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?o.JT.None:i.add((0,k.Vg)((()=>n.textContent=O.NC("checkingForQuickFixes","Checking for quick fixes...")),200));n.textContent||(n.textContent=String.fromCharCode(160));const r=this.getCodeActions(t.marker);i.add((0,o.OF)((()=>r.cancel()))),r.then((r=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:r.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return r.dispose(),void(n.textContent=O.NC("noQuickFixes","No quick fixes available"));n.style.display="none";let a=!1;i.add((0,o.OF)((()=>{a||r.dispose()}))),e.statusBar.addAction({label:O.NC("quick fixes","Quick Fix..."),commandId:T.cz,run:t=>{a=!0;const i=M.G.get(this._editor),n=c.i(t);e.hide(),null==i||i.showCodeActions(H,r,{x:n.left,y:n.top,width:n.width,height:n.height})}})}),N.dL)}}getCodeActions(e){return(0,k.PG)((t=>(0,T.aI)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new r.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),H,F.Ex.None,t)))}};z=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([B(1,I.i),B(2,w.v4),B(3,E.p)],z);var K=i(50098),U=i(91847),j=i(93379),$=i.n(j),q=i(7795),Z=i.n(q),G=i(90569),Q=i.n(G),Y=i(3565),J=i.n(Y),X=i(19216),ee=i.n(X),te=i(44589),ie=i.n(te),ne=i(41738),oe={};oe.styleTagTransform=ie(),oe.setAttributes=J(),oe.insert=Q().bind(null,"head"),oe.domAPI=Z(),oe.insertStyleElement=ee(),$()(ne.Z,oe),ne.Z&&ne.Z.locals&&ne.Z.locals;var se,re=function(e,t){return function(i,n){t(i,n,e)}};let ae=se=class{static get(e){return e.getContribution(se.ID)}constructor(e,t,i,n,s){this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._keybindingService=s,this._toUnhook=new o.SL,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((e=>{e.hasChanged(59)&&(this._unhookEvents(),this._hookEvents())}))}_hookEvents(){const e=this._editor.getOption(59);this._isHoverEnabled=e.enabled,this._isHoverSticky=e.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._toUnhook.add(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._toUnhook.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._toUnhook.add(this._editor.onDidChangeModel((()=>this._hideWidgets()))),this._toUnhook.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const i=e.target;9!==i.type||i.detail!==h.Hb.ID?12===i.type&&i.detail===v.ID||(12!==i.type&&(this._hoverClicked=!1),(null===(t=this._contentWidget)||void 0===t?void 0:t.widget.isResizing)||this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,i;const n=e.event.browserEvent.relatedTarget;(null===(t=this._contentWidget)||void 0===t?void 0:t.widget.isResizing)||(null===(i=this._contentWidget)||void 0===i?void 0:i.containsNode(n))||this._hideWidgets()}_onEditorMouseMove(e){var t,i,n,o,s,r,a,l,d,c,u;const g=e.target;if((null===(t=this._contentWidget)||void 0===t?void 0:t.isFocused)||(null===(i=this._contentWidget)||void 0===i?void 0:i.isResizing))return;if(this._isMouseDown&&this._hoverClicked)return;if(this._isHoverSticky&&9===g.type&&g.detail===h.Hb.ID)return;if(this._isHoverSticky&&(null===(n=this._contentWidget)||void 0===n?void 0:n.containsNode(null===(o=e.event.browserEvent.view)||void 0===o?void 0:o.document.activeElement))&&!(null===(r=null===(s=e.event.browserEvent.view)||void 0===s?void 0:s.getSelection())||void 0===r?void 0:r.isCollapsed))return;if(!this._isHoverSticky&&9===g.type&&g.detail===h.Hb.ID&&(null===(a=this._contentWidget)||void 0===a?void 0:a.isColorPickerVisible))return;if(this._isHoverSticky&&12===g.type&&g.detail===v.ID)return;if(this._isHoverSticky&&(null===(l=this._contentWidget)||void 0===l?void 0:l.isVisibleFromKeyboard))return;const p=null===(d=g.element)||void 0===d?void 0:d.classList.contains("colorpicker-color-decoration"),m=this._editor.getOption(145);if(p&&("click"===m&&!this._hoverActivatedByColorDecoratorClick||"hover"===m&&!this._isHoverEnabled||"clickAndHover"===m&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!(p||this._isHoverEnabled||this._hoverActivatedByColorDecoratorClick))this._hideWidgets();else if(this._getOrCreateContentWidget().maybeShowAt(e))null===(c=this._glyphWidget)||void 0===c||c.hide();else{if(2===g.type&&g.position)return null===(u=this._contentWidget)||void 0===u||u.hide(),this._glyphWidget||(this._glyphWidget=new v(this._editor,this._languageService,this._openerService)),void this._glyphWidget.startShowingAt(g.position.lineNumber);this._hideWidgets()}}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=1===i.kind||2===i.kind&&"editor.action.showHover"===i.commandId&&(null===(t=this._contentWidget)||void 0===t?void 0:t.isVisible);5===e.keyCode||6===e.keyCode||57===e.keyCode||4===e.keyCode||n||this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible)||K.QG.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(i=this._contentWidget)||void 0===i||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(h.hT,this._editor)),this._contentWidget}showContentHover(e,t,i,n,o=!1){this._hoverActivatedByColorDecoratorClick=o,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}focus(){var e;null===(e=this._contentWidget)||void 0===e||e.focus()}scrollUp(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollUp()}scrollDown(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollDown()}scrollLeft(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollLeft()}scrollRight(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollRight()}pageUp(){var e;null===(e=this._contentWidget)||void 0===e||e.pageUp()}pageDown(){var e;null===(e=this._contentWidget)||void 0===e||e.pageDown()}goToTop(){var e;null===(e=this._contentWidget)||void 0===e||e.goToTop()}goToBottom(){var e;null===(e=this._contentWidget)||void 0===e||e.goToBottom()}get isColorPickerVisible(){var e;return null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return null===(e=this._contentWidget)||void 0===e?void 0:e.isVisible}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};ae.ID="editor.contrib.hover",ae=se=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([re(1,C.TG),re(2,w.v4),re(3,l.O),re(4,U.d)],ae);class le extends s.R6{constructor(){super({id:"editor.action.showHover",label:O.NC({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:a.u.editorTextFocus,primary:(0,n.gx)(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=ae.get(t);if(!n)return;const o=t.getPosition(),s=new r.e(o.lineNumber,o.column,o.lineNumber,o.column),a=2===t.getOption(2)||!!(null==i?void 0:i.focus);n.isHoverVisible?n.focus():n.showContentHover(s,1,1,a)}}class de extends s.R6{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:O.NC({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=ae.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const o=new r.e(n.lineNumber,n.column,n.lineNumber,n.column),s=d.S.get(t);s&&s.startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(o,1,1,!0)}))}}class he extends s.R6{constructor(){super({id:"editor.action.scrollUpHover",label:O.NC({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:16,weight:100}})}run(e,t){const i=ae.get(t);i&&i.scrollUp()}}class ce extends s.R6{constructor(){super({id:"editor.action.scrollDownHover",label:O.NC({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:18,weight:100}})}run(e,t){const i=ae.get(t);i&&i.scrollDown()}}class ue extends s.R6{constructor(){super({id:"editor.action.scrollLeftHover",label:O.NC({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:15,weight:100}})}run(e,t){const i=ae.get(t);i&&i.scrollLeft()}}class ge extends s.R6{constructor(){super({id:"editor.action.scrollRightHover",label:O.NC({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:17,weight:100}})}run(e,t){const i=ae.get(t);i&&i.scrollRight()}}class pe extends s.R6{constructor(){super({id:"editor.action.pageUpHover",label:O.NC({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const i=ae.get(t);i&&i.pageUp()}}class me extends s.R6{constructor(){super({id:"editor.action.pageDownHover",label:O.NC({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const i=ae.get(t);i&&i.pageDown()}}class fe extends s.R6{constructor(){super({id:"editor.action.goToTopHover",label:O.NC({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const i=ae.get(t);i&&i.goToTop()}}class _e extends s.R6{constructor(){super({id:"editor.action.goToBottomHover",label:O.NC({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:a.u.hoverFocused,kbOpts:{kbExpr:a.u.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const i=ae.get(t);i&&i.goToBottom()}}(0,s._K)(ae.ID,ae,2),(0,s.Qr)(le),(0,s.Qr)(de),(0,s.Qr)(he),(0,s.Qr)(ce),(0,s.Qr)(ue),(0,s.Qr)(ge),(0,s.Qr)(pe),(0,s.Qr)(me),(0,s.Qr)(fe),(0,s.Qr)(_e),L.Ae.register(x.D5),L.Ae.register(z),(0,S.Ic)(((e,t)=>{const i=e.getColor(y.CNo);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))}))},12457:(e,t,i)=>{i.d(t,{H:()=>l});var n=i(15393),o=i(17301),s=i(4669),r=i(5976);class a{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class l extends r.JT{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new s.Q5),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new n.pY((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new n.pY((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new n.pY((()=>this._triggerLoadingMessage()),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(59).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,n.zS)((e=>this._computer.computeAsync(e))),(()=>{var e,t,i,n;e=this,t=void 0,n=function*(){var e,t,i,n;try{try{for(var s,r=!0,a=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(t=e[i](t)).done,t.value)}))}}}(this._asyncIterable);!(e=(s=yield a.next()).done);r=!0){n=s.value,r=!1;const e=n;e&&(this._result.push(e),this._fireResult())}}catch(e){t={error:e}}finally{try{r||e||!(i=a.return)||(yield i.call(a))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(e){(0,o.dL)(e)}},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new a(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}},66520:(e,t,i)=>{i.d(t,{Ae:()=>s,Qj:()=>n,YM:()=>o});class n{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class o{constructor(e,t,i,n,o,s){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}const s=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}},22374:(e,t,i)=>{i.d(t,{D5:()=>C,c:()=>w,hU:()=>b});var n=i(65321),o=i(9488),s=i(15393),r=i(59365),a=i(5976),l=i(18806),d=i(50187),h=i(24314),c=i(72042),u=i(41095),g=i(63580),p=i(33108),m=i(50988),f=i(71922),_=function(e,t){return function(i,n){t(i,n,e)}};const v=n.$;class b{constructor(e,t,i,n,o){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=o}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let C=class{constructor(e,t,i,n,o){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new b(this,e.range,[(new r.W5).appendText(g.NC("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),a=[];let l=1e3;const d=i.getLineLength(n),c=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._editor.getOption(115),p=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c});let m=!1;u>=0&&d>u&&e.range.startColumn>=u&&(m=!0,a.push(new b(this,e.range,[{value:g.NC("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,l++))),!m&&"number"==typeof p&&d>=p&&a.push(new b(this,e.range,[{value:g.NC("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,l++));let f=!1;for(const i of t){const t=i.range.startLineNumber===n?i.range.startColumn:1,d=i.range.endLineNumber===n?i.range.endColumn:s,c=i.options.hoverMessage;if(!c||(0,r.CP)(c))continue;i.options.beforeContentClassName&&(f=!0);const u=new h.e(e.range.startLineNumber,t,e.range.startLineNumber,d);a.push(new b(this,u,(0,o._2)(c),f,l++))}return a}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return s.Aq.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return s.Aq.EMPTY;const o=new d.L(e.range.startLineNumber,e.range.startColumn);return(0,u.R8)(this._languageFeaturesService.hoverProvider,n,o,i).filter((e=>!(0,r.CP)(e.hover.contents))).map((t=>{const i=t.hover.range?h.e.lift(t.hover.range):e.range;return new b(this,i,t.hover.contents,!1,t.ordinal)}))}renderHoverParts(e,t){return w(e,t,this._editor,this._languageService,this._openerService)}};function w(e,t,i,o,s){t.sort(((e,t)=>e.ordinal-t.ordinal));const d=new a.SL;for(const a of t)for(const t of a.contents){if((0,r.CP)(t))continue;const a=v("div.hover-row.markdown-hover"),h=n.R3(a,v("div.hover-contents")),c=d.add(new l.$({editor:i},o,s));d.add(c.onDidRenderAsync((()=>{h.className="hover-contents code-hover-contents",e.onContentsChanged()})));const u=d.add(c.render(t));h.appendChild(u.element),e.fragment.appendChild(a)}return d}C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([_(1,c.O),_(2,m.v4),_(3,p.Ui),_(4,f.p)],C)},810:(e,t,i)=>{var n=i(15393),o=i(17301),s=i(16467),r=i(16830),a=i(24314),l=i(3860),d=i(29102),h=i(13961),c=i(85215),u=i(63580);class g{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new l.Y(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new l.Y(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var p=i(93379),m=i.n(p),f=i(7795),_=i.n(f),v=i(90569),b=i.n(v),C=i(3565),w=i.n(C),y=i(19216),S=i.n(y),L=i(44589),x=i.n(L),k=i(16921),N={};N.styleTagTransform=x(),N.setAttributes=w(),N.insert=b().bind(null,"head"),N.domAPI=_(),N.insertStyleElement=S(),m()(k.Z,N),k.Z&&k.Z.locals&&k.Z.locals;var D;let E=D=class{static get(e){return e.getContribution(D.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var i;null===(i=this.currentRequest)||void 0===i||i.cancel();const r=this.editor.getSelection(),d=this.editor.getModel();if(!d||!r)return;let h=r;if(h.startLineNumber!==h.endLineNumber)return;const c=new s.yy(this.editor,5),u=d.uri;return this.editorWorkerService.canNavigateValueSet(u)?(this.currentRequest=(0,n.PG)((e=>this.editorWorkerService.navigateValueSet(u,h,t))),this.currentRequest.then((t=>{var i;if(!t||!t.range||!t.value)return;if(!c.validate(this.editor))return;const s=a.e.lift(t.range);let r=t.range;const d=t.value.length-(h.endColumn-h.startColumn);r={startLineNumber:r.startLineNumber,startColumn:r.startColumn,endLineNumber:r.endLineNumber,endColumn:r.startColumn+t.value.length},d>1&&(h=new l.Y(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn+d-1));const u=new g(s,h,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,u),this.editor.pushUndoStop(),this.decorations.set([{range:r,options:D.DECORATION}]),null===(i=this.decorationRemover)||void 0===i||i.cancel(),this.decorationRemover=(0,n.Vs)(350),this.decorationRemover.then((()=>this.decorations.clear())).catch(o.dL)})).catch(o.dL)):Promise.resolve(void 0)}};var I,T;E.ID="editor.contrib.inPlaceReplaceController",E.DECORATION=h.qx.register({description:"in-place-replace",className:"valueSetReplacement"}),E=D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(I=1,T=c.p,function(e,t){T(e,t,I)})],E);class M extends r.R6{constructor(){super({id:"editor.action.inPlaceReplace.up",label:u.NC("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:d.u.writable,kbOpts:{kbExpr:d.u.editorTextFocus,primary:3159,weight:100}})}run(e,t){const i=E.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class R extends r.R6{constructor(){super({id:"editor.action.inPlaceReplace.down",label:u.NC("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:d.u.writable,kbOpts:{kbExpr:d.u.editorTextFocus,primary:3161,weight:100}})}run(e,t){const i=E.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}(0,r._K)(E.ID,E,4),(0,r.Qr)(M),(0,r.Qr)(R)},18279:(e,t,i)=>{function n(e,t){let i=0;for(let n=0;n<e.length;n++)"\t"===e.charAt(n)?i+=t:i++;return i}function o(e,t,i){e=e<0?0:e;let n="";if(!i){const i=Math.floor(e/t);e%=t;for(let e=0;e<i;e++)n+="\t"}for(let t=0;t<e;t++)n+=" ";return n}i.d(t,{J:()=>o,Y:()=>n})},84602:(e,t,i)=>{var n=i(5976),o=i(97295),s=i(16830),r=i(10291),a=i(69386),l=i(24314),d=i(3860),h=i(29102),c=i(51381),u=i(73733),g=i(18279),p=i(63580),m=i(41157),f=i(83158),_=i(75383);function v(e,t,i,n,s){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const l=t.getLanguageConfiguration(e.getLanguageId()).indentationRules;if(!l)return[];for(n=Math.min(n,e.getLineCount());i<=n&&l.unIndentedLinePattern;){const t=e.getLineContent(i);if(!l.unIndentedLinePattern.test(t))break;i++}if(i>n-1)return[];const{tabSize:h,indentSize:c,insertSpaces:u}=e.getOptions(),g=(e,t)=>(t=t||1,r.U.shiftIndent(e,e.length+t,h,c,u)),p=(e,t)=>(t=t||1,r.U.unshiftIndent(e,e.length+t,h,c,u)),m=[];let _;const v=e.getLineContent(i);let b=v;if(null!=s){_=s;const e=o.V8(v);b=_+v.substring(e.length),l.decreaseIndentPattern&&l.decreaseIndentPattern.test(b)&&(_=p(_),b=_+v.substring(e.length)),v!==b&&m.push(a.h.replaceMove(new d.Y(i,1,i,e.length+1),(0,f.x)(_,c,u)))}else _=o.V8(v);let C=_;l.increaseIndentPattern&&l.increaseIndentPattern.test(b)?(C=g(C),_=g(_)):l.indentNextLinePattern&&l.indentNextLinePattern.test(b)&&(C=g(C));for(let t=++i;t<=n;t++){const i=e.getLineContent(t),n=o.V8(i),s=C+i.substring(n.length);l.decreaseIndentPattern&&l.decreaseIndentPattern.test(s)&&(C=p(C),_=p(_)),n!==C&&m.push(a.h.replaceMove(new d.Y(t,1,t,n.length+1),(0,f.x)(C,c,u))),l.unIndentedLinePattern&&l.unIndentedLinePattern.test(i)||(l.increaseIndentPattern&&l.increaseIndentPattern.test(s)?(_=g(_),C=_):C=l.indentNextLinePattern&&l.indentNextLinePattern.test(s)?g(C):_)}return m}class b extends s.R6{constructor(){super({id:b.ID,label:p.NC("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:h.u.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new R(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}b.ID="editor.action.indentationToSpaces";class C extends s.R6{constructor(){super({id:C.ID,label:p.NC("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:h.u.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new A(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}C.ID="editor.action.indentationToTabs";class w extends s.R6{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(m.eJ),n=e.get(u.q),o=t.getModel();if(!o)return;const s=n.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),r=o.getOptions(),a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize&&e===r.tabSize?p.NC("configuredTabSize","Configured Tab Size"):e===s.tabSize?p.NC("defaultTabSize","Default Tab Size"):e===r.tabSize?p.NC("currentTabSize","Current Tab Size"):void 0}))),l=Math.min(o.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:p.NC({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{if(e&&o&&!o.isDisposed()){const t=parseInt(e.label,10);this.displaySizeOnly?o.updateOptions({tabSize:t}):o.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}}))}),50)}}class y extends w{constructor(){super(!1,!1,{id:y.ID,label:p.NC("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}y.ID="editor.action.indentUsingTabs";class S extends w{constructor(){super(!0,!1,{id:S.ID,label:p.NC("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}S.ID="editor.action.indentUsingSpaces";class L extends w{constructor(){super(!0,!0,{id:L.ID,label:p.NC("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}}L.ID="editor.action.changeTabDisplaySize";class x extends s.R6{constructor(){super({id:x.ID,label:p.NC("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(u.q),n=t.getModel();if(!n)return;const o=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}}x.ID="editor.action.detectIndentation";class k extends s.R6{constructor(){super({id:"editor.action.reindentlines",label:p.NC("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:h.u.writable})}run(e,t){const i=e.get(c.c_),n=t.getModel();if(!n)return;const o=v(n,i,1,n.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class N extends s.R6{constructor(){super({id:"editor.action.reindentselectedlines",label:p.NC("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:h.u.writable})}run(e,t){const i=e.get(c.c_),n=t.getModel();if(!n)return;const o=t.getSelections();if(null===o)return;const s=[];for(const e of o){let t=e.startLineNumber,o=e.endLineNumber;if(t!==o&&1===e.endColumn&&o--,1===t){if(t===o)continue}else t--;const r=v(n,i,t,o);s.push(...r)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class D{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(const e of this._edits)t.addEditOperation(l.e.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let E=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new n.SL,this.callOnModel=new n.SL,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(11)<4||this.editor.getOption(54)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(11),{tabSize:s,indentSize:a,insertSpaces:d}=i.getOptions(),h=[],c={shiftIndent:e=>r.U.shiftIndent(e,e.length+1,s,a,d),unshiftIndent:e=>r.U.unshiftIndent(e,e.length+1,s,a,d)};let u=e.startLineNumber;for(;u<=e.endLineNumber&&this.shouldIgnoreLine(i,u);)u++;if(u>e.endLineNumber)return;let p=i.getLineContent(u);if(!/\S/.test(p.substring(0,e.startColumn-1))){const e=(0,_.n8)(n,i,i.getLanguageId(),u,c,this._languageConfigurationService);if(null!==e){const t=o.V8(p),n=g.Y(e,s);if(n!==g.Y(t,s)){const e=g.J(n,s,d);h.push({range:new l.e(u,1,u,t.length+1),text:e}),p=e+p.substr(t.length)}else{const e=(0,_.tI)(i,u,this._languageConfigurationService);if(0===e||8===e)return}}}const m=u;for(;u<e.endLineNumber&&!/\S/.test(i.getLineContent(u+1));)u++;if(u!==e.endLineNumber){const t={tokenization:{getLineTokens:e=>i.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===m?p:i.getLineContent(e)},r=(0,_.n8)(n,t,i.getLanguageId(),u+1,c,this._languageConfigurationService);if(null!==r){const t=g.Y(r,s),n=g.Y(o.V8(i.getLineContent(u+1)),s);if(t!==n){const r=t-n;for(let t=u+1;t<=e.endLineNumber;t++){const e=i.getLineContent(t),n=o.V8(e),a=g.Y(n,s)+r,c=g.J(a,s,d);c!==n&&h.push({range:new l.e(t,1,t,n.length+1),text:c})}}}}if(h.length>0){this.editor.pushUndoStop();const e=new D(h,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function I(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let e=0;e<i;e++)o+=" ";const s=new RegExp(o,"gi");for(let i=1,r=e.getLineCount();i<=r;i++){let r=e.getLineFirstNonWhitespaceColumn(i);if(0===r&&(r=e.getLineMaxColumn(i)),1===r)continue;const a=new l.e(i,1,i,r),d=e.getValueInRange(a),h=n?d.replace(/\t/gi,o):d.replace(s,"\t");t.addEditOperation(a,h)}}var T,M;E.ID="editor.contrib.autoIndentOnPaste",E=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(T=1,M=c.c_,function(e,t){M(e,t,T)})],E);class R{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),I(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class A{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),I(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,s._K)(E.ID,E,2),(0,s.Qr)(b),(0,s.Qr)(C),(0,s.Qr)(y),(0,s.Qr)(S),(0,s.Qr)(L),(0,s.Qr)(x),(0,s.Qr)(k),(0,s.Qr)(N)},66348:(e,t,i)=>{var n=i(16830),o=i(66520),s=i(65321),r=i(9488),a=i(15393),l=i(71050),d=i(17301),h=i(5976),c=i(43702),u=i(98401),g=i(70666),p=i(29994),m=i(43407),f=i(64141),_=i(69386),v=i(24314),b=i(96887),C=i(84973),w=i(13961),y=i(88191),S=i(71922),L=i(88216),x=i(82005),k=i(50187),N=i(66663),D=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class E{constructor(e,t){this.range=e,this.direction=t}}class I{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new I(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(e){return D(this,void 0,void 0,(function*(){if("function"==typeof this.provider.resolveInlayHint){if(this._currentResolve){if(yield this._currentResolve,e.isCancellationRequested)return;return this.resolve(e)}this._isResolved||(this._currentResolve=this._doResolve(e).finally((()=>this._currentResolve=void 0))),yield this._currentResolve}}))}_doResolve(e){var t,i;return D(this,void 0,void 0,(function*(){try{const n=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=null!==(t=null==n?void 0:n.tooltip)&&void 0!==t?t:this.hint.tooltip,this.hint.label=null!==(i=null==n?void 0:n.label)&&void 0!==i?i:this.hint.label,this._isResolved=!0}catch(e){(0,d.Cp)(e),this._isResolved=!1}}))}}class T{static create(e,t,i,n){return D(this,void 0,void 0,(function*(){const o=[],s=e.ordered(t).reverse().map((e=>i.map((i=>D(this,void 0,void 0,(function*(){try{const s=yield e.provideInlayHints(t,i,n);(null==s?void 0:s.hints.length)&&o.push([s,e])}catch(e){(0,d.Cp)(e)}}))))));if(yield Promise.all(s.flat()),n.isCancellationRequested||t.isDisposed())throw new d.FU;return new T(i,o,t)}))}constructor(e,t,i){this._disposables=new h.SL,this.ranges=e,this.provider=new Set;const n=[];for(const[e,o]of t){this._disposables.add(e),this.provider.add(o);for(const t of e.hints){const e=i.validatePosition(t.position);let s="before";const r=T._getRangeAtPosition(i,e);let a;r.getStartPosition().isBefore(e)?(a=v.e.fromPositions(r.getStartPosition(),e),s="after"):(a=v.e.fromPositions(e,r.getEndPosition()),s="before"),n.push(new I(t,new E(a,s),o))}}this.items=n.sort(((e,t)=>k.L.compare(e.hint.position,t.hint.position)))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new v.e(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const o=e.tokenization.getLineTokens(i),s=t.column-1,r=o.findTokenIndexAtOffset(s);let a=o.getStartOffset(r),l=o.getEndOffset(r);return l-a==1&&(a===s&&r>1?(a=o.getStartOffset(r-1),l=o.getEndOffset(r-1)):l===s&&r<o.getCount()-1&&(a=o.getStartOffset(r+1),l=o.getEndOffset(r+1))),new v.e(i,a+1,i,l+1)}}var M,R=i(58722),A=i(94565),O=i(65026),P=i(72065),F=i(59422),B=i(73910),W=i(97781),V=function(e,t){return function(i,n){t(i,n,e)}},H=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class z{constructor(){this._entries=new c.z6(50)}get(e){const t=z._key(e);return this._entries.get(t)}set(e,t){const i=z._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const K=(0,P.yh)("IInlayHintsCache");(0,O.z)(K,z,1);class U{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return"string"==typeof e?{label:e}:e[this.index]}}class j{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let $=M=class{static get(e){var t;return null!==(t=e.getContribution(M.ID))&&void 0!==t?t:void 0}constructor(e,t,i,n,o,s,r){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=o,this._notificationService=s,this._instaService=r,this._disposables=new h.SL,this._sessionDisposables=new h.SL,this._decorationsMetadata=new Map,this._ruleFactory=new p.t7(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(138)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(138);if("off"===e.enabled)return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const i=this._inlayHintsCache.get(t);let n;i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add((0,h.OF)((()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)})));const o=new Set,r=new a.pY((()=>H(this,void 0,void 0,(function*(){const e=Date.now();null==n||n.dispose(!0),n=new l.A;const i=t.onWillDispose((()=>null==n?void 0:n.cancel()));try{const i=n.token,s=yield T.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),i);if(r.delay=this._debounceInfo.update(t,Date.now()-e),i.isCancellationRequested)return void s.dispose();for(const e of s.provider)"function"!=typeof e.onDidChangeInlayHints||o.has(e)||(o.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{r.isScheduled()||r.schedule()}))));this._sessionDisposables.add(s),this._updateHintsDecorators(s.ranges,s.items),this._cacheHintsForFastRestore(t)}catch(e){(0,d.dL)(e)}finally{n.dispose(),i.dispose()}}))),this._debounceInfo.get(t));if(this._sessionDisposables.add(r),this._sessionDisposables.add((0,h.OF)((()=>null==n?void 0:n.dispose(!0)))),r.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&r.isScheduled()||r.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{const t=Math.max(r.delay,1250);r.schedule(t)}))),"on"===e.enabled)this._activeRenderMode=0;else{let t,i;"onUnlessPressed"===e.enabled?(t=0,i=1):(t=1,i=0),this._activeRenderMode=t,this._sessionDisposables.add(s._q.getInstance().event((e=>{if(!this._editor.hasModel())return;const n=e.altKey&&e.ctrlKey&&!e.shiftKey&&!e.metaKey?i:t;if(n!==this._activeRenderMode){this._activeRenderMode=n;const e=this._editor.getModel(),t=this._copyInlayHintsWithCurrentAnchor(e);this._updateHintsDecorators([e.getFullModelRange()],t),r.schedule(0)}})))}this._sessionDisposables.add(this._installDblClickGesture((()=>r.schedule(0)))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new h.SL,t=e.add(new x.yN(this._editor)),i=new h.SL;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),o=this._editor.getModel();if(!n||!o)return void i.clear();const s=new l.A;i.add((0,h.OF)((()=>s.dispose(!0)))),n.item.resolve(s.token),this._activeInlayHintPart=n.part.command||n.part.location?new j(n,t.hasTriggerModifier):void 0;const r=o.validatePosition(n.item.hint.position).lineNumber,a=new v.e(r,1,r,o.getLineMaxColumn(r)),d=this._getInlineHintsForRange(a);this._updateHintsDecorators([a],d),i.add((0,h.OF)((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([a],d)})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((e=>H(this,void 0,void 0,(function*(){const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(R.K,e,this._editor,i.location):b.mY.is(i.command)&&(yield this._invokeCommand(i.command,t.item))}}))))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp((t=>H(this,void 0,void 0,(function*(){if(2!==t.event.detail)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),yield i.item.resolve(l.T.None),(0,r.Of)(i.item.hint.textEdits))){const t=i.item.hint.textEdits.map((e=>_.h.replace(v.e.lift(e.range),e.text)));this._editor.executeEdits("inlayHint.default",t),e()}}))))}_installContextMenu(){return this._editor.onContextMenu((e=>H(this,void 0,void 0,(function*(){if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(R.u,this._editor,e.event.target,t))}))))}_getInlayHintLabelPart(e){var t;if(6!==e.target.type)return;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof w.HS&&(null==i?void 0:i.attachedData)instanceof U?i.attachedData:void 0}_invokeCommand(e,t){var i;return H(this,void 0,void 0,(function*(){try{yield this._commandService.executeCommand(e.id,...null!==(i=e.arguments)&&void 0!==i?i:[])}catch(e){this._notificationService.notify({severity:F.zb.Error,source:t.provider.displayName,message:e})}}))}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const o=e.getDecorationRange(i);if(o){const e=new E(o,n.item.anchor.direction),i=n.item.with({anchor:e});t.set(n.item,i)}}return Array.from(t.values())}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const n of t.sort(v.e.compareRangesUsingStarts)){const t=e.validateRange(new v.e(n.startLineNumber-30,n.startColumn,n.endLineNumber+30,n.endColumn));0!==i.length&&v.e.areIntersectingOrTouching(i[i.length-1],t)?i[i.length-1]=v.e.plusRange(i[i.length-1],t):i.push(t)}return i}_updateHintsDecorators(e,t){var i,n;const o=[],s=(e,t,i,n,s)=>{const r={content:i,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:n,attachedData:s};o.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:0===this._activeRenderMode?r:void 0}}})},a=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(l/3|0)+"px",display:"inline-block"});s(e,i,"",t?C.RM.Right:C.RM.None)},{fontSize:l,fontFamily:d,padding:h,isUniform:c}=this._getLayoutInfo(),u="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(u,d);for(const e of t){e.hint.paddingLeft&&a(e,!1);const t="string"==typeof e.hint.label?[{label:e.hint.label}]:e.hint.label;for(let n=0;n<t.length;n++){const o=t[n],a=0===n,d=n===t.length-1,g={fontSize:`${l}px`,fontFamily:`var(${u}), ${f.hL.fontFamily}`,verticalAlign:c?"baseline":"middle",unicodeBidi:"isolate"};(0,r.Of)(e.hint.textEdits)&&(g.cursor="default"),this._fillInColors(g,e.hint),(o.command||o.location)&&(null===(i=this._activeInlayHintPart)||void 0===i?void 0:i.part.item)===e&&this._activeInlayHintPart.part.index===n&&(g.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(g.color=(0,W.EN)(B._Yy),g.cursor="pointer")),h&&(a&&d?(g.padding=`1px ${0|Math.max(1,l/4)}px`,g.borderRadius=(l/4|0)+"px"):a?(g.padding=`1px 0 1px ${0|Math.max(1,l/4)}px`,g.borderRadius=`${l/4|0}px 0 0 ${l/4|0}px`):d?(g.padding=`1px ${0|Math.max(1,l/4)}px 1px 0`,g.borderRadius=`0 ${l/4|0}px ${l/4|0}px 0`):g.padding="1px 0 1px 0"),s(e,this._ruleFactory.createClassNameRef(g),o.label.replace(/[ \t]/g," "),d&&!e.hint.paddingRight?C.RM.Right:C.RM.None,new U(e,n))}if(e.hint.paddingRight&&a(e,!0),o.length>M._MAX_DECORATORS)break}const g=[];for(const t of e)for(const{id:e}of null!==(n=this._editor.getDecorationsInRange(t))&&void 0!==n?n:[]){const t=this._decorationsMetadata.get(e);t&&(g.push(e),t.classNameRef.dispose(),this._decorationsMetadata.delete(e))}const p=m.Z.capture(this._editor);this._editor.changeDecorations((e=>{const t=e.deltaDecorations(g,o.map((e=>e.decoration)));for(let e=0;e<t.length;e++){const i=o[e];this._decorationsMetadata.set(t[e],i)}})),p.restore(this._editor)}_fillInColors(e,t){t.kind===b.gl.Parameter?(e.backgroundColor=(0,W.EN)(B.phM),e.color=(0,W.EN)(B.HCL)):t.kind===b.gl.Type?(e.backgroundColor=(0,W.EN)(B.bKB),e.color=(0,W.EN)(B.hX8)):(e.backgroundColor=(0,W.EN)(B.PpC),e.color=(0,W.EN)(B.VVv))}_getLayoutInfo(){const e=this._editor.getOption(138),t=e.padding,i=this._editor.getOption(51),n=this._editor.getOption(48);let o=e.fontSize;(!o||o<5||o>i)&&(o=i);const s=e.fontFamily||n;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===n&&o===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};$.ID="editor.contrib.InlayHints",$._MAX_DECORATORS=1500,$=M=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([V(1,S.p),V(2,y.A),V(3,K),V(4,A.H),V(5,F.lT),V(6,P.TG)],$),A.P.registerCommand("_executeInlayHintProvider",((e,...t)=>H(void 0,void 0,void 0,(function*(){const[i,n]=t;(0,u.p_)(g.o.isUri(i)),(0,u.p_)(v.e.isIRange(n));const{inlayHintsProvider:o}=e.get(S.p),s=yield e.get(L.S).createModelReference(i);try{const e=yield T.create(o,s.object.textEditorModel,[v.e.lift(n)],l.T.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{s.dispose()}}))));var q=i(59365),Z=i(72042),G=i(41095),Q=i(22374),Y=i(33108),J=i(50988),X=i(63580),ee=i(1432),te=function(e,t){return function(i,n){t(i,n,e)}},ie=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class ne extends o.YM{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let oe=class extends Q.D5{constructor(e,t,i,n,o,s){super(e,t,i,n,s),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!$.get(this._editor))return null;if(6!==e.target.type)return null;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof w.HS&&i.attachedData instanceof U?new ne(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof ne?new a.Aq((t=>ie(this,void 0,void 0,(function*(){var n,o,s,a;const{part:l}=e;if(yield l.item.resolve(i),i.isCancellationRequested)return;let d,h;if("string"==typeof l.item.hint.tooltip?d=(new q.W5).appendText(l.item.hint.tooltip):l.item.hint.tooltip&&(d=l.item.hint.tooltip),d&&t.emitOne(new Q.hU(this,e.range,[d],!1,0)),(0,r.Of)(l.item.hint.textEdits)&&t.emitOne(new Q.hU(this,e.range,[(new q.W5).appendText((0,X.NC)("hint.dbl","Double-click to insert"))],!1,10001)),"string"==typeof l.part.tooltip?h=(new q.W5).appendText(l.part.tooltip):l.part.tooltip&&(h=l.part.tooltip),h&&t.emitOne(new Q.hU(this,e.range,[h],!1,1)),l.part.location||l.part.command){let i;const n="altKey"===this._editor.getOption(76)?ee.dz?(0,X.NC)("links.navigate.kb.meta.mac","cmd + click"):(0,X.NC)("links.navigate.kb.meta","ctrl + click"):ee.dz?(0,X.NC)("links.navigate.kb.alt.mac","option + click"):(0,X.NC)("links.navigate.kb.alt","alt + click");l.part.location&&l.part.command?i=(new q.W5).appendText((0,X.NC)("hint.defAndCommand","Go to Definition ({0}), right click for more",n)):l.part.location?i=(new q.W5).appendText((0,X.NC)("hint.def","Go to Definition ({0})",n)):l.part.command&&(i=new q.W5(`[${(0,X.NC)("hint.cmd","Execute Command")}](${c=l.part.command,g.o.from({scheme:N.lg.command,path:c.id,query:c.arguments&&encodeURIComponent(JSON.stringify(c.arguments))}).toString()} "${l.part.command.title}") (${n})`,{isTrusted:!0})),i&&t.emitOne(new Q.hU(this,e.range,[i],!1,1e4))}var c;const u=yield this._resolveInlayHintLabelPartHover(l,i);try{for(var p,m=!0,f=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(t=e[i](t)).done,t.value)}))}}}(u);!(n=(p=yield f.next()).done);m=!0){a=p.value,m=!1;const e=a;t.emitOne(e)}}catch(e){o={error:e}}finally{try{m||n||!(s=f.return)||(yield s.call(f))}finally{if(o)throw o.error}}})))):a.Aq.EMPTY}_resolveInlayHintLabelPartHover(e,t){return ie(this,void 0,void 0,(function*(){if(!e.part.location)return a.Aq.EMPTY;const{uri:i,range:n}=e.part.location,o=yield this._resolverService.createModelReference(i);try{const i=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?(0,G.R8)(this._languageFeaturesService.hoverProvider,i,new k.L(n.startLineNumber,n.startColumn),t).filter((e=>!(0,q.CP)(e.hover.contents))).map((t=>new Q.hU(this,e.item.anchor.range,t.hover.contents,!1,2+t.ordinal))):a.Aq.EMPTY}finally{o.dispose()}}))}};oe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([te(1,Z.O),te(2,J.v4),te(3,Y.Ui),te(4,L.S),te(5,S.p)],oe),(0,n._K)($.ID,$,1),o.Ae.register(oe)},58722:(e,t,i)=>{i.d(t,{K:()=>b,u:()=>v});var n=i(65321),o=i(74741),s=i(71050),r=i(98e3),a=i(24314),l=i(88216),d=i(60628),h=i(81774),c=i(84144),u=i(94565),g=i(93983),p=i(5606),m=i(72065),f=i(59422),_=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function v(e,t,i,h){var g;return _(this,void 0,void 0,(function*(){const v=e.get(l.S),b=e.get(p.i),C=e.get(u.H),w=e.get(m.TG),y=e.get(f.lT);if(yield h.item.resolve(s.T.None),!h.part.location)return;const S=h.part.location,L=[],x=new Set(c.BH.getMenuItems(c.eH.EditorContext).map((e=>(0,c.vr)(e)?e.command.id:(0,r.R)())));for(const e of d.Bj.all())x.has(e.desc.id)&&L.push(new o.aU(e.desc.id,c.U8.label(e.desc,{renderShortTitle:!0}),void 0,!0,(()=>_(this,void 0,void 0,(function*(){const i=yield v.createModelReference(S.uri);try{const n=new d._k(i.object.textEditorModel,a.e.getStartPosition(S.range)),o=h.item.anchor.range;yield w.invokeFunction(e.runEditorCommand.bind(e),t,n,o)}finally{i.dispose()}})))));if(h.part.command){const{command:e}=h.part;L.push(new o.Z0),L.push(new o.aU(e.id,e.title,void 0,!0,(()=>_(this,void 0,void 0,(function*(){var t;try{yield C.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}catch(e){y.notify({severity:f.zb.Error,source:h.item.provider.displayName,message:e})}})))))}const k=t.getOption(125);b.showContextMenu({domForShadowRoot:k&&null!==(g=t.getDomNode())&&void 0!==g?g:void 0,getAnchor:()=>{const e=n.i(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>L,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}))}function b(e,t,i,n){return _(this,void 0,void 0,(function*(){const o=e.get(l.S),s=yield o.createModelReference(n.uri);yield i.invokeWithinContext((e=>_(this,void 0,void 0,(function*(){const o=t.hasSideBySideModifier,r=e.get(g.i6),l=h.Jy.inPeekEditor.getValue(r),c=!o&&i.getOption(86)&&!l;return new d.BT({openToSide:o,openInPeek:c,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e,new d._k(s.object.textEditorModel,a.e.getStartPosition(n.range)),a.e.lift(n.range))})))),s.dispose()}))}},96020:(e,t,i)=>{i.d(t,{Np:()=>o,OW:()=>s,Ou:()=>n});const n="editor.action.inlineSuggest.commit",o="editor.action.inlineSuggest.showPrevious",s="editor.action.inlineSuggest.showNext"},78573:(e,t,i)=>{i.d(t,{f:()=>d});var n=i(9849),o=i(97295),s=i(7988),r=i(93983),a=i(5976),l=i(63580);class d extends a.JT{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=d.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=d.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=d.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=d.suppressSuggestions.bindTo(this.contextKeyService),this._register((0,n.EH)((e=>{const t=this.model.read(e),i=null==t?void 0:t.state.read(e),n=!!(null==i?void 0:i.inlineCompletion)&&void 0!==(null==i?void 0:i.ghostText)&&!(null==i?void 0:i.ghostText.isEmpty());this.inlineCompletionVisible.set(n),(null==i?void 0:i.ghostText)&&(null==i?void 0:i.inlineCompletion)&&this.suppressSuggestions.set(i.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)}))),this._register((0,n.EH)((e=>{const t=this.model.read(e);let i=!1,n=!0;const r=null==t?void 0:t.ghostText.read(e);if((null==t?void 0:t.selectedSuggestItem)&&r&&r.parts.length>0){const{column:e,lines:a}=r.parts[0],l=a[0];if(e<=t.textModel.getLineIndentColumn(r.lineNumber)){let e=(0,o.LC)(l);-1===e&&(e=l.length-1),i=e>0;const r=t.textModel.getOptions().tabSize;n=s.i.visibleColumnFromColumn(l,e+1,r)<r}}this.inlineCompletionSuggestsIndentation.set(i),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(n)})))}}d.inlineSuggestionVisible=new r.uy("inlineSuggestionVisible",!1,(0,l.NC)("inlineSuggestionVisible","Whether an inline suggestion is visible")),d.inlineSuggestionHasIndentation=new r.uy("inlineSuggestionHasIndentation",!1,(0,l.NC)("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),d.inlineSuggestionHasIndentationLessThanTabSize=new r.uy("inlineSuggestionHasIndentationLessThanTabSize",!0,(0,l.NC)("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),d.suppressSuggestions=new r.uy("inlineSuggestionSuppressSuggestions",void 0,(0,l.NC)("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"))},50865:(e,t,i)=>{var n=i(16830),o=i(66520),s=i(9849),r=i(29102),a=i(96020),l=i(78573),d=i(56346),h=i(4669),c=i(5976),u=i(69317),g=i(50187),p=i(88191),m=i(71922),f=i(77514),_=i(97295),v=i(93379),b=i.n(v),C=i(7795),w=i.n(C),y=i(90569),S=i.n(y),L=i(3565),x=i.n(L),k=i(19216),N=i.n(k),D=i(44589),E=i.n(D),I=i(77682),T={};T.styleTagTransform=E(),T.setAttributes=x(),T.insert=S().bind(null,"head"),T.domAPI=w(),T.insertStyleElement=N(),b()(I.Z,T),I.Z&&I.Z.locals&&I.Z.locals;var M=i(52136),R=i(64141),A=i(24314),O=i(50072),P=i(72042),F=i(84973),B=i(77378),W=i(92550),V=i(91557),H=i(17301);class z{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)"\n"===e.charAt(t)&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}}const K=[];class U{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new H.he(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new A.e(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function j(e,t){return new g.L(e.lineNumber+t.lineNumber-1,1===t.lineNumber?e.column+t.column-1:t.column)}function $(e){let t=1,i=1;for(const n of e)"\n"===n?(t++,i=1):i++;return new g.L(t,i)}class q{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every(((t,i)=>t.equals(e.parts[i])))}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1];return function(e,t){const i=new z(e),n=t.map((e=>{const t=A.e.lift(e.range);return{startOffset:i.getOffset(t.getStartPosition()),endOffset:i.getOffset(t.getEndPosition()),text:e.text}}));n.sort(((e,t)=>t.startOffset-e.startOffset));for(const t of n)e=e.substring(0,t.startOffset)+t.text+e.substring(t.endOffset);return e}(e.substr(0,t.column-1),this.parts.map((e=>({range:{startLineNumber:1,endLineNumber:1,startColumn:e.column,endColumn:e.column},text:e.lines.join("\n")})))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every((e=>0===e.lines.length))}get lineCount(){return 1+this.parts.reduce(((e,t)=>e+t.lines.length-1),0)}}class Z{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every(((t,i)=>t===e.lines[i]))}}class G{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.newLines=i,this.additionalReservedLineCount=n,this.parts=[new Z(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join("\n")}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every((e=>0===e.lines.length))}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every(((t,i)=>t===e.newLines[i]))&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function Q(e,t){return e===t||!(!e||!t)&&(e instanceof q&&t instanceof q||e instanceof G&&t instanceof G)&&e.equals(t)}let Y=class extends c.JT{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=(0,s.uh)("isDisposed",!1),this.currentTextModel=(0,s.rD)(this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=(0,s.nK)((e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;const n=i instanceof G?i.columnRange:void 0,o=[],s=[];function r(e,t){if(s.length>0){const i=s[s.length-1];t&&i.decorations.push(new W.Kp(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)s.push({content:i,decorations:t?[new W.Kp(1,i.length+1,t,0)]:[]})}const a=t.getLineContent(i.lineNumber);let l,d=0;for(const e of i.parts){let t=e.lines;void 0===l?(o.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):r([a.substring(d,e.column-1)],void 0),t.length>0&&(r(t,"ghost-text"),void 0===l&&e.column<=a.length&&(l=e.column)),d=e.column-1}void 0!==l&&r([a.substring(d)],void 0);const h=void 0!==l?new U(l,a.length+1):void 0;return{replacedRange:n,inlineTexts:o,additionalLines:s,hiddenRange:h,lineNumber:i.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t}})),this.decorations=(0,s.nK)((e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];t.replacedRange&&i.push({range:t.replacedRange.toRange(t.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const e of t.inlineTexts)i.push({range:A.e.fromPositions(new g.L(t.lineNumber,e.column)),options:{description:"ghost-text",after:{content:e.text,inlineClassName:e.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:F.RM.Left},showIfCollapsed:!0}});return i})),this.additionalLinesWidget=this._register(new ee(this.editor,this.languageService.languageIdCodec,(0,s.nK)((e=>{const t=this.uiState.read(e);return t?{lineNumber:t.lineNumber,additionalLines:t.additionalLines,minReservedLineCount:t.additionalReservedLineCount,targetTextModel:t.targetTextModel}:void 0})))),this._register((0,c.OF)((()=>{this.isDisposed.set(!0,void 0)}))),this._register(function(e,t){const i=new c.SL,n=e.createDecorationsCollection();return i.add((0,s.UV)({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};var J,X;Y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(J=2,X=P.O,function(e,t){X(e,t,J)})],Y);class ee extends c.JT{get viewZoneId(){return this._viewZoneId}constructor(e,t,i){super(),this.editor=e,this.languageIdCodec=t,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=(0,s.aq)("editorOptionChanged",h.ju.filter(this.editor.onDidChangeConfiguration,(e=>e.hasChanged(32)||e.hasChanged(115)||e.hasChanged(97)||e.hasChanged(92)||e.hasChanged(50)||e.hasChanged(49)||e.hasChanged(65)))),this._register((0,s.EH)((e=>{const t=this.lines.read(e);this.editorOptionsChanged.read(e),t?this.updateLines(t.lineNumber,t.additionalLines,t.minReservedLineCount):this.clear()})))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:o}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const s=Math.max(t.length,i);if(s>0){const i=document.createElement("div");!function(e,t,i,n,o){const s=n.get(32),r=n.get(115),a=n.get(92),l=n.get(50),d=n.get(49),h=n.get(65),c=new O.HT(1e4);c.appendString('<div class="suggest-preview-text">');for(let e=0,n=i.length;e<n;e++){const n=i[e],u=n.content;c.appendString('<div class="view-line'),c.appendString('" style="top:'),c.appendString(String(e*h)),c.appendString('px;width:1000000px;">');const g=_.$i(u),p=_.Ut(u),m=B.A.createEmpty(u,o);(0,V.d1)(new V.IJ(d.isMonospace&&!s,d.canUseHalfwidthRightwardsArrow,u,!1,g,p,0,m,n.decorations,t,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,r,"none",a,l!==R.n0.OFF,null),c),c.appendString("</div>")}c.appendString("</div>"),(0,M.N)(e,d);const u=c.build(),g=te?te.createHTML(u):u;e.innerHTML=g}(i,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:s,domNode:i,afterColumnAffinity:1})}}))}}const te=(0,f.Z)("editorGhostText",{createHTML:e=>e});var ie=i(50098),ne=i(9488),oe=i(98401),se=i(69386),re=i(96887),ae=i(51381),le=i(71050),de=i(75392),he=i(35146),ce=i(15393),ue=i(6626),ge=i(35382),pe=i(45035),me=i(13883),fe=i(61761),_e=i(6735);class ve{constructor(e){this.lines=e,this.tokenization={getLineTokens:e=>this.lines[e-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var be=i(35084),Ce=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function we(e,t,i,n,o=le.T.None,s){return Ce(this,void 0,void 0,(function*(){const r=function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new A.e(e.lineNumber,i.startColumn,e.lineNumber,n):A.e.fromPositions(e,e.with(void 0,n))}(t,i),a=e.all(i),l=new ue.r;for(const e of a)e.groupId&&l.add(e.groupId,e);function d(e){if(!e.yieldsToGroupIds)return[];const t=[];for(const i of e.yieldsToGroupIds||[]){const e=l.get(i);for(const i of e)t.push(i)}return t}const h=new Map,c=new Set;function u(e,t){if(t=[...t,e],c.has(e))return t;c.add(e);try{const i=d(e);for(const e of i){const i=u(e,t);if(i)return i}}finally{c.delete(e)}}function g(e){const s=h.get(e);if(s)return s;const r=u(e,[]);r&&(0,H.Cp)(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${r.map((e=>e.toString?e.toString():""+e)).join(" -> ")}`));const a=new ce.CR;return h.set(e,a.p),(()=>Ce(this,void 0,void 0,(function*(){if(!r){const t=d(e);for(const e of t){const t=yield g(e);if(t&&t.items.length>0)return}}try{return yield e.provideInlineCompletions(i,t,n,o)}catch(e){return void(0,H.Cp)(e)}})))().then((e=>a.complete(e)),(e=>a.error(e))),a.p}const p=yield Promise.all(a.map((e=>Ce(this,void 0,void 0,(function*(){return{provider:e,completions:yield g(e)}}))))),m=new Map,f=[];for(const e of p){const t=e.completions;if(!t)continue;const n=new Se(t,e.provider);f.push(n);for(const e of t.items){const t=Le.from(e,n,r,i,s);m.set(t.hash(),t)}}return new ye(Array.from(m.values()),new Set(m.keys()),f)}))}class ye{constructor(e,t,i){this.completions=e,this.hashs=t,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class Se{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,0===this.refCount&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class Le{static from(e,t,i,n,o){let s,r,a=e.range?A.e.lift(e.range):i;if("string"==typeof e.insertText){if(s=e.insertText,o&&e.completeBracketPairs){s=xe(s,a.getStartPosition(),n,o);const t=s.length-e.insertText.length;0!==t&&(a=new A.e(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+t))}r=void 0}else if("snippet"in e.insertText){const t=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=xe(e.insertText.snippet,a.getStartPosition(),n,o);const i=e.insertText.snippet.length-t;0!==i&&(a=new A.e(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+i))}const i=(new be.Yj).parse(e.insertText.snippet);1===i.children.length&&i.children[0]instanceof be.xv?(s=i.children[0].value,r=void 0):(s=i.toString(),r={snippet:e.insertText.snippet,range:a})}else(0,he.vE)(e.insertText);return new Le(s,e.command,a,s,r,e.additionalTextEdits||K,e,t)}constructor(e,t,i,n,o,s,r,a){this.filterText=e,this.command=t,this.range=i,this.insertText=n,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=r,this.source=a,n=(e=e.replace(/\r\n|\r/g,"\n")).replace(/\r\n|\r/g,"\n")}withRange(e){return new Le(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}function xe(e,t,i,n){const o=i.getLineContent(t.lineNumber).substring(0,t.column-1)+e,s=i.tokenization.tokenizeLineWithEdit(t,o.length-(t.column-1),e),r=null==s?void 0:s.sliceAndInflate(t.column-1,o.length,0);if(!r)return e;const a=function(e,t){const i=new fe.FE,n=new ge.Z(i,(e=>t.getLanguageConfiguration(e))),o=new _e.xH(new ve([e]),n),s=(0,me.w)(o,[],void 0,!0);let r="";const a=e.getLineContent();return function e(t,i){if(2===t.kind)if(e(t.openingBracket,i),i=(0,pe.Ii)(i,t.openingBracket.length),t.child&&(e(t.child,i),i=(0,pe.Ii)(i,t.child.length)),t.closingBracket)e(t.closingBracket,i),i=(0,pe.Ii)(i,t.closingBracket.length);else{const e=n.getSingleLanguageBracketTokens(t.openingBracket.languageId).findClosingTokenText(t.openingBracket.bracketIds);r+=e}else if(3===t.kind);else if(0===t.kind||1===t.kind)r+=a.substring((0,pe.F_)(i),(0,pe.F_)((0,pe.Ii)(i,t.length)));else if(4===t.kind)for(const n of t.children)e(n,i),i=(0,pe.Ii)(i,n.length)}(s,pe.xl),r}(r,n);return a}var ke=i(2484);class Ne{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){const i=t?this.range.intersectRanges(t):this.range;if(!i)return this;const n=e.getValueInRange(i,1),o=(0,_.Mh)(n,this.text),s=j(this.range.getStartPosition(),$(n.substring(0,o))),r=this.text.substring(o),a=A.e.fromPositions(s,this.range.getEndPosition());return new Ne(a,r)}augments(e){return this.text.startsWith(e.text)&&(t=this.range,(i=e.range).getStartPosition().equals(t.getStartPosition())&&i.getEndPosition().isBeforeOrEqual(t.getEndPosition()));var t,i}computeGhostText(e,t,i,n=0){let o=this.removeCommonPrefix(e);if(o.range.endLineNumber!==o.range.startLineNumber)return;const s=e.getLineContent(o.range.startLineNumber),r=(0,_.V8)(s).length;if(o.range.startColumn-1<=r){const e=(0,_.V8)(o.text).length,t=s.substring(o.range.startColumn-1,r),[i,n]=[o.range.getStartPosition(),o.range.getEndPosition()],a=i.column+t.length<=n.column?i.delta(0,t.length):n,l=A.e.fromPositions(a,n),d=o.text.startsWith(t)?o.text.substring(t.length):o.text.substring(e);o=new Ne(l,d)}const a=e.getValueInRange(o.range),l=function(e,t){if((null==De?void 0:De.originalValue)===e&&(null==De?void 0:De.newValue)===t)return null==De?void 0:De.changes;{let i=Ie(e,t,!0);if(i){const n=Ee(i);if(n>0){const o=Ie(e,t,!1);o&&Ee(o)<n&&(i=o)}}return De={originalValue:e,newValue:t,changes:i},i}}(a,o.text);if(!l)return;const d=o.range.startLineNumber,h=new Array;if("prefix"===t){const e=l.filter((e=>0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==a.length)return}const c=o.text.length-n;for(const e of l){const n=o.range.startColumn+e.originalStart+e.originalLength;if("subwordSmart"===t&&i&&i.lineNumber===o.range.startLineNumber&&n<i.column)return;if(e.originalLength>0)return;if(0===e.modifiedLength)continue;const s=e.modifiedStart+e.modifiedLength,r=Math.max(e.modifiedStart,Math.min(s,c)),a=o.text.substring(e.modifiedStart,r),l=o.text.substring(r,Math.max(e.modifiedStart,s));if(a.length>0){const e=(0,_.uq)(a);h.push(new Z(n,e,!1))}if(l.length>0){const e=(0,_.uq)(l);h.push(new Z(n,e,!0))}}return new q(d,h)}}let De;function Ee(e){let t=0;for(const i of e)t+=i.originalLength;return t}function Ie(e,t,i){if(e.length>5e3||t.length>5e3)return;function n(e){let t=0;for(let i=0,n=e.length;i<n;i++){const n=e.charCodeAt(i);n>t&&(t=n)}return t}const o=Math.max(n(e),n(t));function s(e){if(e<0)throw new Error("unexpected");return o+e+1}function r(e){let t=0,n=0;const o=new Int32Array(e.length);for(let r=0,a=e.length;r<a;r++)if(i&&"("===e[r]){const e=100*n+t;o[r]=s(2*e),t++}else if(i&&")"===e[r]){t=Math.max(t-1,0);const e=100*n+t;o[r]=s(2*e+1),0===t&&n++}else o[r]=e.charCodeAt(r);return o}const a=r(e),l=r(t);return new ke.Hs({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}var Te=function(e,t){return function(i,n){t(i,n,e)}};let Me=class extends c.JT{constructor(e,t,i,n,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=i,this.languageFeaturesService=n,this.languageConfigurationService=o,this._updateOperation=this._register(new c.XK),this.inlineCompletions=(0,s.DN)("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=(0,s.DN)("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent((()=>{this._updateOperation.clear()})))}fetch(e,t,i){var n,o;const r=new Re(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(null===(n=this._updateOperation.value)||void 0===n?void 0:n.request.satisfies(r))return this._updateOperation.value.promise;if(null===(o=a.get())||void 0===o?void 0:o.request.satisfies(r))return Promise.resolve(!0);const l=!!this._updateOperation.value;this._updateOperation.clear();const d=new le.A,h=(()=>{return n=this,o=void 0,c=function*(){var n;if((l||t.triggerKind===re.bw.Automatic)&&(yield(n=this._debounceValue.get(this.textModel),new Promise((e=>{let t;setTimeout((()=>{t&&t.dispose(),e()}),n)})))),d.token.isCancellationRequested||this.textModel.getVersionId()!==r.versionId)return!1;const o=new Date,h=yield we(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,d.token,this.languageConfigurationService);if(d.token.isCancellationRequested||this.textModel.getVersionId()!==r.versionId)return!1;const c=new Date;this._debounceValue.update(this.textModel,c.getTime()-o.getTime());const u=new Oe(h,r,this.textModel,this.versionId);if(i){const t=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!h.has(t)&&u.prepend(i.inlineCompletion,t.range,!0)}return this._updateOperation.clear(),(0,s.PS)((e=>{a.set(u,e)})),!0},new((h=void 0)||(h=Promise))((function(e,t){function i(e){try{r(c.next(e))}catch(e){t(e)}}function s(e){try{r(c.throw(e))}catch(e){t(e)}}function r(t){var n;t.done?e(t.value):(n=t.value,n instanceof h?n:new h((function(e){e(n)}))).then(i,s)}r((c=c.apply(n,o||[])).next())}));var n,o,h,c})(),c=new Ae(r,d,h);return this._updateOperation.value=c,h}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;(null===(t=this._updateOperation.value)||void 0===t?void 0:t.request.context.selectedSuggestionInfo)&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};Me=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Te(3,m.p),Te(4,ae.c_)],Me);class Re{constructor(e,t,i){this.position=e,this.context=t,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&(t=this.context.selectedSuggestionInfo,i=e.context.selectedSuggestionInfo,t&&i?((e,t)=>e.equals(t))(t,i):t===i)&&(e.context.triggerKind===re.bw.Automatic||this.context.triggerKind===re.bw.Explicit)&&this.versionId===e.versionId;var t,i}}class Ae{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class Oe{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,i,n){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=i,this.versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=(0,s.nK)((e=>{this.versionId.read(e);let t=!1;for(const e of this._inlineCompletions)t=t||e._updateRange(this.textModel);return t&&this._rangeVersionIdValue++,this._rangeVersionIdValue}));const o=i.deltaDecorations([],e.completions.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._inlineCompletions=e.completions.map(((e,t)=>new Pe(e,o[t],this._rangeVersionId)))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,0===this._refCount){setTimeout((()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map((e=>e.decorationId)),[])}),0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,i){i&&e.source.addRef();const n=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new Pe(e,n,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}}class Pe{get forwardStable(){var e;return null!==(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)&&void 0!==e&&e}constructor(e,t,i,n){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=i,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=null!=n?n:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new Ne(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,i){const n=this._toFilterTextReplacement(i).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(i).getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;const o=e.getValueInRange(n.range,1).toLowerCase(),s=n.text.toLowerCase(),r=Math.max(0,t.column-n.range.startColumn);let a=s.substring(0,r),l=s.substring(r),d=o.substring(0,r),h=o.substring(r);const c=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=c&&(d=d.trimStart(),0===d.length&&(h=h.trimStart()),a=a.trimStart(),0===a.length&&(l=l.trimStart())),a.startsWith(d)&&!!(0,de.Sy)(h,l)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new Ne(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return Fe(this._getUpdatedRange(e)).isBefore(Fe(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){const t=e.getDecorationRange(this.decorationId);return t?!this._updatedRange.equalsRange(t)&&(this._updatedRange=t,!0):(this._isValid=!1,!0)}}function Fe(e){return e.startLineNumber===e.endLineNumber?new g.L(1,1+e.endColumn-e.startColumn):new g.L(1+e.endLineNumber-e.startLineNumber,e.endColumn)}var Be,We=i(98762),Ve=i(94565),He=i(72065),ze=function(e,t){return function(i,n){t(i,n,e)}},Ke=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.Undo=0]="Undo",e[e.Redo=1]="Redo",e[e.AcceptWord=2]="AcceptWord",e[e.Other=3]="Other"}(Be||(Be={}));let Ue=class extends c.JT{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,i,n,o,r,a,l,d,h,c,u){let g;super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=i,this.textModelVersionId=n,this._debounceValue=o,this._suggestPreviewEnabled=r,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=d,this._instantiationService=h,this._commandService=c,this._languageConfigurationService=u,this._source=this._register(this._instantiationService.createInstance(Me,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=(0,s.uh)("isActive",!1),this._forceUpdate=(0,s.GN)("forceUpdate"),this._selectedInlineCompletionId=(0,s.uh)("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([Be.Redo,Be.Undo,Be.AcceptWord]),this._fetchInlineCompletions=(0,s.aK)("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:re.bw.Automatic}),handleChange:(e,t)=>(e.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(e.change)?t.preserveCurrentCompletion=!0:e.didChange(this._forceUpdate)&&(t.inlineCompletionTriggerKind=e.change),!0)},((e,t)=>{if(this._forceUpdate.read(e),!(this._enabled.read(e)&&this.selectedSuggestItem.read(e)||this._isActive.read(e)))return void this._source.cancelUpdate();this.textModelVersionId.read(e);const i=this.selectedInlineCompletion.get(),n=t.preserveCurrentCompletion||(null==i?void 0:i.forwardStable)?i:void 0,o=this._source.suggestWidgetInlineCompletions.get(),r=this.selectedSuggestItem.read(e);if(o&&!r){const e=this._source.inlineCompletions.get();(0,s.PS)((t=>{e&&o.request.versionId>e.request.versionId&&this._source.inlineCompletions.set(o.clone(),t),this._source.clearSuggestWidgetInlineCompletions(t)}))}const a=this.cursorPosition.read(e),l={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:null==r?void 0:r.toSelectedSuggestionInfo()};return this._source.fetch(a,l,n)})),this._filteredInlineCompletionItems=(0,s.nK)((e=>{const t=this._source.inlineCompletions.read(e);if(!t)return[];const i=this.cursorPosition.read(e),n=t.inlineCompletions.filter((t=>t.isVisible(this.textModel,i,e)));return n})),this.selectedInlineCompletionIndex=(0,s.nK)((e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineCompletionItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineCompletion=(0,s.nK)((e=>this._filteredInlineCompletionItems.read(e)[this.selectedInlineCompletionIndex.read(e)])),this.lastTriggerKind=this._source.inlineCompletions.map((e=>null==e?void 0:e.request.context.triggerKind)),this.inlineCompletionsCount=(0,s.nK)((e=>this.lastTriggerKind.read(e)===re.bw.Explicit?this._filteredInlineCompletionItems.read(e).length:void 0)),this.state=(0,s.bk)({equalityComparer:(e,t)=>e&&t?Q(e.ghostText,t.ghostText)&&e.inlineCompletion===t.inlineCompletion&&e.suggestItem===t.suggestItem:e===t},(e=>{var t;const i=this.textModel,n=this.selectedSuggestItem.read(e);if(n){const o=n.toSingleTextEdit().removeCommonPrefix(i),s=this._computeAugmentedCompletion(o,e);if(!this._suggestPreviewEnabled.read(e)&&!s)return;const r=null!==(t=null==s?void 0:s.edit)&&void 0!==t?t:o,a=s?s.edit.text.length-o.text.length:0,l=this._suggestPreviewMode.read(e),d=this.cursorPosition.read(e),h=r.computeGhostText(i,l,d,a);return{ghostText:null!=h?h:new q(r.range.endLineNumber,[]),inlineCompletion:null==s?void 0:s.completion,suggestItem:n}}{if(!this._isActive.read(e))return;const t=this.selectedInlineCompletion.read(e);if(!t)return;const n=t.toSingleTextEdit(e),o=this._inlineSuggestMode.read(e),s=this.cursorPosition.read(e),r=n.computeGhostText(i,o,s);return r?{ghostText:r,inlineCompletion:t,suggestItem:void 0}:void 0}})),this.ghostText=(0,s.bk)({equalityComparer:Q},(e=>{const t=this.state.read(e);if(t)return t.ghostText})),this._register((0,s.$g)(this._fetchInlineCompletions,!0)),this._register((0,s.EH)((e=>{var t,i;const n=this.state.read(e),o=null==n?void 0:n.inlineCompletion;if((null==o?void 0:o.semanticId)!==(null==g?void 0:g.semanticId)&&(g=o,o)){const e=o.inlineCompletion,n=e.source;null===(i=(t=n.provider).handleItemDidShow)||void 0===i||i.call(t,n.inlineCompletions,e.sourceInlineCompletion,e.insertText)}})))}trigger(e){return Ke(this,void 0,void 0,(function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()}))}triggerExplicitly(e){return Ke(this,void 0,void 0,(function*(){(0,s.c8)(e,(e=>{this._isActive.set(!0,e),this._forceUpdate.trigger(e,re.bw.Explicit)})),yield this._fetchInlineCompletions.get()}))}stop(e){(0,s.c8)(e,(e=>{this._isActive.set(!1,e),this._source.clear(e)}))}_computeAugmentedCompletion(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t),o=n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(oe.$K);return(0,ne.bX)(o,(n=>{let o=n.toSingleTextEdit(t);return o=o.removeCommonPrefix(i,A.e.fromPositions(o.range.getStartPosition(),e.range.getEndPosition())),o.augments(e)?{edit:o,completion:n}:void 0}))}_deltaSelectedInlineCompletionIndex(e){return Ke(this,void 0,void 0,(function*(){yield this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}))}next(){return Ke(this,void 0,void 0,(function*(){yield this._deltaSelectedInlineCompletionIndex(1)}))}previous(){return Ke(this,void 0,void 0,(function*(){yield this._deltaSelectedInlineCompletionIndex(-1)}))}accept(e){var t;return Ke(this,void 0,void 0,(function*(){if(e.getModel()!==this.textModel)throw new H.he;const i=this.state.get();if(!i||i.ghostText.isEmpty()||!i.inlineCompletion)return;const n=i.inlineCompletion.toInlineCompletion(void 0);e.pushUndoStop(),n.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[se.h.replaceMove(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition()),null===(t=We.f.get(e))||void 0===t||t.insert(n.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[se.h.replaceMove(n.range,n.insertText),...n.additionalTextEdits]),n.command&&n.source.addRef(),(0,s.PS)((e=>{this._source.clear(e),this._isActive.set(!1,e)})),n.command&&(yield this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,H.Cp),n.source.removeRef())}))}acceptNextWord(e){return Ke(this,void 0,void 0,(function*(){yield this._acceptNext(e,((e,t)=>{const i=this.textModel.getLanguageIdAtPosition(e.lineNumber,e.column),n=this._languageConfigurationService.getLanguageConfiguration(i),o=new RegExp(n.wordDefinition.source,n.wordDefinition.flags.replace("g","")),s=t.match(o);let r=0;r=s&&void 0!==s.index?0===s.index?s[0].length:s.index:t.length;const a=/\s+/g.exec(t);return a&&void 0!==a.index&&a.index+a[0].length<r&&(r=a.index+a[0].length),r}))}))}acceptNextLine(e){return Ke(this,void 0,void 0,(function*(){yield this._acceptNext(e,((e,t)=>{const i=t.match(/\n/);return i&&void 0!==i.index?i.index+1:t.length}))}))}_acceptNext(e,t){return Ke(this,void 0,void 0,(function*(){if(e.getModel()!==this.textModel)throw new H.he;const i=this.state.get();if(!i||i.ghostText.isEmpty()||!i.inlineCompletion)return;const n=i.ghostText,o=i.inlineCompletion.toInlineCompletion(void 0);if(o.snippetInfo||o.filterText!==o.insertText)return void(yield this.accept(e));const s=n.parts[0],r=new g.L(n.lineNumber,s.column),a=s.lines.join("\n"),l=t(r,a);if(l===a.length&&1===n.parts.length)return void this.accept(e);const d=a.substring(0,l);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[se.h.replace(A.e.fromPositions(r),d)]);const t=$(d);e.setPosition(j(r,t))}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){const t=A.e.fromPositions(o.range.getStartPosition(),j(r,$(d))),i=e.getModel().getValueInRange(t,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,i.length)}}))}handleSuggestAccepted(e){var t,i;const n=e.toSingleTextEdit().removeCommonPrefix(this.textModel),o=this._computeAugmentedCompletion(n,void 0);if(!o)return;const s=o.completion.inlineCompletion;null===(i=(t=s.source.provider).handlePartialAccept)||void 0===i||i.call(t,s.source.inlineCompletions,s.sourceInlineCompletion,n.text.length)}};Ue=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ze(9,He.TG),ze(10,Ve.H),ze(11,ae.c_)],Ue);var je=i(18217),$e=i(25463);class qe extends c.JT{get selectedItem(){return this._selectedItem}constructor(e,t,i,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=i,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=(0,s.uh)("suggestWidgetInlineCompletionProvider.selectedItem",void 0),this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const o=$e.n.get(this.editor);if(o){this._register(o.registerSelector({priority:100,select:(e,t,i)=>{var n;(0,s.PS)((e=>this.checkModelVersion(e)));const r=this.editor.getModel();if(!r)return-1;const a=null===(n=this.suggestControllerPreselector())||void 0===n?void 0:n.removeCommonPrefix(r);if(!a)return-1;const l=g.L.lift(t),d=i.map(((e,t)=>{const i=Ze.fromSuggestion(o,r,l,e,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(r);return{index:t,valid:a.augments(i),prefixLength:i.text.length,suggestItem:e}})).filter((e=>e&&e.valid&&e.prefixLength>0)),h=(0,ne.Dc)(d,(0,ne.tT)((e=>e.prefixLength),ne.fv));return h?h.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(o.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(o.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.update(!1)}))),this._register(o.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(h.ju.once(o.model.onDidTrigger)((e=>{t()}))),this._register(o.onWillInsertSuggestItem((e=>{const t=this.editor.getPosition(),i=this.editor.getModel();if(!t||!i)return;const n=Ze.fromSuggestion(o,i,t,e.item,this.isShiftKeyPressed);this.onWillAccept(n)})))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();var i,n;this._isActive===e&&((i=this._currentSuggestItemInfo)===(n=t)||i&&n&&i.equals(n))||(this._isActive=e,this._currentSuggestItemInfo=t,(0,s.PS)((e=>{this.checkModelVersion(e),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,e)})))}getSuggestItemInfo(){const e=$e.n.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();return t&&i&&n?Ze.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=$e.n.get(this.editor);null==e||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=$e.n.get(this.editor);null==e||e.forceRenderingAbove()}}class Ze{static fromSuggestion(e,t,i,n,o){let{insertText:s}=n.completion,r=!1;if(4&n.completion.insertTextRules){const e=(new be.Yj).parse(s);e.children.length<100&&je.l.adjustWhitespace(t,i,!0,e),s=e.toString(),r=!0}const a=e.getOverwriteInfo(n,o);return new Ze(A.e.fromPositions(i.delta(0,-a.overwriteBefore),i.delta(0,Math.max(a.overwriteAfter,0))),s,n.completion.kind,r)}constructor(e,t,i,n){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new re.ln(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new Ne(this.range,this.insertText)}}var Ge,Qe=i(63580),Ye=i(69149),Je=i(33108),Xe=i(93983),et=i(91847),tt=function(e,t){return function(i,n){t(i,n,e)}};let it=Ge=class extends c.JT{static get(e){return e.getContribution(Ge.ID)}constructor(e,t,i,n,o,r,d,p,m){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.configurationService=n,this.commandService=o,this.debounceService=r,this.languageFeaturesService=d,this.audioCueService=p,this._keybindingService=m,this.model=(0,s.DN)("inlineCompletionModel",void 0),this.textModelVersionId=(0,s.uh)("textModelVersionId",-1),this.cursorPosition=(0,s.uh)("cursorPosition",new g.L(1,1)),this.suggestWidgetAdaptor=this._register(new qe(this.editor,(()=>{var e,t;return null===(t=null===(e=this.model.get())||void 0===e?void 0:e.selectedInlineCompletion.get())||void 0===t?void 0:t.toSingleTextEdit(void 0)}),(e=>this.updateObservables(e,Be.Other)),(e=>{(0,s.PS)((t=>{var i;this.updateObservables(t,Be.Other),null===(i=this.model.get())||void 0===i||i.handleSuggestAccepted(e)}))}))),this._enabled=(0,s.rD)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(61).enabled)),this.ghostTextWidget=this._register(this.instantiationService.createInstance(Y,this.editor,{ghostText:this.model.map(((e,t)=>null==e?void 0:e.ghostText.read(t))),minReservedLineCount:(0,s.Dz)(0),targetTextModel:this.model.map((e=>null==e?void 0:e.textModel))})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new l.f(this.contextKeyService,this.model)),this._register(h.ju.runAndSubscribe(e.onDidChangeModel,(()=>(0,s.PS)((i=>{this.model.set(void 0,i),this.updateObservables(i,Be.Other);const n=e.getModel();if(n){const o=t.createInstance(Ue,n,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,(0,s.rD)(e.onDidChangeConfiguration,(()=>e.getOption(116).preview)),(0,s.rD)(e.onDidChangeConfiguration,(()=>e.getOption(116).previewMode)),(0,s.rD)(e.onDidChangeConfiguration,(()=>e.getOption(61).mode)),this._enabled);this.model.set(o,i)}})))));const f=e=>{var t;return e.isUndoing?Be.Undo:e.isRedoing?Be.Redo:(null===(t=this.model.get())||void 0===t?void 0:t.isAcceptingPartially)?Be.AcceptWord:Be.Other};let _;this._register(e.onDidChangeModelContent((e=>(0,s.PS)((t=>this.updateObservables(t,f(e))))))),this._register(e.onDidChangeCursorPosition((e=>(0,s.PS)((t=>{var i;this.updateObservables(t,Be.Other),3!==e.reason&&"api"!==e.source||null===(i=this.model.get())||void 0===i||i.stop(t)}))))),this._register(e.onDidType((()=>(0,s.PS)((e=>{var t;this.updateObservables(e,Be.Other),this._enabled.get()&&(null===(t=this.model.get())||void 0===t||t.trigger(e))}))))),this._register(this.commandService.onDidExecuteCommand((t=>{new Set([u.wk.Tab.id,u.wk.DeleteLeft.id,u.wk.DeleteRight.id,a.Ou,"acceptSelectedSuggestion"]).has(t.commandId)&&e.hasTextFocus()&&this._enabled.get()&&(0,s.PS)((e=>{var t;null===(t=this.model.get())||void 0===t||t.trigger(e)}))}))),this._register(this.editor.onDidBlurEditorWidget((()=>{this.contextKeyService.getContextKeyValue("accessibleViewIsShown")||this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(61).keepOnBlur||ie.QG.dropDownVisible||(0,s.PS)((e=>{var t;null===(t=this.model.get())||void 0===t||t.stop(e)}))}))),this._register((0,s.EH)((e=>{var t;const i=null===(t=this.model.read(e))||void 0===t?void 0:t.state.read(e);(null==i?void 0:i.suggestItem)?i.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register((0,c.OF)((()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register((0,s.EH)((e=>{const t=this.model.read(e),i=null==t?void 0:t.state.read(e);if(t&&i&&i.inlineCompletion){if(i.inlineCompletion.semanticId!==_){_=i.inlineCompletion.semanticId;const e=t.textModel.getLineContent(i.ghostText.lineNumber);this.audioCueService.playAudioCue(Ye.y$.inlineSuggestion).then((()=>{this.editor.getOption(7)&&this.provideScreenReaderUpdate(i.ghostText.renderForScreenReader(e))}))}}else _=void 0}))),this._register(new ie.oU(this.editor,this.model,this.instantiationService)),this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}))),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}provideScreenReaderUpdate(e){const t=this.contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let n;!t&&i&&this.editor.getOption(146)&&(n=(0,Qe.NC)("showAccessibleViewHint","Inspect this in the accessible view ({0})",i.getAriaLabel())),n?(0,d.Z9)(e+", "+n):(0,d.Z9)(e)}updateObservables(e,t){var i,n;const o=this.editor.getModel();this.textModelVersionId.set(null!==(i=null==o?void 0:o.getVersionId())&&void 0!==i?i:-1,e,t),this.cursorPosition.set(null!==(n=this.editor.getPosition())&&void 0!==n?n:new g.L(1,1),e)}shouldShowHoverAt(e){var t;const i=null===(t=this.model.get())||void 0===t?void 0:t.ghostText.get();return!!i&&i.parts.some((t=>e.containsPosition(new g.L(i.lineNumber,t.column))))}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};it.ID="editor.contrib.inlineCompletionsController",it=Ge=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([tt(1,He.TG),tt(2,Xe.i6),tt(3,Je.Ui),tt(4,Ve.H),tt(5,p.A),tt(6,m.p),tt(7,Ye.e7),tt(8,et.d)],it);var nt=i(55621),ot=i(84144),st=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class rt extends n.R6{constructor(){super({id:rt.ID,label:Qe.NC("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:Xe.Ao.and(r.u.writable,l.f.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var i;return st(this,void 0,void 0,(function*(){const e=it.get(t);null===(i=null==e?void 0:e.model.get())||void 0===i||i.next()}))}}rt.ID=a.OW;class at extends n.R6{constructor(){super({id:at.ID,label:Qe.NC("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:Xe.Ao.and(r.u.writable,l.f.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var i;return st(this,void 0,void 0,(function*(){const e=it.get(t);null===(i=null==e?void 0:e.model.get())||void 0===i||i.previous()}))}}at.ID=a.Np;class lt extends n.R6{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:Qe.NC("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:r.u.writable})}run(e,t){var i;return st(this,void 0,void 0,(function*(){const e=it.get(t);null===(i=null==e?void 0:e.model.get())||void 0===i||i.triggerExplicitly()}))}}class dt extends n.R6{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:Qe.NC("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:Xe.Ao.and(r.u.writable,l.f.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:Xe.Ao.and(r.u.writable,l.f.inlineSuggestionVisible)},menuOpts:[{menuId:ot.eH.InlineSuggestionToolbar,title:Qe.NC("acceptWord","Accept Word"),group:"primary",order:2}]})}run(e,t){var i;return st(this,void 0,void 0,(function*(){const e=it.get(t);yield null===(i=null==e?void 0:e.model.get())||void 0===i?void 0:i.acceptNextWord(e.editor)}))}}class ht extends n.R6{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:Qe.NC("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:Xe.Ao.and(r.u.writable,l.f.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:ot.eH.InlineSuggestionToolbar,title:Qe.NC("acceptLine","Accept Line"),group:"secondary",order:2}]})}run(e,t){var i;return st(this,void 0,void 0,(function*(){const e=it.get(t);yield null===(i=null==e?void 0:e.model.get())||void 0===i?void 0:i.acceptNextLine(e.editor)}))}}class ct extends n.R6{constructor(){super({id:a.Ou,label:Qe.NC("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:l.f.inlineSuggestionVisible,menuOpts:[{menuId:ot.eH.InlineSuggestionToolbar,title:Qe.NC("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:Xe.Ao.and(l.f.inlineSuggestionVisible,r.u.tabMovesFocus.toNegated(),l.f.inlineSuggestionHasIndentationLessThanTabSize,nt._y.Visible.toNegated(),r.u.hoverFocused.toNegated())}})}run(e,t){var i;return st(this,void 0,void 0,(function*(){const e=it.get(t);e&&(null===(i=e.model.get())||void 0===i||i.accept(e.editor),e.editor.focus())}))}}class ut extends n.R6{constructor(){super({id:ut.ID,label:Qe.NC("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:l.f.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return st(this,void 0,void 0,(function*(){const e=it.get(t);(0,s.PS)((t=>{var i;null===(i=null==e?void 0:e.model.get())||void 0===i||i.stop(t)}))}))}}ut.ID="editor.action.inlineSuggest.hide";class gt extends ot.Ke{constructor(){super({id:gt.ID,title:Qe.NC("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:ot.eH.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:Xe.Ao.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return st(this,void 0,void 0,(function*(){const t=e.get(Je.Ui),i="always"===t.getValue("editor.inlineSuggest.showToolbar")?"onHover":"always";t.updateValue("editor.inlineSuggest.showToolbar",i)}))}}gt.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";var pt=i(65321),mt=i(59365),ft=i(18806),_t=i(31106),vt=i(50988),bt=i(10829),Ct=function(e,t){return function(i,n){t(i,n,e)}};class wt{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let yt=class{constructor(e,t,i,n,o,s){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=it.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new o.YM(1e3,this,A.e.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}return 7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new o.YM(1e3,this,i.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if("always"===this._editor.getOption(61).showToolbar)return[];const i=it.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new wt(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new c.SL,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(7)&&this.renderScreenReaderText(e,n,i);const o=n.controller.model.get(),r=this._instantiationService.createInstance(ie.QG,this._editor,!1,(0,s.Dz)(null),o.selectedInlineCompletionIndex,o.inlineCompletionsCount,o.selectedInlineCompletion.map((e=>{var t;return null!==(t=null==e?void 0:e.inlineCompletion.source.inlineCompletions.commands)&&void 0!==t?t:[]})));return e.fragment.appendChild(r.getDomNode()),o.triggerExplicitly(),i.add(r),i}renderScreenReaderText(e,t,i){const n=pt.$,o=n("div.hover-row.markdown-hover"),r=pt.R3(o,n("div.hover-contents",{"aria-live":"assertive"})),a=i.add(new ft.$({editor:this._editor},this._languageService,this._openerService));i.add((0,s.EH)((n=>{var o;const s=null===(o=t.controller.model.read(n))||void 0===o?void 0:o.ghostText.read(n);if(s){const t=this._editor.getModel().getLineContent(s.lineNumber);(t=>{i.add(a.onDidRenderAsync((()=>{r.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=Qe.NC("inlineSuggestionFollows","Suggestion:"),o=i.add(a.render((new mt.W5).appendText(n).appendCodeblock("text",t)));r.replaceChildren(o.element)})(s.renderForScreenReader(t))}else pt.mc(r)}))),e.fragment.appendChild(o)}};yt=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ct(1,P.O),Ct(2,vt.v4),Ct(3,_t.F),Ct(4,He.TG),Ct(5,bt.b)],yt),(0,n._K)(it.ID,it,3),(0,n.Qr)(lt),(0,n.Qr)(rt),(0,n.Qr)(at),(0,n.Qr)(dt),(0,n.Qr)(ht),(0,n.Qr)(ct),(0,n.Qr)(ut),(0,ot.r1)(gt),o.Ae.register(yt)},50098:(e,t,i)=>{i.d(t,{oU:()=>ee,QG:()=>ne});var n=i(65321),o=i(10244),s=i(12983),r=i(74741),a=i(9488),l=i(15393),d=i(73046),h=i(5976),c=i(9849),u=i(1432),g=i(25670),p=i(93379),m=i.n(p),f=i(7795),_=i.n(f),v=i(90569),b=i.n(v),C=i(3565),w=i.n(C),y=i(19216),S=i.n(y),L=i(44589),x=i.n(L),k=i(28300),N={};N.styleTagTransform=x(),N.setAttributes=w(),N.insert=b().bind(null,"head"),N.domAPI=_(),N.insertStyleElement=S(),m()(k.Z,N),k.Z&&k.Z.locals&&k.Z.locals;var D=i(50187),E=i(96887),I=i(96020),T=i(63580),M=i(44691),R=i(7448),A=i(90317),O=i(98324),P=i(4669),F=i(56651),B={};B.styleTagTransform=x(),B.setAttributes=w(),B.insert=b().bind(null,"head"),B.domAPI=_(),B.insertStyleElement=S(),m()(F.Z,B),F.Z&&F.Z.locals&&F.Z.locals;class W extends h.JT{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new P.z5),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new h.SL),this.options=i,this.lookupKeybindings="function"==typeof this.options.getKeyBinding,this.toggleMenuAction=this._register(new V((()=>{var e;return null===(e=this.toggleMenuActionViewItem)||void 0===e?void 0:e.show()}),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new A.o(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,actionViewItemProvider:(e,n)=>{var o;if(e.id===V.ID)return this.toggleMenuActionViewItem=new O.C(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:g.k.asClassNameArray(null!==(o=i.moreIcon)&&void 0!==o?o:d.l.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof r.wY){const i=new O.C(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach((e=>{this.actionBar.push(e,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(e)})}))}getKeybindingLabel(e){var t,i,n;const o=this.lookupKeybindings?null===(i=(t=this.options).getKeyBinding)||void 0===i?void 0:i.call(t,e):void 0;return null!==(n=null==o?void 0:o.getLabel())&&void 0!==n?n:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}class V extends r.aU{constructor(e,t){t=t||T.NC("moreActions","More Actions..."),super(V.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return e=this,t=void 0,n=function*(){this.toggleDropdownMenu()},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}V.ID="toolbar.toggle.more";var H=i(84144),z=i(93983),K=i(5606),U=i(91847),j=i(10829),$=function(e,t){return function(i,n){t(i,n,e)}};let q=class extends W{constructor(e,t,i,n,o,s,r){super(e,o,Object.assign(Object.assign({getKeyBinding:e=>{var t;return null!==(t=s.lookupKeybinding(e.id))&&void 0!==t?t:void 0}},t),{allowContextMenu:!0,skipTelemetry:"string"==typeof(null==t?void 0:t.telemetrySource)})),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=o,this._sessionDisposables=this._store.add(new h.SL);const a=null==t?void 0:t.telemetrySource;a&&this._store.add(this.actionBar.onDidRun((e=>r.publicLog2("workbenchActionExecuted",{id:e.action.id,from:a}))))}setActions(e,t=[],i){var o,s,l;this._sessionDisposables.clear();const d=e.slice(),h=t.slice(),c=[];let u=0;const g=[];let p=!1;if(-1!==(null===(o=this._options)||void 0===o?void 0:o.hiddenItemStrategy))for(let e=0;e<d.length;e++){const t=d[e];(t instanceof H.U8||t instanceof H.NZ)&&t.hideActions&&(c.push(t.hideActions.toggle),t.hideActions.toggle.checked&&u++,t.hideActions.isHidden&&(p=!0,d[e]=void 0,0!==(null===(s=this._options)||void 0===s?void 0:s.hiddenItemStrategy)&&(g[e]=t)))}if(void 0!==(null===(l=this._options)||void 0===l?void 0:l.maxNumberOfItems)){let e=0;for(let t=0;t<d.length;t++){const i=d[t];i&&++e>=this._options.maxNumberOfItems&&(d[t]=void 0,g[t]=i)}}(0,a.Rs)(d),(0,a.Rs)(g),super.setActions(d,r.Z0.join(g,h)),c.length>0&&this._sessionDisposables.add((0,n.nm)(this.getElement(),"contextmenu",(e=>{var t,n,o,s,a;const l=new R.n(e),d=this.getItemAction(l.target);if(!d)return;l.preventDefault(),l.stopPropagation();let h,g=!1;if(1===u&&0===(null===(t=this._options)||void 0===t?void 0:t.hiddenItemStrategy)){g=!0;for(let e=0;e<c.length;e++)if(c[e].checked){c[e]=(0,r.xw)({id:d.id,label:d.label,checked:!0,enabled:!1,run(){}});break}}if(!g&&(d instanceof H.U8||d instanceof H.NZ)){if(!d.hideActions)return;h=d.hideActions.hide}else h=(0,r.xw)({id:"label",label:(0,T.NC)("hide","Hide"),enabled:!1,run(){}});const m=r.Z0.join([h],c);(null===(n=this._options)||void 0===n?void 0:n.resetMenu)&&!i&&(i=[this._options.resetMenu]),p&&i&&(m.push(new r.Z0),m.push((0,r.xw)({id:"resetThisMenu",label:(0,T.NC)("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(i)}))),this._contextMenuService.showContextMenu({getAnchor:()=>l,getActions:()=>m,menuId:null===(o=this._options)||void 0===o?void 0:o.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},null===(s=this._options)||void 0===s?void 0:s.menuOptions),skipTelemetry:"string"==typeof(null===(a=this._options)||void 0===a?void 0:a.telemetrySource),contextKeyService:this._contextKeyService})})))}};q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([$(2,H.co),$(3,z.i6),$(4,K.i),$(5,U.d),$(6,j.b)],q);var Z,G=i(94565),Q=i(72065),Y=i(59554),J=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},X=function(e,t){return function(i,n){t(i,n,e)}};let ee=class extends h.JT{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=(0,c.rD)(this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(61).showToolbar)),this.sessionPosition=void 0,this.position=(0,c.nK)((e=>{var t,i,n;const o=null===(t=this.model.read(e))||void 0===t?void 0:t.ghostText.read(e);if(!this.alwaysShowToolbar.read(e)||!o||0===o.parts.length)return this.sessionPosition=void 0,null;const s=o.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==o.lineNumber&&(this.sessionPosition=void 0);const r=new D.L(o.lineNumber,Math.min(s,null!==(n=null===(i=this.sessionPosition)||void 0===i?void 0:i.column)&&void 0!==n?n:Number.MAX_SAFE_INTEGER));return this.sessionPosition=r,r})),this._register((0,c.gp)(((t,i)=>{const n=this.model.read(t);if(!n||!this.alwaysShowToolbar.read(t))return;const o=i.add(this.instantiationService.createInstance(ne,this.editor,!0,this.position,n.selectedInlineCompletionIndex,n.inlineCompletionsCount,n.selectedInlineCompletion.map((e=>{var t;return null!==(t=null==e?void 0:e.inlineCompletion.source.inlineCompletions.commands)&&void 0!==t?t:[]}))));e.addContentWidget(o),i.add((0,h.OF)((()=>e.removeContentWidget(o)))),i.add((0,c.EH)((e=>{this.position.read(e)&&n.lastTriggerKind.read(e)!==E.bw.Explicit&&n.triggerExplicitly()})))})))}};ee=J([X(2,Q.TG)],ee);const te=(0,Y.q5)("inline-suggestion-hints-next",d.l.chevronRight,(0,T.NC)("parameterHintsNextIcon","Icon for show next parameter hint.")),ie=(0,Y.q5)("inline-suggestion-hints-previous",d.l.chevronLeft,(0,T.NC)("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let ne=Z=class extends h.JT{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new r.aU(e,t,i,!0,(()=>this._commandService.executeCommand(e))),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let s=t;return o&&(s=(0,T.NC)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),n.tooltip=s,n}constructor(e,t,i,o,s,d,h,u,p,m,f){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=o,this._suggestionCount=s,this._extraCommands=d,this._commandService=h,this.keybindingService=p,this._contextKeyService=m,this._menuService=f,this.id="InlineSuggestionHintsContentWidget"+Z.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,n.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,n.h)("div@toolBar")]),this.previousAction=this.createCommandAction(I.Np,(0,T.NC)("previous","Previous"),g.k.asClassName(ie)),this.availableSuggestionCountAction=new r.aU("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(I.OW,(0,T.NC)("next","Next"),g.k.asClassName(te)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(H.eH.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new l.pY((()=>{this.availableSuggestionCountAction.label=""}),100)),this.disableButtonsDebounced=this._register(new l.pY((()=>{this.previousAction.enabled=this.nextAction.enabled=!1}),100)),this.lastCommands=[],this.toolBar=this._register(u.createInstance(re,this.nodes.toolBar,H.eH.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof H.U8)return u.createInstance(se,e,void 0);if(e===this.availableSuggestionCountAction){const t=new oe(void 0,e,{label:!0,icon:!1});return t.setClass("availableSuggestionCount"),t}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{Z._dropDownVisible=e}))),this._register((0,c.EH)((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register((0,c.EH)((e=>{const t=this._suggestionCount.read(e),i=this._currentSuggestionIdx.read(e);void 0!==t?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${i+1}/${t}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),void 0!==t&&t>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()}))),this._register((0,c.EH)((e=>{const t=this._extraCommands.read(e);if((0,a.fS)(this.lastCommands,t))return;this.lastCommands=t;const i=t.map((e=>({class:void 0,id:e.id,enabled:!0,tooltip:e.tooltip||"",label:e.title,run:t=>this._commandService.executeCommand(e.id)})));for(const[e,t]of this.inlineCompletionsActionsMenus.getActions())for(const e of t)e instanceof H.U8&&i.push(e);i.length>0&&i.unshift(new r.Z0),this.toolBar.setAdditionalSecondaryActions(i)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};ne._dropDownVisible=!1,ne.id=0,ne=Z=J([X(6,G.H),X(7,Q.TG),X(8,U.d),X(9,z.i6),X(10,H.co)],ne);class oe extends o.gU{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}}class se extends M.Mm{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,n.h)("div.keybinding").root;new s.e(t,u.OS,Object.assign({disableTitle:!0},s.F)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let re=class extends q{constructor(e,t,i,n,o,s,r,a){super(e,Object.assign({resetMenu:t},i),n,o,s,r,a),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){var e,t,i,n,o,s,r;const a=[],l=[];(0,M.vr)(this.menu,null===(e=this.options2)||void 0===e?void 0:e.menuOptions,{primary:a,secondary:l},null===(i=null===(t=this.options2)||void 0===t?void 0:t.toolbarOptions)||void 0===i?void 0:i.primaryGroup,null===(o=null===(n=this.options2)||void 0===n?void 0:n.toolbarOptions)||void 0===o?void 0:o.shouldInlineSubmenu,null===(r=null===(s=this.options2)||void 0===s?void 0:s.toolbarOptions)||void 0===r?void 0:r.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),a.unshift(...this.prependedPrimaryActions),this.setActions(a,l)}setPrependedPrimaryActions(e){(0,a.fS)(this.prependedPrimaryActions,e,((e,t)=>e===t))||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){(0,a.fS)(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};re=J([X(3,H.co),X(4,z.i6),X(5,K.i),X(6,U.d),X(7,j.b)],re)},52165:(e,t,i)=>{i.d(t,{r:()=>D});var n=i(65321),o=i(15393),s=i(73046),r=i(5976),a=i(97295),l=i(25670),d=i(93379),h=i.n(d),c=i(7795),u=i.n(c),g=i(90569),p=i.n(g),m=i(3565),f=i.n(m),_=i(19216),v=i.n(_),b=i(44589),C=i.n(b),w=i(16668),y={};y.styleTagTransform=C(),y.setAttributes=f(),y.insert=p().bind(null,"head"),y.domAPI=u(),y.insertStyleElement=v(),h()(w.Z,y),w.Z&&w.Z.locals&&w.Z.locals;var S=i(24314),L=i(13961),x=i(72065);const k=L.qx.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:a.B4,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class N extends r.JT{constructor(e,t,i,n,o){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=n.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=n.$("span.icon");this.domNode.append(t),t.classList.add(...l.k.asClassNameArray(s.l.loading),"codicon-modifier-spin");const i=()=>{const e=this.editor.getOption(65);this.domNode.style.height=`${e}px`,this.domNode.style.width=`${Math.ceil(.8*e)}px`};i(),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(51)||e.hasChanged(65))&&i()}))),this._register(n.nm(this.domNode,n.tw.CLICK,(e=>{this.delegate.cancel()})))}getId(){return N.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)}}N.baseId="editor.widget.inlineProgressWidget";let D=class extends r.JT{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new r.XK),this._currentWidget=new r.XK,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,i){return n=this,s=void 0,a=function*(){const n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=(0,o.Vg)((()=>{const n=S.e.fromPositions(e);this._currentDecorations.set([{range:n,options:k}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(N,this.id,this._editor,n,t,i))}),this._showDelay);try{return yield i}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function o(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,o)}l((a=a.apply(n,s||[])).next())}));var n,s,r,a}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};var E,I;D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(E=2,I=x.TG,function(e,t){I(e,t,E)})],D)},97615:(e,t,i)=>{var n=i(16830),o=i(28108),s=i(29102),r=i(63580);class a extends n.R6{constructor(){super({id:"expandLineSelection",label:r.NC("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:s.u.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,o.P.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(i.source,!0)}}(0,n.Qr)(a)},50995:(e,t,i)=>{var n=i(22258),o=i(69317),s=i(16830),r=i(61329),a=i(97295),l=i(69386),d=i(24314);class h{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){const i=function(e,t){t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);const i=[];let n=0,o=0;const s=t.length;for(let r=1,h=e.getLineCount();r<=h;r++){const h=e.getLineContent(r),c=h.length+1;let u=0;if(o<s&&t[o].lineNumber===r&&(u=t[o].column,o++,u===c))continue;if(0===h.length)continue;const g=a.ow(h);let p=0;if(-1===g)p=1;else{if(g===h.length-1)continue;p=g+2}p=Math.max(u,p),i[n++]=l.h.delete(new d.e(r,p,r,c))}return i}(e,this._cursors);for(let e=0,n=i.length;e<n;e++){const n=i[e];t.addEditOperation(n.range,n.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}var c=i(51336),u=i(50187),g=i(3860),p=i(29102);class m{constructor(e,t,i){this._selection=e,this._isCopyingDown=t,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=[];for(let t=i.startLineNumber;t<=i.endLineNumber;t++)n.push(e.getLineContent(t));const o=n.join("\n");""===o&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new d.e(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":"\n"):this._isCopyingDown?t.addEditOperation(new d.e(i.startLineNumber,1,i.startLineNumber,1),o+"\n"):t.addEditOperation(new d.e(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+o),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(0!==this._startLineNumberDelta||0!==this._endLineNumberDelta){let e=i.startLineNumber,t=i.startColumn,n=i.endLineNumber,o=i.endColumn;0!==this._startLineNumberDelta&&(e+=this._startLineNumberDelta,t=1),0!==this._endLineNumberDelta&&(n+=this._endLineNumberDelta,o=1),i=g.Y.createWithDirection(e,t,n,o,this._selectionDirection)}return i}}var f=i(10291),_=i(49119),v=i(51381),b=i(18279),C=i(75383),w=i(1615);let y=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumber<n.endLineNumber&&1===n.endColumn&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const{tabSize:o,indentSize:s,insertSpaces:r}=e.getOptions(),l=this.buildIndentConverter(o,s,r),h={tokenization:{getLineTokens:t=>e.tokenization.getLineTokens(t),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&1===e.getLineMaxColumn(n.startLineNumber)){const i=n.startLineNumber,o=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(o)?t.addEditOperation(new d.e(1,1,1,1),null):(t.addEditOperation(new d.e(i,1,i,1),e.getLineContent(o)),t.addEditOperation(new d.e(o,1,o,e.getLineMaxColumn(o)),null)),n=new g.Y(o,1,o,1)}else{let i,s;if(this._isMovingDown){i=n.endLineNumber+1,s=e.getLineContent(i),t.addEditOperation(new d.e(i-1,e.getLineMaxColumn(i-1),i,e.getLineMaxColumn(i)),null);let c=s;if(this.shouldAutoIndent(e,n)){const u=this.matchEnterRule(e,l,o,i,n.startLineNumber-1);if(null!==u){const t=a.V8(e.getLineContent(i)),n=u+b.Y(t,o),l=b.J(n,o,r);c=l+this.trimStart(s)}else{h.getLineContent=t=>t===n.startLineNumber?e.getLineContent(i):e.getLineContent(t);const t=(0,C.n8)(this._autoIndent,h,e.getLanguageIdAtPosition(i,1),n.startLineNumber,l,this._languageConfigurationService);if(null!==t){const n=a.V8(e.getLineContent(i)),l=b.Y(t,o);if(l!==b.Y(n,o)){const e=b.J(l,o,r);c=e+this.trimStart(s)}}}t.addEditOperation(new d.e(n.startLineNumber,1,n.startLineNumber,1),c+"\n");const g=this.matchEnterRuleMovingDown(e,l,o,n.startLineNumber,i,c);if(null!==g)0!==g&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,g);else{h.getLineContent=t=>t===n.startLineNumber?c:t>=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);const s=(0,C.n8)(this._autoIndent,h,e.getLanguageIdAtPosition(i,1),n.startLineNumber+1,l,this._languageConfigurationService);if(null!==s){const i=a.V8(e.getLineContent(n.startLineNumber)),l=b.Y(s,o),d=b.Y(i,o);if(l!==d){const i=l-d;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}else t.addEditOperation(new d.e(n.startLineNumber,1,n.startLineNumber,1),c+"\n")}else if(i=n.startLineNumber-1,s=e.getLineContent(i),t.addEditOperation(new d.e(i,1,i+1,1),null),t.addEditOperation(new d.e(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+s),this.shouldAutoIndent(e,n)){h.getLineContent=t=>t===i?e.getLineContent(n.startLineNumber):e.getLineContent(t);const s=this.matchEnterRule(e,l,o,n.startLineNumber,n.startLineNumber-2);if(null!==s)0!==s&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,s);else{const s=(0,C.n8)(this._autoIndent,h,e.getLanguageIdAtPosition(n.startLineNumber,1),i,l,this._languageConfigurationService);if(null!==s){const i=a.V8(e.getLineContent(n.startLineNumber)),l=b.Y(s,o),d=b.Y(i,o);if(l!==d){const i=l-d;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>f.U.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>f.U.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let s=o.indentation;o.indentAction===_.wU.None||o.indentAction===_.wU.Indent?s=o.indentation+o.appendText:o.indentAction===_.wU.IndentOutdent?s=o.indentation:o.indentAction===_.wU.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);const r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(s))>=0){const o=a.V8(e.getLineContent(n));let r=a.V8(s);const l=(0,C.tI)(e,n,this._languageConfigurationService);return null!==l&&2&l&&(r=t.unshiftIndent(r)),b.Y(r,i)-b.Y(o,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,o,s){if(a.ow(s)>=0){const s=e.getLineMaxColumn(o),r=(0,w.A)(this._autoIndent,e,new d.e(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let o=n-1;for(;o>=1;){const t=e.getLineContent(o);if(a.ow(t)>=0)break;o--}if(o<1||n>e.getLineCount())return null;const s=e.getLineMaxColumn(o),r=(0,w.A)(this._autoIndent,e,new d.e(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,o,s){let r=o;for(;r>=1;){let t;if(t=r===o&&void 0!==s?s:e.getLineContent(r),a.ow(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(r),h=(0,w.A)(this._autoIndent,e,new d.e(r,l,r,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,h)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,o,s){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){const l=e.getLineContent(r),h=a.V8(l),c=b.Y(h,n)+s,u=b.J(c,n,o);u!==h&&(t.addEditOperation(new d.e(r,1,r,h.length+1),u),r===i.endLineNumber&&i.endColumn<=h.length+1&&""===u&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}};var S,L;y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(S=3,L=v.c_,function(e,t){L(e,t,S)})],y);class x{static getCollator(){return x._COLLATOR||(x._COLLATOR=new Intl.Collator),x._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){const i=function(e,t,i){const n=k(e,t,i);return n?l.h.replace(new d.e(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;const n=k(e,t,i);if(!n)return!1;for(let e=0,t=n.before.length;e<t;e++)if(n.before[e]!==n.after[e])return!0;return!1}}function k(e,t,i){const n=t.startLineNumber;let o=t.endLineNumber;if(1===t.endColumn&&o--,n>=o)return null;const s=[];for(let t=n;t<=o;t++)s.push(e.getLineContent(t));let r=s.slice(0);return r.sort(x.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:o,before:s,after:r}}x._COLLATOR=null;var N=i(63580),D=i(84144);class E extends s.R6{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>d.e.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let e=1;e<i.length;e++){const t=i[e];n.selection.endLineNumber===t.selection.startLineNumber&&(n.index<t.index?t.ignore=!0:(n.ignore=!0,n=t))}const o=[];for(const e of i)o.push(new m(e.selection,this.down,e.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class I extends s.R6{constructor(){super({id:"editor.action.duplicateSelection",label:N.NC("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:p.u.writable,menuOpts:{menuId:D.eH.MenubarSelectionMenu,group:"2_line",title:N.NC({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],o=t.getSelections(),s=t.getModel();for(const e of o)if(e.isEmpty())n.push(new m(e,!0));else{const t=new g.Y(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn);n.push(new r.OY(t,s.getValueInRange(e)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class T extends s.R6{constructor(e,t){super(t),this.down=e}run(e,t){const i=e.get(v.c_),n=[],o=t.getSelections()||[],s=t.getOption(11);for(const e of o)n.push(new y(e,this.down,s,i));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class M extends s.R6{constructor(e,t){super(t),this.descending=e}run(e,t){const i=t.getSelections()||[];for(const e of i)if(!x.canRun(t.getModel(),e,this.descending))return;const n=[];for(let e=0,t=i.length;e<t;e++)n[e]=new x(i[e],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class R extends s.R6{constructor(){super({id:"editor.action.removeDuplicateLines",label:N.NC("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:p.u.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;const n=[],o=[];let s=0;for(const e of t.getSelections()){const t=new Set,r=[];for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const e=i.getLineContent(n);t.has(e)||(r.push(e),t.add(e))}const a=new g.Y(e.startLineNumber,1,e.endLineNumber,i.getLineMaxColumn(e.endLineNumber)),d=e.startLineNumber-s,h=new g.Y(d,1,d+r.length-1,r[r.length-1].length);n.push(l.h.replace(a,r.join("\n"))),o.push(h),s+=e.endLineNumber-e.startLineNumber+1-r.length}t.pushUndoStop(),t.executeEdits(this.id,n,o),t.pushUndoStop()}}class A extends s.R6{constructor(){super({id:A.ID,label:N.NC("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:(0,n.gx)(2089,2102),weight:100}})}run(e,t,i){let n=[];"auto-save"===i.reason&&(n=(t.getSelections()||[]).map((e=>new u.L(e.positionLineNumber,e.positionColumn))));const o=t.getSelection();if(null===o)return;const s=new h(o,n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}}A.ID="editor.action.trimTrailingWhitespace";class O extends s.R6{constructor(){super({id:"editor.action.deleteLines",label:N.NC("lines.delete","Delete Line"),alias:"Delete Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0;const s=[],r=[];for(let e=0,t=i.length;e<t;e++){const t=i[e];let a=t.startLineNumber,d=t.endLineNumber,h=1,c=n.getLineMaxColumn(d);d<n.getLineCount()?(d+=1,c=1):a>1&&(a-=1,h=n.getLineMaxColumn(a)),s.push(l.h.replace(new g.Y(a,h,d,c),"")),r.push(new g.Y(a-o,t.positionColumn,a-o,t.positionColumn)),o+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumber<e.endLineNumber&&1===e.endColumn&&(t-=1),{startLineNumber:e.startLineNumber,selectionStartColumn:e.selectionStartColumn,endLineNumber:t,positionColumn:e.positionColumn}}));t.sort(((e,t)=>e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));const i=[];let n=t[0];for(let e=1;e<t.length;e++)n.endLineNumber+1>=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class P extends s.R6{constructor(){super({id:"editor.action.indentLines",label:N.NC("lines.indent","Indent Line"),alias:"Indent Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,c.u6.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class F extends s.R6{constructor(){super({id:"editor.action.outdentLines",label:N.NC("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2140,weight:100}})}run(e,t){o.wk.Outdent.runEditorCommand(e,t,null)}}class B extends s.R6{constructor(){super({id:"editor.action.insertLineBefore",label:N.NC("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,c.u6.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class W extends s.R6{constructor(){super({id:"editor.action.insertLineAfter",label:N.NC("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,c.u6.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class V extends s.R6{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),o=[];for(let e=0,t=n.length-1;e<t;e++){const t=n[e],i=n[e+1];null===d.e.intersectRanges(t,i)?o.push(t):n[e+1]=d.e.plusRange(t,i)}o.push(n[n.length-1]);const s=this._getEndCursorState(i,o),r=o.map((e=>l.h.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}}class H extends s.R6{constructor(){super({id:"editor.action.joinLines",label:N.NC("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(d.e.compareRangesUsingStarts);const o=[],s=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new g.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new g.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));o.push(s);const r=t.getModel();if(null===r)return;const a=[],h=[];let c=n,u=0;for(let e=0,t=o.length;e<t;e++){const t=o[e],i=t.startLineNumber,s=1;let p,m,f=0;const _=r.getLineContent(t.endLineNumber).length-t.endColumn;if(t.isEmpty()||t.startLineNumber===t.endLineNumber){const e=t.getStartPosition();e.lineNumber<r.getLineCount()?(p=i+1,m=r.getLineMaxColumn(p)):(p=e.lineNumber,m=r.getLineMaxColumn(e.lineNumber))}else p=t.endLineNumber,m=r.getLineMaxColumn(p);let v=r.getLineContent(i);for(let e=i+1;e<=p;e++){const t=r.getLineContent(e),i=r.getLineFirstNonWhitespaceColumn(e);if(i>=1){let e=!0;""===v&&(e=!1),!e||" "!==v.charAt(v.length-1)&&"\t"!==v.charAt(v.length-1)||(e=!1,v=v.replace(/[\s\uFEFF\xA0]+$/g," "));const n=t.substr(i-1);v+=(e?" ":"")+n,f=e?n.length+1:n.length}else f=0}const b=new d.e(i,s,p,m);if(!b.isEmpty()){let e;t.isEmpty()?(a.push(l.h.replace(b,v)),e=new g.Y(b.startLineNumber-u,v.length-f+1,i-u,v.length-f+1)):t.startLineNumber===t.endLineNumber?(a.push(l.h.replace(b,v)),e=new g.Y(t.startLineNumber-u,t.startColumn,t.endLineNumber-u,t.endColumn)):(a.push(l.h.replace(b,v)),e=new g.Y(t.startLineNumber-u,t.startColumn,t.startLineNumber-u,v.length-_)),null!==d.e.intersectRanges(b,n)?c=e:h.push(e)}u+=b.endLineNumber-b.startLineNumber}h.unshift(c),t.pushUndoStop(),t.executeEdits(this.id,a,h),t.pushUndoStop()}}class z extends s.R6{constructor(){super({id:"editor.action.transpose",label:N.NC("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:p.u.writable})}run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=[];for(let e=0,t=i.length;e<t;e++){const t=i[e];if(!t.isEmpty())continue;const s=t.getStartPosition(),a=n.getLineMaxColumn(s.lineNumber);if(s.column>=a){if(s.lineNumber===n.getLineCount())continue;const e=new d.e(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new r.T4(new g.Y(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t))}else{const e=new d.e(s.lineNumber,Math.max(1,s.column-1),s.lineNumber,s.column+1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new r.hP(e,t,new g.Y(s.lineNumber,s.column+1,s.lineNumber,s.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class K extends s.R6{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=t.getOption(128),s=[];for(const e of i)if(e.isEmpty()){const i=e.getStartPosition(),r=t.getConfiguredWordAtPosition(i);if(!r)continue;const a=new d.e(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),h=n.getValueInRange(a);s.push(l.h.replace(a,this._modifyText(h,o)))}else{const t=n.getValueInRange(e);s.push(l.h.replace(e,this._modifyText(t,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}}class U{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class j extends K{constructor(){super({id:"editor.action.transformToTitlecase",label:N.NC("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:p.u.writable})}_modifyText(e,t){const i=j.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}j.titleBoundary=new U("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class $ extends K{constructor(){super({id:"editor.action.transformToSnakecase",label:N.NC("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:p.u.writable})}_modifyText(e,t){const i=$.caseBoundary.get(),n=$.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}$.caseBoundary=new U("(\\p{Ll})(\\p{Lu})","gmu"),$.singleLetters=new U("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class q extends K{constructor(){super({id:"editor.action.transformToCamelcase",label:N.NC("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:p.u.writable})}_modifyText(e,t){const i=q.wordBoundary.get();if(!i)return e;const n=e.split(i);return n.shift()+n.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}q.wordBoundary=new U("[_\\s-]","gm");class Z extends K{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every((e=>e.isSupported()))}constructor(){super({id:"editor.action.transformToKebabcase",label:N.NC("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:p.u.writable})}_modifyText(e,t){const i=Z.caseBoundary.get(),n=Z.singleLetters.get(),o=Z.underscoreBoundary.get();return i&&n&&o?e.replace(o,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}Z.caseBoundary=new U("(\\p{Ll})(\\p{Lu})","gmu"),Z.singleLetters=new U("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),Z.underscoreBoundary=new U("(\\S)(_)(\\S)","gm"),(0,s.Qr)(class extends E{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:N.NC("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:D.eH.MenubarSelectionMenu,group:"2_line",title:N.NC({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),(0,s.Qr)(class extends E{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:N.NC("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:D.eH.MenubarSelectionMenu,group:"2_line",title:N.NC({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),(0,s.Qr)(I),(0,s.Qr)(class extends T{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:N.NC("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:D.eH.MenubarSelectionMenu,group:"2_line",title:N.NC({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),(0,s.Qr)(class extends T{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:N.NC("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:D.eH.MenubarSelectionMenu,group:"2_line",title:N.NC({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),(0,s.Qr)(class extends M{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:N.NC("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:p.u.writable})}}),(0,s.Qr)(class extends M{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:N.NC("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:p.u.writable})}}),(0,s.Qr)(R),(0,s.Qr)(A),(0,s.Qr)(O),(0,s.Qr)(P),(0,s.Qr)(F),(0,s.Qr)(B),(0,s.Qr)(W),(0,s.Qr)(class extends V{constructor(){super({id:"deleteAllLeft",label:N.NC("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let o=0;return t.forEach((t=>{let s;if(1===t.endColumn&&o>0){const e=t.startLineNumber-o;s=new g.Y(e,t.startColumn,e,t.startColumn)}else s=new g.Y(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=s:n.push(s)})),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(null===t)return[];let i=t;const n=e.getModel();return null===n?[]:(i.sort(d.e.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){const t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new d.e(t,i,e.startLineNumber,1)}return new d.e(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new d.e(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}),(0,s.Qr)(class extends V{constructor(){super({id:"deleteAllRight",label:N.NC("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let o=0,s=t.length,r=0;o<s;o++){const s=t[o],a=new g.Y(s.startLineNumber-r,s.startColumn,s.startLineNumber-r,s.startColumn);s.intersectRanges(e)?i=a:n.push(a)}return i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getModel();if(null===t)return[];const i=e.getSelections();if(null===i)return[];const n=i.map((e=>{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new d.e(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new d.e(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(d.e.compareRangesUsingStarts),n}}),(0,s.Qr)(H),(0,s.Qr)(z),(0,s.Qr)(class extends K{constructor(){super({id:"editor.action.transformToUppercase",label:N.NC("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:p.u.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}),(0,s.Qr)(class extends K{constructor(){super({id:"editor.action.transformToLowercase",label:N.NC("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:p.u.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}),$.caseBoundary.isSupported()&&$.singleLetters.isSupported()&&(0,s.Qr)($),q.wordBoundary.isSupported()&&(0,s.Qr)(q),j.titleBoundary.isSupported()&&(0,s.Qr)(j),Z.isSupported()&&(0,s.Qr)(Z)},52293:(e,t,i)=>{var n=i(9488),o=i(15393),s=i(71050),r=i(41264),a=i(17301),l=i(4669),d=i(5976),h=i(97295),c=i(70666),u=i(16830),g=i(17122),p=i(50187),m=i(24314),f=i(29102),_=i(13961),v=i(51381),b=i(63580),C=i(93983),w=i(71922),y=i(73910),S=i(88191),L=i(84013),x=i(93379),k=i.n(x),N=i(7795),D=i.n(N),E=i(90569),I=i.n(E),T=i(3565),M=i.n(T),R=i(19216),A=i.n(R),O=i(44589),P=i.n(O),F=i(55040),B={};B.styleTagTransform=P(),B.setAttributes=M(),B.insert=I().bind(null,"head"),B.domAPI=D(),B.insertStyleElement=A(),k()(F.Z,B),F.Z&&F.Z.locals&&F.Z.locals;var W,V=function(e,t){return function(i,n){t(i,n,e)}},H=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const z=new C.uy("LinkedEditingInputVisible",!1);let K=W=class extends d.JT{static get(e){return e.getContribution(W.ID)}constructor(e,t,i,n,o){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new d.SL),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=z.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new d.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((e=>{(e.hasChanged(68)||e.hasChanged(91))&&this.reinitialize(!1)}))),this._register(this._providers.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(68)||this._editor.getOption(91))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(l.ju.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new o.vp(this._debounceInformation.get(t)),s=()=>{var e;this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),null!==(e=this._debounceDuration)&&void 0!==e?e:this._debounceInformation.get(t))},r=new o.vp(0),a=e=>{this._rangeSyncTriggerPromise=r.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{s()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const t=this._currentDecorations.getRange(0);if(t&&e.changes.every((e=>t.intersectRanges(e.range))))return void a(this._syncRangesToken)}s()}))),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}const o=[];for(let e=1,i=this._currentDecorations.length;e<i;e++){const i=this._currentDecorations.getRange(e);if(i)if(i.startLineNumber!==i.endLineNumber)o.push({range:i,text:n});else{let e=t.getValueInRange(i),s=n,r=i.startColumn,a=i.endColumn;const l=h.Mh(e,s);r+=l,e=e.substr(l),s=s.substr(l);const d=h.P1(e,s);a-=d,e=e.substr(0,e.length-d),s=s.substr(0,s.length-d),r===a&&0===s.length||o.push({range:new m.e(i.startLineNumber,r,i.endLineNumber,a),text:s})}}if(0!==o.length)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const e=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(e)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(e=!1){return H(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return void this.clearRanges();const t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1)return void this.clearRanges();const i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=n;const s=(0,o.PG)((e=>H(this,void 0,void 0,(function*(){try{const o=new L.G(!1),r=yield $(this._providers,i,t,e);if(this._debounceInformation.update(i,o.elapsed()),s!==this._currentRequest)return;if(this._currentRequest=null,n!==i.getVersionId())return;let a=[];(null==r?void 0:r.ranges)&&(a=r.ranges),this._currentWordPattern=(null==r?void 0:r.wordPattern)||this._languageWordPattern;let l=!1;for(let e=0,i=a.length;e<i;e++)if(m.e.containsPosition(a[e],t)){if(l=!0,0!==e){const t=a[e];a.splice(e,1),a.unshift(t)}break}if(!l)return void this.clearRanges();const d=a.map((e=>({range:e,options:W.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations.set(d),this._syncRangesToken++}catch(e){(0,a.n2)(e)||(0,a.dL)(e),this._currentRequest!==s&&this._currentRequest||this.clearRanges()}}))));return this._currentRequest=s,s}))}};K.ID="editor.contrib.linkedEditing",K.DECORATION=_.qx.register({description:"linked-editing",stickiness:0,className:"linked-editing-decoration"}),K=W=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([V(1,C.i6),V(2,w.p),V(3,v.c_),V(4,S.A)],K);class U extends u.R6{constructor(){super({id:"editor.action.linkedEditing",label:b.NC("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:C.Ao.and(f.u.writable,f.u.hasRenameProvider),kbOpts:{kbExpr:f.u.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(g.$),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return c.o.isUri(n)&&p.L.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),a.dL):super.runCommand(e,t)}run(e,t){const i=K.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const j=u._l.bindToContribution(K.get);function $(e,t,i,s){const r=e.ordered(t);return(0,o.Ps)(r.map((e=>()=>H(this,void 0,void 0,(function*(){try{return yield e.provideLinkedEditingRanges(t,i,s)}catch(e){return void(0,a.Cp)(e)}})))),(e=>!!e&&n.Of(null==e?void 0:e.ranges)))}(0,u.fK)(new j({id:"cancelLinkedEditingInput",precondition:z,handler:e=>e.clearRanges(),kbOpts:{kbExpr:f.u.editorTextFocus,weight:199,primary:9,secondary:[1033]}})),(0,y.P6G)("editor.linkedEditingBackground",{dark:r.Il.fromHex("#f00").transparent(.3),light:r.Il.fromHex("#f00").transparent(.3),hcDark:r.Il.fromHex("#f00").transparent(.3),hcLight:r.Il.white},b.NC("editorLinkedEditingBackground","Background color when the editor auto renames on type.")),(0,u.sb)("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(w.p);return $(n,t,i,s.T.None)})),(0,u._K)(K.ID,K,1),(0,u.Qr)(U)},34540:(e,t,i)=>{var n=i(15393),o=i(71050),s=i(17301),r=i(59365),a=i(5976),l=i(66663),d=i(1432),h=i(95935),c=i(84013),u=i(70666),g=i(93379),p=i.n(g),m=i(7795),f=i.n(m),_=i(90569),v=i.n(_),b=i(3565),C=i.n(b),w=i(19216),y=i.n(w),S=i(44589),L=i.n(S),x=i(28477),k={};k.styleTagTransform=L(),k.setAttributes=C(),k.insert=v().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=y(),p()(x.Z,k),x.Z&&x.Z.locals&&x.Z.locals;var N=i(16830),D=i(13961),E=i(88191),I=i(71922),T=i(82005),M=i(9488),R=i(98401),A=i(24314),O=i(73733),P=i(94565),F=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class B{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return F(this,void 0,void 0,(function*(){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}))}}class W{constructor(e){this._disposables=new a.SL;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new B(e,n)));t=W._union(t,e),(0,a.Wf)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,o,s,r;for(n=0,s=0,o=e.length,r=t.length;n<o&&s<r;){const o=e[n],r=t[s];A.e.areIntersectingOrTouching(o.range,r.range)?n++:A.e.compareRangesUsingStarts(o.range,r.range)<0?(i.push(o),n++):(i.push(r),s++)}for(;n<o;n++)i.push(e[n]);for(;s<r;s++)i.push(t[s]);return i}}function V(e,t,i){const n=[],o=e.ordered(t).reverse().map(((e,o)=>Promise.resolve(e.provideLinks(t,i)).then((t=>{t&&(n[o]=[t,e])}),s.Cp)));return Promise.all(o).then((()=>{const e=new W((0,M.kX)(n));return i.isCancellationRequested?(e.dispose(),new W([])):e}))}P.P.registerCommand("_executeLinkProvider",((e,...t)=>F(void 0,void 0,void 0,(function*(){let[i,n]=t;(0,R.p_)(i instanceof u.o),"number"!=typeof n&&(n=0);const{linkProvider:s}=e.get(I.p),r=e.get(O.q).getModel(i);if(!r)return[];const a=yield V(s,r,o.T.None);if(!a)return[];for(let e=0;e<Math.min(n,a.links.length);e++)yield a.links[e].resolve(o.T.None);const l=a.links.slice(0);return a.dispose(),l}))));var H,z=i(63580),K=i(59422),U=i(50988),j=function(e,t){return function(i,n){t(i,n,e)}};let $=H=class extends a.JT{static get(e){return e.getContribution(H.ID)}constructor(e,t,i,o,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=o,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new n.pY((()=>this.computeLinksNow()),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new T.yN(e));this._register(r.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this._register(r.onExecute((e=>{this.onEditorMouseUp(e)}))),this._register(r.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(69)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))}))),this._register(e.onDidChangeModelContent((e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))}))),this._register(e.onDidChangeModel((e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)}))),this._register(e.onDidChangeModelLanguage((e=>{this.stop(),this.computeLinks.schedule(0)}))),this._register(this.providers.onDidChange((e=>{this.stop(),this.computeLinks.schedule(0)}))),this.computeLinks.schedule(0)}computeLinksNow(){return e=this,t=void 0,o=function*(){if(!this.editor.hasModel()||!this.editor.getOption(69))return;const e=this.editor.getModel();if(this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,n.PG)((t=>V(this.providers,e,t)));try{const t=new c.G(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(e){(0,s.dL)(e)}finally{this.computePromise=null}}},new((i=void 0)||(i=Promise))((function(n,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((o=o.apply(e,t||[])).next())}));var e,t,i,o}updateDecorations(e){const t="altKey"===this.editor.getOption(76),i=[],n=Object.keys(this.currentOccurrences);for(const e of n){const t=this.currentOccurrences[e];i.push(t.decorationId)}const o=[];if(e)for(const i of e)o.push(Z.decoration(i,t));this.editor.changeDecorations((t=>{const n=t.deltaDecorations(i,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=n.length;t<i;t++){const i=new Z(e[t],n[t]);this.currentOccurrences[i.decorationId]=i}}))}_onEditorMouseMove(e,t){const i="altKey"===this.editor.getOption(76);if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();const t=this.getLinkOccurrence(e.target.position);t&&this.editor.changeDecorations((e=>{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(76);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(o.T.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===l.lg.file&&e.startsWith(`${l.lg.file}:`)){const i=u.o.parse(e);if(i.scheme===l.lg.file){const n=h.z_(i);let o=null;n.startsWith("/./")?o=`.${n.substr(1)}`:n.startsWith("//./")&&(o=`.${n.substr(2)}`),o&&(e=h.Vo(t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(z.NC("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(z.NC("missing.url","Failed to open this link because its target is missing.")):(0,s.dL)(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};$.ID="editor.linkDetector",$=H=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([j(1,U.v4),j(2,K.lT),j(3,I.p),j(4,E.A)],$);const q={general:D.qx.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:D.qx.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class Z{static decoration(e,t){return{range:e.range,options:Z._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n=Object.assign({},i?q.active:q.general);return n.hoverMessage=function(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?z.NC("links.navigate.executeCmd","Execute command"):z.NC("links.navigate.follow","Follow link"),o=t?d.dz?z.NC("links.navigate.kb.meta.mac","cmd + click"):z.NC("links.navigate.kb.meta","ctrl + click"):d.dz?z.NC("links.navigate.kb.alt.mac","option + click"):z.NC("links.navigate.kb.alt","alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){const e=i[1];t=z.NC("tooltip.explanation","Execute command {0}",e)}}return new r.W5("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${o})`)}return(new r.W5).appendText(`${n} (${o})`)}(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,Z._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,Z._getOptions(this.link,t,!1))}}class G extends N.R6{constructor(){super({id:"editor.action.openLink",label:z.NC("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=$.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const e of n){const t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,N._K)($.ID,$,1),(0,N.Qr)(G)},93519:(e,t,i)=>{var n=i(5976),o=i(16830);class s extends n.JT{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown((e=>{const t=this._editor.getOption(115);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})})))}}s.ID="editor.contrib.longLinesHelper",(0,o._K)(s.ID,s,2)},18806:(e,t,i)=>{i.d(t,{$:()=>I,N:()=>T});var n=i(77352),o=i(77514),s=i(17301),r=i(4669),a=i(5976),l=i(93379),d=i.n(l),h=i(7795),c=i.n(h),u=i(90569),g=i.n(u),p=i(3565),m=i.n(p),f=i(19216),_=i.n(f),v=i(44589),b=i.n(v),C=i(81615),w={};w.styleTagTransform=b(),w.setAttributes=m(),w.insert=g().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=_(),d()(C.Z,w),C.Z&&C.Z.locals&&C.Z.locals;var y,S=i(52136),L=i(72042),x=i(68801),k=i(82963),N=i(50988),D=function(e,t){return function(i,n){t(i,n,e)}},E=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let I=y=class{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new r.Q5,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const o=new a.SL,s=o.add((0,n.ap)(e,Object.assign(Object.assign({},this._getRenderOptions(e,o)),t),i));return s.element.classList.add("rendered-markdown"),{element:s.element,dispose:()=>o.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(e,t)=>E(this,void 0,void 0,(function*(){var i,n,o;let s;e?s=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(s=null===(i=this._options.editor.getModel())||void 0===i?void 0:i.getLanguageId()),s||(s=x.bd);const r=yield(0,k.C2)(this._languageService,t,s),a=document.createElement("span");if(a.innerHTML=null!==(o=null===(n=y._ttpTokenizer)||void 0===n?void 0:n.createHTML(r))&&void 0!==o?o:r,this._options.editor){const e=this._options.editor.getOption(49);(0,S.N)(a,e)}else this._options.codeBlockFontFamily&&(a.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(a.style.fontSize=this._options.codeBlockFontSize),a})),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:t=>T(this._openerService,t,e.isTrusted),disposables:t}}}};function T(e,t,i){return E(this,void 0,void 0,(function*(){try{return yield e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:M(i)})}catch(e){return(0,s.dL)(e),!1}}))}function M(e){return!0===e||!(!e||!Array.isArray(e.enabledCommands))&&e.enabledCommands}I._ttpTokenizer=(0,o.Z)("tokenizeToString",{createHTML:e=>e}),I=y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([D(1,L.O),D(2,N.v4)],I)},39310:(e,t,i)=>{i.d(t,{O:()=>T});var n=i(77352),o=i(56346),s=i(4669),r=i(59365),a=i(5976),l=i(93379),d=i.n(l),h=i(7795),c=i.n(h),u=i(90569),g=i.n(u),p=i(3565),m=i.n(p),f=i(19216),_=i.n(f),v=i(44589),b=i.n(v),C=i(65807),w={};w.styleTagTransform=b(),w.setAttributes=m(),w.insert=g().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=_(),d()(C.Z,w),C.Z&&C.Z.locals&&C.Z.locals;var y,S=i(16830),L=i(24314),x=i(18806),k=i(63580),N=i(93983),D=i(50988),E=i(65321),I=function(e,t){return function(i,n){t(i,n,e)}};let T=y=class{static get(e){return e.getContribution(y.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new a.XK,this._messageListeners=new a.SL,this._mouseOverMessage=!1,this._editor=e,this._visible=y.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;null===(e=this._message)||void 0===e||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;(0,o.Z9)((0,r.Fr)(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=(0,r.Fr)(e)?(0,n.ap)(e,{actionHandler:{callback:t=>(0,x.N)(this._openerService,t,(0,r.Fr)(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new R(this._editor,t,"string"==typeof e?e:this._message.element),this._messageListeners.add(s.ju.debounce(this._editor.onDidBlurEditorText,((e,t)=>t),0)((()=>{this._mouseOverMessage||this._messageWidget.value&&E.jg(document.activeElement,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(E.nm(this._messageWidget.value.getDomNode(),E.tw.MOUSE_ENTER,(()=>this._mouseOverMessage=!0),!0)),this._messageListeners.add(E.nm(this._messageWidget.value.getDomNode(),E.tw.MOUSE_LEAVE,(()=>this._mouseOverMessage=!1),!0)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new L.e(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(R.fadeOut(this._messageWidget.value))}};T.ID="editor.contrib.messageController",T.MESSAGE_VISIBLE=new N.uy("messageVisible",!1,k.NC("messageVisible","Whether the editor is currently showing an inline message")),T=y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([I(1,N.i6),I(2,D.v4)],T);const M=S._l.bindToContribution(T.get);(0,S.fK)(new M({id:"leaveEditorMessage",precondition:T.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class R{static fadeOut(e){const 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},n){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";const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const s=document.createElement("div");"string"==typeof n?(s.classList.add("message"),s.textContent=n):(n.classList.add("message"),s.appendChild(n)),this._domNode.appendChild(s);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),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",2===e)}}(0,S._K)(T.ID,T,4)},77061:(e,t,i)=>{var n,o=i(56346),s=i(15393),r=i(22258),a=i(5976),l=i(16830),d=i(28108),h=i(24314),c=i(3860),u=i(29102),g=i(96962),p=i(63580),m=i(84144),f=i(93983),_=i(71922),v=i(45550),b=i(72065);function C(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", "),t=1===i.length?p.NC("cursorAdded","Cursor added: {0}",e):p.NC("cursorsAdded","Cursors added: {0}",e);(0,o.i7)(t)}}class w extends l.R6{constructor(){super({id:"editor.action.insertCursorAbove",label:p.NC("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:u.u.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,d.P.addCursorUp(o,s,n)),o.revealTopMostCursor(i.source),C(s,o.getCursorStates())}}class y extends l.R6{constructor(){super({id:"editor.action.insertCursorBelow",label:p.NC("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:u.u.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,d.P.addCursorDown(o,s,n)),o.revealBottomMostCursor(i.source),C(s,o.getCursorStates())}}class S extends l.R6{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:p.NC("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:u.u.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n<e.endLineNumber;n++){const e=t.getLineMaxColumn(n);i.push(new c.Y(n,e,n,e))}e.endColumn>1&&i.push(new c.Y(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),r=[];n.forEach((e=>this.getCursorsForSelection(e,i,r))),r.length>0&&t.setSelections(r),C(s,o.getCursorStates())}}class L extends l.R6{constructor(){super({id:"editor.action.addCursorsToBottom",label:p.NC("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),o=[];for(let e=i[0].startLineNumber;e<=n;e++)o.push(new c.Y(e,i[0].startColumn,e,i[0].endColumn));const s=t._getViewModel(),r=s.getCursorStates();o.length>0&&t.setSelections(o),C(r,s.getCursorStates())}}class x extends l.R6{constructor(){super({id:"editor.action.addCursorsToTop",label:p.NC("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new c.Y(e,i[0].startColumn,e,i[0].endColumn));const o=t._getViewModel(),s=o.getCursorStates();n.length>0&&t.setSelections(n),C(s,o.getCursorStates())}}class k{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class N{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new N(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,o,s=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(s=!0,n=!0,o=!0):(n=i.wholeWord,o=i.matchCase);const a=e.getSelection();let l,d=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,d=new c.Y(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new N(e,t,s,l,n,o,d)}constructor(e,t,i,n,o,s,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=o,this.matchCase=s,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new k(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new k(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1);return i?new c.Y(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new k(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new k(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1);return i?new c.Y(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1,1073741824)}}class D extends a.JT{static get(e){return e.getContribution(D.ID)}constructor(e){super(),this._sessionDispose=this._register(new a.SL),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=N.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new c.Y(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!M(this._editor.getModel(),t,i)){const e=this._editor.getModel(),i=[];for(let n=0,o=t.length;n<o;n++)i[n]=this._expandEmptyToWord(e,t[n]);return void this._editor.setSelections(i)}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null;const i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex){const e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(128):null,!1,1073741824):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(128):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;i<n;i++){const n=t[i];if(n.range.intersectRanges(e)){t[i]=t[0],t[0]=n;break}}this._setSelections(t.map((e=>new c.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}D.ID="editor.contrib.multiCursorController";class E extends l.R6{run(e,t){const i=D.get(t);if(!i)return;const n=t._getViewModel();if(n){const o=n.getCursorStates(),s=g.pR.get(t);if(s)this._run(i,s);else{const n=e.get(b.TG).createInstance(g.pR,t);this._run(i,n),n.dispose()}C(o,n.getCursorStates())}}}class I{constructor(e,t,i,n,o){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map((e=>e.range)),this._cachedFindMatches.sort(h.e.compareRangesUsingStarts)),this._cachedFindMatches}}let T=n=class extends a.JT{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(106),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new s.pY((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(106)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()})));const i=g.pR.get(e);i&&this._register(i.getState().onFindReplaceStateChange((e=>{this._update()}))),this.updateSoon.schedule()}_update(){this._setState(n._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t)return null;if(!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const o=D.get(i);if(!o)return null;const s=g.pR.get(i);if(!s)return null;let r=o.getSession(s);if(!r){const e=i.getSelections();if(e.length>1){const t=s.getState().matchCase;if(!M(i.getModel(),e,t))return null}r=N.create(i,s)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const a=s.getState(),l=a.matchCase;if(a.isRevealed){let e=a.searchString;l||(e=e.toLowerCase());let t=r.searchText;if(l||(t=t.toLowerCase()),e===t&&r.matchCase===a.matchCase&&r.wholeWord===a.wholeWord&&!a.isRegex)return null}return new I(i.getModel(),r.searchText,r.matchCase,r.wholeWord?i.getOption(128):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(h.e.compareRangesUsingStarts);const o=[];for(let e=0,t=0,s=i.length,r=n.length;e<s;){const s=i[e];if(t>=r)o.push(s),e++;else{const i=h.e.compareRangesUsingStarts(s,n[t]);i<0?(!n[t].isEmpty()&&h.e.areIntersecting(s,n[t])||o.push(s),e++):(i>0||e++,t++)}}const s=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(79),r=o.map((e=>({range:e,options:(0,v.w)(s)})));this._decorations.set(r)}dispose(){this._setState(null),super.dispose()}};function M(e,t,i){const n=R(e,t[0],!i);for(let o=1,s=t.length;o<s;o++){const s=t[o];if(s.isEmpty())return!1;if(n!==R(e,s,!i))return!1}return!0}function R(e,t,i){const n=e.getValueInRange(t);return i?n.toLowerCase():n}var A,O;T.ID="editor.contrib.selectionHighlighter",T=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(A=1,O=_.p,function(e,t){O(e,t,A)})],T);class P extends l.R6{constructor(){super({id:"editor.action.focusNextCursor",label:p.NC("mutlicursor.focusNextCursor","Focus Next Cursor"),description:{description:p.NC("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const o=Array.from(n.getCursorStates()),s=o.shift();s&&(o.push(s),n.setCursorStates(i.source,3,o),n.revealPrimaryCursor(i.source,!0),C(o,n.getCursorStates()))}}class F extends l.R6{constructor(){super({id:"editor.action.focusPreviousCursor",label:p.NC("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),description:{description:p.NC("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const o=Array.from(n.getCursorStates()),s=o.pop();s&&(o.unshift(s),n.setCursorStates(i.source,3,o),n.revealPrimaryCursor(i.source,!0),C(o,n.getCursorStates()))}}(0,l._K)(D.ID,D,4),(0,l._K)(T.ID,T,1),(0,l.Qr)(w),(0,l.Qr)(y),(0,l.Qr)(S),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:p.NC("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:2082,weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:p.NC("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:p.NC("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:(0,r.gx)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:p.NC("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.selectHighlights",label:p.NC("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:3114,weight:100},menuOpts:{menuId:m.eH.MenubarSelectionMenu,group:"3_multi",title:p.NC({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}),(0,l.Qr)(class extends E{constructor(){super({id:"editor.action.changeAll",label:p.NC("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:f.Ao.and(u.u.writable,u.u.editorTextFocus),kbOpts:{kbExpr:u.u.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}),(0,l.Qr)(L),(0,l.Qr)(x),(0,l.Qr)(P),(0,l.Qr)(F)},55584:(e,t,i)=>{var n=i(79579),o=i(5976),s=i(16830),r=i(29102),a=i(96887),l=i(71922),d=i(15393),h=i(17301),c=i(4669),u=i(44906),g=i(71050),p=i(98401),m=i(70666),f=i(50187),_=i(88216),v=i(94565),b=i(93983),C=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const w={Visible:new b.uy("parameterHintsVisible",!1),MultipleSignatures:new b.uy("parameterHintsMultipleSignatures",!1)};function y(e,t,i,n,o){return C(this,void 0,void 0,(function*(){const s=e.ordered(t);for(const e of s)try{const s=yield e.provideSignatureHelp(t,i,o,n);if(s)return s}catch(e){(0,h.Cp)(e)}}))}v.P.registerCommand("_executeSignatureHelpProvider",((e,...t)=>C(void 0,void 0,void 0,(function*(){const[i,n,o]=t;(0,p.p_)(m.o.isUri(i)),(0,p.p_)(f.L.isIPosition(n)),(0,p.p_)("string"==typeof o||!o);const s=e.get(l.p),r=yield e.get(_.S).createModelReference(i);try{const e=yield y(s.signatureHelpProvider,r.object.textEditorModel,f.L.lift(n),{triggerKind:a.WW.Invoke,isRetrigger:!1,triggerCharacter:o},g.T.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}}))));var S;!function(e){e.Default={type:0},e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}},e.Active=class{constructor(e){this.hints=e,this.type=1}}}(S||(S={}));class L extends o.JT{constructor(e,t,i=L.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new c.Q5),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=S.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new o.XK),this.triggerChars=new u.q,this.retriggerChars=new u.q,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new d.vp(i),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=S.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(h.dL)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(84).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(84).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new S.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return t=this,i=void 0,o=function*(){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(x);this._pendingTriggers=[];const o={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const s=this.editor.getModel(),r=this.editor.getPosition();this.state=new S.Pending((0,d.PG)((e=>y(this.providers,s,r,o,e))),i);try{const t=yield this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new S.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=S.Default),(0,h.dL)(t),!1}},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])if(e.length){const t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(const e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:a.WW.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:a.WW.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:a.WW.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(84).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function x(e,t){switch(t.triggerKind){case a.WW.Invoke:return t;case a.WW.ContentChange:return e;case a.WW.TriggerCharacter:default:return t}}L.DEFAULT_DELAY=120;var k=i(63580),N=i(72065),D=i(65321),E=i(56346),I=i(64117),T=i(73046),M=i(97295),R=i(93379),A=i.n(R),O=i(7795),P=i.n(O),F=i(90569),B=i.n(F),W=i(3565),V=i.n(W),H=i(19216),z=i.n(H),K=i(44589),U=i.n(K),j=i(81386),$={};$.styleTagTransform=U(),$.setAttributes=V(),$.insert=B().bind(null,"head"),$.domAPI=P(),$.insertStyleElement=z(),A()(j.Z,$),j.Z&&j.Z.locals&&j.Z.locals;var q,Z=i(72042),G=i(18806),Q=i(50988),Y=i(73910),J=i(59554),X=i(25670),ee=function(e,t){return function(i,n){t(i,n,e)}};const te=D.$,ie=(0,J.q5)("parameter-hints-next",T.l.chevronDown,k.NC("parameterHintsNextIcon","Icon for show next parameter hint.")),ne=(0,J.q5)("parameter-hints-previous",T.l.chevronUp,k.NC("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let oe=q=class extends o.JT{constructor(e,t,i,n,s){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new o.SL),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new G.$({editor:e},s,n)),this.keyVisible=w.Visible.bindTo(i),this.keyMultipleSignatures=w.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=te(".editor-widget.parameter-hints-widget"),t=D.R3(e,te(".phwrapper"));t.tabIndex=-1;const i=D.R3(t,te(".controls")),n=D.R3(i,te(".button"+X.k.asCSSSelector(ne))),o=D.R3(i,te(".overloads")),s=D.R3(i,te(".button"+X.k.asCSSSelector(ie)));this._register(D.nm(n,"click",(e=>{D.zB.stop(e),this.previous()}))),this._register(D.nm(s,"click",(e=>{D.zB.stop(e),this.next()})));const r=te(".body"),a=new I.s$(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());const l=D.R3(r,te(".signature")),d=D.R3(r,te(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:o,docs:d,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const h=()=>{if(!this.domNodes)return;const e=this.editor.getOption(49);this.domNodes.element.style.fontSize=`${e.fontSize}px`,this.domNodes.element.style.lineHeight=""+e.lineHeight/e.fontSize};h(),this._register(c.ju.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((e=>e.hasChanged(49))).on(h,null)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{var e;null===(e=this.domNodes)||void 0===e||e.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,null===(e=this.domNodes)||void 0===e||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const o=D.R3(this.domNodes.signature,te(".code")),s=this.editor.getOption(49);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;const r=n.parameters.length>0,a=null!==(t=n.activeParameter)&&void 0!==t?t:e.activeParameter;r?this.renderParameters(o,n,a):D.R3(o,te("span")).textContent=n.label;const l=n.parameters[a];if(null==l?void 0:l.documentation){const e=te("span.documentation");if("string"==typeof l.documentation)e.textContent=l.documentation;else{const t=this.renderMarkdownDocs(l.documentation);e.appendChild(t.element)}D.R3(this.domNodes.docs,te("p",{},e))}if(void 0===n.documentation);else if("string"==typeof n.documentation)D.R3(this.domNodes.docs,te("p",{},n.documentation));else{const e=this.renderMarkdownDocs(n.documentation);D.R3(this.domNodes.docs,e.element)}const d=this.hasDocs(n,l);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,l){let e="";const t=n.parameters[a];e=Array.isArray(t.label)?n.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),n.documentation&&(e+="string"==typeof n.documentation?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==e&&(E.Z9(k.NC("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var e;null===(e=this.domNodes)||void 0===e||e.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&(0,p.cW)(t.documentation).length>0||t&&"object"==typeof t.documentation&&(0,p.cW)(t.documentation).value.length>0||e.documentation&&"string"==typeof e.documentation&&(0,p.cW)(e.documentation).length>0||e.documentation&&"object"==typeof e.documentation&&(0,p.cW)(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,o]=this.getParameterLabelOffsets(t,i),s=document.createElement("span");s.textContent=t.label.substring(0,n);const r=document.createElement("span");r.textContent=t.label.substring(n,o),r.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(o),D.R3(e,s,r,a)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${(0,M.ec)(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return q.ID}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};oe.ID="editor.widget.parameterHintsWidget",oe=q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ee(2,b.i6),ee(3,Q.v4),ee(4,Z.O)],oe),(0,Y.P6G)("editorHoverWidget.highlightForeground",{dark:Y.Gwp,light:Y.Gwp,hcDark:Y.Gwp,hcLight:Y.Gwp},k.NC("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var se,re=function(e,t){return function(i,n){t(i,n,e)}};let ae=se=class extends o.JT{static get(e){return e.getContribution(se.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new L(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints((e=>{var t;e?(this.widget.value.show(),this.widget.value.render(e)):null===(t=this.widget.rawValue)||void 0===t||t.hide()}))),this.widget=new n.o((()=>this._register(t.createInstance(oe,this.editor,this.model))))}cancel(){this.model.cancel()}previous(){var e;null===(e=this.widget.rawValue)||void 0===e||e.previous()}next(){var e;null===(e=this.widget.rawValue)||void 0===e||e.next()}trigger(e){this.model.trigger(e,0)}};ae.ID="editor.controller.parameterHints",ae=se=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([re(1,N.TG),re(2,l.p)],ae);class le extends s.R6{constructor(){super({id:"editor.action.triggerParameterHints",label:k.NC("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:r.u.hasSignatureHelpProvider,kbOpts:{kbExpr:r.u.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=ae.get(t);null==i||i.trigger({triggerKind:a.WW.Invoke})}}(0,s._K)(ae.ID,ae,2),(0,s.Qr)(le);const de=s._l.bindToContribution(ae.get);(0,s.fK)(new de({id:"closeParameterHints",precondition:w.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:r.u.focus,primary:9,secondary:[1033]}})),(0,s.fK)(new de({id:"showPrevParameterHint",precondition:b.Ao.and(w.Visible,w.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:r.u.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,s.fK)(new de({id:"showNextParameterHint",precondition:b.Ao.and(w.Visible,w.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:r.u.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},81774:(e,t,i)=>{i.d(t,{Fw:()=>G,Jy:()=>Q,vk:()=>ee,rc:()=>J,SC:()=>oe,M8:()=>se,KY:()=>te,IH:()=>ie,R7:()=>ne});var n=i(65321),o=i(90317),s=i(74741),r=i(73046),a=i(25670),l=i(41264),d=i(4669),h=i(36248),c=i(93379),u=i.n(c),g=i(7795),p=i.n(g),m=i(90569),f=i.n(m),_=i(3565),v=i.n(_),b=i(19216),C=i.n(b),w=i(44589),y=i.n(w),S=i(8881),L={};L.styleTagTransform=y(),L.setAttributes=v(),L.insert=f().bind(null,"head"),L.domAPI=p(),L.insertStyleElement=C(),u()(S.Z,L),S.Z&&S.Z.locals&&S.Z.locals;var x=i(16830),k=i(17122),N=i(84527),D=i(63841),E=i(44742),I=i(5976),T=i(51564),M={};M.styleTagTransform=y(),M.setAttributes=v(),M.insert=f().bind(null,"head"),M.domAPI=p(),M.insertStyleElement=C(),u()(T.Z,M),T.Z&&T.Z.locals&&T.Z.locals;var R=i(24314),A=i(13961);const O=new l.Il(new l.VS(0,122,204)),P={showArrow:!0,showFrame:!0,className:"",frameColor:O,arrowColor:O,keepEditorSelection:!1};class F{constructor(e,t,i,n,o,s,r,a){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=r,this.ordinal=a,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class B{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class W{constructor(e){this._editor=e,this._ruleName=W._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),n.uN(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){n.uN(this._ruleName),n.fk(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:R.e.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}W._IdGenerator=new E.R(".arrow-decoration-");class V{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new I.SL,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=h.I8(t),h.jB(this.options,P,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new W(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}null===(t=this._resizeSash)||void 0===t||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=R.e.isIRange(e)?R.e.lift(e):R.e.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:A.qx.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),null===(e=this._arrow)||void 0===e||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(65);let t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";const s=document.createElement("div");s.style.overflow="hidden";const r=this.editor.getOption(65);if(!this.options.allowUnlimitedHeight){const e=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,e)}let a=0,l=0;if(this._arrow&&this.options.showArrow&&(a=Math.round(r/3),this._arrow.height=a,this._arrow.show(i)),this.options.showFrame&&(l=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new F(s,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e)),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new B("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}const d=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=a+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,o),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const t=h.validateRange(new R.e(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(t,t.startLineNumber===h.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new D.g(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(65),n=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+n;o>5&&o<35&&this._relayout(o)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var H=i(63580),z=i(44691),K=i(93983),U=i(65026),j=i(72065),$=i(73910),q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Z=function(e,t){return function(i,n){t(i,n,e)}};const G=(0,j.yh)("IPeekViewService");var Q;(0,U.z)(G,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose()),this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}},1),function(e){e.inPeekEditor=new K.uy("inReferenceSearchEditor",!0,H.NC("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(Q||(Q={}));let Y=class{constructor(e,t){e instanceof N.H&&Q.inPeekEditor.bindTo(t)}dispose(){}};function J(e){const t=e.get(k.$).getFocusedCodeEditor();return t instanceof N.H?t.getParentEditor():t}Y.ID="editor.contrib.referenceController",Y=q([Z(1,K.i6)],Y),(0,x._K)(Y.ID,Y,0);const X={headerBackgroundColor:l.Il.white,primaryHeadingColor:l.Il.fromHex("#333333"),secondaryHeadingColor:l.Il.fromHex("#6c6c6cb3")};let ee=class extends V{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new d.Q5,this.onDidClose=this._onDidClose.event,h.jB(this.options,X,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=n.$(".head"),this._bodyElement=n.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=n.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),n.mu(this._titleElement,"click",(e=>this._onTitleClick(e)))),n.R3(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=n.$("span.filename"),this._secondaryHeading=n.$("span.dirname"),this._metaHeading=n.$("span.meta"),n.R3(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=n.$(".peekview-actions");n.R3(this._headElement,i);const l=this._getActionBarOptions();this._actionbarWidget=new o.o(i,l),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new s.aU("peekview.close",H.NC("label.close","Close"),a.k.asClassName(r.l.close),!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:z.Id.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:n.PO(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,n.$Z(this._metaHeading)):n.Cp(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(65)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};ee=q([Z(2,j.TG)],ee);const te=(0,$.P6G)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Il.black,hcLight:l.Il.white},H.NC("peekViewTitleBackground","Background color of the peek view title area.")),ie=(0,$.P6G)("peekViewTitleLabel.foreground",{dark:l.Il.white,light:l.Il.black,hcDark:l.Il.white,hcLight:$.NOs},H.NC("peekViewTitleForeground","Color of the peek view title.")),ne=(0,$.P6G)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},H.NC("peekViewTitleInfoForeground","Color of the peek view title info.")),oe=(0,$.P6G)("peekView.border",{dark:$.c63,light:$.c63,hcDark:$.lRK,hcLight:$.lRK},H.NC("peekViewBorder","Color of the peek view borders and arrow.")),se=(0,$.P6G)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Il.black,hcLight:l.Il.white},H.NC("peekViewResultsBackground","Background color of the peek view result list.")),re=((0,$.P6G)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:l.Il.white,hcLight:$.NOs},H.NC("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),(0,$.P6G)("peekViewResult.fileForeground",{dark:l.Il.white,light:"#1E1E1E",hcDark:l.Il.white,hcLight:$.NOs},H.NC("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),(0,$.P6G)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},H.NC("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),(0,$.P6G)("peekViewResult.selectionForeground",{dark:l.Il.white,light:"#6C6C6C",hcDark:l.Il.white,hcLight:$.NOs},H.NC("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),(0,$.P6G)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:l.Il.black,hcLight:l.Il.white},H.NC("peekViewEditorBackground","Background color of the peek view editor.")));(0,$.P6G)("peekViewEditorGutter.background",{dark:re,light:re,hcDark:re,hcLight:re},H.NC("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),(0,$.P6G)("peekViewEditorStickyScroll.background",{dark:re,light:re,hcDark:re,hcLight:re},H.NC("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),(0,$.P6G)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},H.NC("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),(0,$.P6G)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},H.NC("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),(0,$.P6G)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:$.xL1,hcLight:$.xL1},H.NC("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},83943:(e,t,i)=>{i.d(t,{X:()=>h});var n=i(88289),o=i(5976),s=i(65520),r=i(84973),a=i(8625),l=i(97781),d=i(56346);class h{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new o.SL;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new o.XK);return s.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange((()=>{s.value=void 0,s.value=this.doProvide(e,t)}))),n}doProvide(e,t){var i;const r=new o.SL,a=this.activeTextEditorControl;if(a&&this.canProvideWithTextEditor(a)){const l={editor:a},d=(0,s.Pi)(a);if(d){let e=null!==(i=a.saveViewState())&&void 0!==i?i:void 0;r.add(d.onDidChangeCursorPosition((()=>{var t;e=null!==(t=a.saveViewState())&&void 0!==t?t:void 0}))),l.restoreViewState=()=>{e&&a===this.activeTextEditorControl&&a.restoreViewState(e)},r.add((0,n.I)(t.onCancellationRequested)((()=>{var e;return null===(e=l.restoreViewState)||void 0===e?void 0:e.call(l)})))}r.add((0,o.OF)((()=>this.clearDecorations(a)))),r.add(this.provideWithTextEditor(l,e,t))}else r.add(this.provideWithoutTextEditor(e,t));return r}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&(0,d.i7)(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return(0,s.QI)(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,l.EN)(a.m9),position:r.sh.Full}}}],[o,s]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:s}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}},73945:(e,t,i)=>{var n=i(59365),o=i(5976),s=i(16830),r=i(39310),a=i(63580);class l extends o.JT{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit())))}_onDidAttemptReadOnlyEdit(){const e=r.O.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(90);t||(t=this.editor.isSimpleWidget?new n.W5(a.NC("editor.simple.readonly","Cannot edit in read-only input")):new n.W5(a.NC("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}l.ID="editor.contrib.readOnlyMessageController",(0,s._K)(l.ID,l,2)},43448:(e,t,i)=>{var n=i(56346),o=i(15393),s=i(71050),r=i(17301),a=i(5976),l=i(98401),d=i(70666),h=i(16467),c=i(16830),u=i(66007),g=i(17122),p=i(50187),m=i(24314),f=i(29102),_=i(71765),v=i(39310),b=i(63580),C=i(23193),w=i(93983),y=i(72065),S=i(43557),L=i(59422),x=i(90535),k=i(89872),N=i(93379),D=i.n(N),E=i(7795),I=i.n(E),T=i(90569),M=i.n(T),R=i(3565),A=i.n(R),O=i(19216),P=i.n(O),F=i(44589),B=i.n(F),W=i(11522),V={};V.styleTagTransform=B(),V.setAttributes=A(),V.insert=M().bind(null,"head"),V.domAPI=I(),V.insertStyleElement=P(),D()(W.Z,V),W.Z&&W.Z.locals&&W.Z.locals;var H=i(91847),z=i(73910),K=i(97781),U=function(e,t){return function(i,n){t(i,n,e)}};const j=new w.uy("renameInputVisible",!1,(0,b.NC)("renameInputVisible","Whether the rename input widget is visible"));let $=class{constructor(e,t,i,n,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new a.SL,this.allowEditorOverflow=!0,this._visibleContextKey=j.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(49)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,b.NC)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,i,n,o;if(!this._input||!this._domNode)return;const s=e.getColor(z.rh),r=e.getColor(z.A42);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(z.D0T))&&void 0!==t?t:""),this._domNode.style.boxShadow=s?` 0 0 8px 2px ${s}`:"",this._domNode.style.border=r?`1px solid ${r}`:"",this._domNode.style.color=String(null!==(i=e.getColor(z.zJb))&&void 0!==i?i:""),this._input.style.backgroundColor=String(null!==(n=e.getColor(z.sEe))&&void 0!==n?n:"");const a=e.getColor(z.dt_);this._input.style.borderWidth=a?"1px":"0px",this._input.style.borderStyle=a?"solid":"none",this._input.style.borderColor=null!==(o=null==a?void 0:a.toString())&&void 0!==o?o:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(49);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=.8*e.fontSize+"px"}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var e,t;const[i,n]=this._acceptKeybindings;return this._label.innerText=(0,b.NC)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",null===(e=this._keybindingService.lookupKeybinding(i))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(n))||void 0===t?void 0:t.getLabel()),null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;null===(t=this._currentAcceptInput)||void 0===t||t.call(this,e)}cancelInput(e){var t;null===(t=this._currentCancelInput)||void 0===t||t.call(this,e)}getInput(e,t,i,n,o,s){this._domNode.classList.toggle("preview",o),this._position=new p.L(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);const r=new a.SL;return new Promise((e=>{this._currentCancelInput=t=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e(t),!0),this._currentAcceptInput=i=>{0!==this._input.value.trim().length&&this._input.value!==t?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e({newName:this._input.value,wantsPreview:o&&i})):this.cancelInput(!0)},r.add(s.onCancellationRequested((()=>this.cancelInput(!0)))),r.add(this._editor.onDidBlurEditorWidget((()=>this.cancelInput(!document.hasFocus())))),this._show()})).finally((()=>{r.dispose(),this._hide()}))}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))}),100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};$=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([U(2,K.XE),U(3,H.d),U(4,w.i6)],$);var q,Z=i(71922),G=function(e,t){return function(i,n){t(i,n,e)}},Q=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Y{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return Q(this,void 0,void 0,(function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const i=this._providers[this._providerRenameIdx];if(!i.resolveRenameLocation)break;const n=yield i.resolveRenameLocation(this.model,this.position,e);if(n){if(!n.rejectReason)return n;t.push(n.rejectReason)}}const i=this.model.getWordAtPosition(this.position);return i?{range:new m.e(this.position.lineNumber,i.startColumn,this.position.lineNumber,i.endColumn),text:i.word,rejectReason:t.length>0?t.join("\n"):void 0}:{range:m.e.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}))}provideRenameEdits(e,t){return Q(this,void 0,void 0,(function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}))}_provideRenameEdits(e,t,i,n){return Q(this,void 0,void 0,(function*(){const o=this._providers[t];if(!o)return{edits:[],rejectReason:i.join("\n")};const s=yield o.provideRenameEdits(this.model,this.position,e,n);return s?s.rejectReason?this._provideRenameEdits(e,t+1,i.concat(s.rejectReason),n):s:this._provideRenameEdits(e,t+1,i.concat(b.NC("no result","No result.")),n)}))}}let J=q=class{static get(e){return e.getContribution(q.ID)}constructor(e,t,i,n,o,r,l,d){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=r,this._configService=l,this._languageFeaturesService=d,this._disposableStore=new a.SL,this._cts=new s.A,this._renameInputField=this._disposableStore.add(this._instaService.createInstance($,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return Q(this,void 0,void 0,(function*(){if(this._cts.dispose(!0),this._cts=new s.A,!this.editor.hasModel())return;const i=this.editor.getPosition(),r=new Y(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!r.hasProvider())return;const a=new h.Dl(this.editor,5,void 0,this._cts.token);let l;try{const e=r.resolveRenameLocation(a.token);this._progressService.showWhile(e,250),l=yield e}catch(t){return void(null===(e=v.O.get(this.editor))||void 0===e||e.showMessage(t||b.NC("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i))}finally{a.dispose()}if(!l)return;if(l.rejectReason)return void(null===(t=v.O.get(this.editor))||void 0===t||t.showMessage(l.rejectReason,i));if(a.token.isCancellationRequested)return;const d=new h.Dl(this.editor,5,l.range,this._cts.token),c=this.editor.getSelection();let u=0,g=l.text.length;m.e.isEmpty(c)||m.e.spansMultipleLines(c)||!m.e.containsRange(l.range,c)||(u=Math.max(0,c.startColumn-l.range.startColumn),g=Math.min(l.range.endColumn,c.endColumn)-l.range.startColumn);const p=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),f=yield this._renameInputField.getInput(l.range,l.text,u,g,p,d.token);if("boolean"==typeof f)return f&&this.editor.focus(),void d.dispose();this.editor.focus();const _=(0,o.eP)(r.provideRenameEdits(f.newName,d.token),d.token).then((e=>Q(this,void 0,void 0,(function*(){e&&this.editor.hasModel()&&(e.rejectReason?this._notificationService.info(e.rejectReason):(this.editor.setSelection(m.e.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(e,{editor:this.editor,showPreview:f.wantsPreview,label:b.NC("label","Renaming '{0}' to '{1}'",null==l?void 0:l.text,f.newName),code:"undoredo.rename",quotableLabel:b.NC("quotableLabel","Renaming {0} to {1}",null==l?void 0:l.text,f.newName),respectAutoSaveConfig:!0}).then((e=>{e.ariaSummary&&(0,n.Z9)(b.NC("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",l.text,f.newName,e.ariaSummary))})).catch((e=>{this._notificationService.error(b.NC("rename.failedApply","Rename failed to apply edits")),this._logService.error(e)}))))}))),(e=>{this._notificationService.error(b.NC("rename.failed","Rename failed to compute edits")),this._logService.error(e)})).finally((()=>{d.dispose()}));return this._progressService.showWhile(_,250),_}))}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};J.ID="editor.contrib.renameController",J=q=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([G(1,y.TG),G(2,L.lT),G(3,u.vu),G(4,x.ek),G(5,S.VZ),G(6,_.V),G(7,Z.p)],J);class X extends c.R6{constructor(){super({id:"editor.action.rename",label:b.NC("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:w.Ao.and(f.u.writable,f.u.hasRenameProvider),kbOpts:{kbExpr:f.u.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(g.$),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return d.o.isUri(n)&&p.L.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),r.dL):super.runCommand(e,t)}run(e,t){const i=J.get(t);return i?i.run():Promise.resolve()}}(0,c._K)(J.ID,J,4),(0,c.Qr)(X);const ee=c._l.bindToContribution(J.get);(0,c.fK)(new ee({id:"acceptRenameInput",precondition:j,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:w.Ao.and(f.u.focus,w.Ao.not("isComposing")),primary:3}})),(0,c.fK)(new ee({id:"acceptRenameInputWithPreview",precondition:w.Ao.and(j,w.Ao.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:w.Ao.and(f.u.focus,w.Ao.not("isComposing")),primary:1027}})),(0,c.fK)(new ee({id:"cancelRenameInput",precondition:j,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:f.u.focus,primary:9,secondary:[1033]}})),(0,c.sb)("_executeDocumentRenameProvider",(function(e,t,i,...n){const[o]=n;(0,l.p_)("string"==typeof o);const{renameProvider:r}=e.get(Z.p);return function(e,t,i,n){return Q(this,void 0,void 0,(function*(){const o=new Y(t,i,e),r=yield o.resolveRenameLocation(s.T.None);return(null==r?void 0:r.rejectReason)?{edits:[],rejectReason:r.rejectReason}:o.provideRenameEdits(n,s.T.None)}))}(r,t,i,o)})),(0,c.sb)("_executePrepareRename",(function(e,t,i){return Q(this,void 0,void 0,(function*(){const{renameProvider:n}=e.get(Z.p),o=new Y(t,i,n),r=yield o.resolveRenameLocation(s.T.None);if(null==r?void 0:r.rejectReason)throw new Error(r.rejectReason);return r}))})),k.B.as(C.IP.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:b.NC("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},61168:(e,t,i)=>{var n,o=i(5976),s=i(17301),r=i(73733),a=i(33108),l=i(15393),d=i(71050),h=i(97781),c=i(26909),u=i(34983),g=i(88191),p=i(84013),m=i(71922),f=i(73343),_=i(10637),v=i(44408),b=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},C=function(e,t){return function(i,n){t(i,n,e)}};let w=class extends o.JT{constructor(e,t,i,n,o,s){super(),this._watchers=Object.create(null);const r=t=>{this._watchers[t.uri.toString()]=new y(t,e,i,o,s)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(const e of t.getModels()){const t=this._watchers[e.uri.toString()];(0,v.t)(e,i,n)?t||r(e):t&&a(e,t)}};this._register(t.onModelAdded((e=>{(0,v.t)(e,i,n)&&r(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(v.e)&&l()}))),this._register(i.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};w=b([C(0,f.s),C(1,r.q),C(2,h.XE),C(3,a.Ui),C(4,g.A),C(5,m.p)],w);let y=n=class extends o.JT{constructor(e,t,i,s,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:n.REQUEST_MIN_DELAY,max:n.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new l.pY((()=>this._fetchDocumentSemanticTokensNow()),n.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeAttached((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const a=()=>{(0,o.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of this._provider.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>{this._currentDocumentRequestCancellationTokenSource?this._providersChangedDuringRequest=!0:this._fetchDocumentSemanticTokens.schedule(0)})))};a(),this._register(this._provider.onDidChange((()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(i.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),(0,o.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,u.Jc)(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1));if(!this._model.isAttachedToEditor())return;const e=new d.A,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,u.ML)(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const o=[],r=this._model.onDidChangeContent((e=>{o.push(e)})),a=new p.G(!1);n.then((e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,o)}else this._setDocumentSemanticTokens(null,null,null,o)}),(e=>{e&&(s.n2(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||s.dL(e),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,o){o=Math.min(o,i.length-n,e.length-t);for(let s=0;s<o;s++)i[n+s]=e[t+s]}_setDocumentSemanticTokens(e,t,i,o){const s=this._currentDocumentResponse,r=()=>{(o.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.tokenization.setSemanticTokens(null,!0),void r();if((0,u.Vj)(t)){if(!s)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:s.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const o=s.data,r=new Uint32Array(o.length+e);let a=o.length,l=r.length;for(let e=t.edits.length-1;e>=0;e--){const d=t.edits[e];if(d.start>o.length)return i.warnInvalidEditStart(s.resultId,t.resultId,e,d.start,o.length),void this._model.tokenization.setSemanticTokens(null,!0);const h=a-(d.start+d.deleteCount);h>0&&(n._copy(o,a-h,r,l-h,h),l-=h),d.data&&(n._copy(d.data,0,r,l-d.data.length,d.data.length),l-=d.data.length),a=d.start}a>0&&n._copy(o,0,r,0,a),t={resultId:t.resultId,data:r}}}if((0,u.Vl)(t)){this._currentDocumentResponse=new S(e,t.resultId,t.data);const n=(0,c.h)(t,i,this._model.getLanguageId());if(o.length>0)for(const e of o)for(const t of n)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(n,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}else this._model.tokenization.setSemanticTokens(null,!1)}};y.REQUEST_MIN_DELAY=300,y.REQUEST_MAX_DELAY=2e3,y=n=b([C(1,f.s),C(2,h.XE),C(3,g.A),C(4,m.p)],y);class S{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,_.y)(w)},89995:(e,t,i)=>{var n=i(15393),o=i(5976),s=i(16830),r=i(34983),a=i(44408),l=i(26909),d=i(33108),h=i(97781),c=i(88191),u=i(84013),g=i(71922),p=i(73343),m=function(e,t){return function(i,n){t(i,n,e)}};let f=class extends o.JT{constructor(e,t,i,o,s,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=o,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new n.pY((()=>this._tokenizeViewportNow()),100)),this._outstandingRequests=[];const l=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange((()=>{l()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),l()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),l()}))),this._register(this._provider.onDidChange((()=>{this._cancelAll(),l()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(a.e)&&(this._cancelAll(),l())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),l()}))),l()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e)return void this._outstandingRequests.splice(t,1)}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!(0,a.t)(e,this._themeService,this._configurationService))return void(e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1));if(!(0,r.KO)(this._provider,e))return void(e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1));const t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map((t=>this._requestRange(e,t))))}_requestRange(e,t){const i=e.getVersionId(),o=(0,n.PG)((i=>Promise.resolve((0,r.OG)(this._provider,e,t,i)))),s=new u.G(!1);return o.then((n=>{if(this._debounceInformation.update(e,s.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:o,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(o);e.tokenization.setPartialSemanticTokens(t,(0,l.h)(r,a,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(o)),(()=>this._removeOutstandingRequest(o))),o}};f.ID="editor.contrib.viewportSemanticTokens",f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([m(1,p.s),m(2,h.XE),m(3,d.Ui),m(4,c.A),m(5,g.p)],f),(0,s._K)(f.ID,f,1)},34983:(e,t,i)=>{i.d(t,{OG:()=>S,ML:()=>b,KO:()=>w,Jc:()=>v,Vl:()=>m,Vj:()=>f});var n=i(71050),o=i(17301),s=i(70666),r=i(73733),a=i(94565),l=i(98401),d=i(53060),h=i(1432);function c(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const i of e.deltas)i.data&&(t+=i.data.length)}return t}(e));let i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else{t[i++]=2,t[i++]=e.deltas.length;for(const n of e.deltas)t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return h.r()||function(e){for(let t=0,i=e.length;t<i;t+=4){const i=e[t+0],n=e[t+1],o=e[t+2],s=e[t+3];e[t+0]=s,e[t+1]=o,e[t+2]=n,e[t+3]=i}}(t),d.KN.wrap(t)}(t)}var u=i(24314),g=i(71922),p=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function m(e){return e&&!!e.data}function f(e){return e&&Array.isArray(e.edits)}class _{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}function v(e,t){return e.has(t)}function b(e,t,i,n,o){return p(this,void 0,void 0,(function*(){const s=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}(e,t),r=yield Promise.all(s.map((e=>p(this,void 0,void 0,(function*(){let s,r=null;try{s=yield e.provideDocumentSemanticTokens(t,e===i?n:null,o)}catch(e){r=e,s=null}return s&&(m(s)||f(s))||(s=null),new _(e,s,r)})))));for(const e of r){if(e.error)throw e.error;if(e.tokens)return e}return r.length>0?r[0]:null}))}class C{constructor(e,t){this.provider=e,this.tokens=t}}function w(e,t){return e.has(t)}function y(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}function S(e,t,i,n){return p(this,void 0,void 0,(function*(){const s=y(e,t),r=yield Promise.all(s.map((e=>p(this,void 0,void 0,(function*(){let s;try{s=yield e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,o.Cp)(e),s=null}return s&&m(s)||(s=null),new C(e,s)})))));for(const e of r)if(e.tokens)return e;return r.length>0?r[0]:null}))}a.P.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i]=t;(0,l.p_)(i instanceof s.o);const n=e.get(r.q).getModel(i);if(!n)return;const{documentSemanticTokensProvider:o}=e.get(g.p),d=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}(o,n);return d?d[0].getLegend():e.get(a.H).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})))),a.P.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i]=t;(0,l.p_)(i instanceof s.o);const o=e.get(r.q).getModel(i);if(!o)return;const{documentSemanticTokensProvider:d}=e.get(g.p);if(!v(d,o))return e.get(a.H).executeCommand("_provideDocumentRangeSemanticTokens",i,o.getFullModelRange());const h=yield b(d,o,null,null,n.T.None);if(!h)return;const{provider:u,tokens:p}=h;if(!p||!m(p))return;const f=c({id:0,type:"full",data:p.data});return p.resultId&&u.releaseDocumentSemanticTokens(p.resultId),f})))),a.P.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i,o]=t;(0,l.p_)(i instanceof s.o);const a=e.get(r.q).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:d}=e.get(g.p),h=y(d,a);if(0===h.length)return;if(1===h.length)return h[0].getLegend();if(!o||!u.e.isIRange(o))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),h[0].getLegend();const c=yield S(d,a,u.e.lift(o),n.T.None);return c?c.provider.getLegend():void 0})))),a.P.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>p(void 0,void 0,void 0,(function*(){const[i,o]=t;(0,l.p_)(i instanceof s.o),(0,l.p_)(u.e.isIRange(o));const a=e.get(r.q).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:d}=e.get(g.p),h=yield S(d,a,u.e.lift(o),n.T.None);return h&&h.tokens?c({id:0,type:"full",data:h.tokens.data}):void 0}))))},44408:(e,t,i)=>{i.d(t,{e:()=>n,t:()=>o});const n="editor.semanticHighlighting";function o(e,t,i){var o;const s=null===(o=i.getValue(n,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===o?void 0:o.enabled;return"boolean"==typeof s?s:t.getColorTheme().semanticHighlighting}},79694:(e,t,i)=>{i.d(t,{x:()=>r});var n=i(91741),o=i(50187),s=i(24314);class r{provideSelectionRanges(e,t){return i=this,n=void 0,s=function*(){const i=[];for(const n of t){const t=[];i.push(t);const o=new Map;yield new Promise((t=>r._bracketsRightYield(t,0,e,n,o))),yield new Promise((i=>r._bracketsLeftYield(i,0,e,n,o,t)))}return i},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(i,n||[])).next())}));var i,n,o,s}static _bracketsRightYield(e,t,i,o,s){const a=new Map,l=Date.now();for(;;){if(t>=r._maxRounds){e();break}if(!o){e();break}const d=i.bracketPairs.findNextBracket(o);if(!d){e();break}if(Date.now()-l>r._maxDuration){setTimeout((()=>r._bracketsRightYield(e,t+1,i,o,s)));break}if(d.bracketInfo.isOpeningBracket){const e=d.bracketInfo.bracketText,t=a.has(e)?a.get(e):0;a.set(e,t+1)}else{const e=d.bracketInfo.getOpeningBrackets()[0].bracketText;let t=a.has(e)?a.get(e):0;if(t-=1,a.set(e,Math.max(0,t)),t<0){let t=s.get(e);t||(t=new n.S,s.set(e,t)),t.push(d.range)}}o=d.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,o,a){const l=new Map,d=Date.now();for(;;){if(t>=r._maxRounds&&0===o.size){e();break}if(!n){e();break}const h=i.bracketPairs.findPrevBracket(n);if(!h){e();break}if(Date.now()-d>r._maxDuration){setTimeout((()=>r._bracketsLeftYield(e,t+1,i,n,o,a)));break}if(h.bracketInfo.isOpeningBracket){const e=h.bracketInfo.bracketText;let t=l.has(e)?l.get(e):0;if(t-=1,l.set(e,Math.max(0,t)),t<0){const t=o.get(e);if(t){const n=t.shift();0===t.size&&o.delete(e);const l=s.e.fromPositions(h.range.getEndPosition(),n.getStartPosition()),d=s.e.fromPositions(h.range.getStartPosition(),n.getEndPosition());a.push({range:l}),a.push({range:d}),r._addBracketLeading(i,d,a)}}}else{const e=h.bracketInfo.getOpeningBrackets()[0].bracketText,t=l.has(e)?l.get(e):0;l.set(e,t+1)}n=h.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(n);0!==r&&r!==t.startColumn&&(i.push({range:s.e.fromPositions(new o.L(n,r),t.getEndPosition())}),i.push({range:s.e.fromPositions(new o.L(n,1),t.getEndPosition())}));const a=n-1;if(a>0){const n=e.getLineFirstNonWhitespaceColumn(a);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(a)&&(i.push({range:s.e.fromPositions(new o.L(a,n),t.getEndPosition())}),i.push({range:s.e.fromPositions(new o.L(a,1),t.getEndPosition())}))}}}r._maxDuration=30,r._maxRounds=2},102:(e,t,i)=>{var n=i(9488),o=i(71050),s=i(17301),r=i(16830),a=i(50187),l=i(24314),d=i(3860),h=i(29102),c=i(79694),u=i(97295);class g{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:o,startColumn:s}=n,r=i.column-s;let a=r,d=r,h=0;for(;a>=0;a--){const e=o.charCodeAt(a);if(a!==r&&(95===e||45===e))break;if((0,u.mK)(e)&&(0,u.df)(h))break;h=e}for(a+=1;d<o.length;d++){const e=o.charCodeAt(d);if((0,u.df)(e)&&(0,u.mK)(h))break;if(95===e||45===e)break;h=e}a<d&&e.push({range:new l.e(i.lineNumber,s+a,i.lineNumber,s+d)})}_addWordRanges(e,t,i){const n=t.getWordAtPosition(i);n&&e.push({range:new l.e(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new l.e(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var p,m=i(63580),f=i(84144),_=i(94565),v=i(71922),b=i(88216),C=i(98401),w=i(70666),y=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class S{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new S(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let L=p=class{static get(e){return e.getContribution(p.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}run(e){return y(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||(yield D(this._languageFeaturesService.selectionRangeProvider,i,t.map((e=>e.getPosition())),this._editor.getOption(111),o.T.None).then((e=>{var i;if(n.Of(e)&&e.length===t.length&&this._editor.hasModel()&&n.fS(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;i<e.length;i++)e[i]=e[i].filter((e=>e.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new S(0,e))),null===(i=this._selectionListener)||void 0===i||i.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{var e;this._ignoreSelection||(null===(e=this._selectionListener)||void 0===e||e.dispose(),this._state=void 0)}))}}))),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const s=this._state.map((e=>d.Y.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}}))}};var x,k;L.ID="editor.contrib.smartSelectController",L=p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(x=1,k=v.p,function(e,t){k(e,t,x)})],L);class N extends r.R6{constructor(e,t){super(t),this._forward=e}run(e,t){return y(this,void 0,void 0,(function*(){const e=L.get(t);e&&(yield e.run(this._forward))}))}}function D(e,t,i,o,r){return y(this,void 0,void 0,(function*(){const d=e.all(t).concat(new g(o.selectSubwords));1===d.length&&d.unshift(new c.x);const h=[],u=[];for(const e of d)h.push(Promise.resolve(e.provideSelectionRanges(t,i,r)).then((e=>{if(n.Of(e)&&e.length===i.length)for(let t=0;t<i.length;t++){u[t]||(u[t]=[]);for(const n of e[t])l.e.isIRange(n.range)&&l.e.containsPosition(n.range,i[t])&&u[t].push(l.e.lift(n.range))}}),s.Cp));return yield Promise.all(h),u.map((e=>{if(0===e.length)return[];e.sort(((e,t)=>a.L.isBefore(e.getStartPosition(),t.getStartPosition())?1:a.L.isBefore(t.getStartPosition(),e.getStartPosition())||a.L.isBefore(e.getEndPosition(),t.getEndPosition())?-1:a.L.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));const i=[];let n;for(const t of e)(!n||l.e.containsRange(t,n)&&!l.e.equalsRange(t,n))&&(i.push(t),n=t);if(!o.selectLeadingAndTrailingWhitespace)return i;const s=[i[0]];for(let e=1;e<i.length;e++){const n=i[e-1],o=i[e];if(o.startLineNumber!==n.startLineNumber||o.endLineNumber!==n.endLineNumber){const e=new l.e(n.startLineNumber,t.getLineFirstNonWhitespaceColumn(n.startLineNumber),n.endLineNumber,t.getLineLastNonWhitespaceColumn(n.endLineNumber));e.containsRange(n)&&!e.equalsRange(n)&&o.containsRange(e)&&!o.equalsRange(e)&&s.push(e);const i=new l.e(n.startLineNumber,1,n.endLineNumber,t.getLineMaxColumn(n.endLineNumber));i.containsRange(n)&&!i.equalsRange(e)&&o.containsRange(i)&&!o.equalsRange(i)&&s.push(i)}s.push(o)}return s}))}))}_.P.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand"),(0,r._K)(L.ID,L,4),(0,r.Qr)(class extends N{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:m.NC("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:h.u.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:f.eH.MenubarSelectionMenu,group:"1_basic",title:m.NC({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}),(0,r.Qr)(class extends N{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:m.NC("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:h.u.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:f.eH.MenubarSelectionMenu,group:"1_basic",title:m.NC({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}),_.P.registerCommand("_executeSelectionRangeProvider",(function(e,...t){return y(this,void 0,void 0,(function*(){const[i,n]=t;(0,C.p_)(w.o.isUri(i));const s=e.get(v.p).selectionRangeProvider,r=yield e.get(b.S).createModelReference(i);try{return D(s,r.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},o.T.None)}finally{r.dispose()}}))}))},98762:(e,t,i)=>{i.d(t,{f:()=>v});var n,o=i(5976),s=i(98401),r=i(16830),a=i(50187),l=i(29102),d=i(51381),h=i(71922),c=i(55621),u=i(63580),g=i(93983),p=i(43557),m=i(18217),f=function(e,t){return function(i,n){t(i,n,e)}};const _={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let v=n=class{static get(e){return e.getContribution(n.ID)}constructor(e,t,i,s,r){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=r,this._snippetListener=new o.SL,this._modelVersionId=-1,this._inSnippet=n.InSnippetMode.bindTo(s),this._hasNextTabstop=n.HasNextTabstop.bindTo(s),this._hasPrevTabstop=n.HasPrevTabstop.bindTo(s)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?_:Object.assign(Object.assign({},_),t))}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,t){var i;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&"string"!=typeof e&&this.cancel(),this._session?((0,s.p_)("string"==typeof e),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new m.l(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),null===(i=this._session)||void 0===i?void 0:i.hasChoice){const e={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(e,t)=>{if(!this._session||e!==this._editor.getModel()||!a.L.equals(this._editor.getPosition(),t))return;const{activeChoice:i}=this._session;if(!i||0===i.choice.options.length)return;const n=e.getValueInRange(i.range),o=Boolean(i.choice.options.find((e=>e.value===n))),s=[];for(let e=0;e<i.choice.options.length;e++){const t=i.choice.options[e];s.push({kind:13,label:t.value,insertText:t.value,sortText:"a".repeat(e+1),range:i.range,filterText:o?`${n}_${t.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:(0,u.NC)("next","Go to next placeholder...")}})}return{suggestions:s}}},t=this._editor.getModel();let i,n=!1;const o=()=>{null==i||i.dispose(),n=!1},s=()=>{n||(i=this._languageFeaturesService.completionProvider.register({language:t.getLanguageId(),pattern:t.uri.fsPath,scheme:t.uri.scheme,exclusive:!0},e),this._snippetListener.add(i),n=!0)};this._choiceCompletions={provider:e,enable:s,disable:o}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState())))}}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var e;if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{activeChoice:t}=this._session;if(!t||!this._choiceCompletions)return null===(e=this._choiceCompletions)||void 0===e||e.disable(),void(this._currentChoice=void 0);this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask((()=>{(0,c.i5)(this._editor,this._choiceCompletions.provider)})))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;null===(e=this._session)||void 0===e||e.prev(),this._updateState()}next(){var e;null===(e=this._session)||void 0===e||e.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};v.ID="snippetController2",v.InSnippetMode=new g.uy("inSnippetMode",!1,(0,u.NC)("inSnippetMode","Whether the editor in current in snippet mode")),v.HasNextTabstop=new g.uy("hasNextTabstop",!1,(0,u.NC)("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),v.HasPrevTabstop=new g.uy("hasPrevTabstop",!1,(0,u.NC)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),v=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([f(1,p.VZ),f(2,h.p),f(3,g.i6),f(4,d.c_)],v),(0,r._K)(v.ID,v,4);const b=r._l.bindToContribution(v.get);(0,r.fK)(new b({id:"jumpToNextSnippetPlaceholder",precondition:g.Ao.and(v.InSnippetMode,v.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:l.u.editorTextFocus,primary:2}})),(0,r.fK)(new b({id:"jumpToPrevSnippetPlaceholder",precondition:g.Ao.and(v.InSnippetMode,v.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:l.u.editorTextFocus,primary:1026}})),(0,r.fK)(new b({id:"leaveSnippet",precondition:v.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:l.u.editorTextFocus,primary:9,secondary:[1033]}})),(0,r.fK)(new b({id:"acceptSnippet",precondition:v.InSnippetMode,handler:e=>e.finish()}))},35084:(e,t,i)=>{i.d(t,{Lv:()=>l,Vm:()=>a,Yj:()=>p,xv:()=>s,y1:()=>g});class n{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||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};const e=this.pos;let t,i=0,o=this.value.charCodeAt(e);if(t=n._table[o],"number"==typeof t)return this.pos+=1,{type:t,pos:e,len:1};if(n.isDigitCharacter(o)){t=8;do{i+=1,o=this.value.charCodeAt(e+i)}while(n.isDigitCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}if(n.isVariableCharacter(o)){t=9;do{o=this.value.charCodeAt(e+ ++i)}while(n.isVariableCharacter(o)||n.isDigitCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}t=10;do{i+=1,o=this.value.charCodeAt(e+i)}while(!isNaN(o)&&void 0===n._table[o]&&!n.isDigitCharacter(o)&&!n.isVariableCharacter(o));return this.pos+=i,{type:t,pos:e,len:i}}}n._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class o{constructor(){this._children=[]}appendChild(e){return e instanceof s&&this._children[this._children.length-1]instanceof s?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),o=i.children.slice(0);o.splice(n,1,...t),i._children=o,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(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 g)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class s extends o{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new s(this.value)}}class r extends o{}class a extends r{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 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof l?this._children[0]:void 0}clone(){const e=new a(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class l extends o{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof s&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new l;return this.options.forEach(e.appendChild,e),e}}class d extends o{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof h&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof h){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new d;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class h extends o{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}clone(){return new h(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class c extends r{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new s(t)],!0)}clone(){const e=new c(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function u(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class g extends o{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk((function(i){return i instanceof a&&(e.push(i),t=!t||t.index<i.index?i:t),!0})),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk((n=>n===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return u([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof a&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof c&&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(){const e=new g;return this._children=this.children.map((e=>e.clone())),e}walk(e){u(this.children,e)}}class p{constructor(){this._scanner=new n,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){const n=new g;return this.parseFragment(e,n),this.ensureFinalTabstop(n,null!=i&&i,null!=t&&t),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,o=[];t.walk((e=>(e instanceof a&&(e.isFinalTabstop?n.set(0,void 0):!n.has(e.index)&&e.children.length>0?n.set(e.index,e.children):o.push(e)),!0)));const s=(e,i)=>{const o=n.get(e.index);if(!o)return;const r=new a(e.index);r.transform=e.transform;for(const e of o){const t=e.clone();r.appendChild(t),t instanceof a&&n.has(t.index)&&!i.has(t.index)&&(i.add(t.index),s(t,i),i.delete(t.index))}t.replace(e,[r])},r=new Set;for(const e of o)s(e,r);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find((e=>0===e.index))||e.appendChild(new a(0)))}_accept(e,t){if(void 0===e||this._token.type===e){const e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const 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 s(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new a(Number(t)):new c(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const n=new a(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new s("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))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);{const t=new l;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new s(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const n=new c(t);if(!this._accept(1))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);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new s("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){const t=new d;let i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new s(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new h(Number(n))),!0;if(this._accept(4))return e.appendChild(new h(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){const i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new h(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){const t=this._until(4);if(t)return e.appendChild(new h(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){const t=this._until(4);if(t)return e.appendChild(new h(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){const t=this._until(1);if(t){const i=this._until(4);if(i)return e.appendChild(new h(Number(n),void 0,t,i)),!0}}else{const t=this._until(4);if(t)return e.appendChild(new h(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new s(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}},18217:(e,t,i)=>{i.d(t,{l:()=>Z});var n=i(9488),o=i(5976),s=i(97295),r=i(93379),a=i.n(r),l=i(7795),d=i.n(l),h=i(90569),c=i.n(h),u=i(3565),g=i.n(u),p=i(19216),m=i.n(p),f=i(44589),_=i.n(f),v=i(15756),b={};b.styleTagTransform=_(),b.setAttributes=g(),b.insert=c().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m(),a()(v.Z,b),v.Z&&v.Z.locals&&v.Z.locals;var C=i(69386),w=i(24314),y=i(3860),S=i(51381),L=i(13961),x=i(44349),k=i(40382),N=i(35084),D=i(15527),E=i(1432);function I(e,t=E.ED){return(0,D.oP)(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.create(null);var T=i(88721),M=i(95935),R=i(98e3),A=i(63580);Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class O{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(void 0!==i)return i}}}class P{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=this._model.getLineContent(this._selection.startLineNumber),n=(0,s.V8)(i,0,this._selection.startColumn-1);let o=n;e.snippet.walk((t=>t!==e&&(t instanceof N.xv&&(o=(0,s.V8)((0,s.uq)(t.value).pop())),!0)));const r=(0,s.Mh)(o,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${o.substr(r)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):"CURSOR_INDEX"===t?String(this._selectionIdx):"CURSOR_NUMBER"===t?String(this._selectionIdx+1):void 0}}class F{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return T.EZ(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=T.EZ(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t?"."===T.XX(this._model.uri.fsPath)?"":this._labelService.getUriLabel((0,M.XX)(this._model.uri)):"TM_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class B{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!(0,s.m5)(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}let W=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}};var V,H;W=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(V=2,H=S.c_,function(e,t){H(e,t,V)})],W);class z{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if("CURRENT_YEAR"===t)return String(this._date.getFullYear());if("CURRENT_YEAR_SHORT"===t)return String(this._date.getFullYear()).slice(-2);if("CURRENT_MONTH"===t)return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if("CURRENT_DATE"===t)return String(this._date.getDate().valueOf()).padStart(2,"0");if("CURRENT_HOUR"===t)return String(this._date.getHours().valueOf()).padStart(2,"0");if("CURRENT_MINUTE"===t)return String(this._date.getMinutes().valueOf()).padStart(2,"0");if("CURRENT_SECOND"===t)return String(this._date.getSeconds().valueOf()).padStart(2,"0");if("CURRENT_DAY_NAME"===t)return z.dayNames[this._date.getDay()];if("CURRENT_DAY_NAME_SHORT"===t)return z.dayNamesShort[this._date.getDay()];if("CURRENT_MONTH_NAME"===t)return z.monthNames[this._date.getMonth()];if("CURRENT_MONTH_NAME_SHORT"===t)return z.monthNamesShort[this._date.getMonth()];if("CURRENT_SECONDS_UNIX"===t)return String(Math.floor(this._date.getTime()/1e3));if("CURRENT_TIMEZONE_OFFSET"===t){const e=this._date.getTimezoneOffset(),t=e>0?"-":"+",i=Math.trunc(Math.abs(e/60)),n=i<10?"0"+i:i,o=Math.abs(e)-60*i;return t+n+":"+(o<10?"0"+o:o)}}}z.dayNames=[A.NC("Sunday","Sunday"),A.NC("Monday","Monday"),A.NC("Tuesday","Tuesday"),A.NC("Wednesday","Wednesday"),A.NC("Thursday","Thursday"),A.NC("Friday","Friday"),A.NC("Saturday","Saturday")],z.dayNamesShort=[A.NC("SundayShort","Sun"),A.NC("MondayShort","Mon"),A.NC("TuesdayShort","Tue"),A.NC("WednesdayShort","Wed"),A.NC("ThursdayShort","Thu"),A.NC("FridayShort","Fri"),A.NC("SaturdayShort","Sat")],z.monthNames=[A.NC("January","January"),A.NC("February","February"),A.NC("March","March"),A.NC("April","April"),A.NC("May","May"),A.NC("June","June"),A.NC("July","July"),A.NC("August","August"),A.NC("September","September"),A.NC("October","October"),A.NC("November","November"),A.NC("December","December")],z.monthNamesShort=[A.NC("JanuaryShort","Jan"),A.NC("FebruaryShort","Feb"),A.NC("MarchShort","Mar"),A.NC("AprilShort","Apr"),A.NC("MayShort","May"),A.NC("JuneShort","Jun"),A.NC("JulyShort","Jul"),A.NC("AugustShort","Aug"),A.NC("SeptemberShort","Sep"),A.NC("OctoberShort","Oct"),A.NC("NovemberShort","Nov"),A.NC("DecemberShort","Dec")];class K{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=(0,k.uT)(this._workspaceService.getWorkspace());return(0,k.c$)(t)?void 0:"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0}_resolveWorkspaceName(e){if((0,k.eb)(e))return T.EZ(e.uri.path);let t=T.EZ(e.configPath.path);return t.endsWith(k.A6)&&(t=t.substr(0,t.length-k.A6.length-1)),t}_resoveWorkspacePath(e){if((0,k.eb)(e))return I(e.uri.fsPath);const t=T.EZ(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?I(i):"/"}}class U{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?(0,R.R)():void 0}}var j;class ${constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,n.vM)(t.placeholders,N.Vm.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(-1===this._offset)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),o=this._snippet.fullLen(i),s=w.e.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),r=i.isFinalTabstop?$._decor.inactiveFinal:$._decor.inactive,a=t.addDecoration(s,r);this._placeholderDecorations.set(i,a)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),o=this._editor.getModel().getValueInRange(n),s=t.transform.resolve(o).split(/\r\n|\r|\n/);for(let e=1;e<s.length;e++)s[e]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+s[e]);e.push(C.h.replace(n,s.join(this._editor.getModel().getEOL())))}e.length>0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,t=!0):!1===e&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const s=this._placeholderDecorations.get(o),r=this._editor.getModel().getDecorationRange(s);n.push(new y.Y(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),e.changeDecorationOptions(s,o.isFinalTabstop?$._decor.activeFinal:$._decor.active),i.add(o);for(const t of this._snippet.enclosingPlaceholders(o)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?$._decor.activeFinal:$._decor.active),i.add(t)}}for(const[t,n]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(n,t.isFinalTabstop?$._decor.inactiveFinal:$._decor.inactive);return n}));return t?this.move(e):null!=i?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof N.Vm){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(0===this._snippet.placeholders.length)return!0;if(1===this._snippet.placeholders.length){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(t);if(!o){e.delete(n.index);break}i.push(o)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(null==e?void 0:e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);return i?{range:i,choice:e.choice}:void 0}get hasChoice(){let e=!1;return this._snippet.walk((t=>(e=t instanceof N.Lv,!e))),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(-1!==o._offset),console.assert(!o._placeholderDecorations);const s=o._snippet.placeholderInfo.last.index;for(const e of o._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(s+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,o._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of o._snippet.placeholders){const n=o._snippet.offset(e),s=o._snippet.fullLen(e),r=w.e.fromPositions(t.getPositionAt(o._offset+n),t.getPositionAt(o._offset+n+s)),a=i.addDecoration(r,$._decor.inactive);this._placeholderDecorations.set(e,a)}}this._placeholderGroups=(0,n.vM)(this._snippet.placeholders,N.Vm.compareByIndex)}))}}$._decor={active:L.qx.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:L.qx.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:L.qx.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:L.qx.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const q={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let Z=j=class{static adjustWhitespace(e,t,i,n,o){const r=e.getLineContent(t.lineNumber),a=(0,s.V8)(r,0,t.column-1);let l;return n.walk((t=>{if(!(t instanceof N.xv)||t.parent instanceof N.Lv)return!0;if(o&&!o.has(t))return!0;const s=t.value.split(/\r\n|\r|\n/);if(i){const i=n.offset(t);if(0===i)s[0]=e.normalizeIndentation(s[0]);else{l=null!=l?l:n.toString();const t=l.charCodeAt(i-1);10!==t&&13!==t||(s[0]=e.normalizeIndentation(a+s[0]))}for(let t=1;t<s.length;t++)s[t]=e.normalizeIndentation(a+s[t])}const r=s.join(e.getEOL());return r!==t.value&&(t.parent.replace(t,[new N.xv(r)]),l=void 0),!0})),a}static adjustSelection(e,t,i,n){if(0!==i||0!==n){const{positionLineNumber:o,positionColumn:s}=t,r=s-i,a=s+n,l=e.validateRange({startLineNumber:o,startColumn:r,endLineNumber:o,endColumn:a});t=y.Y.createWithDirection(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn,t.getDirection())}return t}static createEditsAndSnippetsFromSelections(e,t,i,n,o,s,r,a,l){const d=[],h=[];if(!e.hasModel())return{edits:d,snippets:h};const c=e.getModel(),u=e.invokeWithinContext((e=>e.get(k.ec))),g=e.invokeWithinContext((e=>new F(e.get(x.e),c))),p=()=>r,m=c.getValueInRange(j.adjustSelection(c,e.getSelection(),i,0)),f=c.getValueInRange(j.adjustSelection(c,e.getSelection(),0,n)),_=c.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),v=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>w.e.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:r,idx:b}of v){let w=j.adjustSelection(c,r,i,0),y=j.adjustSelection(c,r,0,n);m!==c.getValueInRange(w)&&(w=r),f!==c.getValueInRange(y)&&(y=r);const S=r.setStartPosition(w.startLineNumber,w.startColumn).setEndPosition(y.endLineNumber,y.endColumn),L=(new N.Yj).parse(t,!0,o),x=S.getStartPosition(),k=j.adjustWhitespace(c,x,s||b>0&&_!==c.getLineFirstNonWhitespaceColumn(r.positionLineNumber),L);L.resolveVariables(new O([g,new B(p,b,v.length,"spread"===e.getOption(77)),new P(c,r,b,a),new W(c,r,l),new z,new K(u),new U])),d[b]=C.h.replace(S,L.toString()),d[b].identifier={major:b,minor:0},d[b]._isTracked=!0,h[b]=new $(e,L,k)}return{edits:d,snippets:h}}static createEditsAndSnippetsFromEdits(e,t,i,n,o,s,r){if(!e.hasModel()||0===t.length)return{edits:[],snippets:[]};const a=[],l=e.getModel(),d=new N.Yj,h=new N.y1,c=new O([e.invokeWithinContext((e=>new F(e.get(x.e),l))),new B((()=>o),0,e.getSelections().length,"spread"===e.getOption(77)),new P(l,e.getSelection(),0,s),new W(l,e.getSelection(),r),new z,new K(e.invokeWithinContext((e=>e.get(k.ec)))),new U]);t=t.sort(((e,t)=>w.e.compareRangesUsingStarts(e.range,t.range)));let u=0;for(let e=0;e<t.length;e++){const{range:i,template:n}=t[e];if(e>0){const n=t[e-1].range,o=w.e.fromPositions(n.getEndPosition(),i.getStartPosition()),s=new N.xv(l.getValueInRange(o));h.appendChild(s),u+=s.value.length}const o=d.parseFragment(n,h);j.adjustWhitespace(l,i.getStartPosition(),!0,h,new Set(o)),h.resolveVariables(c);const s=h.toString(),r=s.slice(u);u=s.length;const g=C.h.replace(i,r);g.identifier={major:e,minor:0},g._isTracked=!0,a.push(g)}return d.ensureFinalTabstop(h,i,!0),{edits:a,snippets:[new $(e,h,"")]}}constructor(e,t,i=q,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){(0,o.B9)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}="string"==typeof this._template?j.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):j.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>{const i=e.filter((e=>!!e.identifier));for(let e=0;e<t.length;e++)t[e].initialize(i[e].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):i.map((e=>y.Y.fromPositions(e.range.getEndPosition())))})),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=q){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=j.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,(e=>{const t=e.filter((e=>!!e.identifier));for(let e=0;e<n.length;e++)n[e].initialize(t[e].textChange);const i=n[0].isTrivialSnippet;if(!i){for(const e of this._snippets)e.merge(n);console.assert(0===n.length)}return this._snippets[0].hasPlaceholder&&!i?this._move(void 0):t.map((e=>y.Y.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length<this._snippets.length)return!1;const t=new Map;for(const i of this._snippets){const n=i.computePossibleSelections();if(0===t.size)for(const[i,o]of n){o.sort(w.e.compareRangesUsingStarts);for(const n of e)if(o[0].containsRange(n)){t.set(i,[]);break}}if(0===t.size)return!1;t.forEach(((e,t)=>{e.push(...n.get(t))}))}e.sort(w.e.compareRangesUsingStarts);for(const[i,n]of t)if(n.length===e.length){n.sort(w.e.compareRangesUsingStarts);for(let o=0;o<n.length;o++)n[o].containsRange(e[o])||t.delete(i)}else t.delete(i);return t.size>0}};Z=j=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,S.c_)],Z)},90165:(e,t,i)=>{var n=i(16830),o=i(63580);const s=Object.freeze({View:{value:(0,o.NC)("view","View"),original:"View"},Help:{value:(0,o.NC)("help","Help"),original:"Help"},Test:{value:(0,o.NC)("test","Test"),original:"Test"},File:{value:(0,o.NC)("file","File"),original:"File"},Preferences:{value:(0,o.NC)("preferences","Preferences"),original:"Preferences"},Developer:{value:(0,o.NC)({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer"),original:"Developer"}});var r=i(84144),a=i(33108),l=i(93983),d=i(29102),h=i(5976),c=i(71922),u=i(65321),g=i(77514),p=i(25670),m=i(93379),f=i.n(m),_=i(7795),v=i.n(_),b=i(90569),C=i.n(b),w=i(3565),y=i.n(w),S=i(19216),L=i.n(S),x=i(44589),k=i.n(x),N=i(36098),D={};D.styleTagTransform=k(),D.setAttributes=y(),D.insert=C().bind(null,"head"),D.domAPI=v(),D.insertStyleElement=L(),f()(N.Z,D),N.Z&&N.Z.locals&&N.Z.locals;var E=i(60571),I=i(84527),T=i(50187),M=i(50072),R=i(92550),A=i(91557),O=i(63737),P=i(83973),F=i(71705);class B{constructor(e,t,i,n=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=i,this.showEndForLine=n}}const W=(0,g.Z)("stickyScrollViewLayer",{createHTML:e=>e}),V="data-sticky-line-index";class H extends h.JT{constructor(e){super(),this._editor=e,this._foldingIconStore=new h.SL,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(65),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof I.H),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(113).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(113)&&t(),e.hasChanged(65)&&(this._lineHeight=this._editor.getOption(65))}))),this._register(this._editor.onDidScrollChange((e=>{e.scrollLeftChanged&&t(),e.scrollWidthChanged&&this._updateWidgetWidth()}))),this._register(this._editor.onDidChangeModel((()=>{t(),this._updateWidgetWidth()}))),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange((e=>{this._updateWidgetWidth()}))),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getCurrentLines(){return this._lineNumbers}setState(e){if(this._clearStickyWidget(),e&&this._editor._getViewModel()){if(e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const t=[...e.startLineNumbers];null!==e.showEndForLine&&(t[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=t}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode()}}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t="left"===this._editor.getOption(71).side?e.contentLeft-e.minimap.minimapCanvasOuterWidth:e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",this._editor.getScrollWidth()-e.verticalScrollbarWidth+"px"),this._rootDomNode.style.width=e.width-e.minimap.minimapCanvasOuterWidth-e.verticalScrollbarWidth+"px"}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),u.PO(this._lineNumbersDomNode),u.PO(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._stickyLines){const i=t.foldingIcon;i&&i.setVisible(!!e||i.isCollapsed)}}_renderRootNode(){var e,t,i,n,o;return t=this,i=void 0,o=function*(){const t=yield null===(e=O.f.get(this._editor))||void 0===e?void 0:e.getFoldingModel(),i=this._editor.getLayoutInfo();for(const[e,n]of this._lineNumbers.entries()){const o=this._renderChildNode(e,n,i,t);this._linesDomNode.appendChild(o.lineDomNode),this._lineNumbersDomNode.appendChild(o.lineNumberDomNode),this._stickyLines.push(o)}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const n=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(0===n)return void this._clearStickyWidget();this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${n}px`,this._linesDomNodeScrollable.style.height=`${n}px`,this._rootDomNode.style.height=`${n}px`;const o=this._editor.getOption(71).side;this._rootDomNode.style.marginLeft="left"===o?i.minimap.minimapCanvasOuterWidth+"px":"0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}))}_setFoldingHoverListeners(){"mouseover"===this._editor.getOption(108)&&(this._foldingIconStore.add(u.nm(this._lineNumbersDomNode,u.tw.MOUSE_ENTER,(e=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)}))),this._foldingIconStore.add(u.nm(this._lineNumbersDomNode,u.tw.MOUSE_LEAVE,(()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)}))))}_renderChildNode(e,t,i,n){const o=this._editor._getViewModel(),s=o.coordinatesConverter.convertModelPositionToViewPosition(new T.L(t,1)).lineNumber,r=o.getViewLineRenderingData(s),a=this._editor.getOption(71).side,l=this._editor.getOption(66);let d;try{d=R.Kp.filter(r.inlineDecorations,s,r.minColumn,r.maxColumn)}catch(e){d=[]}const h=new A.IJ(!0,!0,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,0,r.tokens,d,r.tabSize,r.startVisibleColumn,1,1,1,500,"none",!0,!0,null),c=new M.HT(2e3),u=(0,A.d1)(h,c);let g;g=W?W.createHTML(c.build()):c.build();const p=document.createElement("span");p.className="sticky-line-content",p.classList.add(`stickyLine${t}`),p.style.lineHeight=`${this._lineHeight}px`,p.innerHTML=g;const m=document.createElement("span");m.className="sticky-line-number",m.style.lineHeight=`${this._lineHeight}px`;const f="left"===a?i.contentLeft-i.minimap.minimapCanvasOuterWidth:i.contentLeft;m.style.width=`${f}px`;const _=document.createElement("span");1===l.renderType||3===l.renderType&&t%10==0?_.innerText=t.toString():2===l.renderType&&(_.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),_.className="sticky-line-number-inner",_.style.lineHeight=`${this._lineHeight}px`,_.style.width=`${i.lineNumbersWidth}px`,_.style.float="left","left"===a?_.style.paddingLeft=i.lineNumbersLeft-i.minimap.minimapCanvasOuterWidth+"px":"right"===a&&(_.style.paddingLeft=`${i.lineNumbersLeft}px`),m.appendChild(_);const v=this._renderFoldingIconForLine(m,n,e,t);this._editor.applyFontInfo(p),this._editor.applyFontInfo(_),p.setAttribute("role","listitem"),p.setAttribute(V,String(e)),p.tabIndex=0,m.style.lineHeight=`${this._lineHeight}px`,p.style.lineHeight=`${this._lineHeight}px`,m.style.height=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`;const b=e===this._lineNumbers.length-1;p.style.zIndex=b?"0":"1",m.style.zIndex=b?"0":"1";const C=`${e*this._lineHeight+this._lastLineRelativePosition+((null==v?void 0:v.isCollapsed)?1:0)}px`,w=e*this._lineHeight+"px";return p.style.top=b?C:w,m.style.top=b?C:w,new z(t,p,m,v,u.characterMapping)}_renderFoldingIconForLine(e,t,i,n){const o=this._editor.getOption(108);if(!t||"never"===o)return;const s=t.regions,r=s.findRange(n),a=s.getStartLineNumber(r);if(n!==a)return;const l=s.isCollapsed(r),d=new K(l,this._lineHeight);return e.append(d.domNode),d.setVisible(!!this._isOnGlyphMargin||l||"always"===o),this._foldingIconStore.add(u.nm(d.domNode,u.tw.CLICK,(()=>{(0,F.d8)(t,Number.MAX_VALUE,[n]),d.isCollapsed=!l;const e=(l?this._editor.getTopForLineNumber(a):this._editor.getTopForLineNumber(s.getEndLineNumber(r)))-this._lineHeight*i+1;this._editor.setScrollTop(e)}))),d}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const e of this._stickyLines)e.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=e.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e<this._stickyLines.length&&this._stickyLines[e].lineDomNode.focus()}getEditorPositionFromNode(e){if(!e||e.children.length>0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=(0,E.dL)(t.characterMapping,e,0);return new T.L(t.lineNumber,i)}getLineNumberFromChildDomNode(e){var t,i;return null!==(i=null===(t=this._getRenderedStickyLineFromChildDomNode(e))||void 0===t?void 0:t.lineNumber)&&void 0!==i?i:null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getStickyLineIndexFromChildDomNode(e);return null===t||t<0||t>=this._stickyLines.length?null:this._stickyLines[t]}getStickyLineIndexFromChildDomNode(e){for(;e&&e!==this._rootDomNode;){const t=e.getAttribute(V);if(t)return parseInt(t,10);e=e.parentElement}return null}}class z{constructor(e,t,i,n,o){this.lineNumber=e,this.lineDomNode=t,this.lineNumberDomNode=i,this.foldingIcon=n,this.characterMapping=o}}class K{constructor(e,t){this.isCollapsed=e,this.dimension=t,this.domNode=document.createElement("div"),this.domNode.style.width=`${t}px`,this.domNode.style.height=`${t}px`,this.domNode.className=p.k.asClassName(e?P.f5:P.Iy)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}var U=i(71050),j=i(15393),$=i(9488),q=i(4669),Z=i(51381),G=i(30335),Q=i(99155),Y=i(84990),J=i(17301);class X{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class ee{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class te{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var ie,ne,oe=i(53725),se=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},re=function(e,t){return function(i,n){t(i,n,e)}},ae=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e.OUTLINE_MODEL="outlineModel",e.FOLDING_PROVIDER_MODEL="foldingProviderModel",e.INDENTATION_MODEL="indentationModel"}(ie||(ie={})),function(e){e[e.VALID=0]="VALID",e[e.INVALID=1]="INVALID",e[e.CANCELED=2]="CANCELED"}(ne||(ne={}));let le=class extends h.JT{constructor(e,t,i,n){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=i,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new j.vp(300)),this._updateOperation=this._register(new h.SL);const o=new he(i),s=new ge(this._editor,i),r=new ue(this._editor,t);switch(n){case ie.OUTLINE_MODEL:this._modelProviders.push(o),this._modelProviders.push(s),this._modelProviders.push(r);break;case ie.FOLDING_PROVIDER_MODEL:this._modelProviders.push(s),this._modelProviders.push(r);break;case ie.INDENTATION_MODEL:this._modelProviders.push(r)}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,i){return ae(this,void 0,void 0,(function*(){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger((()=>ae(this,void 0,void 0,(function*(){for(const n of this._modelProviders){const{statusPromise:o,modelPromise:s}=n.computeStickyModel(e,t,i);this._modelPromise=s;const r=yield o;if(this._modelPromise!==s)return null;switch(r){case ne.CANCELED:return this._updateOperation.clear(),null;case ne.VALID:return n.stickyModel}}return null})))).catch((e=>((0,J.dL)(e),null)))}))}};le=se([re(1,Z.c_),re(2,c.p)],le);class de{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,ne.INVALID}computeStickyModel(e,t,i){if(i.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};const n=(0,j.PG)((i=>this.createModelFromProvider(e,t,i)));return{statusPromise:n.then((n=>this.isModelValid(n)?i.isCancellationRequested?ne.CANCELED:(this._stickyModel=this.createStickyModel(e,t,i,n),ne.VALID):this._invalid())).then(void 0,(e=>((0,J.dL)(e),ne.CANCELED))),modelPromise:n}}isModelValid(e){return!0}isProviderValid(e){return!0}}let he=class extends de{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,i){return G.C3.create(this._languageFeaturesService.documentSymbolProvider,e,i)}createStickyModel(e,t,i,n){var o;const{stickyOutlineElement:s,providerID:r}=this._stickyModelFromOutlineModel(n,null===(o=this._stickyModel)||void 0===o?void 0:o.outlineProviderId);return new te(e.uri,t,s,r)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(oe.$.first(e.children.values())instanceof G.H3){const n=oe.$.find(e.children.values(),(e=>e.id===t));if(n)i=n.children;else{let n,o="",s=-1;for(const[t,i]of e.children.entries()){const e=this._findSumOfRangesOfGroup(i);e>s&&(n=i,s=e,o=i.id)}t=o,i=n.children}}else i=e.children;const n=[],o=Array.from(i.values()).sort(((e,t)=>{const i=new X(e.symbol.range.startLineNumber,e.symbol.range.endLineNumber),n=new X(t.symbol.range.startLineNumber,t.symbol.range.endLineNumber);return this._comparator(i,n)}));for(const e of o)n.push(this._stickyModelFromOutlineElement(e,e.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new ee(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const n of e.children.values())if(n.symbol.selectionRange.startLineNumber!==n.symbol.range.endLineNumber)if(n.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(n,n.symbol.selectionRange.startLineNumber));else for(const e of n.children.values())i.push(this._stickyModelFromOutlineElement(e,n.symbol.selectionRange.startLineNumber));i.sort(((e,t)=>this._comparator(e.range,t.range)));const n=new X(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new ee(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof G.sT?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};he=se([re(0,c.p)],he);class ce extends de{constructor(e){super(),this._foldingLimitReporter=new O.n(e)}createStickyModel(e,t,i,n){const o=this._fromFoldingRegions(n);return new te(e.uri,t,o,void 0)}isModelValid(e){return null!==e}_fromFoldingRegions(e){const t=e.length,i=[],n=new ee(void 0,[],void 0);for(let o=0;o<t;o++){const t=e.getParentIndex(o);let s;s=-1!==t?i[t]:n;const r=new ee(new X(e.getStartLineNumber(o),e.getEndLineNumber(o)+1),[],s);s.children.push(r),i.push(r)}return n}}let ue=class extends ce{constructor(e,t){super(e),this._languageConfigurationService=t}createModelFromProvider(e,t,i){return new Y.aI(e,this._languageConfigurationService,this._foldingLimitReporter).compute(i)}};ue=se([re(1,Z.c_)],ue);let ge=class extends ce{constructor(e,t){super(e),this._languageFeaturesService=t}isProviderValid(e){return O.f.getFoldingRangeProviders(this._languageFeaturesService,e).length>0}createModelFromProvider(e,t,i){const n=O.f.getFoldingRangeProviders(this._languageFeaturesService,e);return new Q.e(e,n,(()=>this.createModelFromProvider(e,t,i)),this._foldingLimitReporter,void 0).compute(i)}};ge=se([re(1,c.p)],ge);var pe=function(e,t){return function(i,n){t(i,n,e)}},me=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class fe{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let _e=class extends h.JT{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new q.Q5),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new h.SL),this._updateSoon=this._register(new j.pY((()=>this.update()),50)),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(113)&&this.readConfiguration()}))),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(113),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new le(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel((()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()}))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas((()=>this.update()))),this._sessionStore.add(this._editor.onDidChangeModelContent((()=>this._updateSoon.schedule()))),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>this.update()))),this.update())}getVersionId(){var e;return null===(e=this._model)||void 0===e?void 0:e.version}update(){var e;return me(this,void 0,void 0,(function*(){null===(e=this._cts)||void 0===e||e.dispose(!0),this._cts=new U.A,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}))}updateStickyModel(e){return me(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._stickyModelProvider)return void(this._model=null);const t=this._editor.getModel(),i=t.getVersionId(),n=yield this._stickyModelProvider.update(t,i,e);e.isCancellationRequested||(this._model=n)}))}updateIndex(e){return-1===e?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,o){if(0===t.children.length)return;let s=o;const r=[];for(let e=0;e<t.children.length;e++){const i=t.children[e];i.range&&r.push(i.range.startLineNumber)}const a=this.updateIndex((0,$.ry)(r,e.startLineNumber,((e,t)=>e-t))),l=this.updateIndex((0,$.ry)(r,e.startLineNumber+n,((e,t)=>e-t)));for(let r=a;r<=l;r++){const a=t.children[r];if(!a)return;if(a.range){const t=a.range.startLineNumber,o=a.range.endLineNumber;e.startLineNumber<=o+1&&t-1<=e.endLineNumber&&t!==s&&(s=t,i.push(new fe(t,o-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n+1,t))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n,o)}}getCandidateStickyLinesIntersecting(e){var t,i;if(!(null===(t=this._model)||void 0===t?void 0:t.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,n,0,-1);const o=null===(i=this._editor._getViewModel())||void 0===i?void 0:i.getHiddenAreas();if(o)for(const e of o)n=n.filter((t=>!(t.startLineNumber>=e.startLineNumber&&t.endLineNumber<=e.endLineNumber+1)));return n}};_e=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([pe(1,c.p),pe(2,Z.c_)],_e);var ve,be=i(72065),Ce=i(5606),we=i(82005),ye=i(24314),Se=i(40184),Le=i(58722),xe=i(88191),ke=i(7448),Ne=function(e,t){return function(i,n){t(i,n,e)}},De=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Ee=ve=class extends h.JT{constructor(e,t,i,n,o,s,r){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=r,this._sessionStore=new h.SL,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new H(this._editor),this._stickyLineCandidateProvider=new _e(this._editor,i,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new B([],[],0),this._readConfiguration();const a=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(113)||e.hasChanged(71)||e.hasChanged(65)||e.hasChanged(108))&&this._readConfiguration()}))),this._register(u.nm(a,u.tw.CONTEXT_MENU,(e=>De(this,void 0,void 0,(function*(){this._onContextMenu(e)}))))),this._stickyScrollFocusedContextKey=d.u.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=d.u.stickyScrollVisible.bindTo(this._contextKeyService);const l=this._register(u.go(a));this._register(l.onDidBlur((e=>{!1===this._positionRevealed&&0===a.clientHeight?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()}))),this._register(l.onDidFocus((e=>{this.focus()}))),this._registerMouseListeners(),this._register(u.nm(a,u.tw.MOUSE_DOWN,(e=>{this._onMouseDown=!0})))}static get(e){return e.getContribution(ve.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),null===(e=this._focusDisposableStore)||void 0===e||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown)return this._onMouseDown=!1,void this._editor.focus();!0!==this._stickyScrollFocusedContextKey.get()&&(this._focused=!0,this._focusDisposableStore=new h.SL,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex<this._stickyScrollWidget.lineNumberCount-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,(()=>this._editor.revealPosition(e)))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,(()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0)))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(ye.e.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new h.SL),t=this._register(new we.yN(this._editor,{extractLineNumberFromMouseEvent:e=>{const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);return t?t.lineNumber:0}})),i=e=>{if(!this._editor.hasModel())return null;if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return null;const t=e.target.element;if(!t||t.innerText!==t.innerHTML)return null;const i=this._stickyScrollWidget.getEditorPositionFromNode(t);return i?{range:new ye.e(i.lineNumber,i.column,i.lineNumber,i.column+t.innerText.length),textElement:t}:null},n=this._stickyScrollWidget.getDomNode();this._register(u.mu(n,u.tw.CLICK,(e=>{if(e.ctrlKey||e.altKey||e.metaKey)return;if(!e.leftButton)return;if(e.shiftKey){const t=this._stickyScrollWidget.getStickyLineIndexFromChildDomNode(e.target);if(null===t)return;const i=new T.L(this._endLineNumbers[t],1);return void this._revealLineInCenterIfOutsideViewport(i)}let t=this._stickyScrollWidget.getEditorPositionFromNode(e.target);if(!t){const i=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);if(null===i)return;t=new T.L(i,1)}this._revealPosition(t)}))),this._register(u.mu(n,u.tw.MOUSE_MOVE,(e=>{if(e.shiftKey){const t=this._stickyScrollWidget.getStickyLineIndexFromChildDomNode(e.target);if(null===t||null!==this._showEndForLine&&this._showEndForLine===t)return;return this._showEndForLine=t,void this._renderStickyScroll()}null!==this._showEndForLine&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._register(u.nm(n,u.tw.MOUSE_LEAVE,(e=>{null!==this._showEndForLine&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._register(t.onMouseMoveOrRelevantKeyDown((([t,n])=>{const o=i(t);if(!o||!t.hasTriggerModifier||!this._editor.hasModel())return void e.clear();const{range:s,textElement:r}=o;if(s.equalsRange(this._stickyRangeProjectedOnEditor)){if("underline"===r.style.textDecoration)return}else this._stickyRangeProjectedOnEditor=s,e.clear();const a=new U.A;let l;e.add((0,h.OF)((()=>a.dispose(!0)))),(0,Se.nD)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new T.L(s.startLineNumber,s.startColumn+1),a.token).then((t=>{if(!a.token.isCancellationRequested)if(0!==t.length){this._candidateDefinitionsLength=t.length;const i=r;l!==i?(e.clear(),l=i,l.style.textDecoration="underline",e.add((0,h.OF)((()=>{l.style.textDecoration="none"})))):l||(l=i,l.style.textDecoration="underline",e.add((0,h.OF)((()=>{l.style.textDecoration="none"}))))}else e.clear()}))}))),this._register(t.onCancel((()=>{e.clear()}))),this._register(t.onExecute((e=>De(this,void 0,void 0,(function*(){if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return;const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);t&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:t.lineNumber,column:1})),this._instaService.invokeFunction(Le.K,e,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))))}_onContextMenu(e){const t=new ke.n(e);this._contextMenuService.showContextMenu({menuId:r.eH.StickyScrollContext,getAnchor:()=>t})}_readConfiguration(){const e=this._editor.getOption(113);if(!1===e.enabled)return this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),void(this._enabled=!1);e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._sessionStore.add(this._editor.onDidLayoutChange((()=>this._onDidResize()))),this._sessionStore.add(this._editor.onDidChangeModelTokens((e=>this._onTokensChange(e)))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll((()=>{this._showEndForLine=null,this._renderStickyScroll()}))),this._enabled=!0),2===this._editor.getOption(66).renderType&&this._sessionStore.add(this._editor.onDidChangeCursorPosition((()=>{this._showEndForLine=null,this._renderStickyScroll()})))}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const t of e.ranges)if(i>=t.fromLineNumber&&i<=t.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll()}_onDidResize(){const e=this._editor.getLayoutInfo().height/this._editor.getOption(65);this._maxStickyLines=Math.round(.25*e)}_renderStickyScroll(){const e=this._editor.getModel();if(!e||e.isTooLargeForTokenization())return void this._stickyScrollWidget.setState(void 0);const t=this._stickyLineCandidateProvider.getVersionId();if(void 0===t||t===e.getVersionId())if(this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(!(0===this._widgetState.startLineNumbers.length)),this._focused)if(-1===this._focusedStickyElementIndex)this._stickyScrollWidget.setState(this._widgetState),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,-1!==this._focusedStickyElementIndex&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const e=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState),0===this._stickyScrollWidget.lineNumberCount?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(e)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}else this._stickyScrollWidget.setState(this._widgetState)}findScrollWidgetState(){const e=this._editor.getOption(65),t=Math.min(this._maxStickyLines,this._editor.getOption(113).maxLineCount),i=this._editor.getScrollTop();let n=0;const o=[],s=[],r=this._editor.getVisibleRanges();if(0!==r.length){const a=new X(r[0].startLineNumber,r[r.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(const r of l){const a=r.startLineNumber,l=r.endLineNumber,d=r.nestingDepth;if(l-a>0){const r=(d-1)*e,h=d*e,c=this._editor.getBottomForLineNumber(a)-i,u=this._editor.getTopForLineNumber(l)-i,g=this._editor.getBottomForLineNumber(l)-i;if(r>u&&r<=g){o.push(a),s.push(l+1),n=g-h;break}if(h>c&&h<=g&&(o.push(a),s.push(l+1)),o.length===t)break}}}return this._endLineNumbers=s,new B(o,s,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};Ee.ID="store.contrib.stickyScrollController",Ee=ve=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ne(1,Ce.i),Ne(2,c.p),Ne(3,be.TG),Ne(4,Z.c_),Ne(5,xe.A),Ne(6,l.i6)],Ee);class Ie extends r.Ke{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:(0,o.NC)("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:(0,o.NC)({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:s.View,toggled:{condition:l.Ao.equals("config.editor.stickyScroll.enabled",!0),title:(0,o.NC)("stickyScroll","Sticky Scroll"),mnemonicTitle:(0,o.NC)({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:r.eH.CommandPalette},{id:r.eH.MenubarAppearanceMenu,group:"4_editor",order:3},{id:r.eH.StickyScrollContext}]})}run(e){return t=this,i=void 0,o=function*(){const t=e.get(a.Ui),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)},new((n=void 0)||(n=Promise))((function(e,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}}const Te=100;class Me extends n.x1{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:(0,o.NC)("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:(0,o.NC)({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:l.Ao.and(l.Ao.has("config.editor.stickyScroll.enabled"),d.u.stickyScrollVisible),menu:[{id:r.eH.CommandPalette}]})}runEditorCommand(e,t){var i;null===(i=Ee.get(t))||void 0===i||i.focus()}}class Re extends n.x1{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:(0,o.NC)("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:d.u.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Te,primary:18}})}runEditorCommand(e,t){var i;null===(i=Ee.get(t))||void 0===i||i.focusNext()}}class Ae extends n.x1{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:(0,o.NC)("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:d.u.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Te,primary:16}})}runEditorCommand(e,t){var i;null===(i=Ee.get(t))||void 0===i||i.focusPrevious()}}class Oe extends n.x1{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:(0,o.NC)("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:d.u.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Te,primary:3}})}runEditorCommand(e,t){var i;null===(i=Ee.get(t))||void 0===i||i.goToFocused()}}class Pe extends n.x1{constructor(){super({id:"editor.action.selectEditor",title:{value:(0,o.NC)("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:d.u.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Te,primary:9}})}runEditorCommand(e,t){var i;null===(i=Ee.get(t))||void 0===i||i.selectEditor()}}(0,n._K)(Ee.ID,Ee,1),(0,r.r1)(Ie),(0,r.r1)(Me),(0,r.r1)(Ae),(0,r.r1)(Re),(0,r.r1)(Oe),(0,r.r1)(Pe)},74961:(e,t,i)=>{i.d(t,{_:()=>a,t:()=>r});var n=i(9488),o=i(75392),s=i(97295);class r{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class a{constructor(e,t,i,n,s,r,l=o.mX.default,d=void 0){this.clipboardText=d,this._snippetCompareFn=a._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=l,"top"===r?this._snippetCompareFn=a._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=a._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();const e=new Set;for(const[t,i]of this.getItemsByProvider())i.length>0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let r="",a="";const l=1===this._refilterKind?this._items:this._filteredItems,d=[],h=!this._options.filterGraceful||l.length>2e3?o.EW:o.l7;for(let n=0;n<l.length;n++){const c=l[n];if(c.isInvalid)continue;const u=this._itemsByProvider.get(c.provider);u?u.push(c):this._itemsByProvider.set(c.provider,[c]);const g=c.position.column-c.editStart.column,p=g+i-(c.position.column-this._column);if(r.length!==p&&(r=0===p?"":t.slice(-p),a=r.toLowerCase()),c.word=r,0===p)c.score=o.CL.Default;else{let e=0;for(;e<g;){const t=r.charCodeAt(e);if(32!==t&&9!==t)break;e+=1}if(e>=p)c.score=o.CL.Default;else if("string"==typeof c.completion.filterText){const t=h(r,a,e,c.completion.filterText,c.filterTextLow,0,this._fuzzyScoreOptions);if(!t)continue;0===(0,s.zY)(c.completion.filterText,c.textLabel)?c.score=t:(c.score=(0,o.jB)(r,a,e,c.textLabel,c.labelLow,0),c.score[0]=t[0])}else{const t=h(r,a,e,c.textLabel,c.labelLow,0,this._fuzzyScoreOptions);if(!t)continue;c.score=t}}c.idx=n,c.distance=this._wordDistance.distance(c.position,c.completion),d.push(c),e.push(c.textLabel.length)}this._filteredItems=d.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,n.HW)(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]<t.score[0]?1:e.distance<t.distance?-1:e.distance>t.distance?1:e.idx<t.idx?-1:e.idx>t.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return a._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return a._compareCompletionItems(e,t)}}},55621:(e,t,i)=>{i.d(t,{A9:()=>L,GI:()=>y,ZJ:()=>k,_y:()=>w,i5:()=>T,kL:()=>D,tG:()=>M});var n=i(71050),o=i(17301),s=i(75392),r=i(5976),a=i(84013),l=i(98401),d=i(70666),h=i(50187),c=i(24314),u=i(88216),g=i(35084),p=i(63580),m=i(84144),f=i(94565),_=i(93983),v=i(71922),b=i(22980),C=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const w={Visible:b.iX,HasFocusedSuggestion:new _.uy("suggestWidgetHasFocusedSuggestion",!1,(0,p.NC)("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new _.uy("suggestWidgetDetailsVisible",!1,(0,p.NC)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new _.uy("suggestWidgetMultipleSuggestions",!1,(0,p.NC)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new _.uy("suggestionMakesTextEdit",!0,(0,p.NC)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new _.uy("acceptSuggestionOnEnter",!0,(0,p.NC)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new _.uy("suggestionHasInsertAndReplaceRange",!1,(0,p.NC)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new _.uy("suggestionInsertMode",void 0,{type:"string",description:(0,p.NC)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new _.uy("suggestionCanResolve",!1,(0,p.NC)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},y=new m.eH("suggestWidgetStatusBar");class S{constructor(e,t,i,n){var o;this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=s.CL.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:null===(o=t.label)||void 0===o?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,c.e.isIRange(t.range)?(this.editStart=new h.L(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new h.L(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new h.L(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||c.e.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new h.L(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new h.L(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new h.L(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||c.e.spansMultipleLines(t.range.insert)||c.e.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return void 0!==this._resolveDuration}get resolveDuration(){return void 0!==this._resolveDuration?this._resolveDuration:-1}resolve(e){return C(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._resolveDuration=void 0})),i=new a.G(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._resolveDuration=i.elapsed(),t.dispose()}),(e=>{(0,o.n2)(e)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}))}return this._resolveCache}))}}class L{constructor(e=2,t=new Set,i=new Set,n=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=o}}let x;function k(){return x}L.default=new L;class N{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function D(e,t,i,s=L.default,l={triggerKind:0},d=n.T.None){return C(this,void 0,void 0,(function*(){const n=new a.G;i=i.clone();const h=t.getWordAtPosition(i),u=h?new c.e(i.lineNumber,h.startColumn,i.lineNumber,h.endColumn):c.e.fromPositions(i),p={replace:u,insert:u.setEndPosition(i.lineNumber,i.column)},m=[],f=new r.SL,_=[];let v=!1;const b=(e,t,n)=>{var o,a,l;let d=!1;if(!t)return d;for(const n of t.suggestions)if(!s.kindFilter.has(n.kind)){if(!s.showDeprecated&&(null===(o=null==n?void 0:n.tags)||void 0===o?void 0:o.includes(1)))continue;n.range||(n.range=p),n.sortText||(n.sortText="string"==typeof n.label?n.label:n.label.label),!v&&n.insertTextRules&&4&n.insertTextRules&&(v=g.Yj.guessNeedsClipboard(n.insertText)),m.push(new S(i,n,t,e)),d=!0}return(0,r.Wf)(t)&&f.add(t),_.push({providerName:null!==(a=e._debugDisplayName)&&void 0!==a?a:"unknown_provider",elapsedProvider:null!==(l=t.duration)&&void 0!==l?l:-1,elapsedOverall:n.elapsed()}),d},w=(()=>C(this,void 0,void 0,(function*(){if(!x||s.kindFilter.has(27))return;const e=s.providerItemsToReuse.get(x);if(e)return void e.forEach((e=>m.push(e)));if(s.providerFilter.size>0&&!s.providerFilter.has(x))return;const n=new a.G,o=yield x.provideCompletionItems(t,i,l,d);b(x,o,n)})))();for(const n of e.orderedGroups(t)){let e=!1;if(yield Promise.all(n.map((n=>C(this,void 0,void 0,(function*(){if(s.providerItemsToReuse.has(n)){const t=s.providerItemsToReuse.get(n);return t.forEach((e=>m.push(e))),void(e=e||t.length>0)}if(!(s.providerFilter.size>0)||s.providerFilter.has(n))try{const o=new a.G,s=yield n.provideCompletionItems(t,i,l,d);e=b(n,s,o)||e}catch(e){(0,o.Cp)(e)}}))))),e||d.isCancellationRequested)break}return yield w,d.isCancellationRequested?(f.dispose(),Promise.reject(new o.FU)):new N(m.sort((y=s.snippetSortOrder,I.get(y))),v,{entries:_,elapsed:n.elapsed()},f);var y}))}function E(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLow<t.sortTextLow)return-1;if(e.sortTextLow>t.sortTextLow)return 1}return e.textLabel<t.textLabel?-1:e.textLabel>t.textLabel?1:e.completion.kind-t.completion.kind}const I=new Map;function T(e,t){var i;null===(i=e.getContribution("editor.contrib.suggestController"))||void 0===i||i.triggerSuggest((new Set).add(t),void 0,!0)}I.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return E(e,t)})),I.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return E(e,t)})),I.set(1,E),f.P.registerCommand("_executeCompletionItemProvider",((e,...t)=>C(void 0,void 0,void 0,(function*(){const[i,o,s,r]=t;(0,l.p_)(d.o.isUri(i)),(0,l.p_)(h.L.isIPosition(o)),(0,l.p_)("string"==typeof s||!s),(0,l.p_)("number"==typeof r||!r);const{completionProvider:a}=e.get(v.p),c=yield e.get(u.S).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=c.object.textEditorModel.validatePosition(o),l=yield D(a,c.object.textEditorModel,i,void 0,{triggerCharacter:null!=s?s:void 0,triggerKind:s?1:0});for(const i of l.items)t.length<(null!=r?r:0)&&t.push(i.resolve(n.T.None)),e.incomplete=e.incomplete||i.container.incomplete,e.suggestions.push(i.completion);try{return yield Promise.all(t),e}finally{setTimeout((()=>l.disposable.dispose()),100)}}finally{c.dispose()}}))));class M{static isAllOff(e){return"off"===e.other&&"off"===e.comments&&"off"===e.strings}static isAllOn(e){return"on"===e.other&&"on"===e.comments&&"on"===e.strings}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}},25463:(e,t,i)=>{i.d(t,{n:()=>pt});var n,o=i(56346),s=i(9488),r=i(15393),a=i(71050),l=i(17301),d=i(4669),h=i(8313),c=i(5976),u=i(1432),g=i(84013),p=i(98401),m=i(43407),f=i(16830),_=i(69386),v=i(50187),b=i(24314),C=i(29102),w=i(98762),y=i(35084),S=i(80378),L=i(93983);let x=n=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=n.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(121)&&this._update())),this._update()}dispose(){var e;this._configListener.dispose(),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(121);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};var k,N;x.AtEnd=new L.uy("atEndOfWord",!1),x=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(k=1,N=L.i6,function(e,t){N(e,t,k)})],x);var D,E=i(63580),I=i(94565),T=i(72065),M=i(43557),R=i(55621);let A=D=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=D.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){0!==e.items.length&&D._moveIndex(!0,e,t)!==t?(this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(let o=t.items.length;o>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,n!==i)&&t.items[n].completion.additionalTextEdits;o--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=D._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};A.OtherSuggestions=new L.uy("hasOtherSuggestions",!1),A=D=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,L.i6)],A);var O=i(44906);class P{constructor(e,t,i,n){this._disposables=new c.SL,this._disposables.add(i.onDidSuggest((e=>{0===e.completionModel.items.length&&this.reset()}))),this._disposables.add(i.onDidCancel((e=>{this.reset()}))),this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((o=>{if(this._active&&!t.isFrozen()&&0!==i.state){const t=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}})))}_onItem(e){if(!e||!(0,s.Of)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new O.q;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var F,B=i(97295),W=i(3860),V=i(85215),H=i(24477),z=i(84972),K=i(33108),U=i(10829),j=i(74961),$=i(71922),q=i(75392),Z=i(78573),G=i(48814),Q=function(e,t){return function(i,n){t(i,n,e)}};class Y{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!(!n||n.endColumn!==i.column&&n.startColumn+1!==i.column||!isNaN(Number(n.word)))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}let J=F=class{constructor(e,t,i,n,o,s,a,l,h){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=o,this._contextKeyService=s,this._configurationService=a,this._languageFeaturesService=l,this._envService=h,this._toDispose=new c.SL,this._triggerCharacterListener=new c.SL,this._triggerQuickSuggest=new r._F,this._triggerState=void 0,this._completionDisposables=new c.SL,this._onDidCancel=new d.Q5,this._onDidTrigger=new d.Q5,this._onDidSuggest=new d.Q5,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new W.Y(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters()}))),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})));let u=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{u=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{u=!1,this._onCompositionEnd()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{u||this._onCursorChange(e)}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{u||void 0===this._triggerState||this._refilterCompletionItems()}))),this._updateTriggerCharacters()}dispose(){(0,c.B9)(this._triggerCharacterListener),(0,c.B9)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(89)||!this._editor.hasModel()||!this._editor.getOption(119))return;const e=new Map;for(const t of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const i of t.triggerCharacters||[]){let n=e.get(i);n||(n=new Set,n.add((0,R.ZJ)()),e.set(i,n)),n.add(t)}const t=t=>{var i;if(!function(e,t,i){if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const n=t.getContextKeyValue(Z.f.suppressSuggestions.key);return void 0!==n?!n:!e.getOption(61).suppressSuggestions}(this._editor,this._contextKeyService,this._configurationService))return;if(Y.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let n="";(0,B.YK)(t.charCodeAt(t.length-1))?(0,B.ZG)(t.charCodeAt(t.length-2))&&(n=t.substr(t.length-2)):n=t.charAt(t.length-1);const o=e.get(n);if(o){const e=new Map;if(this._completionModel)for(const[t,i]of this._completionModel.getItemsByProvider())o.has(t)||e.set(t,i);this.trigger({auto:!0,triggerKind:1,triggerCharacter:n,retrigger:Boolean(this._completionModel),clipboardText:null===(i=this._completionModel)||void 0===i?void 0:i.clipboardText,completionOptions:{providerFilter:o,providerItemsToReuse:e}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd((()=>t())))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;void 0!==this._triggerState&&(this._triggerQuickSuggest.cancel(),null===(t=this._requestToken)||void 0===t||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){void 0!==this._triggerState&&(this._editor.hasModel()&&this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.trigger({auto:this._triggerState.auto,retrigger:!0}):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source?this.cancel():void 0===this._triggerState&&0===e.reason?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():void 0!==this._triggerState&&3===e.reason&&this._refilterCompletionItems()}_onCompositionEnd(){void 0===this._triggerState?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;R.tG.isAllOff(this._editor.getOption(87))||this._editor.getOption(116).snippetsPreventQuickSuggestions&&(null===(e=w.f.get(this._editor))||void 0===e?void 0:e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(void 0!==this._triggerState)return;if(!Y.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(87);if(!R.tG.isAllOff(i)){if(!R.tG.isAllOn(i)){e.tokenization.tokenizeIfCheap(t.lineNumber);const n=e.tokenization.getLineTokens(t.lineNumber),o=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("on"!==R.tG.valueFor(i,o))return}(function(e,t,i){if(!Boolean(t.getContextKeyValue(Z.f.inlineSuggestionVisible.key)))return!0;const n=t.getContextKeyValue(Z.f.suppressSuggestions.key);return void 0!==n?!n:!e.getOption(61).suppressSuggestions})(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}}),this._editor.getOption(88)))}_refilterCompletionItems(){(0,p.p_)(this._editor.hasModel()),(0,p.p_)(void 0!==this._triggerState);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new Y(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(i)}trigger(e){var t,i,n,o,s,r;if(!this._editor.hasModel())return;const d=this._editor.getModel(),h=new Y(d,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:null!==(t=e.shy)&&void 0!==t&&t,position:this._editor.getPosition()}),this._context=h;let c={triggerKind:null!==(i=e.triggerKind)&&void 0!==i?i:0};e.triggerCharacter&&(c={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new a.A;let u=1;switch(this._editor.getOption(110)){case"top":u=0;break;case"bottom":u=2}const{itemKind:g,showDeprecated:p}=F._createSuggestFilter(this._editor),m=new R.A9(u,null!==(o=null===(n=e.completionOptions)||void 0===n?void 0:n.kindFilter)&&void 0!==o?o:g,null===(s=e.completionOptions)||void 0===s?void 0:s.providerFilter,null===(r=e.completionOptions)||void 0===r?void 0:r.providerItemsToReuse,p),f=H.K.create(this._editorWorkerService,this._editor),_=(0,R.kL)(this._languageFeaturesService.completionProvider,d,this._editor.getPosition(),m,c,this._requestToken.token);Promise.all([_,f]).then((([t,i])=>{return n=this,o=void 0,r=function*(){var n;if(null===(n=this._requestToken)||void 0===n||n.dispose(),!this._editor.hasModel())return;let o=null==e?void 0:e.clipboardText;if(!o&&t.needsClipboard&&(o=yield this._clipboardService.readText()),void 0===this._triggerState)return;const s=this._editor.getModel(),r=new Y(s,this._editor.getPosition(),e),a=Object.assign(Object.assign({},q.mX.default),{firstMatchCanBeWeak:!this._editor.getOption(116).matchOnWordStartOnly});if(this._completionModel=new j._(t.items,this._context.column,{leadingLineContent:r.leadingLineContent,characterCountDelta:r.column-this._context.column},i,this._editor.getOption(116),this._editor.getOption(110),a,o),this._completionDisposables.add(t.disposable),this._onNewContext(r),this._reportDurationsTelemetry(t.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const e of t.items)e.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${e.provider._debugDisplayName}`,e.completion)},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,a)}l((r=r.apply(n,o||[])).next())}));var n,o,s,r})).catch(l.dL)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static _createSuggestFilter(e){const t=new Set;"none"===e.getOption(110)&&t.add(27);const i=e.getOption(116);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if((0,B.V8)(e.leadingLineContent)===(0,B.V8)(this._context.leadingLineContent)){if(e.column<this._context.column)e.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();else if(this._completionModel)if(0!==e.leadingWord.word.length&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){if(Y.shouldAutoTrigger(this._editor)&&this._context){const e=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:e}})}}else if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&0!==e.leadingWord.word.length){const e=new Map,t=new Set;for(const[i,n]of this._completionModel.getItemsByProvider())n.length>0&&n[0].container.incomplete?t.add(i):e.set(i,n);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:t,providerItemsToReuse:e}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){const n=Y.shouldAutoTrigger(this._editor);if(!this._context)return void this.cancel();if(n&&this._context.leadingWord.endColumn<e.leadingWord.startColumn)return void this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0});if(this._context.triggerOptions.auto)return void this.cancel();if(this._completionModel.lineContext=t,i=this._completionModel.items.length>0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}else this.cancel();else this.cancel()}};J=F=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Q(1,V.p),Q(2,z.p),Q(3,U.b),Q(4,M.VZ),Q(5,L.i6),Q(6,K.Ui),Q(7,$.p),Q(8,G.Y)],J);class X{constructor(e,t){this._disposables=new c.SL,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType((()=>{if(this._locked||!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;e<i;e++)if(!t[e].isEmpty()){n=!0;break}if(!n)return void(0!==this._lastOvertyped.length&&(this._lastOvertyped.length=0));this._lastOvertyped=[];const o=e.getModel();for(let e=0;e<i;e++){const i=t[e];if(o.getValueLengthInRange(i)>X._maxSelectionLength)return;this._lastOvertyped[e]={value:o.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}}))),this._disposables.add(t.onDidTrigger((e=>{this._locked=!0}))),this._disposables.add(t.onDidCancel((e=>{this._locked=!1})))}getLastOvertypedInfo(e){if(e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}}X._maxSelectionLength=51200;var ee=i(65321),te=(i(89899),i(43799)),ie=i(59870),ne=i(93379),oe=i.n(ne),se=i(7795),re=i.n(se),ae=i(90569),le=i.n(ae),de=i(3565),he=i.n(de),ce=i(19216),ue=i.n(ce),ge=i(44589),pe=i.n(ge),me=i(45224),fe={};fe.styleTagTransform=pe(),fe.setAttributes=he(),fe.insert=le().bind(null,"head"),fe.domAPI=re(),fe.insertStyleElement=ue(),oe()(me.Z,fe),me.Z&&me.Z.locals&&me.Z.locals;var _e=i(84527),ve=i(90317),be=i(44691),Ce=i(84144),we=function(e,t){return function(i,n){t(i,n,e)}};class ye extends be.Mm{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=(0,E.NC)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,ye.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return null===(t=e.getLabel())||void 0===t?void 0:t.replace(/\benter\b/gi,"⏎")}}let Se=class{constructor(e,t,i,n,o){this._menuId=t,this._menuService=n,this._contextKeyService=o,this._menuDisposables=new c.SL,this.element=ee.R3(e,ee.$(".suggest-status-bar"));const s=e=>e instanceof Ce.U8?i.createInstance(ye,e,void 0):void 0;this._leftActions=new ve.o(this.element,{actionViewItemProvider:s}),this._rightActions=new ve.o(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const t=[],i=[];for(const[n,o]of e.getActions())"left"===n?t.push(...o):i.push(...o);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};Se=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([we(2,T.TG),we(3,Ce.co),we(4,L.i6)],Se),i(22368);var Le=i(26904),xe=i(73910),ke=i(92321),Ne=i(97781),De=i(17735),Ee=i(64117),Ie=i(73046),Te=i(25670),Me=i(59365),Re=i(18806);function Ae(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let Oe=class{constructor(e,t){this._editor=e,this._onDidClose=new d.Q5,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new d.Q5,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new c.SL,this._renderDisposeable=new c.SL,this._borderWidth=1,this._size=new ee.Ro(330,0),this.domNode=ee.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(Re.$,{editor:e}),this._body=ee.$(".body"),this._scrollbar=new Ee.s$(this._body,{alwaysConsumeMouseWheel:!0}),ee.R3(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=ee.R3(this._body,ee.$(".header")),this._close=ee.R3(this._header,ee.$("span"+Te.k.asCSSSelector(Ie.l.close))),this._close.title=E.NC("details.close","Close"),this._type=ee.R3(this._header,ee.$("p.type")),this._docs=ee.R3(this._body,ee.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(49)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(49),i=t.getMassagedFontFamily(),n=e.get(117)||t.fontSize,o=e.get(118)||t.lineHeight,s=t.fontWeight,r=`${n}px`,a=`${o}px`;this.domNode.style.fontSize=r,this.domNode.style.lineHeight=""+o/n,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(118)||this._editor.getOption(49).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=E.NC("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:o,documentation:s}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${null!==(i=e.word)&&void 0!==i?i:"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${null===(n=e.completion.commitCharacters)||void 0===n?void 0:n.join("")}\n`,s=(new Me.W5).appendCodeblock("empty",t),o=`Provider: ${e.provider._debugDisplayName}`}if(t||Ae(e)){if(this.domNode.classList.remove("no-docs","no-type"),o){const e=o.length>1e5?`${o.substr(0,1e5)}…`:o;this._type.textContent=e,this._type.title=e,ee.$Z(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else ee.PO(this._type),this._type.title="",ee.Cp(this._type),this.domNode.classList.add("no-type");if(ee.PO(this._docs),"string"==typeof s)this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),ee.PO(this._docs);const e=this._markdownRenderer.render(s);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new ee.Ro(e,t);ee.Ro.equals(i,this._size)||(this._size=i,ee.dp(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};Oe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,T.TG)],Oe);class Pe{constructor(e,t){let i,n;this.widget=e,this._editor=t,this._disposables=new c.SL,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new De.f,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let o=0,s=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(s=n.width-e.dimension.width,t=!0),e.north&&(o=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+o,left:i.left+s})}e.done&&(i=void 0,n=void 0,o=0,s=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{var e;this._anchorBox&&this._placeAtAnchor(this._anchorBox,null!==(e=this._userSize)&&void 0!==e?e:this.widget.size,this._preferAlignAtTop)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,null!==(i=this._userSize)&&void 0!==i?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const o=ee.D6(document.body),s=this.widget.getLayoutInfo(),r=new ee.Ro(220,2*s.lineHeight),a=e.top,l=function(){const i=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),n=-s.borderWidth+e.left+e.width,l=new ee.Ro(i,o.height-e.top-s.borderHeight-s.verticalPadding),d=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:d,minSize:r.with(Math.min(i,r.width))}}(),d=[l,function(){const i=e.left-s.borderWidth-s.horizontalPadding,n=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),l=new ee.Ro(i,o.height-e.top-s.borderHeight-s.verticalPadding),d=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:d,minSize:r.with(Math.min(i,r.width))}}(),function(){const i=e.left,n=-s.borderWidth+e.top+e.height,a=new ee.Ro(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding);return{top:n,left:i,fit:a.height-t.height,maxSizeBottom:a,maxSizeTop:a,minSize:r.with(a.width)}}()],h=null!==(n=d.find((e=>e.fit>=0)))&&void 0!==n?n:d.sort(((e,t)=>t.fit-e.fit))[0],c=e.top+e.height-s.borderHeight;let u,g=t.height;const p=Math.max(h.maxSizeTop.height,h.maxSizeBottom.height);let m;g>p&&(g=p),i?g<=h.maxSizeTop.height?(u=!0,m=h.maxSizeTop):(u=!1,m=h.maxSizeBottom):g<=h.maxSizeBottom.height?(u=!1,m=h.maxSizeBottom):(u=!0,m=h.maxSizeTop),this._applyTopLeft({left:h.left,top:u?h.top:c-g}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!u,h===l,u,h!==l),this._resizable.minSize=h.minSize,this._resizable.maxSize=m,this._resizable.layout(g,Math.min(m.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var Fe,Be=i(32107),We=i(70666),Ve=i(96887),He=i(66663),ze=i(95935),Ke=i(68801);!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(Fe||(Fe={}));const Ue=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function je(e,t,i,n){const o=n===Fe.ROOT_FOLDER?["rootfolder-icon"]:n===Fe.FOLDER?["folder-icon"]:["file-icon"];if(i){let s;if(i.scheme===He.lg.data)s=ze.Vb.parseMetaData(i).get(ze.Vb.META_DATA_LABEL);else{const e=i.path.match(Ue);e?(s=$e(e[2].toLowerCase()),e[1]&&o.push(`${$e(e[1].toLowerCase())}-name-dir-icon`)):s=$e(i.authority.toLowerCase())}if(n===Fe.FOLDER)o.push(`${s}-name-folder-icon`);else{if(s){if(o.push(`${s}-name-file-icon`),o.push("name-file-icon"),s.length<=255){const e=s.split(".");for(let t=1;t<e.length;t++)o.push(`${e.slice(t).join(".")}-ext-file-icon`)}o.push("ext-file-icon")}const n=function(e,t,i){if(!i)return null;let n=null;if(i.scheme===He.lg.data){const e=ze.Vb.parseMetaData(i).get(ze.Vb.META_DATA_MIME);e&&(n=t.getLanguageIdByMimeType(e))}else{const t=e.getModel(i);t&&(n=t.getLanguageId())}return n&&n!==Ke.bd?n:t.guessLanguageIdByFilepathOrFirstLine(i)}(e,t,i);n&&o.push(`${$e(n)}-lang-file-icon`)}}return o}function $e(e){return e.replace(/[\11\12\14\15\40]/g,"/")}var qe,Ze=i(73733),Ge=i(72042),Qe=function(e,t){return function(i,n){t(i,n,e)}};function Ye(e){return`suggest-aria-id:${e}`}const Je=(0,i(59554).q5)("suggest-more-info",Ie.l.chevronRight,E.NC("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),Xe=new((qe=class{extract(e,t){if(e.textLabel.match(qe._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(qe._regexStrict))return t[0]=e.completion.detail,!0;if("string"==typeof e.completion.documentation){const i=qe._regexRelaxed.exec(e.completion.documentation);if(i&&(0===i.index||i.index+i[0].length===e.completion.documentation.length))return t[0]=i[0],!0}return!1}})._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,qe._regexStrict=new RegExp(`^${qe._regexRelaxed.source}$`,"i"),qe);let et=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new d.Q5,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new c.SL,i=e;i.classList.add("show-file-icons");const n=(0,ee.R3)(e,(0,ee.$)(".icon")),o=(0,ee.R3)(n,(0,ee.$)("span.colorspan")),s=(0,ee.R3)(e,(0,ee.$)(".contents")),r=(0,ee.R3)(s,(0,ee.$)(".main")),a=(0,ee.R3)(r,(0,ee.$)(".icon-label.codicon")),l=(0,ee.R3)(r,(0,ee.$)("span.left")),d=(0,ee.R3)(r,(0,ee.$)("span.right")),h=new Be.g(l,{supportHighlights:!0,supportIcons:!0});t.add(h);const u=(0,ee.R3)(l,(0,ee.$)("span.signature-label")),g=(0,ee.R3)(l,(0,ee.$)("span.qualifier-label")),p=(0,ee.R3)(d,(0,ee.$)("span.details-label")),m=(0,ee.R3)(d,(0,ee.$)("span.readMore"+Te.k.asCSSSelector(Je)));m.title=E.NC("readMore","Read More");const f=()=>{const e=this._editor.getOptions(),t=e.get(49),o=t.getMassagedFontFamily(),s=t.fontFeatureSettings,a=e.get(117)||t.fontSize,l=e.get(118)||t.lineHeight,d=t.fontWeight,h=`${a}px`,c=`${l}px`,u=`${t.letterSpacing}px`;i.style.fontSize=h,i.style.fontWeight=d,i.style.letterSpacing=u,r.style.fontFamily=o,r.style.fontFeatureSettings=s,r.style.lineHeight=c,n.style.height=c,n.style.width=c,m.style.height=c,m.style.width=c};return f(),t.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(49)||e.hasChanged(117)||e.hasChanged(118))&&f()}))),{root:i,left:l,right:d,icon:n,colorspan:o,iconLabel:h,iconContainer:a,parametersLabel:u,qualifierLabel:g,detailsLabel:p,readMore:m,disposables:t}}renderElement(e,t,i){const{completion:n}=e;i.root.id=Ye(t),i.colorspan.style.backgroundColor="";const o={labelEscapeNewLines:!0,matches:(0,q.mB)(e.score)},s=[];if(19===n.kind&&Xe.extract(e,s))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=s[0];else if(20===n.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=je(this._modelService,this._languageService,We.o.from({scheme:"fake",path:e.textLabel}),Fe.FILE),s=je(this._modelService,this._languageService,We.o.from({scheme:"fake",path:n.detail}),Fe.FILE);o.extraClasses=t.length>s.length?t:s}else 23===n.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",o.extraClasses=[je(this._modelService,this._languageService,We.o.from({scheme:"fake",path:e.textLabel}),Fe.FOLDER),je(this._modelService,this._languageService,We.o.from({scheme:"fake",path:n.detail}),Fe.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...Te.k.asClassNameArray(Ve.gX.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,o),"string"==typeof n.label?(i.parametersLabel.textContent="",i.detailsLabel.textContent=tt(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=tt(n.label.detail||""),i.detailsLabel.textContent=tt(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(116).showInlineDetails?(0,ee.$Z)(i.detailsLabel):(0,ee.Cp)(i.detailsLabel),Ae(e)?(i.right.classList.add("can-expand-details"),(0,ee.$Z)(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),(0,ee.Cp)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function tt(e){return e.replace(/\r\n|\r|\n/g,"")}et=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Qe(1,Ze.q),Qe(2,Ge.O),Qe(3,Ne.XE)],et);var it,nt=i(86253),ot=function(e,t){return function(i,n){t(i,n,e)}};(0,xe.P6G)("editorSuggestWidget.background",{dark:xe.D0T,light:xe.D0T,hcDark:xe.D0T,hcLight:xe.D0T},E.NC("editorSuggestWidgetBackground","Background color of the suggest widget.")),(0,xe.P6G)("editorSuggestWidget.border",{dark:xe.D1_,light:xe.D1_,hcDark:xe.D1_,hcLight:xe.D1_},E.NC("editorSuggestWidgetBorder","Border color of the suggest widget."));const st=(0,xe.P6G)("editorSuggestWidget.foreground",{dark:xe.NOs,light:xe.NOs,hcDark:xe.NOs,hcLight:xe.NOs},E.NC("editorSuggestWidgetForeground","Foreground color of the suggest widget."));(0,xe.P6G)("editorSuggestWidget.selectedForeground",{dark:xe.NPS,light:xe.NPS,hcDark:xe.NPS,hcLight:xe.NPS},E.NC("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),(0,xe.P6G)("editorSuggestWidget.selectedIconForeground",{dark:xe.cbQ,light:xe.cbQ,hcDark:xe.cbQ,hcLight:xe.cbQ},E.NC("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const rt=(0,xe.P6G)("editorSuggestWidget.selectedBackground",{dark:xe.Vqd,light:xe.Vqd,hcDark:xe.Vqd,hcLight:xe.Vqd},E.NC("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));(0,xe.P6G)("editorSuggestWidget.highlightForeground",{dark:xe.Gwp,light:xe.Gwp,hcDark:xe.Gwp,hcLight:xe.Gwp},E.NC("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),(0,xe.P6G)("editorSuggestWidget.focusHighlightForeground",{dark:xe.PX0,light:xe.PX0,hcDark:xe.PX0,hcLight:xe.PX0},E.NC("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused.")),(0,xe.P6G)("editorSuggestWidgetStatus.foreground",{dark:(0,xe.ZnX)(st,.5),light:(0,xe.ZnX)(st,.5),hcDark:(0,xe.ZnX)(st,.5),hcLight:(0,xe.ZnX)(st,.5)},E.NC("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class at{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof _e.H}`}restore(){var e;const t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{const e=JSON.parse(t);if(ee.Ro.is(e))return ee.Ro.lift(e)}catch(e){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let lt=it=class{constructor(e,t,i,n,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new c.XK,this._pendingShowDetails=new c.XK,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new r._F,this._disposables=new c.SL,this._onDidSelect=new d.K3,this._onDidFocus=new d.K3,this._onDidHide=new d.Q5,this._onDidShow=new d.Q5,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new d.Q5,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new De.f,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new dt(this,e),this._persistedSize=new at(t,e);class s{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let a;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),a=new s(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{var t,i,n,o;if(this._resize(e.dimension.width,e.dimension.height),a&&(a.persistHeight=a.persistHeight||!!e.north||!!e.south,a.persistWidth=a.persistWidth||!!e.east||!!e.west),e.done){if(a){const{itemHeight:e,defaultSize:s}=this.getLayoutInfo(),r=Math.round(e/2);let{width:l,height:d}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-d)<=r)&&(d=null!==(i=null===(t=a.persistedSize)||void 0===t?void 0:t.height)&&void 0!==i?i:s.height),(!a.persistWidth||Math.abs(a.currentSize.width-l)<=r)&&(l=null!==(o=null===(n=a.persistedSize)||void 0===n?void 0:n.width)&&void 0!==o?o:s.width),this._persistedSize.store(new ee.Ro(l,d))}this._contentWidget.unlockPreference(),a=void 0}}))),this._messageElement=ee.R3(this.element.domNode,ee.$(".message")),this._listElement=ee.R3(this.element.domNode,ee.$(".tree"));const l=o.createInstance(Oe,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new Pe(l,this.editor);const h=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(116).showIcons);h();const u=o.createInstance(et,this.editor);this._disposables.add(u),this._disposables.add(u.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new te.aV("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[u],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>E.NC("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:e=>{let t=e.textLabel;if("string"!=typeof e.completion.label){const{detail:i,description:n}=e.completion.label;i&&n?t=E.NC("label.full","{0} {1}, {2}",t,i,n):i?t=E.NC("label.detail","{0} {1}",t,i):n&&(t=E.NC("label.desc","{0}, {1}",t,n))}if(!e.isResolved||!this._isDetailsVisible())return t;const{documentation:i,detail:n}=e.completion,o=B.WU("{0}{1}",n||"",i?"string"==typeof i?i:i.value:"");return E.NC("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",t,o)}}}),this._list.style((0,nt.TU)({listInactiveFocusBackground:rt,listInactiveFocusOutline:xe.xL1})),this._status=o.createInstance(Se,this.element.domNode,R.GI);const g=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(116).showStatusBar);g(),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(116)&&(g(),h())}))),this._ctxSuggestWidgetVisible=R._y.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=R._y.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=R._y.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=R._y.HasFocusedSuggestion.bindTo(i),this._disposables.add(ee.mu(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=(0,ke.c3)(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),void this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=(0,r.PG)((e=>{return t=this,n=void 0,s=function*(){const t=(0,r.Vg)((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250),n=e.onCancellationRequested((()=>t.dispose())),o=yield i.resolve(e);return t.dispose(),n.dispose(),o},new((o=void 0)||(o=Promise))((function(e,i){function r(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,a)}l((s=s.apply(t,n||[])).next())}));var t,n,o,s})),this._currentSuggestionDetails.then((()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:Ye(n)}))})).catch(l.dL)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",4===e),this.element.domNode.classList.remove("message"),e){case 0:ee.Cp(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=it.LOADING_MESSAGE,ee.Cp(this._listElement,this._status.element),ee.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,o.i7)(it.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=it.NO_SUGGESTIONS_MESSAGE,ee.Cp(this._listElement,this._status.element),ee.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,o.i7)(it.NO_SUGGESTIONS_MESSAGE);break;case 3:case 4:ee.Cp(this._messageElement),ee.$Z(this._listElement,this._status.element),this._show();break;case 5:ee.Cp(this._messageElement),ee.$Z(this._listElement,this._status.element),this._details.show(),this._show()}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,r.Vg)((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n,o){var s,r;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(s=this._loadingTimeout)||void 0===s||s.dispose(),null===(r=this._currentSuggestionDetails)||void 0===r||r.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const a=this._completionModel.items.length,l=0===a;if(this._ctxSuggestWidgetMultipleSuggestions.set(a>1),l)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=ee.lI((()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}))}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!Ae(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=ee.lI((()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}))}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.height<i&&this._persistedSize.store(t.with(void 0,i))}isFrozen(){return 4===this._state}_afterRender(e){null!==e?2!==this._state&&1!==this._state&&(this._isDetailsVisible()&&this._details.show(),this._positionDetails()):this._isDetailsVisible()&&this._details.hide()}_layout(e){var t,i,n;if(!this.editor.hasModel())return;if(!this.editor.getDomNode())return;const o=ee.D6(document.body),s=this.getLayoutInfo();e||(e=s.defaultSize);let r=e.height,a=e.width;if(this._status.element.style.height=`${s.itemHeight}px`,2===this._state||1===this._state)r=s.itemHeight+s.borderHeight,a=s.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new ee.Ro(a,r),this._contentWidget.setPreference(2);else{const l=o.width-s.borderHeight-2*s.horizontalPadding;a>l&&(a=l);const d=this._completionModel?this._completionModel.stats.pLabelLen*s.typicalHalfwidthCharacterWidth:a,h=s.statusBarHeight+this._list.contentHeight+s.borderHeight,c=s.itemHeight+s.statusBarHeight,u=ee.i(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=u.top+g.top+g.height,m=Math.min(o.height-p-s.verticalPadding,h),f=u.top+g.top-s.verticalPadding,_=Math.min(f,h);let v=Math.min(Math.max(_,m)+s.borderHeight,h);r===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(r=this._cappedHeight.wanted),r<c&&(r=c),r>v&&(r=v);const b=150;r>m||this._forceRenderingAbove&&f>b?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),v=_):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),v=m),this.element.preferredSize=new ee.Ro(d,s.defaultSize.height),this.element.maxSize=new ee.Ro(l,v),this.element.minSize=new ee.Ro(220,c),this._cappedHeight=r===h?{wanted:null!==(n=null===(i=this._cappedHeight)||void 0===i?void 0:i.wanted)&&void 0!==n?n:e.height,capped:r}:void 0}this._resize(a,r)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=t-o+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,2===(null===(e=this._contentWidget.getPosition())||void 0===e?void 0:e.preference[0]))}getLayoutInfo(){const e=this.editor.getOption(49),t=(0,ie.uZ)(this.editor.getOption(118)||e.lineHeight,8,1e3),i=this.editor.getOption(116).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,o=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new ee.Ro(430,i+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};lt.LOADING_MESSAGE=E.NC("suggestWidget.loading","Loading..."),lt.NO_SUGGESTIONS_MESSAGE=E.NC("suggestWidget.noSuggestions","No suggestions."),lt=it=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ot(1,Le.Uy),ot(2,L.i6),ot(3,Ne.XE),ot(4,T.TG)],lt);class dt{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new ee.Ro(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var ht,ct=i(89954),ut=function(e,t){return function(i,n){t(i,n,e)}};class gt{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);this._marker=e.deltaDecorations([],[{range:b.e.fromPositions(t,n),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let pt=ht=class{static get(e){return e.getContribution(ht.ID)}constructor(e,t,i,n,o,s,a){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=o,this._logService=s,this._telemetryService=a,this._lineSuffix=new c.XK,this._toDispose=new c.SL,this._selectors=new mt((e=>e.priority)),this._onWillInsertSuggestItem=new d.Q5,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=o.createInstance(J,this.editor),this._selectors.register({priority:0,select:(e,t,i)=>this._memoryService.select(e,t,i)});const l=R._y.InsertMode.bindTo(n);l.set(e.getOption(116).insertMode),this._toDispose.add(this.model.onDidTrigger((()=>l.set(e.getOption(116).insertMode)))),this.widget=this._toDispose.add(new r.Ue((()=>{const e=this._instantiationService.createInstance(lt,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new P(this.editor,e,this.model,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t);const i=R._y.MakesTextEdit.bindTo(this._contextKeyService),n=R._y.HasInsertAndReplaceRange.bindTo(this._contextKeyService),o=R._y.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,c.OF)((()=>{i.reset(),n.reset(),o.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),s=e.editStart.column,r=t.column;let a=!0;"smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.additionalTextEdits||4&e.completion.insertTextRules||r-s!==e.completion.insertText.length||(a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:s,endLineNumber:t.lineNumber,endColumn:r})!==e.completion.insertText),i.set(a),n.set(!v.L.equals(e.editInsertEnd,e.editReplaceEnd)),o.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeyCodeChord().equals(new h.$M(!0,!1,!1,!1,33))||u.dz&&e.toKeyCodeChord().equals(new h.$M(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeyCodeChord().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new r.Ue((()=>this._toDispose.add(new X(this.editor,this.model))))),this._alternatives=this._toDispose.add(new r.Ue((()=>this._toDispose.add(new A(this.editor,this._contextKeyService))))),this._toDispose.add(o.createInstance(x,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new gt(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(e.triggerOptions.shy)return;let t=-1;for(const i of this._selectors.itemsOrderedByPriorityDesc)if(t=i.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items),-1!==t)break;-1===t&&(t=0);let i=!1;if(e.triggerOptions.auto){const t=this.editor.getOption(116);"never"===t.selectionMode||"always"===t.selectionMode?i="never"===t.selectionMode:"whenTriggerCharacter"===t.selectionMode?i=1!==e.triggerOptions.triggerKind:"whenQuickSuggestion"===t.selectionMode&&(i=1===e.triggerOptions.triggerKind&&!e.triggerOptions.refilter)}this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.triggerOptions.auto,i)}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));const g=R._y.AcceptSuggestionsOnEnter.bindTo(n),p=()=>{const e=this.editor.getOption(1);g.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>p()))),p()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=w.f.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),o=n.getAlternativeVersionId(),{item:s}=e,r=[],d=new a.A;1&t||this.editor.pushUndoStop();const h=this.getOverwriteInfo(s,Boolean(8&t));this._memoryService.memorize(n,this.editor.getPosition(),s);const c=s.isResolved;let u=-1,p=-1;if(Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();const e=m.Z.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map((e=>_.h.replaceMove(b.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!c){const e=new g.G;let i;const o=n.onDidChangeContent((e=>{if(e.isFlush)return d.cancel(),void o.dispose();for(const t of e.changes){const e=b.e.getEndPosition(t.range);i&&!v.L.isBefore(e,i)||(i=e)}})),a=t;t|=2;let l=!1;const h=this.editor.onWillType((()=>{h.dispose(),l=!0,2&a||this.editor.pushUndoStop()}));r.push(s.resolve(d.token).then((()=>{if(!s.completion.additionalTextEdits||d.token.isCancellationRequested)return;if(i&&s.completion.additionalTextEdits.some((e=>v.L.isBefore(i,b.e.getStartPosition(e.range)))))return!1;l&&this.editor.pushUndoStop();const e=m.Z.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map((e=>_.h.replaceMove(b.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!l&&2&a||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),p=!0===t?1:!1===t?0:-2})).finally((()=>{o.dispose(),h.dispose()})))}let{insertText:f}=s.completion;if(4&s.completion.insertTextRules||(f=y.Yj.escape(f)),this.model.cancel(),i.insert(f,{overwriteBefore:h.overwriteBefore,overwriteAfter:h.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&s.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),s.completion.command)if(s.completion.command.id===ft.id)this.model.trigger({auto:!0,retrigger:!0});else{const e=new g.G;r.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch((e=>{s.completion.extensionId?(0,l.Cp)(e):(0,l.dL)(e)})).finally((()=>{u=e.elapsed()})))}4&t&&this._alternatives.value.set(e,(e=>{for(d.cancel();n.canUndo();){o!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(s),Promise.all(r).finally((()=>{this._reportSuggestionAcceptedTelemetry(s,n,c,u,p),this.model.clear(),d.dispose()}))}_reportSuggestionAcceptedTelemetry(e,t,i,n,o){var s,r,a;0!==Math.floor(100*Math.random())&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:null!==(r=null===(s=e.extensionId)||void 0===s?void 0:s.value)&&void 0!==r?r:"unknown",providerId:null!==(a=e.provider._debugDisplayName)&&void 0!==a?a:"unknown",kind:e.completion.kind,basenameHash:(0,ct.vp)((0,ze.EZ)(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:(0,ze.DZ)(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:o})}getOverwriteInfo(e,t){(0,p.p_)(this.editor.hasModel());let i="replace"===this.editor.getOption(116).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:o+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){if((0,s.Of)(e.completion.additionalTextEdits)){const t=E.NC("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,o.Z9)(t)}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:null!=t&&t,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;return n-i!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};d.ju.once(this.model.onDidTrigger)((e=>{const t=[];d.ju.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{(0,c.B9)(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if((0,c.B9)(t),0===e.items.length)return void i();const o=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),s=e.items[o];n(s)?(this.editor.pushUndoStop(),this._insertSuggestion({index:o,item:s,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};pt.ID="editor.contrib.suggestController",pt=ht=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ut(1,S.Fh),ut(2,I.H),ut(3,L.i6),ut(4,T.TG),ut(5,M.VZ),ut(6,U.b)],pt);class mt{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(-1!==this._items.indexOf(e))throw new Error("Value is already registered");return this._items.push(e),this._items.sort(((e,t)=>this.prioritySelector(t)-this.prioritySelector(e))),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class ft extends f.R6{constructor(){super({id:ft.id,label:E.NC("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:L.Ao.and(C.u.writable,C.u.hasCompletionItemProvider,R._y.Visible.toNegated()),kbOpts:{kbExpr:C.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=pt.get(t);if(!n)return;let o;i&&"object"==typeof i&&!0===i.auto&&(o=!0),n.triggerSuggest(void 0,o,void 0)}}ft.id="editor.action.triggerSuggest",(0,f._K)(pt.ID,pt,2),(0,f.Qr)(ft);const _t=190,vt=f._l.bindToContribution(pt.get);(0,f.fK)(new vt({id:"acceptSelectedSuggestion",precondition:L.Ao.and(R._y.Visible,R._y.HasFocusedSuggestion),handler(e){e.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:L.Ao.and(R._y.Visible,C.u.textInputFocus),weight:_t},{primary:3,kbExpr:L.Ao.and(R._y.Visible,C.u.textInputFocus,R._y.AcceptSuggestionsOnEnter,R._y.MakesTextEdit),weight:_t}],menuOpts:[{menuId:R.GI,title:E.NC("accept.insert","Insert"),group:"left",order:1,when:R._y.HasInsertAndReplaceRange.toNegated()},{menuId:R.GI,title:E.NC("accept.insert","Insert"),group:"left",order:1,when:L.Ao.and(R._y.HasInsertAndReplaceRange,R._y.InsertMode.isEqualTo("insert"))},{menuId:R.GI,title:E.NC("accept.replace","Replace"),group:"left",order:1,when:L.Ao.and(R._y.HasInsertAndReplaceRange,R._y.InsertMode.isEqualTo("replace"))}]})),(0,f.fK)(new vt({id:"acceptAlternativeSelectedSuggestion",precondition:L.Ao.and(R._y.Visible,C.u.textInputFocus,R._y.HasFocusedSuggestion),kbOpts:{weight:_t,kbExpr:C.u.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:R.GI,group:"left",order:2,when:L.Ao.and(R._y.HasInsertAndReplaceRange,R._y.InsertMode.isEqualTo("insert")),title:E.NC("accept.replace","Replace")},{menuId:R.GI,group:"left",order:2,when:L.Ao.and(R._y.HasInsertAndReplaceRange,R._y.InsertMode.isEqualTo("replace")),title:E.NC("accept.insert","Insert")}]})),I.P.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,f.fK)(new vt({id:"hideSuggestWidget",precondition:R._y.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:_t,kbExpr:C.u.textInputFocus,primary:9,secondary:[1033]}})),(0,f.fK)(new vt({id:"selectNextSuggestion",precondition:L.Ao.and(R._y.Visible,L.Ao.or(R._y.MultipleSuggestions,R._y.HasFocusedSuggestion.negate())),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:_t,kbExpr:C.u.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,f.fK)(new vt({id:"selectNextPageSuggestion",precondition:L.Ao.and(R._y.Visible,L.Ao.or(R._y.MultipleSuggestions,R._y.HasFocusedSuggestion.negate())),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:_t,kbExpr:C.u.textInputFocus,primary:12,secondary:[2060]}})),(0,f.fK)(new vt({id:"selectLastSuggestion",precondition:L.Ao.and(R._y.Visible,L.Ao.or(R._y.MultipleSuggestions,R._y.HasFocusedSuggestion.negate())),handler:e=>e.selectLastSuggestion()})),(0,f.fK)(new vt({id:"selectPrevSuggestion",precondition:L.Ao.and(R._y.Visible,L.Ao.or(R._y.MultipleSuggestions,R._y.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:_t,kbExpr:C.u.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,f.fK)(new vt({id:"selectPrevPageSuggestion",precondition:L.Ao.and(R._y.Visible,L.Ao.or(R._y.MultipleSuggestions,R._y.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:_t,kbExpr:C.u.textInputFocus,primary:11,secondary:[2059]}})),(0,f.fK)(new vt({id:"selectFirstSuggestion",precondition:L.Ao.and(R._y.Visible,L.Ao.or(R._y.MultipleSuggestions,R._y.HasFocusedSuggestion.negate())),handler:e=>e.selectFirstSuggestion()})),(0,f.fK)(new vt({id:"focusSuggestion",precondition:L.Ao.and(R._y.Visible,R._y.HasFocusedSuggestion.negate()),handler:e=>e.focusSuggestion(),kbOpts:{weight:_t,kbExpr:C.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,f.fK)(new vt({id:"focusAndAcceptSuggestion",precondition:L.Ao.and(R._y.Visible,R._y.HasFocusedSuggestion.negate()),handler:e=>{e.focusSuggestion(),e.acceptSelectedSuggestion(!0,!1)}})),(0,f.fK)(new vt({id:"toggleSuggestionDetails",precondition:L.Ao.and(R._y.Visible,R._y.HasFocusedSuggestion),handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:_t,kbExpr:C.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:R.GI,group:"right",order:1,when:L.Ao.and(R._y.DetailsVisible,R._y.CanResolve),title:E.NC("detail.more","show less")},{menuId:R.GI,group:"right",order:1,when:L.Ao.and(R._y.DetailsVisible.toNegated(),R._y.CanResolve),title:E.NC("detail.less","show more")}]})),(0,f.fK)(new vt({id:"toggleExplainMode",precondition:R._y.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,f.fK)(new vt({id:"toggleSuggestionFocus",precondition:R._y.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:_t,kbExpr:C.u.textInputFocus,primary:2570,mac:{primary:778}}})),(0,f.fK)(new vt({id:"insertBestCompletion",precondition:L.Ao.and(C.u.textInputFocus,L.Ao.equals("config.editor.tabCompletion","on"),x.AtEnd,R._y.Visible.toNegated(),A.OtherSuggestions.toNegated(),w.f.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest((0,p.Kn)(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:_t,primary:2}})),(0,f.fK)(new vt({id:"insertNextSuggestion",precondition:L.Ao.and(C.u.textInputFocus,L.Ao.equals("config.editor.tabCompletion","on"),A.OtherSuggestions,R._y.Visible.toNegated(),w.f.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:_t,kbExpr:C.u.textInputFocus,primary:2}})),(0,f.fK)(new vt({id:"insertPrevSuggestion",precondition:L.Ao.and(C.u.textInputFocus,L.Ao.equals("config.editor.tabCompletion","on"),A.OtherSuggestions,R._y.Visible.toNegated(),w.f.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:_t,kbExpr:C.u.textInputFocus,primary:1026}})),(0,f.Qr)(class extends f.R6{constructor(){super({id:"editor.action.resetSuggestSize",label:E.NC("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){var i;null===(i=pt.get(t))||void 0===i||i.resetWidgetSize()}})},88088:(e,t,i)=>{var n,o=i(71050),s=i(75392),r=i(53725),a=i(5976),l=i(16830),d=i(17122),h=i(24314),c=i(71922),u=i(74961),g=i(55621),p=i(80378),m=i(24477),f=i(84972),_=i(72065),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};class C{constructor(e,t,i,n,o,s){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=o,this.completion=s}}let w=class extends a.L6{constructor(e,t,i,n,o,s){super(o.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=s}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn<i.endColumn&&0===this.completionModel.getIncompleteProvider().size}get items(){var e;const t=[],{items:i}=this.completionModel,n=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},i),a=r.$.slice(i,n),l=r.$.slice(i,0,n);let d=5;for(const i of r.$.concat(a,l)){if(i.score===s.CL.Default)continue;const n=new h.e(i.editStart.lineNumber,i.editStart.column,i.editInsertEnd.lineNumber,i.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),r=i.completion.insertTextRules&&4&i.completion.insertTextRules?{snippet:i.completion.insertText}:i.completion.insertText;t.push(new C(n,r,null!==(e=i.filterTextLow)&&void 0!==e?e:i.labelLow,i.completion.additionalTextEdits,i.completion.command,i)),d-- >=0&&i.resolve(o.T.None)}return t}};w=v([b(5,p.Fh)],w);let y=class{constructor(e,t,i,n){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=i,this._suggestMemoryService=n}provideInlineCompletions(e,t,i,n){var o,s,r,a,l;return s=this,r=void 0,l=function*(){if(i.selectedSuggestionInfo)return;const s=this._getEditorOption(87,e);if(g.tG.isAllOff(s))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const r=e.tokenization.getLineTokens(t.lineNumber),a=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==g.tG.valueFor(s,a))return;let l,d,c=e.getWordAtPosition(t);if((null==c?void 0:c.word)||(l=this._getTriggerCharacterInfo(e,t)),!(null==c?void 0:c.word)&&!l)return;if(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column)return;const p=e.getValueInRange(new h.e(t.lineNumber,1,t.lineNumber,t.column));if(!l&&(null===(o=this._lastResult)||void 0===o?void 0:o.canBeReused(e,t.lineNumber,c))){const e=new u.t(p,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),d=this._lastResult}else{const i=yield(0,g.kL)(this._languageFeatureService.completionProvider,e,t,new g.A9(void 0,void 0,null==l?void 0:l.providers),l&&{triggerKind:1,triggerCharacter:l.ch},n);let o;i.needsClipboard&&(o=yield this._clipboardService.readText());const s=new u._(i.items,t.column,new u.t(p,0),m.K.None,this._getEditorOption(116,e),this._getEditorOption(110,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},o);d=new w(e,t.lineNumber,c,s,i,this._suggestMemoryService)}return this._lastResult=d,d},new((a=void 0)||(a=Promise))((function(e,t){function i(e){try{o(l.next(e))}catch(e){t(e)}}function n(e){try{o(l.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof a?o:new a((function(e){e(o)}))).then(i,n)}o((l=l.apply(s,r||[])).next())}))}handleItemDidShow(e,t){t.completion.resolve(o.T.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const n=e.getValueInRange(h.e.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(const t of this._languageFeatureService.completionProvider.all(e))(null===(i=t.triggerCharacters)||void 0===i?void 0:i.includes(n))&&o.add(t);if(0!==o.size)return{providers:o,ch:n}}};y=v([b(1,c.p),b(2,f.p),b(3,p.Fh)],y);let S=n=class{constructor(e,t,i,o){if(1==++n._counter){const s=o.createInstance(y,((t,n)=>{var o;return(null!==(o=i.listCodeEditors().find((e=>e.getModel()===n)))&&void 0!==o?o:e).getOption(t)}));n._disposable=t.inlineCompletionsProvider.register("*",s)}}dispose(){var e;0==--n._counter&&(null===(e=n._disposable)||void 0===e||e.dispose(),n._disposable=void 0)}};S._counter=0,S=n=v([b(1,c.p),b(2,d.$),b(3,_.TG)],S),(0,l._K)("suggest.inlineCompletionsProvider",S,0)},80378:(e,t,i)=>{i.d(t,{Fh:()=>_});var n,o=i(15393),s=i(5976),r=i(43702),a=i(4767),l=i(96887),d=i(33108),h=i(65026),c=i(72065),u=i(26904),g=function(e,t){return function(i,n){t(i,n,e)}};class p{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;const n=i[0].score[0];for(let e=0;e<i.length;e++){const{score:t,completion:o}=i[e];if(t[0]!==n)break;if(o.preselect)return e}return 0}}class m extends p{constructor(){super("first")}memorize(e,t,i){}toJSON(){}fromJSON(){}}let f=n=class{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new s.SL,this._persistSoon=new o.pY((()=>this._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===u.fk.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){var i;const o=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if((null===(i=this._strategy)||void 0===i?void 0:i.name)!==o){this._saveState();const e=n._strategyCtors.get(o)||m;this._strategy=new e;try{const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=this._storageService.get(`${n._storagePrefix}/${o}`,e);t&&this._strategy.fromJSON(JSON.parse(t))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=JSON.stringify(this._strategy);this._storageService.store(`${n._storagePrefix}/${this._strategy.name}`,t,e,1)}}};f._strategyCtors=new Map([["recentlyUsedByPrefix",class extends p{constructor(){super("recentlyUsedByPrefix"),this._trie=a.Id.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${n}`;this._trie.set(o,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const o=`${e.getLanguageId()}/${n}`;let s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let e=0;e<i.length;e++){const{kind:t,insertText:n}=i[e].completion;if(t===s.type&&n===s.insertText)return e}return super.select(e,t,i)}toJSON(){const e=[];return this._trie.forEach(((t,i)=>e.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"==typeof i.type?i.type:l.gX.fromString(i.type),this._trie.set(t,i)}}}],["recentlyUsed",class extends p{constructor(){super("recentlyUsed"),this._cache=new r.z6(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageId()}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(0===i.length)return 0;const n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,i);const o=i[0].score[0];let s=-1,r=-1;for(let t=0;t<i.length&&i[t].score[0]===o;t++){const n=`${e.getLanguageId()}/${i[t].textLabel}`,o=this._cache.peek(n);if(o&&o.touch>r&&o.type===i[t].completion.kind&&o.insertText===i[t].completion.insertText&&(r=o.touch,s=t),i[t].completion.preselect)return t}return-1!==s?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:l.gX.fromString(i.type),this._cache.set(t,i);this._seq=this._cache.size}}],["first",m]]),f._storagePrefix="suggest/memories",f=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([g(0,u.Uy),g(1,d.Ui)],f);const _=(0,c.yh)("ISuggestMemories");(0,h.z)(_,f,1)},24477:(e,t,i)=>{i.d(t,{K:()=>r});var n=i(9488),o=i(24314),s=i(79694);class r{static create(e,t){return i=this,a=void 0,d=function*(){if(!t.getOption(116).localityBonus)return r.None;if(!t.hasModel())return r.None;const i=t.getModel(),a=t.getPosition();if(!e.canComputeWordRanges(i.uri))return r.None;const[l]=yield(new s.x).provideSelectionRanges(i,[a]);if(0===l.length)return r.None;const d=yield e.computeWordRanges(i.uri,l[0].range);if(!d)return r.None;const h=i.getWordUntilPosition(a);return delete d[h.word],new class extends r{distance(e,i){if(!a.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;const s="string"==typeof i.label?i.label:i.label.label,r=d[s];if((0,n.XY)(r))return 2<<20;const h=(0,n.ry)(r,o.e.fromPositions(e),o.e.compareRangesUsingStarts),c=h>=0?r[h]:r[Math.max(0,~h-1)];let u=l.length;for(const e of l){if(!o.e.containsRange(e.range,c))break;u-=1}return u}}},new((l=void 0)||(l=Promise))((function(e,t){function n(e){try{s(d.next(e))}catch(e){t(e)}}function o(e){try{s(d.throw(e))}catch(e){t(e)}}function s(t){var i;t.done?e(t.value):(i=t.value,i instanceof l?i:new l((function(e){e(i)}))).then(n,o)}s((d=d.apply(i,a||[])).next())}));var i,a,l,d}}r.None=new class extends r{distance(){return 0}}},22368:(e,t,i)=>{var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(30745),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=i(63580),v=i(73910);(0,v.P6G)("symbolIcon.arrayForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.booleanForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,_.NC)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.colorForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.constantForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,_.NC)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,_.NC)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,_.NC)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,_.NC)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,_.NC)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.fileForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.folderForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,_.NC)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,_.NC)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.keyForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.keywordForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,_.NC)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.moduleForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.namespaceForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.nullForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.numberForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.objectForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.operatorForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.packageForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.propertyForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.referenceForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.snippetForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.stringForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.structForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.textForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.typeParameterForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.unitForeground",{dark:v.dRz,light:v.dRz,hcDark:v.dRz,hcLight:v.dRz},(0,_.NC)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,v.P6G)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,_.NC)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))},64662:(e,t,i)=>{var n=i(56346),o=i(37940),s=i(63580),r=i(84144),a=i(93983);class l extends r.Ke{constructor(){super({id:l.ID,title:{value:s.NC({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(e){const t="terminal"===e.get(a.i6).getContextKeyValue("focusedView")?"terminalFocus":"editorFocus",i=!o.n.getTabFocusMode(t);o.n.setTabFocusMode(i,t),i?(0,n.Z9)(s.NC("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,n.Z9)(s.NC("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}l.ID="editor.action.toggleTabFocusMode",(0,r.r1)(l)},52614:(e,t,i)=>{var n=i(84013),o=i(16830),s=i(63580);class r extends o.R6{constructor(){super({id:"editor.action.forceRetokenize",label:s.NC("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const o=new n.G;i.tokenization.forceTokenization(i.getLineCount()),o.stop(),console.log(`tokenization took ${o.elapsed()}`)}}(0,o.Qr)(r)},84677:(e,t,i)=>{var n=i(15393),o=i(73046),s=i(59365),r=i(5976),a=i(1432),l=i(97295),d=i(93379),h=i.n(d),c=i(7795),u=i.n(c),g=i(90569),p=i.n(g),m=i(3565),f=i.n(m),_=i(19216),v=i.n(_),b=i(44589),C=i.n(b),w=i(98679),y={};y.styleTagTransform=C(),y.setAttributes=f(),y.insert=p().bind(null,"head"),y.domAPI=u(),y.insertStyleElement=v(),h()(w.Z,y),w.Z&&w.Z.locals&&w.Z.locals;var S=i(16830),L=i(64141),x=i(13961),k=i(31446),N=i(85215),D=i(72042),E=i(30168),I=i(66520),T=i(22374),M=i(98367),R={};R.styleTagTransform=C(),R.setAttributes=f(),R.insert=p().bind(null,"head"),R.domAPI=u(),R.insertStyleElement=v(),h()(M.Z,R),M.Z&&M.Z.locals&&M.Z.locals;var A=i(65321),O=i(90317),P=i(74741),F=i(18806),B=i(72065),W=i(4850),V=i(59069),H=i(10553),z=i(4669),K=i(50988),U=i(57150),j={};j.styleTagTransform=C(),j.setAttributes=f(),j.insert=p().bind(null,"head"),j.domAPI=u(),j.insertStyleElement=v(),h()(U.Z,j),U.Z&&U.Z.locals&&U.Z.locals;let $=class extends r.JT{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n){var o;super(),this._link=t,this._enabled=!0,this.el=(0,A.R3)(e,(0,A.$)("a.monaco-link",{tabIndex:null!==(o=t.tabIndex)&&void 0!==o?o:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const s=this._register(new W.Y(this.el,"click")),r=this._register(new W.Y(this.el,"keypress")),a=z.ju.chain(r.event).map((e=>new V.y(e))).filter((e=>3===e.keyCode)).event,l=this._register(new W.Y(this.el,H.t.Tap)).event;this._register(H.o.addTarget(this.el));const d=z.ju.any(s.event,a,l);this._register(d((e=>{this.enabled&&(A.zB.stop(e,!0),(null==i?void 0:i.opener)?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))}))),this.enabled=!0}};var q,Z;$=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(q=3,Z=K.v4,function(e,t){Z(e,t,q)})],$);var G=i(59554),Q=i(25670),Y=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},J=function(e,t){return function(i,n){t(i,n,e)}};let X=class extends r.JT{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(ee))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),null===(t=e.onClose)||void 0===t||t.call(e)}})),this._editor.setBanner(this.banner.element,26)}};X=Y([J(1,B.TG)],X);let ee=class extends r.JT{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(F.$,{}),this.element=(0,A.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"==typeof e.message?e.message:void 0}getBannerMessage(e){if("string"==typeof e){const t=(0,A.$)("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){(0,A.PO)(this.element)}show(e){(0,A.PO)(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=(0,A.R3)(this.element,(0,A.$)("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild((0,A.$)(`div${Q.k.asCSSSelector(e.icon)}`));const n=(0,A.R3)(this.element,(0,A.$)("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=(0,A.R3)(this.element,(0,A.$)("div.message-actions-container")),e.actions)for(const t of e.actions)this._register(this.instantiationService.createInstance($,this.messageActionsContainer,Object.assign(Object.assign({},t),{tabIndex:-1}),{}));const o=(0,A.R3)(this.element,(0,A.$)("div.action-container"));this.actionBar=this._register(new O.o(o)),this.actionBar.push(this._register(new P.aU("banner.close","Close Banner",Q.k.asClassName(G.s_),!0,(()=>{"function"==typeof e.onClose&&e.onClose()}))),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};ee=Y([J(0,B.TG)],ee);var te=i(63580),ie=i(33108),ne=i(41157),oe=i(33425),se=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},re=function(e,t){return function(i,n){t(i,n,e)}},ae=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const le=(0,G.q5)("extensions-warning-message",o.l.warning,te.NC("warningIcon","Icon shown with a warning message in the extensions editor."));let de=class extends r.JT{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){if(this._bannerClosed)return;const t=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);let i;if(e.nonBasicAsciiCharacterCount>=t)i={message:te.NC("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new we};else if(e.ambiguousCharacterCount>=t)i={message:te.NC("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new be};else{if(!(e.invisibleCharacterCount>=t))throw new Error("Unreachable");i={message:te.NC("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new Ce}}this._bannerController.show({id:"unicodeHighlightBanner",message:i.message,icon:le,actions:[{label:i.command.shortLabel,href:`command:${i.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(X,e)),this._register(this._editor.onDidChangeModel((()=>{this._bannerClosed=!1,this._updateHighlighter()}))),this._options=e.getOption(123),this._register(i.onDidChangeTrust((e=>{this._updateHighlighter()}))),this._register(e.onDidChangeConfiguration((t=>{t.hasChanged(123)&&(this._options=e.getOption(123),this._updateHighlighter())}))),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=function(e,t){return{nonBasicASCII:t.nonBasicASCII===L.Av?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===L.Av?!e:t.includeComments,includeStrings:t.includeStrings===L.Av?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales}}(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every((e=>!1===e)))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map((e=>e.codePointAt(0))),allowedLocales:Object.keys(e.allowedLocales).map((e=>"_os"===e?(new Intl.NumberFormat).resolvedOptions().locale:"_vscode"===e?a.dK:e))};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new he(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new ce(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};de.ID="editor.contrib.unicodeHighlighter",de=se([re(1,N.p),re(2,oe.Y),re(3,B.TG)],de);let he=class extends r.JT{constructor(e,t,i,o){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=o,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.pY((()=>this._update()),250)),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then((t=>{if(this._model.isDisposed())return;if(this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const e of t.ranges)i.push({range:e,options:fe.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)}))}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();return(0,E.Fd)(t,e)?{reason:me(t.getValueInRange(e.range),this._options),inComment:(0,E.$t)(t,e),inString:(0,E.zg)(t,e)}:null}};he=se([re(3,N.p)],he);class ce extends r.JT{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.pY((()=>this._update()),250)),this._register(this._editor.onDidLayoutChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidScrollChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeHiddenAreas((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const t of e){const e=k.a.computeUnicodeHighlights(this._model,this._options,t);for(const t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(const e of i.ranges)t.push({range:e,options:fe.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return(0,E.Fd)(t,e)?{reason:me(i,this._options),inComment:(0,E.$t)(t,e),inString:(0,E.zg)(t,e)}:null}}let ue=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=this._editor.getContribution(de.ID);if(!n)return[];const o=[],r=new Set;let a=300;for(const e of t){const t=n.getDecorationInfo(e);if(!t)continue;const d=i.getValueInRange(e.range).codePointAt(0),h=pe(d);let c;switch(t.reason.kind){case 0:c=(0,l.$i)(t.reason.confusableWith)?te.NC("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,pe(t.reason.confusableWith.codePointAt(0))):te.NC("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,pe(t.reason.confusableWith.codePointAt(0)));break;case 1:c=te.NC("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:c=te.NC("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h)}if(r.has(c))continue;r.add(c);const u={codePoint:d,reason:t.reason,inComment:t.inComment,inString:t.inString},g=te.NC("unicodeHighlight.adjustSettings","Adjust settings"),p=`command:${ye.ID}?${encodeURIComponent(JSON.stringify(u))}`,m=new s.W5("",!0).appendMarkdown(c).appendText(" ").appendLink(p,g);o.push(new T.hU(this,e.range,[m],!1,a++))}return o}renderHoverParts(e,t){return(0,T.c)(e,t,this._editor,this._languageService,this._openerService)}};function ge(e){return`U+${e.toString(16).padStart(4,"0")}`}function pe(e){let t=`\`${ge(e)}\``;return l.vU.isInvisibleCharacter(e)||(t+=` "${function(e){return 96===e?"`` ` ``":"`"+String.fromCodePoint(e)+"`"}(e)}"`),t}function me(e,t){return k.a.computeUnicodeHighlightReason(e,t)}ue=se([re(1,D.O),re(2,K.v4)],ue);class fe{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=x.qx.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}fe.instance=new fe;class _e extends S.R6{constructor(){super({id:be.ID,label:te.NC("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=te.NC("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,i){return ae(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(ie.Ui);t&&this.runAction(t)}))}runAction(e){return ae(this,void 0,void 0,(function*(){yield e.updateValue(L.qt.includeComments,!1,2)}))}}class ve extends S.R6{constructor(){super({id:be.ID,label:te.NC("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=te.NC("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,i){return ae(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(ie.Ui);t&&this.runAction(t)}))}runAction(e){return ae(this,void 0,void 0,(function*(){yield e.updateValue(L.qt.includeStrings,!1,2)}))}}class be extends S.R6{constructor(){super({id:be.ID,label:te.NC("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=te.NC("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,i){return ae(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(ie.Ui);t&&this.runAction(t)}))}runAction(e){return ae(this,void 0,void 0,(function*(){yield e.updateValue(L.qt.ambiguousCharacters,!1,2)}))}}be.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class Ce extends S.R6{constructor(){super({id:Ce.ID,label:te.NC("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=te.NC("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,i){return ae(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(ie.Ui);t&&this.runAction(t)}))}runAction(e){return ae(this,void 0,void 0,(function*(){yield e.updateValue(L.qt.invisibleCharacters,!1,2)}))}}Ce.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class we extends S.R6{constructor(){super({id:we.ID,label:te.NC("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=te.NC("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,i){return ae(this,void 0,void 0,(function*(){const t=null==e?void 0:e.get(ie.Ui);t&&this.runAction(t)}))}runAction(e){return ae(this,void 0,void 0,(function*(){yield e.updateValue(L.qt.nonBasicASCII,!1,2)}))}}we.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class ye extends S.R6{constructor(){super({id:ye.ID,label:te.NC("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,i){return ae(this,void 0,void 0,(function*(){const{codePoint:t,reason:n,inString:o,inComment:s}=i,r=String.fromCodePoint(t),a=e.get(ne.eJ),d=e.get(ie.Ui),h=[];if(0===n.kind)for(const e of n.notAmbiguousInLocales)h.push({label:te.NC("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',e),run:()=>ae(this,void 0,void 0,(function*(){Se(d,[e])}))});if(h.push({label:function(e){return l.vU.isInvisibleCharacter(e)?te.NC("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",ge(e)):te.NC("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${ge(e)} "${r}"`)}(t),run:()=>function(e,t){return ae(this,void 0,void 0,(function*(){const i=e.getValue(L.qt.allowedCharacters);let n;n="object"==typeof i&&i?i:{};for(const e of t)n[String.fromCodePoint(e)]=!0;yield e.updateValue(L.qt.allowedCharacters,n,2)}))}(d,[t])}),s){const e=new _e;h.push({label:e.label,run:()=>ae(this,void 0,void 0,(function*(){return e.runAction(d)}))})}else if(o){const e=new ve;h.push({label:e.label,run:()=>ae(this,void 0,void 0,(function*(){return e.runAction(d)}))})}if(0===n.kind){const e=new be;h.push({label:e.label,run:()=>ae(this,void 0,void 0,(function*(){return e.runAction(d)}))})}else if(1===n.kind){const e=new Ce;h.push({label:e.label,run:()=>ae(this,void 0,void 0,(function*(){return e.runAction(d)}))})}else if(2===n.kind){const e=new we;h.push({label:e.label,run:()=>ae(this,void 0,void 0,(function*(){return e.runAction(d)}))})}else!function(e){throw new Error(`Unexpected value: ${e}`)}(n);const c=yield a.pick(h,{title:te.NC("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});c&&(yield c.run())}))}}function Se(e,t){var i;return ae(this,void 0,void 0,(function*(){const n=null===(i=e.inspect(L.qt.allowedLocales).user)||void 0===i?void 0:i.value;let o;o="object"==typeof n&&n?Object.assign({},n):{};for(const e of t)o[e]=!0;yield e.updateValue(L.qt.allowedLocales,o,2)}))}ye.ID="editor.action.unicodeHighlight.showExcludeOptions",(0,S.Qr)(be),(0,S.Qr)(Ce),(0,S.Qr)(we),(0,S.Qr)(ye),(0,S._K)(de.ID,de,1),I.Ae.register(ue)},79607:(e,t,i)=>{var n=i(5976),o=i(95935),s=i(16830),r=i(17122),a=i(63580),l=i(28820),d=function(e,t){return function(i,n){t(i,n,e)}};const h="ignoreUnusualLineTerminators";let c=class extends n.JT{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(124),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(124)&&(this._config=this._editor.getOption(124),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return e=this,t=void 0,n=function*(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=function(e,t){return e.getModelProperty(t.uri,h)}(this._codeEditorService,e);if(!0===t)return;if(this._editor.getOption(89))return;if("auto"===this._config)return void e.removeUnusualLineTerminators(this._editor.getSelections());if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=yield this._dialogService.confirm({title:a.NC("unusualLineTerminators.title","Unusual Line Terminators"),message:a.NC("unusualLineTerminators.message","Detected unusual line terminators"),detail:a.NC("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,o.EZ)(e.uri)),primaryButton:a.NC({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:a.NC("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}i.confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,i){e.setModelProperty(t.uri,h,!0)}(this._codeEditorService,e)},new((i=void 0)||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}};c.ID="editor.contrib.unusualLineTerminatorsDetector",c=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([d(1,l.S),d(2,r.$)],c),(0,s._K)(c.ID,c,1)},45550:(e,t,i)=>{i.d(t,{G:()=>R,w:()=>A});var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(19620),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=i(84973),v=i(13961),b=i(96887),C=i(63580),w=i(73910),y=i(97781);const S=(0,w.P6G)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},C.NC("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);(0,w.P6G)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},C.NC("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),(0,w.P6G)("editor.wordHighlightTextBackground",{light:S,dark:S,hcDark:S,hcLight:S},C.NC("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const L=(0,w.P6G)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:w.xL1,hcLight:w.xL1},C.NC("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));(0,w.P6G)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:w.xL1,hcLight:w.xL1},C.NC("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),(0,w.P6G)("editor.wordHighlightTextBorder",{light:L,dark:L,hcDark:L,hcLight:L},C.NC("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const x=(0,w.P6G)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},C.NC("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),k=(0,w.P6G)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},C.NC("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),N=(0,w.P6G)("editorOverviewRuler.wordHighlightTextForeground",{dark:w.SPM,light:w.SPM,hcDark:w.SPM,hcLight:w.SPM},C.NC("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),D=v.qx.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,y.EN)(k),position:_.sh.Center},minimap:{color:(0,y.EN)(w.IYc),position:_.F5.Inline}}),E=v.qx.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,y.EN)(N),position:_.sh.Center},minimap:{color:(0,y.EN)(w.IYc),position:_.F5.Inline}}),I=v.qx.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,y.EN)(w.SPM),position:_.sh.Center},minimap:{color:(0,y.EN)(w.IYc),position:_.F5.Inline}}),T=v.qx.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),M=v.qx.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,y.EN)(x),position:_.sh.Center},minimap:{color:(0,y.EN)(w.IYc),position:_.F5.Inline}});function R(e){return e===b.MY.Write?D:e===b.MY.Text?E:M}function A(e){return e?T:I}(0,y.Ic)(((e,t)=>{const i=e.getColor(w.Rzx);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)}))},70943:(e,t,i)=>{var n,o=i(56346),s=i(9488),r=i(15393),a=i(71050),l=i(17301),d=i(5976),h=i(16830),c=i(24314),u=i(29102),g=i(96887),p=i(63580),m=i(93983),f=i(71922),_=i(45550),v=i(53725),b=function(e,t){return function(i,n){t(i,n,e)}};const C=new m.uy("hasWordHighlights",!1);function w(e,t,i,n){const o=e.ordered(t);return(0,r.Ps)(o.map((e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,l.Cp))),s.Of)}class y{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=(0,r.PG)((e=>this._compute(this._model,this._selection,this._wordSeparators,e)))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new c.e(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,s=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let e=0,t=i.length;!a&&e<t;e++){const t=i.getRange(e);t&&t.startLineNumber===n&&t.startColumn<=o&&t.endColumn>=s&&(a=!0)}return a}cancel(){this.result.cancel()}}class S extends y{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return w(this._providers,e,t.getPosition(),n).then((e=>e||[]))}}class L extends y{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return(0,r.Vs)(250,n).then((()=>{if(!t.isEmpty())return[];const n=e.getWordAtPosition(t.getPosition());return!n||n.word.length>1e3?[]:e.findMatches(n.word,!0,!1,!0,i,!1).map((e=>({range:e.range,kind:g.MY.Text})))}))}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty===n&&super.isValid(e,t,i)}}(0,h.sb)("_executeDocumentHighlights",((e,t,i)=>w(e.get(f.p).documentHighlightProvider,t,i,a.T.None)));class x{constructor(e,t,i,n){this.toUnhook=new d.SL,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.linkedHighlighters=i,this._hasWordHighlights=C.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(79),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(e)}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{this._stopAll()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{const t=this.editor.getOption(79);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())}))),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(c.e.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const s=this.editor.getModel().getLineContent(i.startLineNumber);(0,o.Z9)(`${s}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const s=this.editor.getModel().getLineContent(i.startLineNumber);(0,o.Z9)(`${s}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){const e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber)return void this._stopAll();const t=e.startColumn,i=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn<i)return void this._stopAll();const o=this.workerRequest&&this.workerRequest.isValid(this.model,e,this.decorations);if(this.lastCursorPositionChangeTime=(new Date).getTime(),o)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();const e=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=(s=this.providers,r=this.model,a=this.editor.getSelection(),d=this.editor.getOption(128),s.has(r)?new S(r,a,d,s):new L(r,a,d)),this.workerRequest.result.then((t=>{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=t||[],this._beginRenderDecorations())}),l.dL)}var s,r,a,d}_beginRenderDecorations(){const e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:(0,_.G)(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations());for(const t of this.linkedHighlighters())(null==t?void 0:t.editor.getModel())===this.editor.getModel()&&(t._stopAll(),t.decorations.set(e),t._hasWordHighlights.set(t.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}}let k=n=class extends d.JT{static get(e){return e.getContribution(n.ID)}constructor(e,t,i){super(),this.wordHighlighter=null,this.linkedContributions=new Set;const n=()=>{e.hasModel()&&(this.wordHighlighter=new x(e,i.documentHighlightProvider,(()=>v.$.map(this.linkedContributions,(e=>e.wordHighlighter))),t))};this._register(e.onDidChangeModel((e=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),n()}))),n()}saveViewState(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}moveNext(){var e;null===(e=this.wordHighlighter)||void 0===e||e.moveNext()}moveBack(){var e;null===(e=this.wordHighlighter)||void 0===e||e.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};k.ID="editor.contrib.wordHighlighter",k=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([b(1,m.i6),b(2,f.p)],k);class N extends h.R6{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=k.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class D extends h.R6{constructor(){super({id:"editor.action.wordHighlight.trigger",label:p.NC("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:C.toNegated(),kbOpts:{kbExpr:u.u.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=k.get(t);n&&n.restoreViewState(!0)}}(0,h._K)(k.ID,k,0),(0,h.Qr)(class extends N{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:p.NC("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:C,kbOpts:{kbExpr:u.u.editorTextFocus,primary:65,weight:100}})}}),(0,h.Qr)(class extends N{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:p.NC("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:C,kbOpts:{kbExpr:u.u.editorTextFocus,primary:1089,weight:100}})}}),(0,h.Qr)(D)},37181:(e,t,i)=>{i.d(t,{IA:()=>v,t8:()=>w});var n=i(16830),o=i(61329),s=i(64141),r=i(55343),a=i(92896),l=i(24929),d=i(50187),h=i(24314),c=i(3860),u=i(29102),g=i(51381),p=i(63580),m=i(31106),f=i(93983),_=i(39282);class v extends n._l{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(128)),o=t.getModel(),s=t.getSelections().map((e=>{const t=new d.L(e.positionLineNumber,e.positionColumn),i=this._move(n,o,t,this._wordNavigationType);return this._moveTo(e,i,this._inSelectionMode)}));if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,s.map((e=>r.Vi.fromModelSelection(e)))),1===s.length){const e=new d.L(s[0].positionLineNumber,s[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new c.Y(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new c.Y(t.lineNumber,t.column,t.lineNumber,t.column)}}class b extends v{_move(e,t,i,n){return a.w.moveWordLeft(e,t,i,n)}}class C extends v{_move(e,t,i,n){return a.w.moveWordRight(e,t,i,n)}}class w extends n._l{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(g.c_);if(!t.hasModel())return;const s=(0,l.u)(t.getOption(128)),r=t.getModel(),a=t.getSelections(),d=t.getOption(6),h=t.getOption(10),c=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),p=a.map((e=>{const i=this._delete({wordSeparators:s,model:r,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(8),autoClosingBrackets:d,autoClosingQuotes:h,autoClosingPairs:c,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new o.T4(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,p),t.pushUndoStop()}}class y extends w{_delete(e,t){return a.w.deleteWordLeft(e,t)||new h.e(1,1,1,1)}}class S extends w{_delete(e,t){const i=a.w.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new h.e(n,o,n,o)}}class L extends n.R6{constructor(){super({id:"deleteInsideWord",precondition:u.u.writable,label:p.NC("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(128)),s=t.getModel(),r=t.getSelections().map((e=>{const t=a.w.deleteInsideWord(n,s,e);return new o.T4(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}),(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}),(0,n.fK)(new class extends b{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,_.cv))||void 0===e?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}),(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}),(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}),(0,n.fK)(new class extends b{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,_.cv))||void 0===e?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}),(0,n.fK)(new class extends C{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}),(0,n.fK)(new class extends C{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,_.cv))||void 0===e?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}),(0,n.fK)(new class extends C{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}),(0,n.fK)(new class extends C{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}),(0,n.fK)(new class extends C{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(u.u.textInputFocus,null===(e=f.Ao.and(m.U,_.cv))||void 0===e?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}),(0,n.fK)(new class extends C{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}),(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}),(0,n.fK)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}),(0,n.fK)(new class extends C{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}),(0,n.fK)(new class extends C{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(s.BH.wordSeparators.defaultValue),t,i,n)}}),(0,n.fK)(new class extends y{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:u.u.writable})}}),(0,n.fK)(new class extends y{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:u.u.writable})}}),(0,n.fK)(new class extends y{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:u.u.writable,kbOpts:{kbExpr:u.u.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}),(0,n.fK)(new class extends S{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:u.u.writable})}}),(0,n.fK)(new class extends S{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:u.u.writable})}}),(0,n.fK)(new class extends S{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:u.u.writable,kbOpts:{kbExpr:u.u.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}),(0,n.Qr)(L)},86709:(e,t,i)=>{var n=i(16830),o=i(92896),s=i(24314),r=i(29102),a=i(37181),l=i(94565);class d extends a.t8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:r.u.writable,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){return o.L.deleteWordPartLeft(e)||new s.e(1,1,1,1)}}class h extends a.t8{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:r.u.writable,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=o.L.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),r=e.model.getLineMaxColumn(n);return new s.e(n,r,n,r)}}class c extends a.IA{_move(e,t,i,n){return o.L.moveWordPartLeft(e,t,i)}}l.P.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft"),l.P.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class u extends a.IA{_move(e,t,i,n){return o.L.moveWordPartRight(e,t,i)}}(0,n.fK)(new d),(0,n.fK)(new h),(0,n.fK)(new class extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}),(0,n.fK)(new class extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}),(0,n.fK)(new class extends u{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}),(0,n.fK)(new class extends u{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:r.u.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}})},41321:(e,t,i)=>{var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(21556),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _=i(65321),v=i(5976),b=i(16830),C=i(1432);class w extends v.JT{constructor(e){super(),this.editor=e,this.widget=null,C.gn&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(89);!this.widget&&e?this.widget=new y(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}w.ID="editor.contrib.iPadShowKeyboard";class y extends v.JT{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(_.nm(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(_.nm(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return y.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}y.ID="editor.contrib.ShowKeyboardWidget",(0,b._K)(w.ID,w,3)},95733:(e,t,i)=>{var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(75189),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals;var _,v=i(65321),b=i(41264),C=i(5976),w=i(16830),y=i(96887),S=i(45797),L=i(276),x=i(72042),k=i(44156),N=i(20913),D=function(e,t){return function(i,n){t(i,n,e)}};let E=_=class extends C.JT{static get(e){return e.getContribution(_.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(y.RW.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new T(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};E.ID="editor.contrib.inspectTokens",E=_=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([D(1,k.Z),D(2,x.O)],E);class I extends w.R6{constructor(){super({id:"editor.action.inspectTokens",label:N.ug.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=E.get(t);null==i||i.launch()}}class T extends C.JT{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=function(e,t){const i=y.RW.get(t);if(i)return i;const n=e.encodeLanguageId(t);return{getInitialState:()=>L.TJ,tokenize:(e,i,n)=>(0,L.Ri)(t,n),tokenizeEncoded:(e,t,i)=>(0,L.Dy)(n,i)}}(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return T._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let n=t.tokens1.length-1;n>=0;n--){const o=t.tokens1[n];if(e.column-1>=o.offset){i=n;break}}let n=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){n=i;break}const o=this._model.getLineContent(e.lineNumber);let s="";if(i<t.tokens1.length){const e=t.tokens1[i].offset,n=i+1<t.tokens1.length?t.tokens1[i+1].offset:o.length;s=o.substring(e,n)}(0,v.mc)(this._domNode,(0,v.$)("h2.tm-token",void 0,function(e){let t="";for(let i=0,n=e.length;i<n;i++){const n=e.charCodeAt(i);switch(n){case 9:t+="→";break;case 32:t+="·";break;default:t+=String.fromCharCode(n)}}return t}(s),(0,v.$)("span.tm-token-length",void 0,`${s.length} ${1===s.length?"char":"chars"}`))),(0,v.R3)(this._domNode,(0,v.$)("hr.tokens-inspect-separator",{style:"clear:both"}));const r=1+(n<<1)<t.tokens2.length?this._decodeMetadata(t.tokens2[1+(n<<1)]):null;(0,v.R3)(this._domNode,(0,v.$)("table.tm-metadata-table",void 0,(0,v.$)("tbody",void 0,(0,v.$)("tr",void 0,(0,v.$)("td.tm-metadata-key",void 0,"language"),(0,v.$)("td.tm-metadata-value",void 0,`${r?r.languageId:"-?-"}`)),(0,v.$)("tr",void 0,(0,v.$)("td.tm-metadata-key",void 0,"token type"),(0,v.$)("td.tm-metadata-value",void 0,`${r?this._tokenTypeToString(r.tokenType):"-?-"}`)),(0,v.$)("tr",void 0,(0,v.$)("td.tm-metadata-key",void 0,"font style"),(0,v.$)("td.tm-metadata-value",void 0,`${r?this._fontStyleToString(r.fontStyle):"-?-"}`)),(0,v.$)("tr",void 0,(0,v.$)("td.tm-metadata-key",void 0,"foreground"),(0,v.$)("td.tm-metadata-value",void 0,`${r?b.Il.Format.CSS.formatHex(r.foreground):"-?-"}`)),(0,v.$)("tr",void 0,(0,v.$)("td.tm-metadata-key",void 0,"background"),(0,v.$)("td.tm-metadata-value",void 0,`${r?b.Il.Format.CSS.formatHex(r.background):"-?-"}`))))),(0,v.R3)(this._domNode,(0,v.$)("hr.tokens-inspect-separator")),i<t.tokens1.length&&(0,v.R3)(this._domNode,(0,v.$)("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const t=y.RW.getColorMap(),i=S.N.getLanguageId(e),n=S.N.getTokenType(e),o=S.N.getFontStyle(e),s=S.N.getForeground(e),r=S.N.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:n,fontStyle:o,foreground:t[s],background:t[r]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),0===t.length&&(t="---"),t}_getTokensAtLine(e){const t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),n=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:i.tokens,tokens2:n.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}T._ID="editor.contrib.inspectTokensWidget",(0,w._K)(E.ID,E,4),(0,w.Qr)(I)},38956:(e,t,i)=>{var n=i(89872),o=i(90725),s=i(20913),r=i(17122),a=i(21212),l=i(9488),d=i(98401),h=i(63580);function c(e,t){return t&&(e.stack||e.stacktrace)?h.NC("stackTrace.format","{0}: {1}",g(e),u(e.stack)||u(e.stacktrace)):g(e)}function u(e){return Array.isArray(e)?e.join("\n"):e}function g(e){return"ERR_UNC_HOST_NOT_ALLOWED"===e.code?`${e.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?h.NC("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||h.NC("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function p(e=null,t=!1){if(!e)return h.NC("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const i=l.kX(e),n=p(i[0],t);return i.length>1?h.NC("error.moreErrors","{0} ({1} errors in total)",n,i.length):n}if(d.HD(e))return e;if(e.detail){const i=e.detail;if(i.error)return c(i.error,t);if(i.exception)return c(i.exception,t)}return e.stack?c(e,t):e.message?e.message:h.NC("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var m,f=i(17301),_=i(75392),v=i(5976),b=i(43702),C=i(94565),w=i(33108),y=i(28820),S=i(72065),L=i(91847),x=i(15393),k=i(71050),N=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function D(e){const t=e;return Array.isArray(t.items)}function E(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(m||(m={}));class I extends v.JT{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){var n;const o=new v.SL;let s;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=o.add(new v.XK),a=()=>N(this,void 0,void 0,(function*(){const n=r.value=new v.SL;null==s||s.dispose(!0),e.busy=!1,s=new k.A(t);const o=s.token,a=e.value.substr(this.prefix.length).trim(),l=this._getPicks(a,n,o,i),h=(t,i)=>{var n;let o,s;if(D(t)?(o=t.items,s=t.active):o=t,0===o.length){if(i)return!1;(a.length>0||e.hideInput)&&(null===(n=this.options)||void 0===n?void 0:n.noResultsPick)&&(o=(0,d.mf)(this.options.noResultsPick)?[this.options.noResultsPick(a)]:[this.options.noResultsPick])}return e.items=o,s&&(e.activeItems=[s]),!0},c=t=>N(this,void 0,void 0,(function*(){let i=!1,n=!1;yield Promise.all([(()=>N(this,void 0,void 0,(function*(){"number"==typeof t.mergeDelay&&(yield(0,x.Vs)(t.mergeDelay),o.isCancellationRequested)||n||(i=h(t.picks,!0))})))(),(()=>N(this,void 0,void 0,(function*(){e.busy=!0;try{const n=yield t.additionalPicks;if(o.isCancellationRequested)return;let s,r,a,l;if(D(t.picks)?(s=t.picks.items,r=t.picks.active):s=t.picks,D(n)?(a=n.items,l=n.active):a=n,a.length>0||!i){let t;if(!r&&!l){const i=e.activeItems[0];i&&-1!==s.indexOf(i)&&(t=i)}h({items:[...s,...a],active:r||l||t})}}finally{o.isCancellationRequested||(e.busy=!1),n=!0}})))()])}));if(null===l);else if(E(l))yield c(l);else if(l instanceof Promise){e.busy=!0;try{const e=yield l;if(o.isCancellationRequested)return;E(e)?yield c(e):h(e)}finally{o.isCancellationRequested||(e.busy=!1)}}else h(l)}));return o.add(e.onDidChangeValue((()=>a()))),a(),o.add(e.onDidAccept((t=>{const[i]=e.selectedItems;"function"==typeof(null==i?void 0:i.accept)&&(t.inBackground||e.hide(),i.accept(e.keyMods,t))}))),o.add(e.onDidTriggerItemButton((({button:i,item:n})=>N(this,void 0,void 0,(function*(){var o,s;if("function"==typeof n.trigger){const r=null!==(s=null===(o=n.buttons)||void 0===o?void 0:o.indexOf(i))&&void 0!==s?s:-1;if(r>=0){const i=n.trigger(r,e.keyMods),o="number"==typeof i?i:yield i;if(t.isCancellationRequested)return;switch(o){case m.NO_ACTION:break;case m.CLOSE_PICKER:e.hide();break;case m.REFRESH_PICKER:a();break;case m.REMOVE_ITEM:{const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice(),n=i.splice(t,1),o=e.activeItems.filter((e=>e!==n[0])),s=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,o&&(e.activeItems=o),e.keepScrollPosition=s}break}}}}}))))),o}}var T,M,R=i(26904),A=i(10829),O=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},P=function(e,t){return function(i,n){t(i,n,e)}},F=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let B=T=class extends I{constructor(e,t,i,n,o,s){super(T.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(W)),this.options=e}_getPicks(e,t,i,n){var o,s,r,a;return F(this,void 0,void 0,(function*(){const t=yield this.getCommandPicks(i);if(i.isCancellationRequested)return[];const l=[];for(const i of t){const t=null!==(o=T.WORD_FILTER(e,i.label))&&void 0!==o?o:void 0,n=i.commandAlias&&null!==(s=T.WORD_FILTER(e,i.commandAlias))&&void 0!==s?s:void 0;t||n?(i.highlights={label:t,detail:this.options.showAlias?n:void 0},l.push(i)):e===i.commandId&&l.push(i)}const d=new Map;for(const e of l){const t=d.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):d.set(e.label,e)}l.sort(((e,t)=>{const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return-1;if(n)return 1;if(this.options.suggestedCommandIds){const i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return-1;if(n)return 1}return e.label.localeCompare(t.label)}));const c=[];let u=!1,g=!!this.options.suggestedCommandIds;for(let e=0;e<l.length;e++){const t=l[e];0===e&&this.commandsHistory.peek(t.commandId)&&(c.push({type:"separator",label:(0,h.NC)("recentlyUsed","recently used")}),u=!0),g&&!this.commandsHistory.peek(t.commandId)&&(null===(r=this.options.suggestedCommandIds)||void 0===r?void 0:r.has(t.commandId))&&(c.push({type:"separator",label:(0,h.NC)("commonlyUsed","commonly used")}),u=!0,g=!1),!u||this.commandsHistory.peek(t.commandId)||(null===(a=this.options.suggestedCommandIds)||void 0===a?void 0:a.has(t.commandId))||(c.push({type:"separator",label:(0,h.NC)("morecCommands","other commands")}),u=!1),c.push(this.toCommandPick(t,n))}return this.hasAdditionalCommandPicks(e,i)?{picks:c,additionalPicks:(()=>F(this,void 0,void 0,(function*(){const o=yield this.getAdditionalCommandPicks(t,l,e,i);return i.isCancellationRequested?[]:o.map((e=>this.toCommandPick(e,n)))})))()}:c}))}toCommandPick(e,t){if("separator"===e.type)return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?(0,h.NC)("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,i.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:()=>F(this,void 0,void 0,(function*(){var i,n;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:null!==(i=null==t?void 0:t.from)&&void 0!==i?i:"quick open"});try{(null===(n=e.args)||void 0===n?void 0:n.length)?yield this.commandService.executeCommand(e.commandId,...e.args):yield this.commandService.executeCommand(e.commandId)}catch(t){(0,f.n2)(t)||this.dialogService.error((0,h.NC)("canNotRun","Command '{0}' resulted in an error",e.label),p(t))}}))})}};B.PREFIX=">",B.WORD_FILTER=(0,_.or)(_.Ji,_.KZ,_.ir),B=T=O([P(1,S.TG),P(2,L.d),P(3,C.H),P(4,A.b),P(5,y.S)],B);let W=M=class extends v.JT{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>this.updateConfiguration(e))))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=M.getConfiguredCommandHistoryLength(this.configurationService),M.cache&&M.cache.limit!==this.configuredCommandsHistoryLength&&(M.cache.limit=this.configuredCommandsHistoryLength,M.saveState(this.storageService)))}load(){const e=this.storageService.get(M.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(e){}const i=M.cache=new b.z6(this.configuredCommandsHistoryLength,1);if(t){let e;e=t.usesLRU?t.entries:t.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>i.set(e.key,e.value)))}M.counter=this.storageService.getNumber(M.PREF_KEY_COUNTER,0,M.counter)}push(e){M.cache&&(M.cache.set(e,M.counter++),M.saveState(this.storageService))}peek(e){var t;return null===(t=M.cache)||void 0===t?void 0:t.peek(e)}static saveState(e){if(!M.cache)return;const t={usesLRU:!0,entries:[]};M.cache.forEach(((e,i)=>t.entries.push({key:i,value:e}))),e.store(M.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(M.PREF_KEY_COUNTER,M.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const n=null===(i=null===(t=e.getValue().workbench)||void 0===t?void 0:t.commandPalette)||void 0===i?void 0:i.history;return"number"==typeof n?n:M.DEFAULT_COMMANDS_HISTORY_LENGTH}};W.DEFAULT_COMMANDS_HISTORY_LENGTH=50,W.PREF_KEY_CACHE="commandPalette.mru.cache",W.PREF_KEY_COUNTER="commandPalette.mru.counter",W.counter=1,W=M=O([P(0,R.Uy),P(1,w.Ui)],W);class V extends B{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:(0,a.x$)(i.label)||i.id});return t}}var H=i(16830),z=i(29102),K=i(41157),U=function(e,t){return function(i,n){t(i,n,e)}},j=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let $=class extends V{get activeTextEditorControl(){var e;return null!==(e=this.codeEditorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}constructor(e,t,i,n,o,s){super({showAlias:!1},e,i,n,o,s),this.codeEditorService=t}getCommandPicks(){return j(this,void 0,void 0,(function*(){return this.getCodeEditorCommandPicks()}))}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return j(this,void 0,void 0,(function*(){return[]}))}};$=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([U(0,S.TG),U(1,r.$),U(2,L.d),U(3,C.H),U(4,A.b),U(5,y.S)],$);class q extends H.R6{constructor(){super({id:q.ID,label:s.UX.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:z.u.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(K.eJ).quickAccess.show($.PREFIX)}}q.ID="editor.action.quickCommand",(0,H.Qr)(q),n.B.as(o.IP.Quickaccess).registerQuickAccessProvider({ctor:$,prefix:$.PREFIX,helpEntries:[{description:s.UX.quickCommandHelp,commandId:q.ID}]})},43588:(e,t,i)=>{var n=i(5976),o=i(65520),s=i(83943),r=i(63580);class a extends s.X{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,r.NC)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,n.JT.None}provideWithTextEditor(e,t,i){const s=e.editor,r=new n.SL;r.add(t.onDidAccept((i=>{const[n]=t.selectedItems;if(n){if(!this.isValidLineNumber(s,n.lineNumber))return;this.gotoLocation(e,{range:this.toRange(n.lineNumber,n.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const l=()=>{const e=this.parsePosition(s,t.value.trim().substr(a.PREFIX.length)),i=this.getPickLabel(s,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(s,e.lineNumber))return void this.clearDecorations(s);const n=this.toRange(e.lineNumber,e.column);s.revealRangeInCenter(n,0),this.addDecorations(s,n)};l(),r.add(t.onDidChangeValue((()=>l())));const d=(0,o.Pi)(s);return d&&2===d.getOptions().get(66).renderType&&(d.updateOptions({lineNumbers:"on"}),r.add((0,n.OF)((()=>d.updateOptions({lineNumbers:"relative"}))))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,r.NC)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):(0,r.NC)("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?(0,r.NC)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,o):(0,r.NC)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const o={lineNumber:t,column:i};return n.validatePosition(o).equals(o)}lineCount(e){var t,i;return null!==(i=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==i?i:0}}a.PREFIX=":";var l=i(89872),d=i(90725),h=i(17122),c=i(20913),u=i(4669),g=i(16830),p=i(29102),m=i(41157);let f=class extends a{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=u.ju.None}get activeTextEditorControl(){var e;return null!==(e=this.editorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}};var _,v;f=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(_=0,v=h.$,function(e,t){v(e,t,_)})],f);class b extends g.R6{constructor(){super({id:b.ID,label:c.qq.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:p.u.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(m.eJ).quickAccess.show(f.PREFIX)}}b.ID="editor.action.gotoLine",(0,g.Qr)(b),l.B.as(d.IP.Quickaccess).registerQuickAccessProvider({ctor:f,prefix:f.PREFIX,helpEntries:[{description:c.qq.gotoLineActionLabel,commandId:b.ID}]})},48766:(e,t,i)=>{i(89899),i(22368);var n=i(15393),o=i(71050),s=i(73046),r=i(25670),a=i(75392),l=i(88721),d=i(1432),h=i(97295);const c=[void 0,[]];function u(e,t,i=0,n=0){const o=t;return o.values&&o.values.length>1?function(e,t,i,n){let o=0;const s=[];for(const r of t){const[t,a]=g(e,r,i,n);if("number"!=typeof t)return c;o+=t,s.push(...a)}return[o,p(s)]}(e,o.values,i,n):g(e,t,i,n)}function g(e,t,i,n){const o=(0,a.EW)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return o?[o[0],(0,a.mB)(o)]:c}function p(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const e of t)!n||(s=e,(o=n).end<s.start||s.end<o.start)?(n=e,i.push(e)):(n.start=Math.min(n.start,e.start),n.end=Math.max(n.end,e.end));var o,s;return i}function m(e){return e.startsWith('"')&&e.endsWith('"')}Object.freeze({score:0});const f=" ";function _(e){"string"!=typeof e&&(e="");const t=e.toLowerCase(),{pathNormalized:i,normalized:n,normalizedLowercase:o}=v(e),s=i.indexOf(l.ir)>=0,r=m(e);let a;const d=e.split(f);if(d.length>1)for(const e of d){const t=m(e),{pathNormalized:i,normalized:n,normalizedLowercase:o}=v(e);n&&(a||(a=[]),a.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:i,normalized:n,normalizedLowercase:o,expectContiguousMatch:t}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:o,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function v(e){let t;t=d.ED?e.replace(/\//g,l.ir):e.replace(/\\/g,l.ir);const i=(0,h.R1)(t).replace(/\s|"/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function b(e){return Array.isArray(e)?_(e.map((e=>e.original)).join(f)):_(e.original)}var C,w=i(5976),y=i(24314),S=i(96887),L=i(30335),x=i(83943),k=i(63580),N=i(71922),D=i(9488),E=function(e,t){return function(i,n){t(i,n,e)}},I=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let T=C=class extends x.X{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,k.NC)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),w.JT.None}provideWithTextEditor(e,t,i){const n=e.editor,o=this.getModel(n);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,i):this.doProvideWithoutEditorSymbols(e,o,t,i):w.JT.None}doProvideWithoutEditorSymbols(e,t,i,n){const o=new w.SL;return this.provideLabelPick(i,(0,k.NC)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(()=>{I(this,void 0,void 0,(function*(){(yield this.waitForLanguageSymbolRegistry(t,o))&&!n.isCancellationRequested&&o.add(this.doProvideWithEditorSymbols(e,t,i,n))}))})(),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return I(this,void 0,void 0,(function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new n.CR,o=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(o.dispose(),i.complete(!0))})));return t.add((0,w.OF)((()=>i.complete(!1)))),i.p}))}doProvideWithEditorSymbols(e,t,i,n){var s;const r=e.editor,a=new w.SL;a.add(i.onDidAccept((t=>{const[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),t.inBackground||i.hide())}))),a.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const l=this.getDocumentSymbols(t,n);let d;const h=e=>I(this,void 0,void 0,(function*(){null==d||d.dispose(!0),i.busy=!1,d=new o.A(n),i.busy=!0;try{const t=_(i.value.substr(C.PREFIX.length).trim()),o=yield this.doGetSymbolPicks(l,t,void 0,d.token);if(n.isCancellationRequested)return;if(o.length>0){if(i.items=o,e&&0===t.original.length){const t=(0,D.dF)(o,(t=>Boolean("separator"!==t.type&&t.range&&y.e.containsPosition(t.range.decoration,e))));t&&(i.activeItems=[t])}}else t.original.length>0?this.provideLabelPick(i,(0,k.NC)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,(0,k.NC)("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}}));return a.add(i.onDidChangeValue((()=>h(void 0)))),h(null===(s=r.getSelection())||void 0===s?void 0:s.getPosition()),a.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;e&&e.range&&(r.revealRangeInCenter(e.range.selection,0),this.addDecorations(r,e.range.decoration))}))),a}doGetSymbolPicks(e,t,i,n){var o,a;return I(this,void 0,void 0,(function*(){const l=yield e;if(n.isCancellationRequested)return[];const d=0===t.original.indexOf(C.SCOPE_PREFIX),c=d?1:0;let g,p,m;t.values&&t.values.length>1?(g=b(t.values[0]),p=b(t.values.slice(1))):g=t;const f=null===(a=null===(o=this.options)||void 0===o?void 0:o.openSideBySideDirection)||void 0===a?void 0:a.call(o);f&&(m=[{iconClass:"right"===f?r.k.asClassName(s.l.splitHorizontal):r.k.asClassName(s.l.splitVertical),tooltip:"right"===f?(0,k.NC)("openToSide","Open to the Side"):(0,k.NC)("openToBottom","Open to the Bottom")}]);const _=[];for(let L=0;L<l.length;L++){const x=l[L],N=(0,h.fy)(x.name),D=`$(${S.uZ.toIcon(x.kind).id}) ${N}`,E=D.length-N.length;let I,T,A,O,P=x.containerName;if((null==i?void 0:i.extraContainerLabel)&&(P=P?`${i.extraContainerLabel} • ${P}`:i.extraContainerLabel),t.original.length>c){let B=!1;if(g!==t&&([I,T]=u(D,Object.assign(Object.assign({},t),{values:void 0}),c,E),"number"==typeof I&&(B=!0)),"number"!=typeof I&&([I,T]=u(D,g,c,E),"number"!=typeof I))continue;if(!B&&p){if(P&&p.original.length>0&&([A,O]=u(P,p)),"number"!=typeof A)continue;"number"==typeof I&&(I+=A)}}const F=x.tags&&x.tags.indexOf(1)>=0;_.push({index:L,kind:x.kind,score:I,label:D,ariaLabel:(0,S.R4)(x.name,x.kind),description:P,highlights:F?void 0:{label:T,description:O},range:{selection:y.e.collapseToStart(x.selectionRange),decoration:x.range},strikethrough:F,buttons:m})}const v=_.sort(((e,t)=>d?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let w=[];if(d){let W,V,H=0;function z(){V&&"number"==typeof W&&H>0&&(V.label=(0,h.WU)(R[W]||M,H))}for(const K of v)W!==K.kind?(z(),W=K.kind,H=1,V={type:"separator"},w.push(V)):H++,w.push(K);z()}else v.length>0&&(w=[{label:(0,k.NC)("symbols","symbols ({0})",_.length),type:"separator"},...v]);return w}))}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){const i=R[e.kind]||M,n=R[t.kind]||M,o=i.localeCompare(n);return 0===o?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return I(this,void 0,void 0,(function*(){const i=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}))}};T.PREFIX="@",T.SCOPE_PREFIX=":",T.PREFIX_BY_CATEGORY=`${C.PREFIX}${C.SCOPE_PREFIX}`,T=C=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([E(0,N.p),E(1,L.Je)],T);const M=(0,k.NC)("property","properties ({0})"),R={5:(0,k.NC)("method","methods ({0})"),11:(0,k.NC)("function","functions ({0})"),8:(0,k.NC)("_constructor","constructors ({0})"),12:(0,k.NC)("variable","variables ({0})"),4:(0,k.NC)("class","classes ({0})"),22:(0,k.NC)("struct","structs ({0})"),23:(0,k.NC)("event","events ({0})"),24:(0,k.NC)("operator","operators ({0})"),10:(0,k.NC)("interface","interfaces ({0})"),2:(0,k.NC)("namespace","namespaces ({0})"),3:(0,k.NC)("package","packages ({0})"),25:(0,k.NC)("typeParameter","type parameters ({0})"),1:(0,k.NC)("modules","modules ({0})"),6:(0,k.NC)("property","properties ({0})"),9:(0,k.NC)("enum","enumerations ({0})"),21:(0,k.NC)("enumMember","enumeration members ({0})"),14:(0,k.NC)("string","strings ({0})"),0:(0,k.NC)("file","files ({0})"),17:(0,k.NC)("array","arrays ({0})"),15:(0,k.NC)("number","numbers ({0})"),16:(0,k.NC)("boolean","booleans ({0})"),18:(0,k.NC)("object","objects ({0})"),19:(0,k.NC)("key","keys ({0})"),7:(0,k.NC)("field","fields ({0})"),13:(0,k.NC)("constant","constants ({0})")};var A=i(89872),O=i(90725),P=i(17122),F=i(20913),B=i(4669),W=i(16830),V=i(29102),H=i(41157),z=function(e,t){return function(i,n){t(i,n,e)}};let K=class extends T{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=B.ju.None}get activeTextEditorControl(){var e;return null!==(e=this.editorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}};K=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([z(0,P.$),z(1,N.p),z(2,L.Je)],K);class U extends W.R6{constructor(){super({id:U.ID,label:F.aq.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:V.u.hasDocumentSymbolProvider,kbOpts:{kbExpr:V.u.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(H.eJ).quickAccess.show(T.PREFIX,{itemActivation:H.jG.NONE})}}U.ID="editor.action.quickOutline",(0,W.Qr)(U),A.B.as(O.IP.Quickaccess).registerQuickAccessProvider({ctor:K,prefix:T.PREFIX,helpEntries:[{description:F.aq.quickOutlineActionLabel,prefix:T.PREFIX,commandId:U.ID},{description:F.aq.quickOutlineByCategoryActionLabel,prefix:T.PREFIX_BY_CATEGORY}]})},78944:(e,t,i)=>{var n,o=i(89872),s=i(90725),r=i(20913),a=i(63580),l=i(5976),d=i(91847),h=i(41157),c=function(e,t){return function(i,n){t(i,n,e)}};let u=n=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=o.B.as(s.IP.Quickaccess)}provide(e){const t=new l.SL;return t.add(e.onDidAccept((()=>{const[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),t.add(e.onDidChangeValue((e=>{const t=this.registry.getQuickAccessProvider(e.substr(n.PREFIX.length));t&&t.prefix&&t.prefix!==n.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),e.items=this.getQuickAccessProviders().filter((e=>e.prefix!==n.PREFIX)),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))).flatMap((e=>this.createPicks(e)))}createPicks(e){return e.helpEntries.map((t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:(0,a.NC)("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}}))}};u.PREFIX="?",u=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([c(0,h.eJ),c(1,d.d)],u),o.B.as(s.IP.Quickaccess).registerQuickAccessProvider({ctor:u,prefix:"",helpEntries:[{description:r.ld.helpQuickAccessActionLabel}]})},45048:(e,t,i)=>{var n=i(16830),o=i(17122),s=i(88802),r=i(33108),a=i(93983),l=i(72065),d=i(59422),h=i(26904),c=function(e,t){return function(i,n){t(i,n,e)}};let u=class extends s.J{constructor(e,t,i,n,o,s,r){super(!0,e,t,i,n,o,s,r)}};u=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([c(1,a.i6),c(2,o.$),c(3,d.lT),c(4,l.TG),c(5,h.Uy),c(6,r.Ui)],u),(0,n._K)(s.J.ID,u,4)},58763:(e,t,i)=>{i.d(t,{kR:()=>T,MU:()=>M,nI:()=>W,rW:()=>I,TG:()=>E});var n=i(65321),o=i(16268),s=i(41264),r=i(4669),a=i(96887),l=i(45797);class d{constructor(e,t,i,n,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}const h=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class c{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(h);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=s.Il.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class u{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,o=e.length;n<o;n++){const o=e[n];let s=-1;if("string"==typeof o.fontStyle){s=0;const e=o.fontStyle.split(" ");for(let t=0,i=e.length;t<i;t++)switch(e[t]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break;case"strikethrough":s|=8}}let r=null;"string"==typeof o.foreground&&(r=o.foreground);let a=null;"string"==typeof o.background&&(a=o.background),t[i++]=new d(o.token||"",n,s,r,a)}return t}(e),t)}static createFromParsedTokenTheme(e,t){return function(e,t){e.sort(((e,t)=>{const i=function(e,t){return e<t?-1:e>t?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",o="ffffff";for(;e.length>=1&&""===e[0].token;){const t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}const s=new c;for(const e of t)s.getId(e);const r=s.getId(n),a=s.getId(o),l=new p(i,r,a),d=new m(l);for(let t=0,i=e.length;t<i;t++){const i=e[t];d.insert(i.token,i.fontStyle,s.getId(i.foreground),s.getId(i.background))}return new u(s,d)}(e,t)}constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let i=this._cache.get(t);if(void 0===i){const e=this._match(t),n=function(e){const t=e.match(g);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}(t);i=(e.metadata|n<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const g=/\b(comment|string|regex|regexp)\b/;class p{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new p(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class m{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;const t=e.indexOf(".");let i,n;-1===t?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const o=this._children.get(i);return void 0!==o?o.match(n):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);const o=e.indexOf(".");let s,r;-1===o?(s=e,r=""):(s=e.substring(0,o),r=e.substring(o+1));let a=this._children.get(s);void 0===a&&(a=new m(this._mainRule.clone()),this._children.set(s,a)),a.insert(r,t,i,n)}}var f=i(8625),_=i(73910);const v={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[_.cvW]:"#FFFFFE",[_.NOs]:"#000000",[_.ES4]:"#E5EBF1",[f.gS]:"#D3D3D3",[f.qe]:"#939393",[_.Rzx]:"#ADD6FF4D"}},b={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[_.cvW]:"#1E1E1E",[_.NOs]:"#D4D4D4",[_.ES4]:"#3A3D41",[f.gS]:"#404040",[f.qe]:"#707070",[_.Rzx]:"#ADD6FF26"}},C={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[_.cvW]:"#000000",[_.NOs]:"#FFFFFF",[f.gS]:"#FFFFFF",[f.qe]:"#FFFFFF"}},w={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[_.cvW]:"#FFFFFF",[_.NOs]:"#292929",[f.gS]:"#292929",[f.qe]:"#292929"}};var y=i(89872),S=i(97781),L=i(5976),x=i(92321),k=i(25670),N=i(59554);class D{getIcon(e){const t=(0,N.Ks)();let i=e.defaults;for(;k.k.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}const E="vs",I="vs-dark",T="hc-black",M="hc-light",R=y.B.as(_.IPX.ColorContribution),A=y.B.as(S.IP.ThemingContribution);class O{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(P(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,s.Il.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=F(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,s.Il.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){return this.getColors().get(e)||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=R.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case E:return x.eL.LIGHT;case T:return x.eL.HIGH_CONTRAST_DARK;case M:return x.eL.HIGH_CONTRAST_LIGHT;default:return x.eL.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=F(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=u.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=l.N.getForeground(n),s=l.N.getFontStyle(n);return{foreground:o,italic:Boolean(1&s),bold:Boolean(2&s),underline:Boolean(4&s),strikethrough:Boolean(8&s)}}}function P(e){return e===E||e===I||e===T||e===M}function F(e){switch(e){case E:return v;case I:return b;case T:return C;case M:return w}}function B(e){const t=F(e);return new O(e,t)}class W extends L.JT{constructor(){super(),this._onColorThemeChange=this._register(new r.Q5),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new r.Q5),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new D,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(E,B(E)),this._knownThemes.set(I,B(I)),this._knownThemes.set(T,B(T)),this._knownThemes.set(M,B(M));const e=function(e){const t=new r.Q5,i=(0,N.Ks)();return i.onDidChange((()=>t.fire())),null==e||e.onDidProductIconThemeChange((()=>t.fire())),{onDidChange:t.event,getCSS(){const t=e?e.getProductIconTheme():new D,o={},s=e=>{const i=t.getIcon(e);if(!i)return;const s=i.font;return s?(o[s.id]=s.definition,`.codicon-${e.id}:before { content: '${i.fontCharacter}'; font-family: ${(0,n._h)(s.id)}; }`):`.codicon-${e.id}:before { content: '${i.fontCharacter}'; }`},r=[];for(const e of i.getIcons()){const t=s(e);t&&r.push(t)}for(const e in o){const t=o[e],i=t.weight?`font-weight: ${t.weight};`:"",s=t.style?`font-style: ${t.style};`:"",a=t.src.map((e=>`${(0,n.wY)(e.location)} format('${e.format}')`)).join(", ");r.push(`@font-face { src: ${a}; font-family: ${(0,n._h)(e)};${i}${s} font-display: block; }`)}return r.join("\n")}}}(this);this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(E),this._onOSSchemeChanged(),e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),(0,o.uB)("(forced-colors: active)",(()=>{this._onOSSchemeChanged()}))}registerEditorContainer(e){return n.OO(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=n.dS(void 0,(e=>{e.className="monaco-colors",e.textContent=this._allCSS})),this._styleElements.push(this._globalStyleElement)),L.JT.None}_registerShadowDomContainer(e){const t=n.dS(e,(e=>{e.className="monaco-colors",e.textContent=this._allCSS}));return this._styleElements.push(t),{dispose:()=>{for(let e=0;e<this._styleElements.length;e++)if(this._styleElements[e]===t)return void this._styleElements.splice(e,1)}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!P(t.base)&&!P(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new O(e,t)),P(e)&&this._knownThemes.forEach((t=>{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(E),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=window.matchMedia("(forced-colors: active)").matches;if(e!==(0,x.c3)(this._theme.type)){let t;t=(0,x._T)(this._theme.type)?e?T:I:e?M:E,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};A.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const e of R.getColors()){const t=this._theme.getColor(e.id,!0);t&&n.push(`${(0,_.QO2)(e.id)}: ${t.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor { ${n.join("\n")} }`);const o=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){const t=[];for(let i=1,n=e.length;i<n;i++){const n=e[i];t[i]=`.mtk${i} { color: ${n}; }`}return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; text-underline-position: under; }"),t.push(".mtks { text-decoration: line-through; }"),t.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),t.join("\n")}(o)),this._themeCSS=e.join("\n"),this._updateCSS(),a.RW.setColorMap(o),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._styleElements.forEach((e=>e.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},15662:(e,t,i)=>{var n=i(16830),o=i(44156),s=i(20913),r=i(92321),a=i(58763);class l extends n.R6{constructor(){super({id:"editor.action.toggleHighContrast",label:s.xi.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(o.Z),n=i.getColorTheme();(0,r.c3)(n.type)?(i.setTheme(this._originalThemeName||((0,r._T)(n.type)?a.rW:a.TG)),this._originalThemeName=null):(i.setTheme((0,r._T)(n.type)?a.kR:a.MU),this._originalThemeName=n.themeName)}}(0,n.Qr)(l)},44156:(e,t,i)=>{i.d(t,{Z:()=>n});const n=(0,i(72065).yh)("themeService")},40605:(e,t,i)=>{var n=i(91902),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},d={};l(d,n,"default");var h=class{_onDidChange=new d.Emitter;_options;_modeConfiguration;_languageId;constructor(e,t,i){this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},c={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},u={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},g=new h("css",c,u),p=new h("scss",c,u),m=new h("less",c,u);function f(){return i.e(5288).then(i.bind(i,45288))}d.languages.css={cssDefaults:g,lessDefaults:m,scssDefaults:p},d.languages.onLanguage("less",(()=>{f().then((e=>e.setupMode(m)))})),d.languages.onLanguage("scss",(()=>{f().then((e=>e.setupMode(p)))})),d.languages.onLanguage("css",(()=>{f().then((e=>e.setupMode(g)))}))},68423:(e,t,i)=>{var n=i(91902),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},d={};l(d,n,"default");var h=class{_onDidChange=new d.Emitter;_options;_modeConfiguration;_languageId;constructor(e,t,i){this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},c={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},suggest:{},data:{useDefaultDataProvider:!0}};function u(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===g,documentFormattingEdits:e===g,documentRangeFormattingEdits:e===g}}var g="html",p="handlebars",m="razor",f=y(g,c,u(g)),_=f.defaults,v=y(p,c,u(p)),b=v.defaults,C=y(m,c,u(m)),w=C.defaults;function y(e,t=c,n=u(e)){const o=new h(e,t,n);let s;const r=d.languages.onLanguage(e,(async()=>{s=(await i.e(5377).then(i.bind(i,15377))).setupMode(o)}));return{defaults:o,dispose(){r.dispose(),s?.dispose(),s=void 0}}}d.languages.html={htmlDefaults:_,razorDefaults:w,handlebarDefaults:b,htmlLanguageService:f,handlebarLanguageService:v,razorLanguageService:C,registerHTMLLanguageService:y}},72323:(e,t,i)=>{var n=i(91902),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},d={};l(d,n,"default");var h=new class{_onDidChange=new d.Emitter;_diagnosticsOptions;_modeConfiguration;_languageId;constructor(e,t,i){this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});d.languages.json={jsonDefaults:h},d.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),d.languages.onLanguage("json",(()=>{i.e(665).then(i.bind(i,90665)).then((e=>e.setupMode(h)))}))},39585:(e,t,i)=>{i.d(t,{TG:()=>_});var n=i(91902),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},d={};l(d,n,"default");var h=(e=>(e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext",e))(h||{}),c=(e=>(e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev",e))(c||{}),u=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(u||{}),g=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(g||{}),p=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e))(p||{}),m=class{_onDidChange=new d.Emitter;_onDidExtraLibsChange=new d.Emitter;_extraLibs;_removedExtraLibs;_eagerModelSync;_compilerOptions;_diagnosticsOptions;_workerOptions;_onDidExtraLibsChangeTimeout;_inlayHintsOptions;_modeConfiguration;constructor(e,t,i,n,o){this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(o),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(i=void 0===t?`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let e=this._extraLibs[i];e&&e.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const e=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=t.content;let n=1;this._removedExtraLibs[e]&&(n=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=window.setTimeout((()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)}),0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},f={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},_=new m({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},f),v=new m({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},f);function b(){return i.e(8401).then(i.bind(i,78401))}d.languages.typescript={ModuleKind:h,JsxEmit:c,NewLineKind:u,ScriptTarget:g,ModuleResolutionKind:p,typescriptVersion:"5.0.2",typescriptDefaults:_,javascriptDefaults:v,getTypeScriptWorker:()=>b().then((e=>e.getTypeScriptWorker())),getJavaScriptWorker:()=>b().then((e=>e.getJavaScriptWorker()))},d.languages.onLanguage("typescript",(()=>b().then((e=>e.setupTypeScript(_))))),d.languages.onLanguage("javascript",(()=>b().then((e=>e.setupJavaScript(v)))))},63580:(e,t,i)=>{i.d(t,{NC:()=>o,aj:()=>s});let n="undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function o(e,t,...i){return function(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,i)=>{const n=i[0],o=t[n];let s=e;return"string"==typeof o?s=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(s=String(o)),s})),n&&(i=""+i.replace(/[aouei]/g,"$&$&")+""),i}(t,i)}function s(e){}},31106:(e,t,i)=>{i.d(t,{F:()=>o,U:()=>s});var n=i(93983);const o=(0,i(72065).yh)("accessibilityService"),s=new n.uy("accessibilityModeEnabled",!1)},44691:(e,t,i)=>{i.d(t,{Mm:()=>$,Id:()=>Q,vr:()=>U,LJ:()=>K});var n=i(65321),o=i(59069),s=i(10244),r=i(98324),a=i(74741),l=i(8030),d=i(5976),h=i(1432),c=i(93379),u=i.n(c),g=i(7795),p=i.n(g),m=i(90569),f=i.n(m),_=i(3565),v=i.n(_),b=i(19216),C=i.n(b),w=i(44589),y=i.n(w),S=i(51854),L={};L.styleTagTransform=y(),L.setAttributes=v(),L.insert=f().bind(null,"head"),L.domAPI=p(),L.insertStyleElement=C(),u()(S.Z,L),S.Z&&S.Z.locals&&S.Z.locals;var x=i(63580),k=i(84144),N=i(93983),D=i(5606),E=i(72065),I=i(91847),T=i(59422),M=i(26904),R=i(97781),A=i(25670),O=i(92321),P=i(98401),F=i(73910),B=i(86253),W=i(31106),V=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},H=function(e,t){return function(i,n){t(i,n,e)}},z=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function K(e,t,i,o){const s=e.getActions(t),r=n._q.getInstance();j(s,i,r.keyStatus.altKey||(h.ED||h.IJ)&&r.keyStatus.shiftKey,o?e=>e===o:e=>"navigation"===e)}function U(e,t,i,n,o,s){j(e.getActions(t),i,!1,"string"==typeof n?e=>e===n:n,o,s)}function j(e,t,i,n=(e=>"navigation"===e),o=(()=>!1),s=!1){let r,l;Array.isArray(t)?(r=t,l=t):(r=t.primary,l=t.secondary);const d=new Set;for(const[t,o]of e){let e;n(t)?(e=r,e.length>0&&s&&e.push(new a.Z0)):(e=l,e.length>0&&e.push(new a.Z0));for(let n of o){i&&(n=n instanceof k.U8&&n.alt?n.alt:n);const o=e.push(n);n instanceof a.wY&&d.add({group:t,action:n,index:o-1})}}for(const{group:e,action:t,index:i}of d){const s=n(e)?r:l,a=t.actions;a.length<=1&&o(t,e,s.length)&&s.splice(i,1,...a)}}let $=class extends s.gU{constructor(e,t,i,o,s,r,a,l){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable,keybinding:null==t?void 0:t.keybinding,hoverDelegate:null==t?void 0:t.hoverDelegate}),this._keybindingService=i,this._notificationService=o,this._contextKeyService=s,this._themeService=r,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new d.XK),this._altKey=n._q.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return z(this,void 0,void 0,(function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}}))}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const i=()=>{var e;const i=!!(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);i!==this._wantsAltCommand&&(this._wantsAltCommand=i,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register((0,n.nm)(e,"mouseleave",(e=>{t=!1,i()}))),this._register((0,n.nm)(e,"mouseenter",(e=>{t=!0,i()}))),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let o=i?(0,x.NC)("titleAndKb","{0} ({1})",n,i):n;if(!this._wantsAltCommand&&(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),n=i?(0,x.NC)("titleAndKb","{0} ({1})",e,i):e;o=(0,x.NC)("titleAndKbAndAlt","{0}\n[{1}] {2}",o,l.xo.modifierLabels[h.OS].altKey,n)}return o}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const o=this._commandAction.checked&&(s=e.toggled)&&void 0!==s.condition&&e.toggled.icon?e.toggled.icon:e.icon;var s;if(o)if(A.k.isThemeIcon(o)){const e=A.k.asClassNameArray(o);i.classList.add(...e),this._itemClassDispose.value=(0,d.OF)((()=>{i.classList.remove(...e)}))}else i.style.backgroundImage=(0,O._T)(this._themeService.getColorTheme().type)?(0,n.wY)(o.dark):(0,n.wY)(o.light),i.classList.add("icon"),this._itemClassDispose.value=(0,d.F8)((0,d.OF)((()=>{i.style.backgroundImage="",i.classList.remove("icon")})),this._themeService.onDidColorThemeChange((()=>{this.updateClass()})))}};$=V([H(2,I.d),H(3,T.lT),H(4,N.i6),H(5,R.XE),H(6,D.i),H(7,W.F)],$);let q=class extends r.C{constructor(e,t,i,n,o){var s,r,a;const l=Object.assign(Object.assign({},t),{menuAsChild:null!==(s=null==t?void 0:t.menuAsChild)&&void 0!==s&&s,classNames:null!==(r=null==t?void 0:t.classNames)&&void 0!==r?r:A.k.isThemeIcon(e.item.icon)?A.k.asClassName(e.item.icon):void 0,keybindingProvider:null!==(a=null==t?void 0:t.keybindingProvider)&&void 0!==a?a:e=>i.lookupKeybinding(e.id)});super(e,{getActions:()=>e.actions},n,l),this._keybindingService=i,this._contextMenuService=n,this._themeService=o}render(e){super.render(e),(0,P.p_)(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!A.k.isThemeIcon(i)){this.element.classList.add("icon");const e=()=>{this.element&&(this.element.style.backgroundImage=(0,O._T)(this._themeService.getColorTheme().type)?(0,n.wY)(i.dark):(0,n.wY)(i.light))};e(),this._register(this._themeService.onDidColorThemeChange((()=>{e()})))}}};q=V([H(2,I.d),H(3,D.i),H(4,R.XE)],q);let Z=class extends s.YH{constructor(e,t,i,n,o,s,l,d){var h,c,u;let g;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=s,this._instaService=l,this._storageService=d,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;const p=(null==t?void 0:t.persistLastActionId)?d.get(this._storageKey,1):void 0;p&&(g=e.actions.find((e=>p===e.id))),g||(g=e.actions[0]),this._defaultAction=this._instaService.createInstance($,g,{keybinding:this._getDefaultActionKeybindingLabel(g)});const m=Object.assign(Object.assign({keybindingProvider:e=>this._keybindingService.lookupKeybinding(e.id)},t),{menuAsChild:null===(h=null==t?void 0:t.menuAsChild)||void 0===h||h,classNames:null!==(c=null==t?void 0:t.classNames)&&void 0!==c?c:["codicon","codicon-chevron-down"],actionRunner:null!==(u=null==t?void 0:t.actionRunner)&&void 0!==u?u:new a.Wi});this._dropdown=new r.C(e,e.actions,this._contextMenuService,m),this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof k.U8&&this.update(e.action)}))}update(e){var t;(null===(t=this._options)||void 0===t?void 0:t.persistLastActionId)&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance($,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends a.Wi{runAction(e,t){return z(this,void 0,void 0,(function*(){yield e.run(void 0)}))}},this._container&&this._defaultAction.render((0,n.Ce)(this._container,(0,n.$)(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(null===(t=this._options)||void 0===t?void 0:t.renderKeybindingWithDefaultActionLabel){const t=this._keybindingService.lookupKeybinding(e.id);t&&(i=`(${t.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=(0,n.$)(".action-container");this._defaultAction.render((0,n.R3)(this._container,t)),this._register((0,n.nm)(t,n.tw.KEY_DOWN,(e=>{const t=new o.y(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=(0,n.$)(".dropdown-action-container");this._dropdown.render((0,n.R3)(this._container,i)),this._register((0,n.nm)(i,n.tw.KEY_DOWN,(e=>{var t;const i=new o.y(e);i.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),null===(t=this._defaultAction.element)||void 0===t||t.focus(),i.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};Z=V([H(2,I.d),H(3,T.lT),H(4,D.i),H(5,k.co),H(6,E.TG),H(7,M.Uy)],Z);let G=class extends s.Lc{constructor(e,t){super(null,e,e.actions.map((e=>({text:e.id===a.Z0.ID?"─────────":e.label,isDisabled:!e.enabled}))),0,t,B.BM,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex((e=>e.checked))))}render(e){super.render(e),e.style.borderColor=(0,F.n_1)(F.a9O)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};function Q(e,t,i){return t instanceof k.U8?e.createInstance($,t,i):t instanceof k.NZ?t.item.isSelection?e.createInstance(G,t):t.item.rememberDefaultAction?e.createInstance(Z,t,Object.assign(Object.assign({},i),{persistLastActionId:!0})):e.createInstance(q,t,i):void 0}G=V([H(1,D.u)],G)},84144:(e,t,i)=>{i.d(t,{BH:()=>C,Ke:()=>S,NZ:()=>w,U8:()=>y,co:()=>v,eH:()=>_,f6:()=>f,r1:()=>L,vr:()=>m});var n,o=i(74741),s=i(25670),r=i(4669),a=i(5976),l=i(91741),d=i(94565),h=i(93983),c=i(72065),u=i(49989),g=function(e,t){return function(i,n){t(i,n,e)}},p=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};function m(e){return void 0!==e.command}function f(e){return void 0!==e.submenu}class _{constructor(e){if(_._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);_._instances.set(e,this),this.id=e}}_._instances=new Map,_.CommandPalette=new _("CommandPalette"),_.DebugBreakpointsContext=new _("DebugBreakpointsContext"),_.DebugCallStackContext=new _("DebugCallStackContext"),_.DebugConsoleContext=new _("DebugConsoleContext"),_.DebugVariablesContext=new _("DebugVariablesContext"),_.DebugWatchContext=new _("DebugWatchContext"),_.DebugToolBar=new _("DebugToolBar"),_.DebugToolBarStop=new _("DebugToolBarStop"),_.EditorContext=new _("EditorContext"),_.SimpleEditorContext=new _("SimpleEditorContext"),_.EditorContent=new _("EditorContent"),_.EditorLineNumberContext=new _("EditorLineNumberContext"),_.EditorContextCopy=new _("EditorContextCopy"),_.EditorContextPeek=new _("EditorContextPeek"),_.EditorContextShare=new _("EditorContextShare"),_.EditorTitle=new _("EditorTitle"),_.EditorTitleRun=new _("EditorTitleRun"),_.EditorTitleContext=new _("EditorTitleContext"),_.EditorTitleContextShare=new _("EditorTitleContextShare"),_.EmptyEditorGroup=new _("EmptyEditorGroup"),_.EmptyEditorGroupContext=new _("EmptyEditorGroupContext"),_.EditorTabsBarContext=new _("EditorTabsBarContext"),_.ExplorerContext=new _("ExplorerContext"),_.ExplorerContextShare=new _("ExplorerContextShare"),_.ExtensionContext=new _("ExtensionContext"),_.GlobalActivity=new _("GlobalActivity"),_.CommandCenter=new _("CommandCenter"),_.LayoutControlMenuSubmenu=new _("LayoutControlMenuSubmenu"),_.LayoutControlMenu=new _("LayoutControlMenu"),_.MenubarMainMenu=new _("MenubarMainMenu"),_.MenubarAppearanceMenu=new _("MenubarAppearanceMenu"),_.MenubarDebugMenu=new _("MenubarDebugMenu"),_.MenubarEditMenu=new _("MenubarEditMenu"),_.MenubarCopy=new _("MenubarCopy"),_.MenubarFileMenu=new _("MenubarFileMenu"),_.MenubarGoMenu=new _("MenubarGoMenu"),_.MenubarHelpMenu=new _("MenubarHelpMenu"),_.MenubarLayoutMenu=new _("MenubarLayoutMenu"),_.MenubarNewBreakpointMenu=new _("MenubarNewBreakpointMenu"),_.PanelAlignmentMenu=new _("PanelAlignmentMenu"),_.PanelPositionMenu=new _("PanelPositionMenu"),_.MenubarPreferencesMenu=new _("MenubarPreferencesMenu"),_.MenubarRecentMenu=new _("MenubarRecentMenu"),_.MenubarSelectionMenu=new _("MenubarSelectionMenu"),_.MenubarShare=new _("MenubarShare"),_.MenubarSwitchEditorMenu=new _("MenubarSwitchEditorMenu"),_.MenubarSwitchGroupMenu=new _("MenubarSwitchGroupMenu"),_.MenubarTerminalMenu=new _("MenubarTerminalMenu"),_.MenubarViewMenu=new _("MenubarViewMenu"),_.MenubarHomeMenu=new _("MenubarHomeMenu"),_.OpenEditorsContext=new _("OpenEditorsContext"),_.OpenEditorsContextShare=new _("OpenEditorsContextShare"),_.ProblemsPanelContext=new _("ProblemsPanelContext"),_.SCMChangeContext=new _("SCMChangeContext"),_.SCMResourceContext=new _("SCMResourceContext"),_.SCMResourceContextShare=new _("SCMResourceContextShare"),_.SCMResourceFolderContext=new _("SCMResourceFolderContext"),_.SCMResourceGroupContext=new _("SCMResourceGroupContext"),_.SCMSourceControl=new _("SCMSourceControl"),_.SCMTitle=new _("SCMTitle"),_.SearchContext=new _("SearchContext"),_.SearchActionMenu=new _("SearchActionContext"),_.StatusBarWindowIndicatorMenu=new _("StatusBarWindowIndicatorMenu"),_.StatusBarRemoteIndicatorMenu=new _("StatusBarRemoteIndicatorMenu"),_.StickyScrollContext=new _("StickyScrollContext"),_.TestItem=new _("TestItem"),_.TestItemGutter=new _("TestItemGutter"),_.TestMessageContext=new _("TestMessageContext"),_.TestMessageContent=new _("TestMessageContent"),_.TestPeekElement=new _("TestPeekElement"),_.TestPeekTitle=new _("TestPeekTitle"),_.TouchBarContext=new _("TouchBarContext"),_.TitleBarContext=new _("TitleBarContext"),_.TitleBarTitleContext=new _("TitleBarTitleContext"),_.TunnelContext=new _("TunnelContext"),_.TunnelPrivacy=new _("TunnelPrivacy"),_.TunnelProtocol=new _("TunnelProtocol"),_.TunnelPortInline=new _("TunnelInline"),_.TunnelTitle=new _("TunnelTitle"),_.TunnelLocalAddressInline=new _("TunnelLocalAddressInline"),_.TunnelOriginInline=new _("TunnelOriginInline"),_.ViewItemContext=new _("ViewItemContext"),_.ViewContainerTitle=new _("ViewContainerTitle"),_.ViewContainerTitleContext=new _("ViewContainerTitleContext"),_.ViewTitle=new _("ViewTitle"),_.ViewTitleContext=new _("ViewTitleContext"),_.CommentEditorActions=new _("CommentEditorActions"),_.CommentThreadTitle=new _("CommentThreadTitle"),_.CommentThreadActions=new _("CommentThreadActions"),_.CommentThreadAdditionalActions=new _("CommentThreadAdditionalActions"),_.CommentThreadTitleContext=new _("CommentThreadTitleContext"),_.CommentThreadCommentContext=new _("CommentThreadCommentContext"),_.CommentTitle=new _("CommentTitle"),_.CommentActions=new _("CommentActions"),_.InteractiveToolbar=new _("InteractiveToolbar"),_.InteractiveCellTitle=new _("InteractiveCellTitle"),_.InteractiveCellDelete=new _("InteractiveCellDelete"),_.InteractiveCellExecute=new _("InteractiveCellExecute"),_.InteractiveInputExecute=new _("InteractiveInputExecute"),_.NotebookToolbar=new _("NotebookToolbar"),_.NotebookStickyScrollContext=new _("NotebookStickyScrollContext"),_.NotebookCellTitle=new _("NotebookCellTitle"),_.NotebookCellDelete=new _("NotebookCellDelete"),_.NotebookCellInsert=new _("NotebookCellInsert"),_.NotebookCellBetween=new _("NotebookCellBetween"),_.NotebookCellListTop=new _("NotebookCellTop"),_.NotebookCellExecute=new _("NotebookCellExecute"),_.NotebookCellExecutePrimary=new _("NotebookCellExecutePrimary"),_.NotebookDiffCellInputTitle=new _("NotebookDiffCellInputTitle"),_.NotebookDiffCellMetadataTitle=new _("NotebookDiffCellMetadataTitle"),_.NotebookDiffCellOutputsTitle=new _("NotebookDiffCellOutputsTitle"),_.NotebookOutputToolbar=new _("NotebookOutputToolbar"),_.NotebookEditorLayoutConfigure=new _("NotebookEditorLayoutConfigure"),_.NotebookKernelSource=new _("NotebookKernelSource"),_.BulkEditTitle=new _("BulkEditTitle"),_.BulkEditContext=new _("BulkEditContext"),_.TimelineItemContext=new _("TimelineItemContext"),_.TimelineTitle=new _("TimelineTitle"),_.TimelineTitleContext=new _("TimelineTitleContext"),_.TimelineFilterSubMenu=new _("TimelineFilterSubMenu"),_.AccountsContext=new _("AccountsContext"),_.PanelTitle=new _("PanelTitle"),_.AuxiliaryBarTitle=new _("AuxiliaryBarTitle"),_.TerminalInstanceContext=new _("TerminalInstanceContext"),_.TerminalEditorInstanceContext=new _("TerminalEditorInstanceContext"),_.TerminalNewDropdownContext=new _("TerminalNewDropdownContext"),_.TerminalTabContext=new _("TerminalTabContext"),_.TerminalTabEmptyAreaContext=new _("TerminalTabEmptyAreaContext"),_.WebviewContext=new _("WebviewContext"),_.InlineCompletionsActions=new _("InlineCompletionsActions"),_.NewFile=new _("NewFile"),_.MergeInput1Toolbar=new _("MergeToolbar1Toolbar"),_.MergeInput2Toolbar=new _("MergeToolbar2Toolbar"),_.MergeBaseToolbar=new _("MergeBaseToolbar"),_.MergeInputResultToolbar=new _("MergeToolbarResultToolbar"),_.InlineSuggestionToolbar=new _("InlineSuggestionToolbar"),_.ChatContext=new _("ChatContext"),_.ChatCodeBlock=new _("ChatCodeblock"),_.ChatMessageTitle=new _("ChatMessageTitle"),_.ChatExecute=new _("ChatExecute"),_.ChatInputSide=new _("ChatInputSide"),_.AccessibleView=new _("AccessibleView");const v=(0,c.yh)("menuService");class b{static for(e){let t=this._all.get(e);return t||(t=new b(e),this._all.set(e,t)),t}static merge(e){const t=new Set;for(const i of e)i instanceof b&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}b._all=new Map;const C=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new r.SZ({merge:b.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(b.for(_.CommandPalette)),(0,a.OF)((()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(b.for(_.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new l.S,this._menuItems.set(e,i));const n=i.push(t);return this._onDidChangeMenu.fire(b.for(e)),(0,a.OF)((()=>{n(),this._onDidChangeMenu.fire(b.for(e))}))}appendMenuItems(e){const t=new a.SL;for(const{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===_.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)m(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class w extends o.wY{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let y=n=class{static label(e,t){return(null==t?void 0:t.renderShortTitle)&&e.shortTitle?"string"==typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"==typeof e.title?e.title:e.title.value}constructor(e,t,i,o,r,a){var l,d;let h;if(this.hideActions=o,this._commandService=a,this.id=e.id,this.label=n.label(e,i),this.tooltip=null!==(d="string"==typeof e.tooltip?e.tooltip:null===(l=e.tooltip)||void 0===l?void 0:l.value)&&void 0!==d?d:"",this.enabled=!e.precondition||r.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=r.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"==typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&s.k.isThemeIcon(t.icon)&&(h=t.icon),this.checked&&t.title&&(this.label="string"==typeof t.title?t.title:t.title.value)}h||(h=s.k.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new n(t,void 0,i,o,r,a):void 0,this._options=i,this.class=h&&s.k.asClassName(h)}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};y=n=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([g(4,h.i6),g(5,d.H)],y);class S{constructor(e){this.desc=e}}function L(e){const t=new a.SL,i=new e,n=i.desc,{f1:o,menu:s,keybinding:r,description:l}=n,c=p(n,["f1","menu","keybinding","description"]);if(t.add(d.P.registerCommand({id:c.id,handler:(e,...t)=>i.run(e,...t),description:l})),Array.isArray(s))for(const e of s)t.add(C.appendMenuItem(e.id,Object.assign({command:Object.assign(Object.assign({},c),{precondition:null===e.precondition?void 0:c.precondition})},e)));else s&&t.add(C.appendMenuItem(s.id,Object.assign({command:Object.assign(Object.assign({},c),{precondition:null===s.precondition?void 0:c.precondition})},s)));if(o&&(t.add(C.appendMenuItem(_.CommandPalette,{command:c,when:c.precondition})),t.add(C.addCommand(c))),Array.isArray(r))for(const e of r)t.add(u.W.registerKeybindingRule(Object.assign(Object.assign({},e),{id:c.id,when:c.precondition?h.Ao.and(c.precondition,e.when):e.when})));else r&&t.add(u.W.registerKeybindingRule(Object.assign(Object.assign({},r),{id:c.id,when:c.precondition?h.Ao.and(c.precondition,r.when):r.when})));return t}},69149:(e,t,i)=>{i.d(t,{e7:()=>s,y$:()=>l});var n=i(72065),o=i(63580);const s=(0,n.yh)("audioCue");class r{static register(e){return new r(e.fileName)}constructor(e){this.fileName=e}}r.error=r.register({fileName:"error.mp3"}),r.warning=r.register({fileName:"warning.mp3"}),r.foldedArea=r.register({fileName:"foldedAreas.mp3"}),r.break=r.register({fileName:"break.mp3"}),r.quickFixes=r.register({fileName:"quickFixes.mp3"}),r.taskCompleted=r.register({fileName:"taskCompleted.mp3"}),r.taskFailed=r.register({fileName:"taskFailed.mp3"}),r.terminalBell=r.register({fileName:"terminalBell.mp3"}),r.diffLineInserted=r.register({fileName:"diffLineInserted.mp3"}),r.diffLineDeleted=r.register({fileName:"diffLineDeleted.mp3"}),r.diffLineModified=r.register({fileName:"diffLineModified.mp3"}),r.chatRequestSent=r.register({fileName:"chatRequestSent.mp3"}),r.chatResponsePending=r.register({fileName:"chatResponsePending.mp3"}),r.chatResponseReceived1=r.register({fileName:"chatResponseReceived1.mp3"}),r.chatResponseReceived2=r.register({fileName:"chatResponseReceived2.mp3"}),r.chatResponseReceived3=r.register({fileName:"chatResponseReceived3.mp3"}),r.chatResponseReceived4=r.register({fileName:"chatResponseReceived4.mp3"});class a{constructor(e){this.randomOneOf=e}}class l{static register(e){const t=new a("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new l(t,e.name,e.settingsKey);return l._audioCues.add(i),i}constructor(e,t,i){this.sound=e,this.name=t,this.settingsKey=i}}l._audioCues=new Set,l.error=l.register({name:(0,o.NC)("audioCues.lineHasError.name","Error on Line"),sound:r.error,settingsKey:"audioCues.lineHasError"}),l.warning=l.register({name:(0,o.NC)("audioCues.lineHasWarning.name","Warning on Line"),sound:r.warning,settingsKey:"audioCues.lineHasWarning"}),l.foldedArea=l.register({name:(0,o.NC)("audioCues.lineHasFoldedArea.name","Folded Area on Line"),sound:r.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"}),l.break=l.register({name:(0,o.NC)("audioCues.lineHasBreakpoint.name","Breakpoint on Line"),sound:r.break,settingsKey:"audioCues.lineHasBreakpoint"}),l.inlineSuggestion=l.register({name:(0,o.NC)("audioCues.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:r.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),l.terminalQuickFix=l.register({name:(0,o.NC)("audioCues.terminalQuickFix.name","Terminal Quick Fix"),sound:r.quickFixes,settingsKey:"audioCues.terminalQuickFix"}),l.onDebugBreak=l.register({name:(0,o.NC)("audioCues.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:r.break,settingsKey:"audioCues.onDebugBreak"}),l.noInlayHints=l.register({name:(0,o.NC)("audioCues.noInlayHints","No Inlay Hints on Line"),sound:r.error,settingsKey:"audioCues.noInlayHints"}),l.taskCompleted=l.register({name:(0,o.NC)("audioCues.taskCompleted","Task Completed"),sound:r.taskCompleted,settingsKey:"audioCues.taskCompleted"}),l.taskFailed=l.register({name:(0,o.NC)("audioCues.taskFailed","Task Failed"),sound:r.taskFailed,settingsKey:"audioCues.taskFailed"}),l.terminalCommandFailed=l.register({name:(0,o.NC)("audioCues.terminalCommandFailed","Terminal Command Failed"),sound:r.error,settingsKey:"audioCues.terminalCommandFailed"}),l.terminalBell=l.register({name:(0,o.NC)("audioCues.terminalBell","Terminal Bell"),sound:r.terminalBell,settingsKey:"audioCues.terminalBell"}),l.notebookCellCompleted=l.register({name:(0,o.NC)("audioCues.notebookCellCompleted","Notebook Cell Completed"),sound:r.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"}),l.notebookCellFailed=l.register({name:(0,o.NC)("audioCues.notebookCellFailed","Notebook Cell Failed"),sound:r.taskFailed,settingsKey:"audioCues.notebookCellFailed"}),l.diffLineInserted=l.register({name:(0,o.NC)("audioCues.diffLineInserted","Diff Line Inserted"),sound:r.diffLineInserted,settingsKey:"audioCues.diffLineInserted"}),l.diffLineDeleted=l.register({name:(0,o.NC)("audioCues.diffLineDeleted","Diff Line Deleted"),sound:r.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"}),l.diffLineModified=l.register({name:(0,o.NC)("audioCues.diffLineModified","Diff Line Modified"),sound:r.diffLineModified,settingsKey:"audioCues.diffLineModified"}),l.chatRequestSent=l.register({name:(0,o.NC)("audioCues.chatRequestSent","Chat Request Sent"),sound:r.chatRequestSent,settingsKey:"audioCues.chatRequestSent"}),l.chatResponseReceived=l.register({name:(0,o.NC)("audioCues.chatResponseReceived","Chat Response Received"),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[r.chatResponseReceived1,r.chatResponseReceived2,r.chatResponseReceived3,r.chatResponseReceived4]}}),l.chatResponsePending=l.register({name:(0,o.NC)("audioCues.chatResponsePending","Chat Response Pending"),sound:r.chatResponsePending,settingsKey:"audioCues.chatResponsePending"})},84972:(e,t,i)=>{i.d(t,{p:()=>n});const n=(0,i(72065).yh)("clipboardService")},94565:(e,t,i)=>{i.d(t,{H:()=>l,P:()=>d});var n=i(4669),o=i(53725),s=i(5976),r=i(91741),a=i(98401);const l=(0,i(72065).yh)("commandService"),d=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new n.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(const i of e.description.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return(0,a.D8)(n,t),i(e,...n)}}const{id:i}=e;let n=this._commands.get(i);n||(n=new r.S,this._commands.set(i,n));const o=n.unshift(e),l=(0,s.OF)((()=>{o();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return d.registerCommand(e,((e,...i)=>e.get(l).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return o.$.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};d.registerCommand("noop",(()=>{}))},33108:(e,t,i)=>{i.d(t,{KV:()=>s,Mt:()=>l,Od:()=>o,UI:()=>d,Ui:()=>n,xL:()=>r});const n=(0,i(72065).yh)("configurationService");function o(e,t){const i=Object.create(null);for(const n in e)s(i,n,e[n],t);return i}function s(e,t,i,n){const o=t.split("."),s=o.pop();let r=e;for(let e=0;e<o.length;e++){const i=o[e];let s=r[i];switch(typeof s){case"undefined":s=r[i]=Object.create(null);break;case"object":break;default:return void n(`Ignoring ${t} as ${o.slice(0,e+1).join(".")} is ${JSON.stringify(s)}`)}r=s}if("object"==typeof r&&null!==r)try{r[s]=i}catch(e){n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(r)}`)}else n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(r)}`)}function r(e,t){a(e,t.split("."))}function a(e,t){const i=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(i)){const n=e[i];"object"!=typeof n||Array.isArray(n)||(a(n,t),0===Object.keys(n).length&&delete e[i])}}else delete e[i]}function l(e,t,i){const n=function(e,t){let i=e;for(const e of t){if("object"!=typeof i||null===i)return;i=i[e]}return i}(e,t.split("."));return void 0===n?i:n}function d(e){return e.replace(/[\[\]]/g,"")}},23193:(e,t,i)=>{i.d(t,{IP:()=>h,eU:()=>y,ny:()=>S});var n=i(9488),o=i(4669),s=i(98401),r=i(63580),a=i(33108),l=i(81294),d=i(89872);const h={Configuration:"base.contributions.configuration"},c={properties:{},patternProperties:{}},u={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},_="vscode://schemas/settings/resourceLanguage",v=d.B.as(l.I.JSONContribution),b="\\[([^\\]]+)\\]",C=new RegExp(b,"g"),w=`^(${b})+$`,y=new RegExp(w);function S(e){const t=[];if(y.test(e)){let i=C.exec(e);for(;null==i?void 0:i.length;){const n=i[1].trim();n&&t.push(n),i=C.exec(e)}}return(0,n.EB)(t)}const L=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new o.Q5,this._onDidUpdateConfiguration=new o.Q5,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:r.NC("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},v.registerSchema(_,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=new Set;this.doRegisterConfigurations(e,t,i),v.registerSchema(_,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var i;const n=[];for(const{overrides:o,source:l}of e)for(const e in o)if(t.add(e),y.test(e)){const t=this.configurationDefaultsOverrides.get(e),d=null!==(i=null==t?void 0:t.valuesSources)&&void 0!==i?i:new Map;if(l)for(const t of Object.keys(o[e]))d.set(t,l);const h=Object.assign(Object.assign({},(null==t?void 0:t.value)||{}),o[e]);this.configurationDefaultsOverrides.set(e,{source:l,value:h,valuesSources:d});const c=(0,a.UI)(e),u={type:"object",default:h,description:r.NC("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",c),$ref:_,defaultDefaultValue:h,source:s.HD(l)?void 0:l,defaultValueSource:l};n.push(...S(e)),this.configurationProperties[e]=u,this.defaultLanguageConfigurationOverridesNode.properties[e]=u}else{this.configurationDefaultsOverrides.set(e,{value:o[e],source:l});const t=this.configurationProperties[e];t&&(this.updatePropertyDefaultValue(e,t),this.updateSchema(e,t))}this.doRegisterOverrideIdentifiers(n)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,i),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,i,n,o=3,r){var a;o=s.Jp(e.scope)?o:e.scope;const l=e.properties;if(l)for(const e in l){const d=l[e];t&&x(e,d)?delete l[e]:(d.source=i,d.defaultDefaultValue=l[e].default,this.updatePropertyDefaultValue(e,d),y.test(e)?d.scope=void 0:(d.scope=s.Jp(d.scope)?o:d.scope,d.restricted=s.Jp(d.restricted)?!!(null==n?void 0:n.includes(e)):d.restricted),!l[e].hasOwnProperty("included")||l[e].included?(this.configurationProperties[e]=l[e],(null===(a=l[e].policy)||void 0===a?void 0:a.name)&&this.policyConfigurations.set(l[e].policy.name,e),!l[e].deprecationMessage&&l[e].markdownDeprecationMessage&&(l[e].deprecationMessage=l[e].markdownDeprecationMessage),r.add(e)):(this.excludedConfigurationProperties[e]=l[e],delete l[e]))}const d=e.allOf;if(d)for(const e of d)this.validateAndRegisterProperties(e,t,i,n,o,r)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);const n=e.allOf;null==n||n.forEach(t)};t(e)}updateSchema(e,t){switch(c.properties[e]=t,t.scope){case 1:u.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:p.properties[e]=t;break;case 3:m.properties[e]=t;break;case 4:f.properties[e]=t;break;case 5:f.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:r.NC("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.NC("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};this.updatePropertyDefaultValue(t,i),c.properties[t]=i,u.properties[t]=i,g.properties[t]=i,p.properties[t]=i,m.properties[t]=i,f.properties[t]=i}}registerOverridePropertyPatternKey(){const e={type:"object",description:r.NC("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.NC("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};c.patternProperties[w]=e,u.patternProperties[w]=e,g.patternProperties[w]=e,p.patternProperties[w]=e,m.patternProperties[w]=e,f.patternProperties[w]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e);let n=null==i?void 0:i.value,o=null==i?void 0:i.source;s.o8(n)&&(n=t.defaultDefaultValue,o=void 0),s.o8(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n,t.defaultValueSource=o}};function x(e,t){var i,n,o,s;return e.trim()?y.test(e)?r.NC("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==L.getConfigurationProperties()[e]?r.NC("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):(null===(i=t.policy)||void 0===i?void 0:i.name)&&void 0!==L.getPolicyConfigurations().get(null===(n=t.policy)||void 0===n?void 0:n.name)?r.NC("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,null===(o=t.policy)||void 0===o?void 0:o.name,L.getPolicyConfigurations().get(null===(s=t.policy)||void 0===s?void 0:s.name)):null:r.NC("config.property.empty","Cannot register an empty property")}d.B.add(h.Configuration,L)},93983:(e,t,i)=>{i.d(t,{Ao:()=>L,i6:()=>$,uy:()=>j,Fb:()=>x,K8:()=>G});var n=i(1432),o=i(97295),s=i(17301),r=i(63580);function a(...e){switch(e.length){case 1:return(0,r.NC)("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,r.NC)("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,r.NC)("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const l=(0,r.NC)("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),d=(0,r.NC)("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class h{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:case 8:return">=";case 9:return"=~";case 10:case 17:case 18:case 19:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 20:return"EOF";default:throw(0,s.L6)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(a("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(a("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(a("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&this._input.charCodeAt(this._current)===e&&(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,i=this._input.substring(this._start,this._current),n={type:19,offset:this._start,lexeme:i};this._errors.push({offset:t,lexeme:i,additionalInfo:e}),this._tokens.push(n)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),i=h._keywords.get(t);i?this._addToken(i):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;39!==this._peek()&&!this._isAtEnd();)this._advance();this._isAtEnd()?this._error(l):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,i=!1;for(;;){if(e>=this._input.length)return this._current=e,void this._error(d);const n=this._input.charCodeAt(e);if(t)t=!1;else{if(47===n&&!i){e++;break}91===n?i=!0:92===n?t=!0:93===n&&(i=!1)}e++}for(;e<this._input.length&&h._regexFlags.has(this._input.charCodeAt(e));)e++;this._current=e;const n=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:n,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}}h._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0)))),h._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]);var c=i(72065);const u=new Map;u.set("false",!1),u.set("true",!0),u.set("isMac",n.dz),u.set("isLinux",n.IJ),u.set("isWindows",n.ED),u.set("isWeb",n.$L),u.set("isMacNative",n.dz&&!n.$L),u.set("isEdge",n.un),u.set("isFirefox",n.vU),u.set("isChrome",n.i7),u.set("isSafari",n.G6);const g=Object.prototype.hasOwnProperty,p={regexParsingWithErrorRecovery:!0},m=(0,r.NC)("contextkey.parser.error.emptyString","Empty context key expression"),f=(0,r.NC)("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),_=(0,r.NC)("contextkey.parser.error.noInAfterNot","'in' after 'not'."),v=(0,r.NC)("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),b=(0,r.NC)("contextkey.parser.error.unexpectedToken","Unexpected token"),C=(0,r.NC)("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),w=(0,r.NC)("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),y=(0,r.NC)("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class S{constructor(e=p){this._config=e,this._scanner=new h,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?C:void 0;throw this._parsingErrors.push({message:b,offset:e.offset,lexeme:h.getLexeme(e),additionalInfo:t}),S._parseError}return e}catch(e){if(e!==S._parseError)throw e;return}}else this._parsingErrors.push({message:m,offset:0,lexeme:"",additionalInfo:f})}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return 1===e.length?e[0]:L.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return 1===e.length?e[0]:L.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),N.INSTANCE;case 12:return this._advance(),D.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,v),null==e?void 0:e.negate()}case 17:return this._advance(),A.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),L.true();case 12:return this._advance(),L.false();case 0:{this._advance();const e=this._expr();return this._consume(1,v),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const i=e.lexeme,n=i.lastIndexOf("/"),o=n===i.length-1?void 0:this._removeFlagsGY(i.substring(n+1));let s;try{s=new RegExp(i.substring(1,n),o)}catch(t){throw this._errExpectedButGot("REGEX",e)}return V.create(t,s)}switch(e.type){case 10:case 19:{const i=[e.lexeme];this._advance();let n=this._peek(),o=0;for(let t=0;t<e.lexeme.length;t++)40===e.lexeme.charCodeAt(t)?o++:41===e.lexeme.charCodeAt(t)&&o--;for(;!this._isAtEnd()&&15!==n.type&&16!==n.type;){switch(n.type){case 0:o++;break;case 1:o--;break;case 10:case 18:for(let t=0;t<n.lexeme.length;t++)40===n.lexeme.charCodeAt(t)?o++:41===e.lexeme.charCodeAt(t)&&o--}if(o<0)break;i.push(h.getLexeme(n)),this._advance(),n=this._peek()}const s=i.join(""),r=s.lastIndexOf("/"),a=r===s.length-1?void 0:this._removeFlagsGY(s.substring(r+1));let l;try{l=new RegExp(s.substring(1,r),a)}catch(t){throw this._errExpectedButGot("REGEX",e)}return L.regex(t,l)}case 18:{const i=e.lexeme;this._advance();let n=null;if(!(0,o.m5)(i)){const t=i.indexOf("/"),o=i.lastIndexOf("/");if(t!==o&&t>=0){const s=i.slice(t+1,o),r="i"===i[o+1]?"i":"";try{n=new RegExp(s,r)}catch(t){throw this._errExpectedButGot("REGEX",e)}}}if(null===n)throw this._errExpectedButGot("REGEX",e);return V.create(t,n)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,_);const e=this._value();return L.notIn(t,e)}switch(this._peek().type){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return L.equals(t,e);switch(e){case"true":return L.has(t);case"false":return L.not(t);default:return L.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return L.notEquals(t,e);switch(e){case"true":return L.not(t);case"false":return L.has(t);default:return L.notEquals(t,e)}}case 5:return this._advance(),B.create(t,this._value());case 6:return this._advance(),W.create(t,this._value());case 7:return this._advance(),P.create(t,this._value());case 8:return this._advance(),F.create(t,this._value());case 13:return this._advance(),L.in(t,this._value());default:return L.has(t)}}case 20:throw this._parsingErrors.push({message:w,offset:e.offset,lexeme:"",additionalInfo:y}),S._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=(0,r.NC)("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,h.getLexeme(t)),o=t.offset,s=h.getLexeme(t);return this._parsingErrors.push({message:n,offset:o,lexeme:s,additionalInfo:i}),S._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}S._parseError=new Error;class L{static false(){return N.INSTANCE}static true(){return D.INSTANCE}static has(e){return E.create(e)}static equals(e,t){return I.create(e,t)}static notEquals(e,t){return R.create(e,t)}static regex(e,t){return V.create(e,t)}static in(e,t){return T.create(e,t)}static notIn(e,t){return M.create(e,t)}static not(e){return A.create(e)}static and(...e){return K.create(e,null,!0)}static or(...e){return U.create(e,null,!0)}static deserialize(e){if(null!=e)return this._parser.parse(e)}}function x(e,t){const i=e?e.substituteConstants():void 0,n=t?t.substituteConstants():void 0;return!i&&!n||!(!i||!n)&&i.equals(n)}function k(e,t){return e.cmp(t)}L._parser=new S({regexParsingWithErrorRecovery:!1});class N{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return D.INSTANCE}}N.INSTANCE=new N;class D{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return N.INSTANCE}}D.INSTANCE=new D;class E{static create(e,t=null){const i=u.get(e);return"boolean"==typeof i?i?D.INSTANCE:N.INSTANCE:new E(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:q(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=u.get(this.key);return"boolean"==typeof e?e?D.INSTANCE:N.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this)),this.negated}}class I{static create(e,t,i=null){if("boolean"==typeof t)return t?E.create(e,i):A.create(e,i);const n=u.get(e);return"boolean"==typeof n?t===(n?"true":"false")?D.INSTANCE:N.INSTANCE:new I(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:Z(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=u.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?D.INSTANCE:N.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class T{static create(e,t){return new T(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:Z(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):"string"==typeof i&&"object"==typeof t&&null!==t&&g.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=M.create(this.key,this.valueKey)),this.negated}}class M{static create(e,t){return new M(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=T.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class R{static create(e,t,i=null){if("boolean"==typeof t)return t?A.create(e,i):E.create(e,i);const n=u.get(e);return"boolean"==typeof n?t===(n?"true":"false")?N.INSTANCE:D.INSTANCE:new R(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:Z(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=u.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?N.INSTANCE:D.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this.value,this)),this.negated}}class A{static create(e,t=null){const i=u.get(e);return"boolean"==typeof i?i?N.INSTANCE:D.INSTANCE:new A(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:q(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=u.get(this.key);return"boolean"==typeof e?e?N.INSTANCE:D.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this)),this.negated}}function O(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):N.INSTANCE}class P{static create(e,t,i=null){return O(t,(t=>new P(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:Z(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=W.create(this.key,this.value,this)),this.negated}}class F{static create(e,t,i=null){return O(t,(t=>new F(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:Z(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class B{static create(e,t,i=null){return O(t,(t=>new B(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:Z(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=F.create(this.key,this.value,this)),this.negated}}class W{static create(e,t,i=null){return O(t,(t=>new W(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:Z(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}class V{static create(e,t){return new V(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return t<i?-1:t>i?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=H.create(this)),this.negated}}class H{static create(e){return new H(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function z(e){let t=null;for(let i=0,n=e.length;i<n;i++){const n=e[i].substituteConstants();if(e[i]!==n&&null===t){t=[];for(let n=0;n<i;n++)t[n]=e[n]}null!==t&&(t[i]=n)}return null===t?e:t}class K{static create(e,t,i){return K._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=6}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=k(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=z(this.expr);return e===this.expr?this:K.create(e,this.negated,!1)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].evaluate(e))return!1;return!0}static _normalizeArr(e,t,i){const n=[];let o=!1;for(const t of e)if(t)if(1!==t.type){if(0===t.type)return N.INSTANCE;6!==t.type?n.push(t):n.push(...t.expr)}else o=!0;if(0===n.length&&o)return D.INSTANCE;if(0!==n.length){if(1===n.length)return n[0];n.sort(k);for(let e=1;e<n.length;e++)n[e-1].equals(n[e])&&(n.splice(e,1),e--);if(1===n.length)return n[0];for(;n.length>1;){const e=n[n.length-1];if(9!==e.type)break;n.pop();const t=n.pop(),o=0===n.length,s=U.create(e.expr.map((e=>K.create([e,t],null,i))),null,o);s&&(n.push(s),n.sort(k))}if(1===n.length)return n[0];if(i){for(let e=0;e<n.length;e++)for(let t=e+1;t<n.length;t++)if(n[e].negate().equals(n[t]))return N.INSTANCE;if(1===n.length)return n[0]}return new K(n,t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=U.create(e,this,!0)}return this.negated}}class U{static create(e,t,i){return U._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=k(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=z(this.expr);return e===this.expr?this:U.create(e,this.negated,!1)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(this.expr[t].evaluate(e))return!0;return!1}static _normalizeArr(e,t,i){let n=[],o=!1;if(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];if(i)if(0!==i.type){if(1===i.type)return D.INSTANCE;9!==i.type?n.push(i):n=n.concat(i.expr)}else o=!0}if(0===n.length&&o)return N.INSTANCE;n.sort(k)}if(0!==n.length){if(1===n.length)return n[0];for(let e=1;e<n.length;e++)n[e-1].equals(n[e])&&(n.splice(e,1),e--);if(1===n.length)return n[0];if(i){for(let e=0;e<n.length;e++)for(let t=e+1;t<n.length;t++)if(n[e].negate().equals(n[t]))return D.INSTANCE;if(1===n.length)return n[0]}return new U(n,t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of Y(t))for(const t of Y(i))n.push(K.create([e,t],null,!1));e.unshift(U.create(n,null,!1))}this.negated=U.create(e,this,!0)}return this.negated}}class j extends E{static all(){return j._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?j._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&j._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return I.create(this.key,e)}}j._info=[];const $=(0,c.yh)("contextKeyService");function q(e,t){return e<t?-1:e>t?1:0}function Z(e,t,i,n){return e<i?-1:e>i?1:t<n?-1:t>n?1:0}function G(e,t){if(0===e.type||1===t.type)return!0;if(9===e.type)return 9===t.type&&Q(e.expr,t.expr);if(9===t.type){for(const i of t.expr)if(G(e,i))return!0;return!1}if(6===e.type){if(6===t.type)return Q(t.expr,e.expr);for(const i of e.expr)if(G(i,t))return!0;return!1}return e.equals(t)}function Q(e,t){let i=0,n=0;for(;i<e.length&&n<t.length;){const o=e[i].cmp(t[n]);if(o<0)return!1;0===o?(i++,n++):n++}return i===e.length}function Y(e){return 9===e.type?e.expr:[e]}},39282:(e,t,i)=>{i.d(t,{Pf:()=>a,cv:()=>r,d0:()=>l});var n=i(1432),o=i(63580),s=i(93983);new s.uy("isMac",n.dz,(0,o.NC)("isMac","Whether the operating system is macOS")),new s.uy("isLinux",n.IJ,(0,o.NC)("isLinux","Whether the operating system is Linux"));const r=new s.uy("isWindows",n.ED,(0,o.NC)("isWindows","Whether the operating system is Windows")),a=new s.uy("isWeb",n.$L,(0,o.NC)("isWeb","Whether the platform is a web browser")),l=(new s.uy("isMacNative",n.dz&&!n.$L,(0,o.NC)("isMacNative","Whether the operating system is macOS on a non-browser platform")),new s.uy("isIOS",n.gn,(0,o.NC)("isIOS","Whether the operating system is iOS")),new s.uy("isMobile",n.tq,(0,o.NC)("isMobile","Whether the platform is a mobile web browser")),new s.uy("isDevelopment",!1,!0),new s.uy("productQualityType","",(0,o.NC)("productQualityType","Quality type of VS Code")),"inputFocus");new s.uy(l,!1,(0,o.NC)("inputFocus","Whether keyboard focus is inside an input box"))},5606:(e,t,i)=>{i.d(t,{i:()=>s,u:()=>o});var n=i(72065);const o=(0,n.yh)("contextViewService"),s=(0,n.yh)("contextMenuService")},28820:(e,t,i)=>{i.d(t,{S:()=>n});const n=(0,i(72065).yh)("dialogService")},16021:(e,t,i)=>{i.d(t,{Ej:()=>s,Km:()=>o});var n=i(89872);const o={EDITORS:"CodeEditors",FILES:"CodeFiles"};n.B.add("workbench.contributions.dragAndDrop",new class{});class s{constructor(){}static getInstance(){return s.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}s.INSTANCE=new s},48814:(e,t,i)=>{i.d(t,{Y:()=>n});const n=(0,i(72065).yh)("environmentService")},22980:(e,t,i)=>{i.d(t,{Yb:()=>N,Nq:()=>D,iX:()=>C});var n=i(50153),o=i(65321),s=i(98892),r=i(44299),a=i(93794),l=i(73046),d=i(4669),h=(i(30340),i(63580));const c=h.NC("defaultLabel","input"),u=h.NC("label.preserveCaseToggle","Preserve Case");class g extends s.Z{constructor(e){super({icon:l.l.preserveCase,title:u+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class p extends a.${constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new d.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new d.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new d.Q5),this._onInput=this._register(new d.Q5),this._onKeyUp=this._register(new d.Q5),this._onPreserveCaseKeyDown=this._register(new d.Q5),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||c;const s=n.appendPreserveCaseLabel||"",a=n.history||[],l=!!n.flexibleHeight,h=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new r.pG(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:h,flexibleMaxHeight:u,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new g(Object.assign({appendTitle:s,isChecked:!1},n.toggleStyles))),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const p=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){const t=p.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%p.length:e.equals(15)&&(i=0===t?p.length-1:t-1),e.equals(9)?(p[t].blur(),this.inputBox.focus()):i>=0&&p[i].focus(),o.zB.stop(e,!0)}}}));const m=document.createElement("div");m.className="controls",m.style.display=this._showOptionButtons?"block":"none",m.appendChild(this.preserveCase.domNode),this.domNode.appendChild(m),null==e||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;null===(e=this.inputBox)||void 0===e||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var m=i(93983),f=i(49989),_=i(5976),v=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},b=function(e,t){return function(i,n){t(i,n,e)}};const C=new m.uy("suggestWidgetVisible",!1,(0,h.NC)("suggestWidgetVisible","Whether suggestion are visible")),w="historyNavigationWidgetFocus",y="historyNavigationForwardsEnabled",S="historyNavigationBackwardsEnabled";let L;const x=[];function k(e,t){if(x.includes(t))throw new Error("Cannot register the same widget multiple times");x.push(t);const i=new _.SL,n=new m.uy(w,!1).bindTo(e),o=new m.uy(y,!0).bindTo(e),s=new m.uy(S,!0).bindTo(e),r=()=>{n.set(!0),L=t},a=()=>{n.set(!1),L===t&&(L=void 0)};return t.element===document.activeElement&&r(),i.add(t.onDidFocus((()=>r()))),i.add(t.onDidBlur((()=>a()))),i.add((0,_.OF)((()=>{x.splice(x.indexOf(t),1),a()}))),{historyNavigationForwardsEnablement:o,historyNavigationBackwardsEnablement:s,dispose(){i.dispose()}}}let N=class extends n.V{constructor(e,t,i,n){super(e,t,i);const o=this._register(n.createScoped(this.inputBox.element));this._register(k(o,this.inputBox))}};N=v([b(3,m.i6)],N);let D=class extends p{constructor(e,t,i,n,o=!1){super(e,t,o,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(k(s,this.inputBox))}};D=v([b(3,m.i6)],D),f.W.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:m.Ao.and(m.Ao.has(w),m.Ao.equals(S,!0),m.Ao.not("isComposing"),C.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{null==L||L.showPreviousValue()}}),f.W.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:m.Ao.and(m.Ao.has(w),m.Ao.equals(y,!0),m.Ao.not("isComposing"),C.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{null==L||L.showNextValue()}})},97108:(e,t,i)=>{i.d(t,{M:()=>n});class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},65026:(e,t,i)=>{i.d(t,{d:()=>r,z:()=>s});var n=i(97108);const o=[];function s(e,t,i){t instanceof n.M||(t=new n.M(t,[],Boolean(i))),o.push([e,t])}function r(){return o}},72065:(e,t,i)=>{var n;i.d(t,{I8:()=>n,TG:()=>o,yh:()=>s}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(n||(n={}));const o=s("instantiationService");function s(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);const t=function(e,i,o){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[n.DI_TARGET]===t?t[n.DI_DEPENDENCIES].push({id:e,index:i}):(t[n.DI_DEPENDENCIES]=[{id:e,index:i}],t[n.DI_TARGET]=t)}(t,e,o)};return t.toString=()=>e,n.serviceIds.set(e,t),t}},60972:(e,t,i)=>{i.d(t,{y:()=>n});class n{constructor(...e){this._entries=new Map;for(const[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}},81294:(e,t,i)=>{i.d(t,{I:()=>s});var n=i(4669),o=i(89872);const s={JSONContribution:"base.contributions.json"},r=new class{constructor(){this._onDidChangeSchema=new n.Q5,this.schemasById={}}registerSchema(e,t){var i;this.schemasById[(i=e,i.length>0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};o.B.add(s.JSONContribution,r)},91847:(e,t,i)=>{i.d(t,{d:()=>n});const n=(0,i(72065).yh)("keybindingService")},49989:(e,t,i)=>{i.d(t,{W:()=>h});var n=i(8313),o=i(1432),s=i(94565),r=i(89872),a=i(5976),l=i(91741);class d{constructor(){this._coreKeybindings=new l.S,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===o.OS){if(e&&e.win)return e.win}else if(2===o.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=d.bindToCurrentPlatform(e),i=new a.SL;if(t&&t.primary){const s=(0,n.Z9)(t.primary,o.OS);s&&i.add(this._registerDefaultKeybinding(s,e.id,e.args,e.weight,0,e.when))}if(t&&Array.isArray(t.secondary))for(let s=0,r=t.secondary.length;s<r;s++){const r=t.secondary[s],a=(0,n.Z9)(r,o.OS);a&&i.add(this._registerDefaultKeybinding(a,e.id,e.args,e.weight,-s-1,e.when))}return i}registerCommandAndKeybindingRule(e){return(0,a.F8)(this.registerKeybindingRule(e),s.P.registerCommand(e))}_registerDefaultKeybinding(e,t,i,n,o,s){const r=this._coreKeybindings.push({keybinding:e,command:t,commandArgs:i,when:s,weight1:n,weight2:o,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,(0,a.OF)((()=>{r(),this._cachedMergedKeybindings=null}))}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(c)),this._cachedMergedKeybindings.slice(0)}}const h=new d;function c(e,t){if(e.weight1!==t.weight1)return e.weight1-t.weight1;if(e.command&&t.command){if(e.command<t.command)return-1;if(e.command>t.command)return 1}return e.weight2-t.weight2}r.B.add("platform.keybindingsRegistry",h)},44349:(e,t,i)=>{i.d(t,{e:()=>n});const n=(0,i(72065).yh)("labelService")},95191:(e,t,i)=>{i.d(t,{Lw:()=>at,XN:()=>lt,ls:()=>ti,ev:()=>Ut,CQ:()=>ut,PS:()=>vt,uJ:()=>Ct});var n=i(65321),o=i(9488),s=i(71050),r=i(4669),a=i(5976),l=(i(33164),i(43799));class d{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:a.JT.None}}renderElement(e,t,i,n){var o;if(null===(o=i.disposable)||void 0===o||o.dispose(),!i.data)return;const r=this.modelProvider();if(r.isResolved(e))return this.renderer.renderElement(r.get(e),e,i.data,n);const a=new s.A,l=r.resolve(e,a.token);i.disposable={dispose:()=>a.cancel()},this.renderer.renderPlaceholder(e,i.data),l.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class h{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}class c{constructor(e,t,i,n,o={}){const s=()=>this.model,r=n.map((e=>new d(e,s)));this.list=new l.aV(e,t,i,r,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new h(e,t.accessibilityProvider)})}(s,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return r.ju.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return r.ju.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return r.ju.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,o.w6)(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var u=i(89782),g=i(93379),p=i.n(g),m=i(7795),f=i.n(m),_=i(90569),v=i.n(_),b=i(3565),C=i.n(b),w=i(19216),y=i.n(w),S=i(44589),L=i.n(S),x=i(1728),k={};k.styleTagTransform=L(),k.setAttributes=C(),k.insert=v().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=y(),p()(x.Z,k),x.Z&&x.Z.locals&&x.Z.locals;class N{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=N.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-table-tr")),i=[],o=[];for(let e=0;e<this.columns.length;e++){const s=this.renderers[e],r=(0,n.R3)(t,(0,n.$)(".monaco-table-td",{"data-col-index":e}));r.style.width=`${this.getColumnSize(e)}px`,i.push(r),o.push(s.renderTemplate(r))}const s={container:e,cellContainers:i,cellTemplateData:o};return this.renderedTemplates.add(s),s}renderElement(e,t,i,n){for(let o=0;o<this.columns.length;o++){const s=this.columns[o].project(e);this.renderers[o].renderElement(s,t,i.cellTemplateData[o],n)}}disposeElement(e,t,i,n){for(let o=0;o<this.columns.length;o++){const s=this.renderers[o];if(s.disposeElement){const r=this.columns[o].project(e);s.disposeElement(r,t,i.cellTemplateData[o],n)}}}disposeTemplate(e){for(let t=0;t<this.columns.length;t++)this.renderers[t].disposeTemplate(e.cellTemplateData[t]);(0,n.PO)(e.container),this.renderedTemplates.delete(e)}layoutColumn(e,t){for(const{cellContainers:i}of this.renderedTemplates)i[e].style.width=`${t}px`}}N.TemplateId="row";class D{get minimumSize(){var e;return null!==(e=this.column.minimumWidth)&&void 0!==e?e:120}get maximumSize(){var e;return null!==(e=this.column.maximumWidth)&&void 0!==e?e:Number.POSITIVE_INFINITY}get onDidChange(){var e;return null!==(e=this.column.onDidChangeWidthConstraints)&&void 0!==e?e:r.ju.None}constructor(e,t){this.column=e,this.index=t,this._onDidLayout=new r.Q5,this.onDidLayout=this._onDidLayout.event,this.element=(0,n.$)(".monaco-table-th",{"data-col-index":t,title:e.tooltip},e.label)}layout(e){this._onDidLayout.fire([this.index,e])}}class E{get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onDidScroll(){return this.list.onDidScroll}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get scrollHeight(){return this.list.scrollHeight}get renderHeight(){return this.list.renderHeight}get onDidDispose(){return this.list.onDidDispose}constructor(e,t,i,o,s,d){this.virtualDelegate=i,this.domId="table_id_"+ ++E.InstanceCount,this.disposables=new a.SL,this.cachedWidth=0,this.cachedHeight=0,this.domNode=(0,n.R3)(t,(0,n.$)(`.monaco-table.${this.domId}`));const h=o.map(((e,t)=>new D(e,t))),c={size:h.reduce(((e,t)=>e+t.column.weight),0),views:h.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new u.z(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:c})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const g=new N(o,s,(e=>this.splitview.getViewSize(e)));var p;this.list=this.disposables.add(new l.aV(e,this.domNode,(p=i,{getHeight:e=>p.getHeight(e),getTemplateId:()=>N.TemplateId}),[g],d)),r.ju.any(...h.map((e=>e.onDidLayout)))((([e,t])=>g.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=o.reduce(((e,t)=>e+t.weight),0),i=o[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=(0,n.dS)(this.domNode),this.style(l.uZ)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}E.InstanceCount=0,i(4850);var I,T,M=i(59069),R=(i(90317),i(50153),i(44299)),A=i(25707),O=i(98892);!function(e){e[e.Expanded=0]="Expanded",e[e.Collapsed=1]="Collapsed",e[e.PreserveOrExpanded=2]="PreserveOrExpanded",e[e.PreserveOrCollapsed=3]="PreserveOrCollapsed"}(I||(I={})),function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element",e[e.Filter=3]="Filter"}(T||(T={}));class P extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class F{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}var B=i(15393),W=i(5635),V=i(2484),H=i(53725);function z(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function K(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function U(e){return"boolean"==typeof e.collapsible}class j{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new r.E7,this._onDidChangeCollapseState=new r.Q5,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new r.Q5,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new r.Q5,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new B.vp(W.n),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=H.$.empty(),n={}){if(0===e.length)throw new P(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,o,s){var r;void 0===n&&(n=H.$.empty()),void 0===s&&(s=null!==(r=o.diffDepth)&&void 0!==r?r:0);const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,o);const l=[...n],d=t[t.length-1],h=new V.Hs({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,d),...l,...a.children.slice(d+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(h.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);const c=t.slice(0,-1),u=(t,i,n)=>{if(s>0)for(let r=0;r<n;r++)t--,i--,this.spliceSmart(e,[...c,t,0],Number.MAX_SAFE_INTEGER,l[i].children,o,s-1)};let g=Math.min(a.children.length,d+i),p=l.length;for(const e of h.changes.sort(((e,t)=>t.originalStart-e.originalStart)))u(g,p,g-(e.originalStart+e.originalLength)),g=e.originalStart,p=e.modifiedStart-d,this.spliceSimple([...c,g],e.originalLength,H.$.slice(l,p,p+e.modifiedLength),o);u(g,p,g)}spliceSimple(e,t,i=H.$.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:d,visible:h}=this.getParentNodeWithListIndex(e),c=[],u=H.$.map(i,(e=>this.createTreeNode(e,a,a.visible?1:0,d,c,n))),g=e[e.length-1],p=a.children.length>0;let m=0;for(let e=g;e>=0&&e<a.children.length;e--){const t=a.children[e];if(t.visible){m=t.visibleChildIndex;break}}const f=[];let _=0,v=0;for(const e of u)f.push(e),v+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=m+_++);const b=(0,o.db)(a.children,g,t,f);r?a.lastDiffIds?(0,o.db)(a.lastDiffIds,g,t,f.map((e=>r.getId(e.element).toString()))):a.lastDiffIds=a.children.map((e=>r.getId(e.element).toString())):a.lastDiffIds=void 0;let C=0;for(const e of b)e.visible&&C++;if(0!==C)for(let e=g+f.length;e<a.children.length;e++){const t=a.children[e];t.visible&&(t.visibleChildIndex-=C)}if(a.visibleChildrenCount+=_-C,d&&h){const e=b.reduce(((e,t)=>e+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(a,v-e),this.list.splice(l,e,c)}if(b.length>0&&s){const e=t=>{s(t),t.children.forEach(e)};b.forEach(e)}this._onDidSplice.fire({insertedNodes:f,deletedNodes:b});const w=a.children.length>0;p!==w&&this.setCollapsible(e.slice(0,-1),w);let y=a;for(;y;){if(2===y.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}y=y.parent}}rerender(e){if(0===e.length)throw new P(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,o)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&s&&!U(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e<i.children.length;e++)if(i.children[e].visible){if(n>-1){n=-1;break}n=e}n>-1&&this._setCollapseState([...e,n],t)}return s}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const s=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=s-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(U(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!U(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,o,s){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&o.push(r);const l=e.children||H.$.empty(),d=n&&0!==a&&!r.collapsed;let h=0,c=1;for(const e of l){const t=this.createTreeNode(e,r,a,d,o,s);r.children.push(t),c+=t.renderNodeCount,t.visible&&(t.visibleChildIndex=h++)}return r.collapsible=r.collapsible||r.children.length>0,r.visibleChildrenCount=h,r.visible=2===a?h>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=c):(r.renderNodeCount=0,n&&o.pop()),null==s||s(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const s=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const s of e.children)r=this._updateNodeAfterFilterChange(s,o,i,n&&!e.collapsed)||r,s.visible&&(s.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?r:1===o,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-s):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):z(i)?(e.filterData=i.data,K(i.visibility)):(e.filterData=void 0,K(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new P(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:o}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>t.children.length)throw new P(this.user,"Invalid tree location");const r=t.children[s];return{node:r,listIndex:i,revealed:n,visible:o&&r.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){const[s,...r]=e;if(s<0||s>t.children.length)throw new P(this.user,"Invalid tree location");for(let e=0;e<s;e++)i+=t.children[e].renderNodeCount;return n=n&&!t.collapsed,o=o&&t.visible,0===r.length?{parentNode:t,listIndex:i,revealed:n,visible:o}:this.getParentNodeWithListIndex(r,t.children[s],i+1,n,o)}getNode(e=[]){return this.getTreeNode(e)}getNodeLocation(e){const t=[];let i=e;for(;i.parent;)t.push(i.parent.children.indexOf(i)),i=i.parent;return t.reverse()}getParentNodeLocation(e){return 0===e.length?void 0:1===e.length?[]:(0,o.JH)(e)[0]}getFirstElementChild(e){const t=this.getTreeNode(e);if(0!==t.children.length)return t.children[0].element}}i(74741);var $=i(73046),q=i(25670),Z=i(6626),G=i(75392),Q=i(59870),Y=i(98401),J=i(61766),X={};X.styleTagTransform=L(),X.setAttributes=C(),X.insert=v().bind(null,"head"),X.domAPI=f(),X.insertStyleElement=y(),p()(J.Z,X),J.Z&&J.Z.locals&&J.Z.locals;var ee,te,ie,ne=i(63580);class oe extends A.kX{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function se(e){return e instanceof A.kX?new oe(e):e}class re{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=a.JT.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,se(e),t)}onDragOver(e,t,i,n,s=!0){const r=this.dnd.onDragOver(se(e),t&&t.element,i,n),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return r;if(a&&"boolean"!=typeof r&&r.autoExpand&&(this.autoExpandDisposable=(0,B.Vg)((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500)),"boolean"==typeof r||!r.accept||void 0===r.bubble||r.feedback)return s?r:{accept:"boolean"==typeof r?r:r.accept,effect:"boolean"==typeof r?void 0:r.effect,feedback:[i]};if(1===r.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),s=i.getParentNodeLocation(o),r=i.getNode(s),a=s&&i.getListIndex(s);return this.onDragOver(e,r,a,n,!1)}const l=this.modelProvider(),d=l.getNodeLocation(t),h=l.getListIndex(d),c=l.getListRenderCount(d);return Object.assign(Object.assign({},r),{feedback:(0,o.w6)(h,h+c)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(se(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}}class ae{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var i,n;null===(n=(i=this.delegate).setDynamicHeight)||void 0===n||n.call(i,e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(ee||(ee={}));class le{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new a.SL,this.onDidChange=r.ju.forEach(e,(e=>this._elements=e),this.disposables)}dispose(){this.disposables.dispose()}}class de{constructor(e,t,i,n,o,s={}){var l;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=o,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=de.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=a.JT.None,this.disposables=new a.SL,this.templateId=e.templateId,this.updateOptions(s),r.ju.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),null===(l=e.onDidChangeTwistieState)||void 0===l||l.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent){const t=(0,Q.uZ)(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[e,t]of this.renderedNodes)this.renderTreeElement(e,t)}}if(void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==ee.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[e,t]of this.renderedNodes)this._renderIndentGuides(e,t);if(this.indentGuidesDisposable.dispose(),t){const e=new a.SL;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-tl-row")),i=(0,n.R3)(t,(0,n.$)(".monaco-tl-indent")),o=(0,n.R3)(t,(0,n.$)(".monaco-tl-twistie")),s=(0,n.R3)(t,(0,n.$)(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:o,indentGuidesDisposable:a.JT.None,templateData:r}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var o,s;i.indentGuidesDisposable.dispose(),null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const i=de.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=i+this.indent-16+"px",e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...q.k.asClassNameArray($.l.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...q.k.asClassNameArray($.l.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if((0,n.PO)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new a.SL,o=this.modelProvider();for(;;){const s=o.getNodeLocation(e),r=o.getParentNodeLocation(s);if(!r)break;const l=o.getNode(r),d=(0,n.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&d.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(d):t.indent.insertBefore(d,t.indent.firstElementChild),this.renderedIndentGuides.add(l,d),i.add((0,a.OF)((()=>this.renderedIndentGuides.delete(l,d)))),e=l}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(e){}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,a.B9)(this.disposables)}}de.DefaultIndent=8;class he{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new a.SL,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const n=this._filter.filter(e,t);if(i="boolean"==typeof n?n?1:0:z(n)?K(n.visibility):n,0===i)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:G.CL.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),o=Array.isArray(n)?n:[n];for(const e of o){const t=e&&e.toString();if(void 0===t)return{data:G.CL.Default,visibility:i};let n;if(this.tree.findMatchType===ie.Contiguous){const e=t.toLowerCase().indexOf(this._lowercasePattern);if(e>-1){n=[Number.MAX_SAFE_INTEGER,0];for(let t=this._lowercasePattern.length;t>0;t--)n.push(e+t-1)}}else n=(0,G.EW)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(n)return this._matchCount++,1===o.length?{data:n,visibility:i}:{data:{label:t,score:n},visibility:i}}return this.tree.findMode===te.Filter?"number"==typeof this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:G.CL.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,a.B9)(this.disposables)}}R.g4,O.D,function(e){e[e.Highlight=0]="Highlight",e[e.Filter=1]="Filter"}(te||(te={})),function(e){e[e.Fuzzy=0]="Fuzzy",e[e.Contiguous=1]="Contiguous"}(ie||(ie={}));class ce{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,o,s={}){var l,d;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=o,this.options=s,this._pattern="",this.width=0,this._onDidChangeMode=new r.Q5,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new r.Q5,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new r.Q5,this._onDidChangeOpenState=new r.Q5,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new a.SL,this.disposables=new a.SL,this._mode=null!==(l=e.options.defaultFindMode)&&void 0!==l?l:te.Highlight,this._matchType=null!==(d=e.options.defaultFindMatchType)&&void 0!==d?d:ie.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){var e,t,i,n;const o=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&o?null===(e=this.tree.options.showNotFoundMessage)||void 0===e||e?null===(t=this.widget)||void 0===t||t.showMessage({type:2,content:(0,ne.NC)("not found","No elements found.")}):null===(i=this.widget)||void 0===i||i.showMessage({type:2}):null===(n=this.widget)||void 0===n||n.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===te.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1||!G.CL.isDefault(e.filterData)}layout(e){var t;this.width=e,null===(t=this.widget)||void 0===t||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function ue(e){let t=T.Unknown;return(0,n.uU)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=T.Twistie:(0,n.uU)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=T.Element:(0,n.uU)(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=T.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function ge(e,t){t(e),e.children.forEach((e=>ge(e,t)))}class pe{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new r.Q5,this.onDidChange=this._onDidChange.event}set(e,t){!(null==t?void 0:t.__forceEvent)&&(0,o.fS)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>ge(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>ge(e,n)));const o=new Map,s=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>ge(e,s)));const r=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=o.get(t);e&&e.visible&&r.push(e)}else r.push(e)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class me extends l.sx{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if((0,l.iK)(e.browserEvent.target)||(0,l.cK)(e.browserEvent.target)||(0,l.hD)(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let o=!1;if(o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,o&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,s),o&&n)return void(e.browserEvent.isHandledByList=!0)}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&(e.browserEvent.isHandledByList||super.onDoubleClick(e))}}class fe extends l.aV{constructor(e,t,i,n,o,s,r,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=s,this.anchorTrait=r}createMouseController(e){return new me(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],s=[];let r;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&s.push(e+i),this.anchorTrait.has(t)&&(r=e+i)})),n.length>0&&super.setFocus((0,o.EB)([...super.getFocus(),...n])),s.length>0&&super.setSelection((0,o.EB)([...super.getSelection(),...s])),"number"==typeof r&&super.setAnchor(r)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class _e{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return r.ju.filter(r.ju.map(this.view.onMouseDblClick,ue),(e=>e.target!==T.Filter))}get onPointer(){return r.ju.map(this.view.onPointer,ue)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return r.ju.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.mode)&&void 0!==t?t:te.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.matchType)&&void 0!==t?t:ie.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,o,s={}){var d;this._user=e,this._options=s,this.eventBufferer=new r.E7,this.onDidChangeFindOpenState=r.ju.None,this.disposables=new a.SL,this._onWillRefilter=new r.Q5,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new r.Q5;const h=new ae(i),c=new r.ZD,u=new r.ZD,g=this.disposables.add(new le(u.event)),p=new Z.r;this.renderers=o.map((e=>new de(e,(()=>this.model),c.event,g,p,s)));for(const e of this.renderers)this.disposables.add(e);let m;s.keyboardNavigationLabelProvider&&(m=new he(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:m}),this.disposables.add(m)),this.focus=new pe((()=>this.view.getFocusedElements()[0]),s.identityProvider),this.selection=new pe((()=>this.view.getSelectedElements()[0]),s.identityProvider),this.anchor=new pe((()=>this.view.getAnchorElement()),s.identityProvider),this.view=new fe(e,t,h,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},function(e,t){return t&&Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:e=>t.identityProvider.getId(e.element)},dnd:t.dnd&&new re(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},t.accessibilityProvider),{getSetSize(t){const i=e(),n=i.getNodeLocation(t),o=i.getParentNodeLocation(n);return i.getNode(o).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>t.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>t.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)})})}((()=>this.model),s)),{tree:this})),this.model=this.createModel(e,this.view,s),c.input=this.model.onDidChangeCollapseState;const f=r.ju.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}),this.disposables);if(f((()=>null),null,this.disposables),u.input=r.ju.chain(r.ju.any(f,this.focus.onDidChange,this.selection.onDidChange)).debounce((()=>null),0).map((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]})).event,!1!==s.keyboardSupport){const e=r.ju.chain(this.view.onKeyDown).filter((e=>!(0,l.cK)(e.target))).map((e=>new M.y(e)));e.filter((e=>15===e.keyCode)).on(this.onLeftArrow,this,this.disposables),e.filter((e=>17===e.keyCode)).on(this.onRightArrow,this,this.disposables),e.filter((e=>10===e.keyCode)).on(this.onSpace,this,this.disposables)}if((null===(d=s.findWidgetEnabled)||void 0===d||d)&&s.keyboardNavigationLabelProvider&&s.contextViewProvider){const e=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new ce(this,this.model,this.view,m,s.contextViewProvider,e),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=r.ju.None,this.onDidChangeFindMatchType=r.ju.None;this.styleElement=(0,n.dS)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===ee.Always)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),null===(t=this.findController)||void 0===t||t.updateOptions(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===ee.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),(0,Y.hj)(t)&&(null===(i=this.findController)||void 0===i||i.layout(t))}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){(0,a.B9)(this.disposables),this.view.dispose()}}class ve{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new j(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare:(e,t)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=H.$.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=H.$.empty(),i){const n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{var t;if(null===e.element)return;const s=e;if(n.add(s.element),this.nodes.set(s.element,s),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.add(e),this.nodesByIdentity.set(e,s)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,s)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const s=e;if(n.has(s.element)||this.nodes.delete(s.element),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,s)}}))}preserveCollapseState(e=H.$.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),H.$.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t){let t;return t=void 0===e.collapsed?void 0:e.collapsed===I.Collapsed||e.collapsed===I.PreserveOrCollapsed||e.collapsed!==I.Expanded&&e.collapsed!==I.PreserveOrExpanded&&Boolean(e.collapsed),Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children),collapsed:t})}const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible;let n;return n=void 0===e.collapsed||e.collapsed===I.PreserveOrCollapsed||e.collapsed===I.PreserveOrExpanded?t.collapsed:e.collapsed===I.Collapsed||e.collapsed!==I.Expanded&&Boolean(e.collapsed),Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new P(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new P(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new P(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new P(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function be(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:H.$.map(H.$.from(e.children),be),collapsible:e.collapsible,collapsed:e.collapsed}}function Ce(e){const t=[e.element],i=e.incompressible||!1;let n,o;for(;[o,n]=H.$.consume(H.$.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:H.$.map(H.$.concat(o,n),Ce),collapsible:e.collapsible,collapsed:e.collapsed}}function we(e,t=0){let i;return i=t<e.element.elements.length-1?[we(e,t+1)]:H.$.map(H.$.from(e.children),(e=>we(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function ye(e){return we(e,0)}function Se(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:H.$.map(H.$.from(e.children),(e=>Se(e,t,i)))})}class Le{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new ve(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=H.$.empty(),i){const n=i.diffIdentityProvider&&(s=i.diffIdentityProvider,{getId:e=>e.elements.map((e=>s.getId(e).toString())).join("\0")});var s;if(null===e){const e=H.$.map(t,this.enabled?Ce:be);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const r=this.nodes.get(e);if(!r)throw new P(this.user,"Unknown compressed tree node");const a=this.model.getNode(r),l=this.model.getParentNodeLocation(r),d=this.model.getNode(l),h=Se(ye(a),e,t),c=(this.enabled?Ce:be)(h),u=i.diffIdentityProvider?(e,t)=>i.diffIdentityProvider.getId(e)===i.diffIdentityProvider.getId(t):void 0;if((0,o.fS)(c.element.elements,a.element.elements,u))return void this._setChildren(r,c.children||H.$.empty(),{diffIdentityProvider:n,diffDepth:1});const g=d.children.map((e=>e===a?c:e));this._setChildren(d.element,g,{diffIdentityProvider:n,diffDepth:a.depth-d.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=H.$.map(t,ye),n=H.$.map(i,e?Ce:be);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new P(this.user,`Tree element not found: ${e}`);return t}}const xe=e=>e[e.length-1];class ke{get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new ke(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}class Ne{get onDidSplice(){return r.ju.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return r.ju.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return r.ju.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||xe;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new F((e=>new ke(n,e))),this.model=new Le(e,function(e,t){return{splice(i,n,o){t.splice(i,n,o.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:i=>t.identityProvider.getId(e(i))},sorter:t.sorter&&{compare:(e,i)=>t.sorter.compare(e.elements[0],i.elements[0])},filter:t.filter&&{filter:(i,n)=>t.filter.filter(e(i),n)}})}(n,i))}setChildren(e,t=H.$.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return null==t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var De=i(49898);class Ee extends _e{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}setChildren(e,t=H.$.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new ve(e,t,i)}}class Ie{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){var o,s,r,a;i.compressedTreeNode?null===(s=(o=this.renderer).disposeCompressedElements)||void 0===s||s.call(o,i.compressedTreeNode,t,i.data,n):null===(a=(r=this.renderer).disposeElement)||void 0===a||a.call(r,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([De.H],Ie.prototype,"compressedTreeNodeProvider",null);class Te extends Ee{constructor(e,t,i,n,o={}){const s=()=>this;super(e,t,i,n.map((e=>new Ie(s,e))),function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(s,o))}setChildren(e,t=H.$.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new Ne(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var Me=i(17301),Re=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function Ae(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function Oe(e,t){return!!t.parent&&(t.parent===e||Oe(e,t.parent))}class Pe{get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new Pe(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class Fe{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...q.k.asClassNameArray($.l.treeItemLoading)),!0):(t.classList.remove(...q.k.asClassNameArray($.l.treeItemLoading)),!1)}disposeElement(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function Be(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function We(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class Ve extends A.kX{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function He(e){return e instanceof A.kX?new Ve(e):e}class ze{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,He(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(He(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(He(e),t&&t.element,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}}function Ke(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new ze(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),defaultFindVisibility:t=>t.hasChildren&&t.stale?1:"number"==typeof e.defaultFindVisibility?e.defaultFindVisibility:void 0===e.defaultFindVisibility?2:e.defaultFindVisibility(t.element)})}function Ue(e,t){t(e),e.children.forEach((e=>Ue(e,t)))}class je{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return r.ju.map(this.tree.onDidChangeFocus,Be)}get onDidChangeSelection(){return r.ju.map(this.tree.onDidChangeSelection,Be)}get onMouseDblClick(){return r.ju.map(this.tree.onMouseDblClick,We)}get onPointer(){return r.ju.map(this.tree.onPointer,We)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,o,s={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new r.Q5,this._onDidChangeNodeSlowState=new r.Q5,this.nodeMapper=new F((e=>new Pe(e))),this.disposables=new a.SL,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.collapseByDefault=s.collapseByDefault,this.tree=this.createTree(e,t,i,n,s),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=Ae({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,i,n,o){const s=new ae(i),r=n.map((e=>new Fe(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=Ke(o)||{};return new Ee(e,t,s,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return Re(this,void 0,void 0,(function*(){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n,o){return Re(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new P(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(yield this.refreshAndRenderNode(s,t,n,o),i)try{this.tree.rerender(s)}catch(e){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return Re(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new P(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield r.ju.toPromise(this._onDidRender.event)),n}))}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new P(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return Re(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return Re(this,void 0,void 0,(function*(){let n;return this.subTreeRefreshPromises.forEach(((o,s)=>{!n&&function(e,t){return e===t||Oe(e,t)||Oe(t,e)}(s,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n||(e!==this.root&&this.tree.getNode(e).collapsed?(e.hasChildren=!!this.dataSource.hasChildren(e.element),void(e.stale=!0)):this.doRefreshSubTree(e,t,i))}))}doRefreshSubTree(e,t,i){return Re(this,void 0,void 0,(function*(){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const n=yield this.doRefreshNode(e,t,i);e.stale=!1,yield B.jT.settled(n.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}))}doRefreshNode(e,t,i){return Re(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if((0,Y.TW)(t))n=Promise.resolve(t);else{const i=(0,B.Vs)(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(H.$.empty());try{const o=yield n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,Me.n2)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return(0,Y.TW)(i)?this.processChildren(i):(t=(0,B.PG)((()=>Re(this,void 0,void 0,(function*(){return this.processChildren(yield i)})))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(Me.dL))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const s=new Map,r=new Map;for(const t of e.children)if(s.set(t.element,t),this.identityProvider){const e=this.tree.isCollapsed(t);r.set(t.id,{node:t,collapsed:e})}const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=Ae({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),d=r.get(l);if(d){const e=d.node;return s.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?d.collapsed?(e.children.forEach((e=>Ue(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const h=Ae({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(h),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(h),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(h):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(h.collapsedByDefault=!1,a.push(h)),h}));for(const e of s.values())Ue(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>i.diffIdentityProvider.getId(e.element)}});this.tree.setChildren(e===this.root?null:e,n,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?H.$.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class $e{get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new $e(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class qe{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...q.k.asClassNameArray($.l.treeItemLoading)),!0):(t.classList.remove(...q.k.asClassNameArray($.l.treeItemLoading)),!1)}disposeElement(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeCompressedElements)||void 0===s||s.call(o,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,a.B9)(this.disposables)}}class Ze extends je{constructor(e,t,i,n,o,s,r={}){super(e,t,i,o,s,r),this.compressionDelegate=n,this.compressibleNodeMapper=new F((e=>new $e(e))),this.filter=r.filter}createTree(e,t,i,n,o){const s=new ae(i),r=n.map((e=>new qe(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&Ke(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))})})}(o)||{};return new Te(e,t,s,r,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),s=n(this.tree.getFocus());super.render(e,t);const r=this.getSelection();let a=!1;const l=this.getFocus();let d=!1;const h=e=>{const t=e.element;if(t)for(let e=0;e<t.elements.length;e++){const n=i(t.elements[e].element),h=t.elements[t.elements.length-1].element;o.has(n)&&-1===r.indexOf(h)&&(r.push(h),a=!0),s.has(n)&&-1===l.indexOf(h)&&(l.push(h),d=!0)}e.children.forEach(h)};h(this.tree.getCompressedTreeNode(e===this.root?null:e)),a&&this.setSelection(r),d&&this.setFocus(l)}processChildren(e){return this.filter&&(e=H.$.filter(e,(e=>{const t="boolean"==typeof(i=this.filter.filter(e,1))?i?1:0:z(i)?K(i.visibility):K(i);var i;if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t}))),super.processChildren(e)}}class Ge extends _e{constructor(e,t,i,n,o,s={}){super(e,t,i,n,s),this.user=e,this.dataSource=o,this.identityProvider=s.identityProvider}createModel(e,t,i){return new ve(e,t,i)}}var Qe=i(33108),Ye=i(23193),Je=i(93983),Xe=i(39282),et=i(5606),tt=i(72065),it=i(91847),nt=i(89872),ot=i(86253),st=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},rt=function(e,t){return function(i,n){t(i,n,e)}};const at=(0,tt.yh)("listService");class lt{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new a.SL,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&(null===(t=this._lastFocusedWidget)||void 0===t||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,null===(i=this._lastFocusedWidget)||void 0===i||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new l.wD((0,n.dS)(),"").style(ot.O2)),this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),(0,a.F8)(e.onDidFocus((()=>this.setLastFocusedList(e))),(0,a.OF)((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)})))}dispose(){this.disposables.dispose()}}const dt=new Je.uy("listScrollAtBoundary","none"),ht=(Je.Ao.or(dt.isEqualTo("top"),dt.isEqualTo("both")),Je.Ao.or(dt.isEqualTo("bottom"),dt.isEqualTo("both")),new Je.uy("listFocus",!0)),ct=new Je.uy("listSupportsMultiselect",!0),ut=Je.Ao.and(ht,Je.Ao.not(Xe.d0)),gt=new Je.uy("listHasSelectionOrFocus",!1),pt=new Je.uy("listDoubleSelection",!1),mt=new Je.uy("listMultiSelection",!1),ft=new Je.uy("listSelectionNavigation",!1),_t=new Je.uy("listSupportsFind",!0),vt=new Je.uy("treeElementCanCollapse",!1),bt=new Je.uy("treeElementHasParent",!1),Ct=new Je.uy("treeElementCanExpand",!1),wt=new Je.uy("treeElementHasChild",!1),yt=new Je.uy("treeFindOpen",!1),St="listTypeNavigationMode",Lt="listAutomaticKeyboardNavigation";function xt(e,t){const i=e.createScoped(t.getHTMLElement());return ht.bindTo(i),i}function kt(e,t){const i=dt.bindTo(e),n=()=>{const e=0===t.scrollTop,n=t.scrollHeight-t.renderHeight-t.scrollTop<1;e&&n?i.set("both"):e?i.set("top"):n?i.set("bottom"):i.set("none")};return n(),t.onDidScroll(n)}const Nt="workbench.list.multiSelectModifier",Dt="workbench.list.openMode",Et="workbench.list.horizontalScrolling",It="workbench.list.defaultFindMode",Tt="workbench.list.typeNavigationMode",Mt="workbench.list.keyboardNavigation",Rt="workbench.list.scrollByPage",At="workbench.list.defaultFindMatchType",Ot="workbench.tree.indent",Pt="workbench.tree.renderIndentGuides",Ft="workbench.list.smoothScrolling",Bt="workbench.list.mouseWheelScrollSensitivity",Wt="workbench.list.fastScrollSensitivity",Vt="workbench.tree.expandMode";function Ht(e){return"alt"===e.getValue(Nt)}class zt extends a.JT{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=Ht(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(Nt)&&(this.useAltAsMultipleSelectionModifier=Ht(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,l.Zo)(e)}isSelectionRangeChangeEvent(e){return(0,l.wn)(e)}}function Kt(e,t){var i;const n=e.get(Qe.Ui),o=e.get(it.d),s=new a.SL;return[Object.assign(Object.assign({},t),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>o.mightProducePrintableCharacter(e)},smoothScrolling:Boolean(n.getValue(Ft)),mouseWheelScrollSensitivity:n.getValue(Bt),fastScrollSensitivity:n.getValue(Wt),multipleSelectionController:null!==(i=t.multipleSelectionController)&&void 0!==i?i:s.add(new zt(n)),keyboardNavigationEventFilter:Yt(o),scrollByPage:Boolean(n.getValue(Rt))}),s]}let Ut=class extends l.aV{constructor(e,t,i,n,o,s,r,a,l){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(a.getValue(Et)),[h,c]=l.invokeFunction(Kt,o);super(e,t,i,n,Object.assign(Object.assign({keyboardSupport:!1},h),{horizontalScrolling:d})),this.disposables.add(c),this.contextKeyService=xt(s,this),this.disposables.add(kt(this.contextKeyService,this)),this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),ft.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=gt.bindTo(this.contextKeyService),this.listDoubleSelection=pt.bindTo(this.contextKeyService),this.listMultiSelection=mt.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Ht(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(Nt)&&(this._useAltAsMultipleSelectionModifier=Ht(a));let t={};if(e.affectsConfiguration(Et)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(Et));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(Rt)){const e=Boolean(a.getValue(Rt));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(Ft)){const e=Boolean(a.getValue(Ft));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(Bt)){const e=a.getValue(Bt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Wt)){const e=a.getValue(Wt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Zt(this,Object.assign({configurationService:a},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,ot.TU)(e):ot.O2)}};Ut=st([rt(5,Je.i6),rt(6,at),rt(7,Qe.Ui),rt(8,tt.TG)],Ut);let jt=class extends c{constructor(e,t,i,n,o,s,r,l,d){const h=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(Et)),[c,u]=d.invokeFunction(Kt,o);super(e,t,i,n,Object.assign(Object.assign({keyboardSupport:!1},c),{horizontalScrolling:h})),this.disposables=new a.SL,this.disposables.add(u),this.contextKeyService=xt(s,this),this.disposables.add(kt(this.contextKeyService,this.widget)),this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),ft.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=Ht(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(Nt)&&(this._useAltAsMultipleSelectionModifier=Ht(l));let t={};if(e.affectsConfiguration(Et)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Et));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(Rt)){const e=Boolean(l.getValue(Rt));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(Ft)){const e=Boolean(l.getValue(Ft));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(Bt)){const e=l.getValue(Bt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Wt)){const e=l.getValue(Wt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Zt(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,ot.TU)(e):ot.O2)}dispose(){this.disposables.dispose(),super.dispose()}};jt=st([rt(5,Je.i6),rt(6,at),rt(7,Qe.Ui),rt(8,tt.TG)],jt);let $t=class extends E{constructor(e,t,i,n,o,s,r,a,l,d){const h=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(l.getValue(Et)),[c,u]=d.invokeFunction(Kt,s);super(e,t,i,n,o,Object.assign(Object.assign({keyboardSupport:!1},c),{horizontalScrolling:h})),this.disposables.add(u),this.contextKeyService=xt(r,this),this.disposables.add(kt(this.contextKeyService,this)),this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport),ft.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=gt.bindTo(this.contextKeyService),this.listDoubleSelection=pt.bindTo(this.contextKeyService),this.listMultiSelection=mt.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Ht(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(Nt)&&(this._useAltAsMultipleSelectionModifier=Ht(l));let t={};if(e.affectsConfiguration(Et)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Et));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(Rt)){const e=Boolean(l.getValue(Rt));t=Object.assign(Object.assign({},t),{scrollByPage:e})}if(e.affectsConfiguration(Ft)){const e=Boolean(l.getValue(Ft));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(Bt)){const e=l.getValue(Bt);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Wt)){const e=l.getValue(Wt);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Gt(this,Object.assign({configurationService:l},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,ot.TU)(e):ot.O2)}dispose(){this.disposables.dispose(),super.dispose()}};$t=st([rt(6,Je.i6),rt(7,at),rt(8,Qe.Ui),rt(9,tt.TG)],$t);class qt extends a.JT{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new r.Q5),this.onDidOpen=this._onDidOpen.event,this._register(r.ju.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Dt)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(Dt)&&(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Dt)))})))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class Zt extends qt{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Gt extends qt{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Qt extends qt{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function Yt(e){let t=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(t)return t=!1,!1;const n=e.softDispatch(i,i.target);return 1===n.kind?(t=!0,!1):(t=!1,0===n.kind)}}let Jt=class extends Ee{constructor(e,t,i,n,o,s,r,a,l){const{options:d,getTypeNavigationMode:h,disposable:c}=s.invokeFunction(si,o);super(e,t,i,n,d),this.disposables.add(c),this.internals=new ri(this,o,h,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};Jt=st([rt(5,tt.TG),rt(6,Je.i6),rt(7,at),rt(8,Qe.Ui)],Jt);let Xt=class extends Te{constructor(e,t,i,n,o,s,r,a,l){const{options:d,getTypeNavigationMode:h,disposable:c}=s.invokeFunction(si,o);super(e,t,i,n,d),this.disposables.add(c),this.internals=new ri(this,o,h,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Xt=st([rt(5,tt.TG),rt(6,Je.i6),rt(7,at),rt(8,Qe.Ui)],Xt);let ei=class extends Ge{constructor(e,t,i,n,o,s,r,a,l,d){const{options:h,getTypeNavigationMode:c,disposable:u}=r.invokeFunction(si,s);super(e,t,i,n,o,h),this.disposables.add(u),this.internals=new ri(this,s,c,s.overrideStyles,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),void 0!==e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};ei=st([rt(6,tt.TG),rt(7,Je.i6),rt(8,at),rt(9,Qe.Ui)],ei);let ti=class extends je{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,o,s,r,a,l,d){const{options:h,getTypeNavigationMode:c,disposable:u}=r.invokeFunction(si,s);super(e,t,i,n,o,h),this.disposables.add(u),this.internals=new ri(this,s,c,s.overrideStyles,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};ti=st([rt(6,tt.TG),rt(7,Je.i6),rt(8,at),rt(9,Qe.Ui)],ti);let ii=class extends Ze{constructor(e,t,i,n,o,s,r,a,l,d,h){const{options:c,getTypeNavigationMode:u,disposable:g}=a.invokeFunction(si,r);super(e,t,i,n,o,s,c),this.disposables.add(g),this.internals=new ri(this,r,u,r.overrideStyles,l,d,h),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function ni(e){const t=e.getValue(It);if("highlight"===t)return te.Highlight;if("filter"===t)return te.Filter;const i=e.getValue(Mt);return"simple"===i||"highlight"===i?te.Highlight:"filter"===i?te.Filter:void 0}function oi(e){const t=e.getValue(At);return"fuzzy"===t?ie.Fuzzy:"contiguous"===t?ie.Contiguous:void 0}function si(e,t){var i;const n=e.get(Qe.Ui),o=e.get(et.u),s=e.get(Je.i6),r=e.get(tt.TG),a=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(Et)),[d,h]=r.invokeFunction(Kt,t),c=t.paddingBottom,u=void 0!==t.renderIndentGuides?t.renderIndentGuides:n.getValue(Pt);return{getTypeNavigationMode:()=>{const e=s.getContextKeyValue(St);if("automatic"===e)return l.AA.Automatic;if("trigger"===e)return l.AA.Trigger;if(!1===s.getContextKeyValue(Lt))return l.AA.Trigger;const t=n.getValue(Tt);return"automatic"===t?l.AA.Automatic:"trigger"===t?l.AA.Trigger:void 0},disposable:h,options:Object.assign(Object.assign({keyboardSupport:!1},d),{indent:"number"==typeof n.getValue(Ot)?n.getValue(Ot):void 0,renderIndentGuides:u,smoothScrolling:Boolean(n.getValue(Ft)),defaultFindMode:ni(n),defaultFindMatchType:oi(n),horizontalScrolling:a,scrollByPage:Boolean(n.getValue(Rt)),paddingBottom:c,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(i=t.expandOnlyOnTwistieClick)&&void 0!==i?i:"doubleClick"===n.getValue(Vt),contextViewProvider:o,findWidgetStyles:ot.uX})}}ii=st([rt(7,tt.TG),rt(8,Je.i6),rt(9,at),rt(10,Qe.Ui)],ii);let ri=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,o,s,r){var a;this.tree=e,this.disposables=[],this.contextKeyService=xt(o,e),this.disposables.push(kt(this.contextKeyService,e)),this.listSupportsMultiSelect=ct.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport),ft.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=_t.bindTo(this.contextKeyService),this.listSupportFindWidget.set(null===(a=t.findWidgetEnabled)||void 0===a||a),this.hasSelectionOrFocus=gt.bindTo(this.contextKeyService),this.hasDoubleSelection=pt.bindTo(this.contextKeyService),this.hasMultiSelection=mt.bindTo(this.contextKeyService),this.treeElementCanCollapse=vt.bindTo(this.contextKeyService),this.treeElementHasParent=bt.bindTo(this.contextKeyService),this.treeElementCanExpand=Ct.bindTo(this.contextKeyService),this.treeElementHasChild=wt.bindTo(this.contextKeyService),this.treeFindOpen=yt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Ht(r),this.updateStyleOverrides(n);const l=()=>{const t=e.getFocus()[0];if(!t)return;const i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},d=new Set;d.add(St),d.add(Lt),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),l()})),e.onDidChangeCollapseState(l),e.onDidChangeModel(l),e.onDidChangeFindOpenState((e=>this.treeFindOpen.set(e))),r.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(Nt)&&(this._useAltAsMultipleSelectionModifier=Ht(r)),n.affectsConfiguration(Ot)){const e=r.getValue(Ot);o=Object.assign(Object.assign({},o),{indent:e})}if(n.affectsConfiguration(Pt)&&void 0===t.renderIndentGuides){const e=r.getValue(Pt);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(n.affectsConfiguration(Ft)){const e=Boolean(r.getValue(Ft));o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(n.affectsConfiguration(It)||n.affectsConfiguration(Mt)){const e=ni(r);o=Object.assign(Object.assign({},o),{defaultFindMode:e})}if(n.affectsConfiguration(Tt)||n.affectsConfiguration(Mt)){const e=i();o=Object.assign(Object.assign({},o),{typeNavigationMode:e})}if(n.affectsConfiguration(At)){const e=oi(r);o=Object.assign(Object.assign({},o),{defaultFindMatchType:e})}if(n.affectsConfiguration(Et)&&void 0===t.horizontalScrolling){const e=Boolean(r.getValue(Et));o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}if(n.affectsConfiguration(Rt)){const e=Boolean(r.getValue(Rt));o=Object.assign(Object.assign({},o),{scrollByPage:e})}if(n.affectsConfiguration(Vt)&&void 0===t.expandOnlyOnTwistieClick&&(o=Object.assign(Object.assign({},o),{expandOnlyOnTwistieClick:"doubleClick"===r.getValue(Vt)})),n.affectsConfiguration(Bt)){const e=r.getValue(Bt);o=Object.assign(Object.assign({},o),{mouseWheelScrollSensitivity:e})}if(n.affectsConfiguration(Wt)){const e=r.getValue(Wt);o=Object.assign(Object.assign({},o),{fastScrollSensitivity:e})}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(d)&&e.updateOptions({typeNavigationMode:i()})}))),this.navigator=new Qt(e,Object.assign({configurationService:r},t)),this.disposables.push(this.navigator)}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?(0,ot.TU)(e):ot.O2)}dispose(){this.disposables=(0,a.B9)(this.disposables)}};ri=st([rt(4,Je.i6),rt(5,at),rt(6,Qe.Ui)],ri),nt.B.as(Ye.IP.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,ne.NC)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Nt]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,ne.NC)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,ne.NC)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,ne.NC)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[Dt]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,ne.NC)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Et]:{type:"boolean",default:!1,description:(0,ne.NC)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Rt]:{type:"boolean",default:!1,description:(0,ne.NC)("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[Ot]:{type:"number",default:8,minimum:4,maximum:40,description:(0,ne.NC)("tree indent setting","Controls tree indentation in pixels.")},[Pt]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,ne.NC)("render tree indent guides","Controls whether the tree should render indent guides.")},[Ft]:{type:"boolean",default:!1,description:(0,ne.NC)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Bt]:{type:"number",default:1,markdownDescription:(0,ne.NC)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Wt]:{type:"number",default:5,markdownDescription:(0,ne.NC)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[It]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,ne.NC)("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),(0,ne.NC)("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:(0,ne.NC)("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[Mt]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,ne.NC)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,ne.NC)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,ne.NC)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,ne.NC)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:(0,ne.NC)("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and\t'workbench.list.typeNavigationMode' instead.")},[At]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,ne.NC)("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),(0,ne.NC)("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:(0,ne.NC)("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[Vt]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,ne.NC)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Tt]:{type:"string",enum:["automatic","trigger"],default:"automatic",description:(0,ne.NC)("typeNavigationMode","Controls the how type navigation works in lists and trees in the workbench. When set to 'trigger', type navigation begins once the 'list.triggerTypeNavigation' command is run.")}}})},43557:(e,t,i)=>{i.d(t,{VZ:()=>r,in:()=>a,kw:()=>h,qA:()=>c});var n=i(4669),o=i(5976),s=i(93983);const r=(0,i(72065).yh)("logService");var a;!function(e){e[e.Off=0]="Off",e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error"}(a||(a={}));const l=a.Info;class d extends o.JT{constructor(){super(...arguments),this.level=l,this._onDidChangeLogLevel=this._register(new n.Q5),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==a.Off&&this.level<=e}}class h extends d{constructor(e=l,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(a.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(a.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(a.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(a.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(a.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}dispose(){}}class c extends d{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}warn(e,...t){for(const i of this.loggers)i.warn(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose()}}new s.uy("logLevel",function(e){switch(e){case a.Trace:return"trace";case a.Debug:return"debug";case a.Info:return"info";case a.Warning:return"warn";case a.Error:return"error";case a.Off:return"off"}}(a.Info))},98674:(e,t,i)=>{i.d(t,{H0:()=>o,ZL:()=>n,lT:()=>l});var n,o,s=i(14603),r=i(63580),a=i(72065);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(n||(n={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=(0,r.NC)("sev.error","Error"),t[e.Warning]=(0,r.NC)("sev.warning","Warning"),t[e.Info]=(0,r.NC)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case s.Z.Error:return e.Error;case s.Z.Warning:return e.Warning;case s.Z.Info:return e.Info;case s.Z.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return s.Z.Error;case e.Warning:return s.Z.Warning;case e.Info:return s.Z.Info;case e.Hint:return s.Z.Ignore}}}(n||(n={})),function(e){const t="";function i(e,i){const o=[t];return e.source?o.push(e.source.replace("¦","\\¦")):o.push(t),e.code?"string"==typeof e.code?o.push(e.code.replace("¦","\\¦")):o.push(e.code.value.replace("¦","\\¦")):o.push(t),void 0!==e.severity&&null!==e.severity?o.push(n.toString(e.severity)):o.push(t),e.message&&i?o.push(e.message.replace("¦","\\¦")):o.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?o.push(e.startLineNumber.toString()):o.push(t),void 0!==e.startColumn&&null!==e.startColumn?o.push(e.startColumn.toString()):o.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?o.push(e.endLineNumber.toString()):o.push(t),void 0!==e.endColumn&&null!==e.endColumn?o.push(e.endColumn.toString()):o.push(t),o.push(t),o.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(o||(o={}));const l=(0,a.yh)("markerService")},59422:(e,t,i)=>{i.d(t,{EO:()=>a,lT:()=>r,zb:()=>s});var n=i(14603),o=i(72065),s=n.Z;const r=(0,o.yh)("notificationService");class a{}},50988:(e,t,i)=>{i.d(t,{Gs:()=>a,v4:()=>s,xI:()=>l,xn:()=>r});var n=i(97295),o=i(70666);const s=(0,i(72065).yh)("openerService");function r(e,t){return o.o.isUri(e)?(0,n.qq)(e.scheme,t):(0,n.ok)(e,t+":")}function a(e,...t){return t.some((t=>r(e,t)))}function l(e){let t;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}},90535:(e,t,i)=>{i.d(t,{Ex:()=>s,R9:()=>o,ek:()=>r});var n=i(72065);const o=(0,n.yh)("progressService");Object.freeze({total(){},worked(){},done(){}});class s{constructor(e,t){this.callback=e,this.report=(null==t?void 0:t.async)?this._reportAsync.bind(this):this._reportSync.bind(this)}_reportSync(e){this._value=e,this.callback(this._value)}_reportAsync(e){Promise.resolve(this._lastTask).finally((()=>{this._value=e;const t=this.callback(this._value);this._lastTask=Promise.resolve(t).finally((()=>this._lastTask=void 0))}))}}s.None=Object.freeze({report(){}});const r=(0,n.yh)("editorProgressService")},90725:(e,t,i)=>{i.d(t,{IP:()=>a,Ry:()=>n});var n,o=i(9488),s=i(5976),r=i(89872);!function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(n||(n={}));const a={Quickaccess:"workbench.contributions.quickaccess"};r.B.add(a.Quickaccess,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),(0,s.OF)((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return(0,o.kX)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||this.defaultProvider}})},41157:(e,t,i)=>{i.d(t,{Jq:()=>s,X5:()=>o,eJ:()=>a,jG:()=>r});var n=i(72065);const o={ctrlCmd:!1,alt:!1};var s,r;!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(s||(s={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(r||(r={})),new class{constructor(e){this.options=e}};const a=(0,n.yh)("quickInputService")},89872:(e,t,i)=>{i.d(t,{B:()=>s});var n=i(35146),o=i(98401);const s=new class{constructor(){this.data=new Map}add(e,t){n.ok(o.HD(e)),n.ok(o.Kn(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},26904:(e,t,i)=>{i.d(t,{Uy:()=>m,vm:()=>v,fk:()=>f});var n,o,s=i(4669),r=i(5976),a=i(98401),l=i(15393),d=i(23897),h=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",e[e.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"}(n||(n={})),function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(o||(o={}));class c extends r.JT{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new s.K3),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=o.None,this.cache=new Map,this.flushDelayer=new l.rH(c.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var t,i;this._onDidChangeStorage.pause();try{null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.acceptExternal(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.acceptExternal(e,void 0)))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===o.Closed)return;let i=!1;(0,a.Jp)(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const i=this.cache.get(e);return(0,a.Jp)(i)?t:i}getBoolean(e,t){const i=this.get(e);return(0,a.Jp)(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return(0,a.Jp)(i)?t:parseInt(i,10)}set(e,t,i=!1){return h(this,void 0,void 0,(function*(){if(this.state===o.Closed)return;if((0,a.Jp)(t))return this.delete(e,i);const n=(0,a.Kn)(t)||Array.isArray(t)?(0,d.Pz)(t):String(t);return this.cache.get(e)!==n?(this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()):void 0}))}delete(e,t=!1){return h(this,void 0,void 0,(function*(){if(this.state!==o.Closed)return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return h(this,void 0,void 0,(function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}))}doFlush(e){return h(this,void 0,void 0,(function*(){return this.flushDelayer.trigger((()=>this.flushPending()),e)}))}dispose(){this.flushDelayer.dispose(),super.dispose()}}c.DEFAULT_FLUSH_DELAY=100;class u{constructor(){this.onDidChangeItemsExternal=s.ju.None,this.items=new Map}updateItems(e){var t,i;return h(this,void 0,void 0,(function*(){null===(t=e.insert)||void 0===t||t.forEach(((e,t)=>this.items.set(t,e))),null===(i=e.delete)||void 0===i||i.forEach((e=>this.items.delete(e)))}))}}var g=i(72065);const p="__$__targetStorageMarker",m=(0,g.yh)("storageService");var f;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(f||(f={}));class _ extends r.JT{constructor(e={flushInterval:_.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new s.K3),this._onDidChangeTarget=this._register(new s.K3),this._onWillSaveState=this._register(new s.Q5),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,i){return s.ju.filter(this._onDidChangeValue.event,(i=>i.scope===e&&(void 0===t||i.key===t)),i)}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===p){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n,o=!1){(0,a.Jp)(t)?this.remove(e,i,o):this.withPausedEmitters((()=>{var s;this.updateKeyTarget(e,i,n),null===(s=this.getStorage(i))||void 0===s||s.set(e,t,o)}))}remove(e,t,i=!1){this.withPausedEmitters((()=>{var n;this.updateKeyTarget(e,t,void 0),null===(n=this.getStorage(t))||void 0===n||n.delete(e,i)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){var o,s;const r=this.getKeyTargets(t);"number"==typeof i?r[e]!==i&&(r[e]=i,null===(o=this.getStorage(t))||void 0===o||o.set(p,JSON.stringify(r),n)):"number"==typeof r[e]&&(delete r[e],null===(s=this.getStorage(t))||void 0===s||s.set(p,JSON.stringify(r),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?function(e){const t=e.get(p);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}(t):Object.create(null)}}_.DEFAULT_FLUSH_INTERVAL=6e4;class v extends _{constructor(){super(),this.applicationStorage=this._register(new c(new u,{hint:n.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new c(new u,{hint:n.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new c(new u,{hint:n.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.profileStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e)))),this._register(this.applicationStorage.onDidChangeStorage((e=>this.emitDidChangeValue(-1,e))))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}},10829:(e,t,i)=>{i.d(t,{b:()=>n});const n=(0,i(72065).yh)("telemetryService")},86253:(e,t,i)=>{i.d(t,{BM:()=>p,Hc:()=>d,O2:()=>u,TU:()=>g,ZR:()=>m,b5:()=>a,eO:()=>s,ku:()=>c,pl:()=>l,uX:()=>h,wG:()=>r});var n=i(73910),o=i(41264);const s={keybindingLabelBackground:(0,n.n_1)(n.oQ$),keybindingLabelForeground:(0,n.n_1)(n.lWp),keybindingLabelBorder:(0,n.n_1)(n.AWI),keybindingLabelBottomBorder:(0,n.n_1)(n.K19),keybindingLabelShadow:(0,n.n_1)(n.rh)},r={buttonForeground:(0,n.n_1)(n.j5u),buttonSeparator:(0,n.n_1)(n.iFQ),buttonBackground:(0,n.n_1)(n.b7$),buttonHoverBackground:(0,n.n_1)(n.GO4),buttonSecondaryForeground:(0,n.n_1)(n.qBU),buttonSecondaryBackground:(0,n.n_1)(n.ESD),buttonSecondaryHoverBackground:(0,n.n_1)(n.xEn),buttonBorder:(0,n.n_1)(n.GYc)},a={progressBarBackground:(0,n.n_1)(n.zRJ)},l={inputActiveOptionBorder:(0,n.n_1)(n.PRb),inputActiveOptionForeground:(0,n.n_1)(n.Pvw),inputActiveOptionBackground:(0,n.n_1)(n.XEs)},d=((0,n.n_1)(n.SUp),(0,n.n_1)(n.nd),(0,n.n_1)(n.BQ0),(0,n.n_1)(n.D0T),(0,n.n_1)(n.Hfx),(0,n.n_1)(n.rh),(0,n.n_1)(n.lRK),(0,n.n_1)(n.JpG),(0,n.n_1)(n.BOY),(0,n.n_1)(n.OLZ),(0,n.n_1)(n.url),{inputBackground:(0,n.n_1)(n.sEe),inputForeground:(0,n.n_1)(n.zJb),inputBorder:(0,n.n_1)(n.dt_),inputValidationInfoBorder:(0,n.n_1)(n.EPQ),inputValidationInfoBackground:(0,n.n_1)(n._lC),inputValidationInfoForeground:(0,n.n_1)(n.YI3),inputValidationWarningBorder:(0,n.n_1)(n.C3g),inputValidationWarningBackground:(0,n.n_1)(n.RV_),inputValidationWarningForeground:(0,n.n_1)(n.SUG),inputValidationErrorBorder:(0,n.n_1)(n.OZR),inputValidationErrorBackground:(0,n.n_1)(n.paE),inputValidationErrorForeground:(0,n.n_1)(n._t9)}),h={listFilterWidgetBackground:(0,n.n_1)(n.vGG),listFilterWidgetOutline:(0,n.n_1)(n.oSI),listFilterWidgetNoMatchesOutline:(0,n.n_1)(n.Saq),listFilterWidgetShadow:(0,n.n_1)(n.y65),inputBoxStyles:d,toggleStyles:l},c={badgeBackground:(0,n.n_1)(n.g8u),badgeForeground:(0,n.n_1)(n.qeD),badgeBorder:(0,n.n_1)(n.lRK)},u=((0,n.n_1)(n.ixd),(0,n.n_1)(n.l80),(0,n.n_1)(n.H6q),(0,n.n_1)(n.H6q),(0,n.n_1)(n.fSI),{listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,n.n_1)(n._bK),listFocusForeground:(0,n.n_1)(n._2n),listFocusOutline:(0,n.n_1)(n.Oop),listActiveSelectionBackground:(0,n.n_1)(n.dCr),listActiveSelectionForeground:(0,n.n_1)(n.M6C),listActiveSelectionIconForeground:(0,n.n_1)(n.Tnx),listFocusAndSelectionOutline:(0,n.n_1)(n.Bqu),listFocusAndSelectionBackground:(0,n.n_1)(n.dCr),listFocusAndSelectionForeground:(0,n.n_1)(n.M6C),listInactiveSelectionBackground:(0,n.n_1)(n.rg2),listInactiveSelectionIconForeground:(0,n.n_1)(n.kvU),listInactiveSelectionForeground:(0,n.n_1)(n.ytC),listInactiveFocusBackground:(0,n.n_1)(n.s$),listInactiveFocusOutline:(0,n.n_1)(n.F3d),listHoverBackground:(0,n.n_1)(n.mV1),listHoverForeground:(0,n.n_1)(n.$d5),listDropBackground:(0,n.n_1)(n.AS1),listSelectionOutline:(0,n.n_1)(n.xL1),listHoverOutline:(0,n.n_1)(n.xL1),treeIndentGuidesStroke:(0,n.n_1)(n.UnT),treeInactiveIndentGuidesStroke:(0,n.n_1)(n.KjV),tableColumnsBorder:(0,n.n_1)(n.uxu),tableOddRowsBackgroundColor:(0,n.n_1)(n.EQn)});function g(e){return function(e,t){const i=Object.assign({},t);for(const t in e){const o=e[t];i[t]=void 0!==o?(0,n.n_1)(o):void 0}return i}(e,u)}const p={selectBackground:(0,n.n_1)(n.XV0),selectListBackground:(0,n.n_1)(n.Fgs),selectForeground:(0,n.n_1)(n._g0),decoratorRightForeground:(0,n.n_1)(n.kJk),selectBorder:(0,n.n_1)(n.a9O),focusBorder:(0,n.n_1)(n.R80),listFocusBackground:(0,n.n_1)(n.Vqd),listInactiveSelectionIconForeground:(0,n.n_1)(n.cbQ),listFocusForeground:(0,n.n_1)(n.NPS),listFocusOutline:(0,n.BtC)(n.xL1,o.Il.transparent.toString()),listHoverBackground:(0,n.n_1)(n.mV1),listHoverForeground:(0,n.n_1)(n.$d5),listHoverOutline:(0,n.n_1)(n.xL1),selectListBorder:(0,n.n_1)(n.D1_),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0},m={shadowColor:(0,n.n_1)(n.rh),borderColor:(0,n.n_1)(n.Cdg),foregroundColor:(0,n.n_1)(n.DEr),backgroundColor:(0,n.n_1)(n.Hz8),selectionForegroundColor:(0,n.n_1)(n.jbW),selectionBackgroundColor:(0,n.n_1)(n.$DX),selectionBorderColor:(0,n.n_1)(n.E3h),separatorColor:(0,n.n_1)(n.ZGJ),scrollbarShadow:(0,n.n_1)(n._wn),scrollbarSliderBackground:(0,n.n_1)(n.etL),scrollbarSliderHoverBackground:(0,n.n_1)(n.ABB),scrollbarSliderActiveBackground:(0,n.n_1)(n.ynu)}},73910:(e,t,i)=>{i.d(t,{$DX:()=>Ft,$d5:()=>ut,A42:()=>L,ABB:()=>ie,AS1:()=>gt,AWI:()=>xe,BOY:()=>di,BQ0:()=>Nt,Bqu:()=>it,BtC:()=>u,C3g:()=>P,CNo:()=>Be,Cdg:()=>Rt,CzK:()=>$e,D0T:()=>pe,D1_:()=>fe,DEr:()=>At,Dut:()=>ce,E3h:()=>Bt,EPQ:()=>R,EQn:()=>xt,ES4:()=>Ee,ESD:()=>Q,EiJ:()=>Oe,F3d:()=>ht,F9q:()=>Ye,Fgs:()=>H,Fm_:()=>Xt,GO4:()=>q,GYc:()=>Z,Gj_:()=>oi,Gwp:()=>pt,H6q:()=>Kt,HCL:()=>Ue,Hfx:()=>me,Hz8:()=>Ot,IPX:()=>g,IYc:()=>ii,Ido:()=>_,Itd:()=>ai,Ivo:()=>si,JpG:()=>li,K19:()=>ke,KjV:()=>St,L_t:()=>Je,M6C:()=>ot,MUv:()=>Me,NOs:()=>ge,NPS:()=>It,Ng6:()=>_e,OLZ:()=>hi,OZR:()=>W,Oop:()=>tt,P4M:()=>Ge,P6G:()=>m,P6Y:()=>Qe,PRb:()=>D,PX0:()=>mt,PpC:()=>He,Pvw:()=>I,QO2:()=>h,R80:()=>b,RV_:()=>A,Rzx:()=>Ie,SPM:()=>ei,SUG:()=>O,SUY:()=>ti,SUp:()=>kt,Saq:()=>Ct,T83:()=>he,Tnx:()=>st,UnT:()=>yt,VVv:()=>Ve,Vqd:()=>Mt,XEs:()=>E,XV0:()=>V,XZx:()=>v,YI3:()=>M,ZGJ:()=>Wt,ZnX:()=>gi,_2n:()=>et,_Yy:()=>We,_bK:()=>Xe,_g0:()=>z,_lC:()=>T,_t9:()=>B,_wn:()=>ee,a9O:()=>K,b6y:()=>re,b7$:()=>$,bKB:()=>Ke,c63:()=>de,cbQ:()=>Tt,cvW:()=>ue,dCr:()=>nt,dRz:()=>f,dt_:()=>N,etL:()=>te,fSI:()=>Ut,g8u:()=>J,gkn:()=>Pe,hEj:()=>Ne,hX8:()=>ze,iFQ:()=>j,ixd:()=>zt,j5u:()=>U,jUe:()=>Re,jbW:()=>Pt,kJk:()=>we,kVY:()=>ri,keg:()=>qe,kvU:()=>lt,kwl:()=>pi,l80:()=>Ht,lRK:()=>C,lUq:()=>Vt,lWp:()=>Le,lXJ:()=>se,loF:()=>Ce,mV1:()=>ct,n_1:()=>c,nd:()=>Dt,nyM:()=>Te,oQ$:()=>Se,oSI:()=>bt,opG:()=>ye,ov3:()=>ni,pW3:()=>le,paE:()=>F,phM:()=>je,pnM:()=>Ae,qBU:()=>G,qeD:()=>X,rg2:()=>rt,rh:()=>S,s$:()=>dt,sEe:()=>x,tZ6:()=>be,uoC:()=>ae,url:()=>y,uxu:()=>Lt,vGG:()=>vt,xEn:()=>Y,xL1:()=>w,y65:()=>wt,yJx:()=>Fe,yb5:()=>De,ynu:()=>ne,ypS:()=>Ze,ytC:()=>at,zJb:()=>k,zKr:()=>ve,zRJ:()=>oe});var n=i(15393),o=i(41264),s=i(4669),r=i(35146),a=i(63580),l=i(81294),d=i(89872);function h(e){return`--vscode-${e.replace(/\./g,"-")}`}function c(e){return`var(${h(e)})`}function u(e,t){return`var(${h(e)}, ${t})`}const g={ColorContribution:"base.contributions.colors"},p=new class{constructor(){this._onDidChangeSchema=new s.Q5,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){const s={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=s;const r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults)return fi(i.defaults[t.type],t)}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{const i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function m(e,t,i,n,o){return p.registerColor(e,t,i,n,o)}d.B.add(g.ColorContribution,p);const f=m("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},a.NC("foreground","Overall foreground color. This color is only used if not overridden by a component.")),_=(m("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},a.NC("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),m("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},a.NC("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."))),v=(m("descriptionForeground",{light:"#717171",dark:gi(f,.7),hcDark:gi(f,.7),hcLight:gi(f,.7)},a.NC("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),m("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},a.NC("iconForeground","The default color for icons in the workbench."))),b=m("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},a.NC("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),C=m("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},a.NC("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),w=m("contrastActiveBorder",{light:null,dark:null,hcDark:b,hcLight:b},a.NC("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),y=(m("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},a.NC("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),m("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:o.Il.black,hcLight:"#292929"},a.NC("textSeparatorForeground","Color for text separators.")),m("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},a.NC("textLinkForeground","Foreground color for links in text."))),S=(m("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},a.NC("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),m("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},a.NC("textPreformatForeground","Foreground color for preformatted text segments.")),m("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},a.NC("textBlockQuoteBackground","Background color for block quotes in text.")),m("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:o.Il.white,hcLight:"#292929"},a.NC("textBlockQuoteBorder","Border color for block quotes in text.")),m("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:o.Il.black,hcLight:"#F2F2F2"},a.NC("textCodeBlockBackground","Background color for code blocks in text.")),m("widget.shadow",{dark:gi(o.Il.black,.36),light:gi(o.Il.black,.16),hcDark:null,hcLight:null},a.NC("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),L=m("widget.border",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("widgetBorder","Border color of widgets such as find/replace inside the editor.")),x=m("input.background",{dark:"#3C3C3C",light:o.Il.white,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputBoxBackground","Input box background.")),k=m("input.foreground",{dark:f,light:f,hcDark:f,hcLight:f},a.NC("inputBoxForeground","Input box foreground.")),N=m("input.border",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("inputBoxBorder","Input box border.")),D=m("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:C,hcLight:C},a.NC("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),E=(m("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},a.NC("inputOption.hoverBackground","Background color of activated options in input fields.")),m("inputOption.activeBackground",{dark:gi(b,.4),light:gi(b,.2),hcDark:o.Il.transparent,hcLight:o.Il.transparent},a.NC("inputOption.activeBackground","Background hover color of options in input fields."))),I=m("inputOption.activeForeground",{dark:o.Il.white,light:o.Il.black,hcDark:f,hcLight:f},a.NC("inputOption.activeForeground","Foreground color of activated options in input fields.")),T=(m("input.placeholderForeground",{light:gi(f,.5),dark:gi(f,.5),hcDark:gi(f,.7),hcLight:gi(f,.7)},a.NC("inputPlaceholderForeground","Input box foreground color for placeholder text.")),m("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationInfoBackground","Input validation background color for information severity."))),M=m("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:f},a.NC("inputValidationInfoForeground","Input validation foreground color for information severity.")),R=m("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:C,hcLight:C},a.NC("inputValidationInfoBorder","Input validation border color for information severity.")),A=m("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationWarningBackground","Input validation background color for warning severity.")),O=m("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:f},a.NC("inputValidationWarningForeground","Input validation foreground color for warning severity.")),P=m("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:C,hcLight:C},a.NC("inputValidationWarningBorder","Input validation border color for warning severity.")),F=m("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("inputValidationErrorBackground","Input validation background color for error severity.")),B=m("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:f},a.NC("inputValidationErrorForeground","Input validation foreground color for error severity.")),W=m("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:C,hcLight:C},a.NC("inputValidationErrorBorder","Input validation border color for error severity.")),V=m("dropdown.background",{dark:"#3C3C3C",light:o.Il.white,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("dropdownBackground","Dropdown background.")),H=m("dropdown.listBackground",{dark:null,light:null,hcDark:o.Il.black,hcLight:o.Il.white},a.NC("dropdownListBackground","Dropdown list background.")),z=m("dropdown.foreground",{dark:"#F0F0F0",light:f,hcDark:o.Il.white,hcLight:f},a.NC("dropdownForeground","Dropdown foreground.")),K=m("dropdown.border",{dark:V,light:"#CECECE",hcDark:C,hcLight:C},a.NC("dropdownBorder","Dropdown border.")),U=m("button.foreground",{dark:o.Il.white,light:o.Il.white,hcDark:o.Il.white,hcLight:o.Il.white},a.NC("buttonForeground","Button foreground color.")),j=m("button.separator",{dark:gi(U,.4),light:gi(U,.4),hcDark:gi(U,.4),hcLight:gi(U,.4)},a.NC("buttonSeparator","Button separator color.")),$=m("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},a.NC("buttonBackground","Button background color.")),q=m("button.hoverBackground",{dark:ui($,.2),light:ci($,.2),hcDark:$,hcLight:$},a.NC("buttonHoverBackground","Button background color when hovering.")),Z=m("button.border",{dark:C,light:C,hcDark:C,hcLight:C},a.NC("buttonBorder","Button border color.")),G=m("button.secondaryForeground",{dark:o.Il.white,light:o.Il.white,hcDark:o.Il.white,hcLight:f},a.NC("buttonSecondaryForeground","Secondary button foreground color.")),Q=m("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:o.Il.white},a.NC("buttonSecondaryBackground","Secondary button background color.")),Y=m("button.secondaryHoverBackground",{dark:ui(Q,.2),light:ci(Q,.2),hcDark:null,hcLight:null},a.NC("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),J=m("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:o.Il.black,hcLight:"#0F4A85"},a.NC("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),X=m("badge.foreground",{dark:o.Il.white,light:"#333",hcDark:o.Il.white,hcLight:o.Il.white},a.NC("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),ee=m("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},a.NC("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),te=m("scrollbarSlider.background",{dark:o.Il.fromHex("#797979").transparent(.4),light:o.Il.fromHex("#646464").transparent(.4),hcDark:gi(C,.6),hcLight:gi(C,.4)},a.NC("scrollbarSliderBackground","Scrollbar slider background color.")),ie=m("scrollbarSlider.hoverBackground",{dark:o.Il.fromHex("#646464").transparent(.7),light:o.Il.fromHex("#646464").transparent(.7),hcDark:gi(C,.8),hcLight:gi(C,.8)},a.NC("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),ne=m("scrollbarSlider.activeBackground",{dark:o.Il.fromHex("#BFBFBF").transparent(.4),light:o.Il.fromHex("#000000").transparent(.6),hcDark:C,hcLight:C},a.NC("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),oe=m("progressBar.background",{dark:o.Il.fromHex("#0E70C0"),light:o.Il.fromHex("#0E70C0"),hcDark:C,hcLight:C},a.NC("progressBarBackground","Background color of the progress bar that can show for long running operations.")),se=(m("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},a.NC("editorError.foreground","Foreground color of error squigglies in the editor."))),re=m("editorError.border",{dark:null,light:null,hcDark:o.Il.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},a.NC("errorBorder","If set, color of double underlines for errors in the editor.")),ae=(m("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},a.NC("editorWarning.foreground","Foreground color of warning squigglies in the editor."))),le=m("editorWarning.border",{dark:null,light:null,hcDark:o.Il.fromHex("#FFCC00").transparent(.8),hcLight:o.Il.fromHex("#FFCC00").transparent(.8)},a.NC("warningBorder","If set, color of double underlines for warnings in the editor.")),de=(m("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},a.NC("editorInfo.foreground","Foreground color of info squigglies in the editor."))),he=m("editorInfo.border",{dark:null,light:null,hcDark:o.Il.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},a.NC("infoBorder","If set, color of double underlines for infos in the editor.")),ce=m("editorHint.foreground",{dark:o.Il.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},a.NC("editorHint.foreground","Foreground color of hint squigglies in the editor.")),ue=(m("editorHint.border",{dark:null,light:null,hcDark:o.Il.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},a.NC("hintBorder","If set, color of double underlines for hints in the editor.")),m("sash.hoverBorder",{dark:b,light:b,hcDark:b,hcLight:b},a.NC("sashActiveBorder","Border color of active sashes.")),m("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:o.Il.black,hcLight:o.Il.white},a.NC("editorBackground","Editor background color."))),ge=m("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:o.Il.white,hcLight:f},a.NC("editorForeground","Editor default foreground color.")),pe=(m("editorStickyScroll.background",{light:ue,dark:ue,hcDark:ue,hcLight:ue},a.NC("editorStickyScrollBackground","Sticky scroll background color for the editor")),m("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("editorStickyScrollHoverBackground","Sticky scroll on hover background color for the editor")),m("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:o.Il.white},a.NC("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),me=m("editorWidget.foreground",{dark:f,light:f,hcDark:f,hcLight:f},a.NC("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),fe=m("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:C,hcLight:C},a.NC("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),_e=m("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},a.NC("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),ve=m("quickInput.background",{dark:pe,light:pe,hcDark:pe,hcLight:pe},a.NC("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),be=m("quickInput.foreground",{dark:me,light:me,hcDark:me,hcLight:me},a.NC("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Ce=m("quickInputTitle.background",{dark:new o.Il(new o.VS(255,255,255,.105)),light:new o.Il(new o.VS(0,0,0,.06)),hcDark:"#000000",hcLight:o.Il.white},a.NC("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),we=m("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:o.Il.white,hcLight:"#0F4A85"},a.NC("pickerGroupForeground","Quick picker color for grouping labels.")),ye=m("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:o.Il.white,hcLight:"#0F4A85"},a.NC("pickerGroupBorder","Quick picker color for grouping borders.")),Se=m("keybindingLabel.background",{dark:new o.Il(new o.VS(128,128,128,.17)),light:new o.Il(new o.VS(221,221,221,.4)),hcDark:o.Il.transparent,hcLight:o.Il.transparent},a.NC("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Le=m("keybindingLabel.foreground",{dark:o.Il.fromHex("#CCCCCC"),light:o.Il.fromHex("#555555"),hcDark:o.Il.white,hcLight:f},a.NC("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),xe=m("keybindingLabel.border",{dark:new o.Il(new o.VS(51,51,51,.6)),light:new o.Il(new o.VS(204,204,204,.4)),hcDark:new o.Il(new o.VS(111,195,223)),hcLight:C},a.NC("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),ke=m("keybindingLabel.bottomBorder",{dark:new o.Il(new o.VS(68,68,68,.6)),light:new o.Il(new o.VS(187,187,187,.4)),hcDark:new o.Il(new o.VS(111,195,223)),hcLight:f},a.NC("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),Ne=m("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},a.NC("editorSelectionBackground","Color of the editor selection.")),De=m("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:o.Il.white},a.NC("editorSelectionForeground","Color of the selected text for high contrast.")),Ee=m("editor.inactiveSelectionBackground",{light:gi(Ne,.5),dark:gi(Ne,.5),hcDark:gi(Ne,.7),hcLight:gi(Ne,.5)},a.NC("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Ie=m("editor.selectionHighlightBackground",{light:mi(Ne,ue,.3,.6),dark:mi(Ne,ue,.3,.6),hcDark:null,hcLight:null},a.NC("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),Te=(m("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:w,hcLight:w},a.NC("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),m("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},a.NC("editorFindMatch","Color of the current search match."))),Me=m("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},a.NC("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Re=m("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},a.NC("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Ae=m("editor.findMatchBorder",{light:null,dark:null,hcDark:w,hcLight:w},a.NC("editorFindMatchBorder","Border color of the current search match.")),Oe=m("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:w,hcLight:w},a.NC("findMatchHighlightBorder","Border color of the other search matches.")),Pe=m("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:gi(w,.4),hcLight:gi(w,.4)},a.NC("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Fe=(m("searchEditor.findMatchBackground",{light:gi(Me,.66),dark:gi(Me,.66),hcDark:Me,hcLight:Me},a.NC("searchEditor.queryMatch","Color of the Search Editor query matches.")),m("searchEditor.findMatchBorder",{light:gi(Oe,.66),dark:gi(Oe,.66),hcDark:Oe,hcLight:Oe},a.NC("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches.")),m("search.resultsInfoForeground",{light:f,dark:gi(f,.65),hcDark:f,hcLight:f},a.NC("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),m("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},a.NC("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),m("editorHoverWidget.background",{light:pe,dark:pe,hcDark:pe,hcLight:pe},a.NC("hoverBackground","Background color of the editor hover."))),Be=(m("editorHoverWidget.foreground",{light:me,dark:me,hcDark:me,hcLight:me},a.NC("hoverForeground","Foreground color of the editor hover.")),m("editorHoverWidget.border",{light:fe,dark:fe,hcDark:fe,hcLight:fe},a.NC("hoverBorder","Border color of the editor hover."))),We=(m("editorHoverWidget.statusBarBackground",{dark:ui(Fe,.2),light:ci(Fe,.05),hcDark:pe,hcLight:pe},a.NC("statusBarBackground","Background color of the editor hover status bar.")),m("editorLink.activeForeground",{dark:"#4E94CE",light:o.Il.blue,hcDark:o.Il.cyan,hcLight:"#292929"},a.NC("activeLinkForeground","Color of active links."))),Ve=m("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:o.Il.white,hcLight:o.Il.black},a.NC("editorInlayHintForeground","Foreground color of inline hints")),He=m("editorInlayHint.background",{dark:gi(J,.1),light:gi(J,.1),hcDark:gi(o.Il.white,.1),hcLight:gi(J,.1)},a.NC("editorInlayHintBackground","Background color of inline hints")),ze=m("editorInlayHint.typeForeground",{dark:Ve,light:Ve,hcDark:Ve,hcLight:Ve},a.NC("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),Ke=m("editorInlayHint.typeBackground",{dark:He,light:He,hcDark:He,hcLight:He},a.NC("editorInlayHintBackgroundTypes","Background color of inline hints for types")),Ue=m("editorInlayHint.parameterForeground",{dark:Ve,light:Ve,hcDark:Ve,hcLight:Ve},a.NC("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),je=m("editorInlayHint.parameterBackground",{dark:He,light:He,hcDark:He,hcLight:He},a.NC("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),$e=(m("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},a.NC("editorLightBulbForeground","The color used for the lightbulb actions icon.")),m("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},a.NC("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),new o.Il(new o.VS(155,185,85,.2))),qe=new o.Il(new o.VS(255,0,0,.2)),Ze=m("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},a.NC("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Ge=m("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},a.NC("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Qe=(m("diffEditor.insertedLineBackground",{dark:$e,light:$e,hcDark:null,hcLight:null},a.NC("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditor.removedLineBackground",{dark:qe,light:qe,hcDark:null,hcLight:null},a.NC("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),m("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),m("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),m("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content."))),Ye=m("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),Je=(m("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},a.NC("diffEditorInsertedOutline","Outline color for the text that got inserted.")),m("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},a.NC("diffEditorRemovedOutline","Outline color for text that got removed.")),m("diffEditor.border",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("diffEditorBorder","Border color between the two text editors.")),m("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},a.NC("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views."))),Xe=(m("diffEditor.unchangedRegionBackground",{dark:"#3e3e3e",light:"#e4e4e4",hcDark:null,hcLight:null},a.NC("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedRegionForeground",{dark:"#a3a2a2",light:"#4d4c4c",hcDark:null,hcLight:null},a.NC("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),m("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},a.NC("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),m("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."))),et=m("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tt=m("list.focusOutline",{dark:b,light:b,hcDark:w,hcLight:w},a.NC("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),it=m("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),nt=m("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ot=m("list.activeSelectionForeground",{dark:o.Il.white,light:o.Il.white,hcDark:null,hcLight:null},a.NC("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),st=m("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),rt=m("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),at=m("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),lt=m("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),dt=m("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ht=m("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ct=m("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:o.Il.white.transparent(.1),hcLight:o.Il.fromHex("#0F4A85").transparent(.1)},a.NC("listHoverBackground","List/Tree background when hovering over items using the mouse.")),ut=m("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),gt=m("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},a.NC("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),pt=m("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:b,hcLight:b},a.NC("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),mt=m("list.focusHighlightForeground",{dark:pt,light:(ft=nt,_t=pt,"#BBE7FF",{op:6,if:ft,then:_t,else:"#BBE7FF"}),hcDark:pt,hcLight:pt},a.NC("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));var ft,_t;m("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},a.NC("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),m("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},a.NC("listErrorForeground","Foreground color of list items containing errors.")),m("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},a.NC("listWarningForeground","Foreground color of list items containing warnings."));const vt=m("listFilterWidget.background",{light:ci(pe,0),dark:ui(pe,0),hcDark:pe,hcLight:pe},a.NC("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),bt=m("listFilterWidget.outline",{dark:o.Il.transparent,light:o.Il.transparent,hcDark:"#f38518",hcLight:"#007ACC"},a.NC("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Ct=m("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:C,hcLight:C},a.NC("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),wt=m("listFilterWidget.shadow",{dark:S,light:S,hcDark:S,hcLight:S},a.NC("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),yt=(m("list.filterMatchBackground",{dark:Me,light:Me,hcDark:null,hcLight:null},a.NC("listFilterMatchHighlight","Background color of the filtered match.")),m("list.filterMatchBorder",{dark:Oe,light:Oe,hcDark:C,hcLight:w},a.NC("listFilterMatchHighlightBorder","Border color of the filtered match.")),m("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},a.NC("treeIndentGuidesStroke","Tree stroke color for the indentation guides."))),St=m("tree.inactiveIndentGuidesStroke",{dark:gi(yt,.4),light:gi(yt,.4),hcDark:gi(yt,.4),hcLight:gi(yt,.4)},a.NC("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),Lt=m("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},a.NC("tableColumnsBorder","Table border color between columns.")),xt=m("tree.tableOddRowsBackground",{dark:gi(f,.04),light:gi(f,.04),hcDark:null,hcLight:null},a.NC("tableOddRowsBackgroundColor","Background color for odd table rows.")),kt=(m("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},a.NC("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. ")),m("checkbox.background",{dark:V,light:V,hcDark:V,hcLight:V},a.NC("checkbox.background","Background color of checkbox widget."))),Nt=(m("checkbox.selectBackground",{dark:pe,light:pe,hcDark:pe,hcLight:pe},a.NC("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),m("checkbox.foreground",{dark:z,light:z,hcDark:z,hcLight:z},a.NC("checkbox.foreground","Foreground color of checkbox widget."))),Dt=m("checkbox.border",{dark:K,light:K,hcDark:K,hcLight:K},a.NC("checkbox.border","Border color of checkbox widget.")),Et=(m("checkbox.selectBorder",{dark:v,light:v,hcDark:v,hcLight:v},a.NC("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),m("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,a.NC("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead"))),It=m("quickInputList.focusForeground",{dark:ot,light:ot,hcDark:ot,hcLight:ot},a.NC("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),Tt=m("quickInputList.focusIconForeground",{dark:st,light:st,hcDark:st,hcLight:st},a.NC("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),Mt=m("quickInputList.focusBackground",{dark:pi(Et,nt),light:pi(Et,nt),hcDark:null,hcLight:null},a.NC("quickInput.listFocusBackground","Quick picker background color for the focused item.")),Rt=m("menu.border",{dark:null,light:null,hcDark:C,hcLight:C},a.NC("menuBorder","Border color of menus.")),At=m("menu.foreground",{dark:z,light:z,hcDark:z,hcLight:z},a.NC("menuForeground","Foreground color of menu items.")),Ot=m("menu.background",{dark:V,light:V,hcDark:V,hcLight:V},a.NC("menuBackground","Background color of menu items.")),Pt=m("menu.selectionForeground",{dark:ot,light:ot,hcDark:ot,hcLight:ot},a.NC("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Ft=m("menu.selectionBackground",{dark:nt,light:nt,hcDark:nt,hcLight:nt},a.NC("menuSelectionBackground","Background color of the selected menu item in menus.")),Bt=m("menu.selectionBorder",{dark:null,light:null,hcDark:w,hcLight:w},a.NC("menuSelectionBorder","Border color of the selected menu item in menus.")),Wt=m("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:C,hcLight:C},a.NC("menuSeparatorBackground","Color of a separator menu item in menus.")),Vt=m("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},a.NC("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),Ht=(m("toolbar.hoverOutline",{dark:null,light:null,hcDark:w,hcLight:w},a.NC("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),m("toolbar.activeBackground",{dark:ui(Vt,.1),light:ci(Vt,.1),hcDark:null,hcLight:null},a.NC("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),m("editor.snippetTabstopHighlightBackground",{dark:new o.Il(new o.VS(124,124,124,.3)),light:new o.Il(new o.VS(10,50,100,.2)),hcDark:new o.Il(new o.VS(124,124,124,.3)),hcLight:new o.Il(new o.VS(10,50,100,.2))},a.NC("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),m("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),m("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),m("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Il(new o.VS(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},a.NC("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),m("breadcrumb.foreground",{light:gi(f,.8),dark:gi(f,.8),hcDark:gi(f,.8),hcLight:gi(f,.8)},a.NC("breadcrumbsFocusForeground","Color of focused breadcrumb items."))),zt=m("breadcrumb.background",{light:ue,dark:ue,hcDark:ue,hcLight:ue},a.NC("breadcrumbsBackground","Background color of breadcrumb items.")),Kt=m("breadcrumb.focusForeground",{light:ci(f,.2),dark:ui(f,.1),hcDark:ui(f,.1),hcLight:ui(f,.1)},a.NC("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Ut=m("breadcrumb.activeSelectionForeground",{light:ci(f,.2),dark:ui(f,.1),hcDark:ui(f,.1),hcLight:ui(f,.1)},a.NC("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),jt=(m("breadcrumbPicker.background",{light:pe,dark:pe,hcDark:pe,hcLight:pe},a.NC("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),o.Il.fromHex("#40C8AE").transparent(.5)),$t=o.Il.fromHex("#40A6FF").transparent(.5),qt=o.Il.fromHex("#606060").transparent(.4),Zt=.4,Gt=m("merge.currentHeaderBackground",{dark:jt,light:jt,hcDark:null,hcLight:null},a.NC("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Qt=(m("merge.currentContentBackground",{dark:gi(Gt,Zt),light:gi(Gt,Zt),hcDark:gi(Gt,Zt),hcLight:gi(Gt,Zt)},a.NC("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.incomingHeaderBackground",{dark:$t,light:$t,hcDark:null,hcLight:null},a.NC("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),Yt=(m("merge.incomingContentBackground",{dark:gi(Qt,Zt),light:gi(Qt,Zt),hcDark:gi(Qt,Zt),hcLight:gi(Qt,Zt)},a.NC("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.commonHeaderBackground",{dark:qt,light:qt,hcDark:null,hcLight:null},a.NC("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),Jt=(m("merge.commonContentBackground",{dark:gi(Yt,Zt),light:gi(Yt,Zt),hcDark:gi(Yt,Zt),hcLight:gi(Yt,Zt)},a.NC("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),m("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},a.NC("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),Xt=(m("editorOverviewRuler.currentContentForeground",{dark:gi(Gt,1),light:gi(Gt,1),hcDark:Jt,hcLight:Jt},a.NC("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.incomingContentForeground",{dark:gi(Qt,1),light:gi(Qt,1),hcDark:Jt,hcLight:Jt},a.NC("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.commonContentForeground",{dark:gi(Yt,1),light:gi(Yt,1),hcDark:Jt,hcLight:Jt},a.NC("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),m("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},a.NC("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0)),ei=m("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},a.NC("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),ti=m("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},a.NC("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),ii=m("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},a.NC("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),ni=m("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},a.NC("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),oi=m("minimap.errorHighlight",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hcDark:new o.Il(new o.VS(255,50,50,1)),hcLight:"#B5200D"},a.NC("minimapError","Minimap marker color for errors.")),si=m("minimap.warningHighlight",{dark:ae,light:ae,hcDark:le,hcLight:le},a.NC("overviewRuleWarning","Minimap marker color for warnings.")),ri=m("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},a.NC("minimapBackground","Minimap background color.")),ai=m("minimap.foregroundOpacity",{dark:o.Il.fromHex("#000f"),light:o.Il.fromHex("#000f"),hcDark:o.Il.fromHex("#000f"),hcLight:o.Il.fromHex("#000f")},a.NC("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),li=(m("minimapSlider.background",{light:gi(te,.5),dark:gi(te,.5),hcDark:gi(te,.5),hcLight:gi(te,.5)},a.NC("minimapSliderBackground","Minimap slider background color.")),m("minimapSlider.hoverBackground",{light:gi(ie,.5),dark:gi(ie,.5),hcDark:gi(ie,.5),hcLight:gi(ie,.5)},a.NC("minimapSliderHoverBackground","Minimap slider background color when hovering.")),m("minimapSlider.activeBackground",{light:gi(ne,.5),dark:gi(ne,.5),hcDark:gi(ne,.5),hcLight:gi(ne,.5)},a.NC("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),m("problemsErrorIcon.foreground",{dark:se,light:se,hcDark:se,hcLight:se},a.NC("problemsErrorIconForeground","The color used for the problems error icon."))),di=m("problemsWarningIcon.foreground",{dark:ae,light:ae,hcDark:ae,hcLight:ae},a.NC("problemsWarningIconForeground","The color used for the problems warning icon.")),hi=m("problemsInfoIcon.foreground",{dark:de,light:de,hcDark:de,hcLight:de},a.NC("problemsInfoIconForeground","The color used for the problems info icon."));function ci(e,t){return{op:0,value:e,factor:t}}function ui(e,t){return{op:1,value:e,factor:t}}function gi(e,t){return{op:2,value:e,factor:t}}function pi(...e){return{op:4,values:e}}function mi(e,t,i,n){return{op:5,value:e,background:t,factor:i,transparency:n}}function fi(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?o.Il.fromHex(e):t.getColor(e):e instanceof o.Il?e:"object"==typeof e?function(e,t){var i,n,s,a;switch(e.op){case 0:return null===(i=fi(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=fi(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(s=fi(e.value,t))||void 0===s?void 0:s.transparent(e.factor);case 3:{const i=fi(e.background,t);return i?null===(a=fi(e.value,t))||void 0===a?void 0:a.makeOpaque(i):fi(e.value,t)}case 4:for(const i of e.values){const e=fi(i,t);if(e)return e}return;case 6:return fi(t.defines(e.if)?e.then:e.else,t);case 5:{const i=fi(e.value,t);if(!i)return;const n=fi(e.background,t);return n?i.isDarkerThan(n)?o.Il.getLighterColor(i,n,e.factor).transparent(e.transparency):o.Il.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw(0,r.vE)(e)}}(e,t):void 0}m("charts.foreground",{dark:f,light:f,hcDark:f,hcLight:f},a.NC("chartsForeground","The foreground color used in charts.")),m("charts.lines",{dark:gi(f,.5),light:gi(f,.5),hcDark:gi(f,.5),hcLight:gi(f,.5)},a.NC("chartsLines","The color used for horizontal lines in charts.")),m("charts.red",{dark:se,light:se,hcDark:se,hcLight:se},a.NC("chartsRed","The red color used in chart visualizations.")),m("charts.blue",{dark:de,light:de,hcDark:de,hcLight:de},a.NC("chartsBlue","The blue color used in chart visualizations.")),m("charts.yellow",{dark:ae,light:ae,hcDark:ae,hcLight:ae},a.NC("chartsYellow","The yellow color used in chart visualizations.")),m("charts.orange",{dark:ti,light:ti,hcDark:ti,hcLight:ti},a.NC("chartsOrange","The orange color used in chart visualizations.")),m("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},a.NC("chartsGreen","The green color used in chart visualizations.")),m("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},a.NC("chartsPurple","The purple color used in chart visualizations."));const _i="vscode://schemas/workbench-colors",vi=d.B.as(l.I.JSONContribution);vi.registerSchema(_i,p.getColorSchema());const bi=new n.pY((()=>vi.notifySchemaChanged(_i)),200);p.onDidChangeSchema((()=>{bi.isScheduled()||bi.schedule()}))},59554:(e,t,i)=>{i.d(t,{Ks:()=>f,q5:()=>m,s_:()=>C});var n,o,s=i(15393),r=i(73046),a=i(25670),l=i(4669),d=i(98401),h=i(70666),c=i(63580),u=i(81294),g=i(89872);!function(e){e.getDefinition=function(e,t){let i=e.defaults;for(;a.k.isThemeIcon(i);){const e=p.getIcon(i.id);if(!e)return;i=e.defaults}return i}}(n||(n={})),function(e){e.toJSONObject=function(e){return{weight:e.weight,style:e.style,src:e.src.map((e=>({format:e.format,location:e.location.toString()})))}},e.fromJSONObject=function(e){const t=e=>(0,d.HD)(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every((e=>(0,d.HD)(e.format)&&(0,d.HD)(e.location))))return{weight:t(e.weight),style:t(e.style),src:e.src.map((e=>({format:e.format,location:h.o.parse(e.location)})))}}}(o||(o={}));const p=new class{constructor(){this._onDidChange=new l.Q5,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,c.NC)("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,c.NC)("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${a.k.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}const s={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=s;const r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;a.k.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const o of n.filter((e=>!!e.description)).sort(e))i.push(`|<i class="${t(o)}"></i>|${o.id}|${a.k.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter((e=>!a.k.isThemeIcon(e.defaults))).sort(e))i.push(`|<i class="${t(o)}"></i>|${o.id}|`);return i.join("\n")}};function m(e,t,i,n){return p.registerIcon(e,t,i,n)}function f(){return p}g.B.add("base.contributions.icons",p),function(){const e=(0,r.u)();for(const t in e){const i="\\"+e[t].toString(16);p.registerIcon(t,{fontCharacter:i})}}();const _="vscode://schemas/icons",v=g.B.as(u.I.JSONContribution);v.registerSchema(_,p.getIconSchema());const b=new s.pY((()=>v.notifySchemaChanged(_)),200);p.onDidChange((()=>{b.isScheduled()||b.schedule()}));const C=m("widget-close",r.l.close,(0,c.NC)("widgetClose","Icon for the close action in widgets."));m("goto-previous-location",r.l.arrowUp,(0,c.NC)("previousChangeIcon","Icon for goto previous editor location.")),m("goto-next-location",r.l.arrowDown,(0,c.NC)("nextChangeIcon","Icon for goto next editor location.")),a.k.modify(r.l.sync,"spin"),a.k.modify(r.l.loading,"spin")},92321:(e,t,i)=>{var n;function o(e){return e===n.HIGH_CONTRAST_DARK||e===n.HIGH_CONTRAST_LIGHT}function s(e){return e===n.DARK||e===n.HIGH_CONTRAST_DARK}i.d(t,{_T:()=>s,c3:()=>o,eL:()=>n}),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST_DARK="hcDark",e.HIGH_CONTRAST_LIGHT="hcLight"}(n||(n={}))},97781:(e,t,i)=>{i.d(t,{EN:()=>d,IP:()=>c,Ic:()=>g,XE:()=>l,bB:()=>p,m6:()=>h});var n=i(4669),o=i(5976),s=i(72065),r=i(89872),a=i(92321);const l=(0,s.yh)("themeService");function d(e){return{id:e}}function h(e){switch(e){case a.eL.DARK:return"vs-dark";case a.eL.HIGH_CONTRAST_DARK:return"hc-black";case a.eL.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const c={ThemingContribution:"base.contributions.theming"},u=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new n.Q5}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,o.OF)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function g(e){return u.onColorThemeChange(e)}r.B.add(c.ThemingContribution,u);class p extends o.JT{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},64862:(e,t,i)=>{i.d(t,{Xt:()=>s,YO:()=>o,gJ:()=>r,tJ:()=>n});const n=(0,i(72065).yh)("undoRedoService");class o{constructor(e,t){this.resource=e,this.elements=t}}class s{constructor(){this.id=s._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}s._ID=0,s.None=new s;class r{constructor(){this.id=r._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}r._ID=0,r.None=new r},40382:(e,t,i)=>{i.d(t,{A6:()=>g,c$:()=>l,eb:()=>a,ec:()=>r,md:()=>u,p$:()=>p,uT:()=>c,x:()=>m});var n=i(63580),o=i(88721),s=(i(4767),i(70666));const r=(0,i(72065).yh)("contextService");function a(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&s.o.isUri(t.uri)}function l(e){return"string"==typeof(null==e?void 0:e.id)&&!a(e)&&!function(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&s.o.isUri(t.configPath)}(e)}const d={id:"ext-dev"},h={id:"empty-window"};function c(e,t){if("string"==typeof e||void 0===e)return"string"==typeof e?{id:(0,o.EZ)(e)}:t?d:h;const i=e;return i.configuration?{id:i.id,configPath:i.configuration}:1===i.folders.length?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}class u{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const g="code-workspace",p=((0,n.NC)("codeWorkspace","Code Workspace"),"4064f6ec-cb38-4ad0-af64-ee6467e63c82");function m(e){return e.id===p}},33425:(e,t,i)=>{i.d(t,{Y:()=>n});const n=(0,i(72065).yh)("workspaceTrustManagementService")},36362:(e,t,i)=>{var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(18072),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals},71512:(e,t,i)=>{var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(1425),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals},75408:(e,t,i)=>{var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(32757),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals},30340:(e,t,i)=>{var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(96266),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals},33164:(e,t,i)=>{var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(27703),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals},39587:(e,t,i)=>{var n=i(93379),o=i.n(n),s=i(7795),r=i.n(s),a=i(90569),l=i.n(a),d=i(3565),h=i.n(d),c=i(19216),u=i.n(c),g=i(44589),p=i.n(g),m=i(22313),f={};f.styleTagTransform=p(),f.setAttributes=h(),f.insert=l().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),o()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals},25080:(e,t,i)=>{e.exports=i.p+"2f0552c881ce212d4d29.ttf"},67485:(e,t,i)=>{e.exports=i.p+"e053fabf5e3a25640d55.ttf"}}]);